Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 4, 2011, 12:45:06 AM (13 years ago)
Author:
landauf
Message:

Chat works again
Removed console output for almost all gameplay messages (use chat/notifications instead)
Deathmatch level now actually uses Deathmatch gametype

Location:
code/branches/output/src/modules
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/output/src/modules/gametypes/RaceCheckPoint.cc

    r8811 r8822  
    2929#include "RaceCheckPoint.h"
    3030
     31#include "util/Convert.h"
    3132#include "core/CoreIncludes.h"
    3233#include "core/XMLPort.h"
     34#include "network/Host.h"
    3335#include "SpaceRace.h"
    34 #include "util/Convert.h"
    3536
    3637namespace orxonox
    3738{
    3839    CreateFactory(RaceCheckPoint);
    39    
     40
    4041    RaceCheckPoint::RaceCheckPoint(BaseObject* creator): DistanceTrigger(creator), RadarViewable(creator, static_cast<WorldEntity*>(this))
    4142    {
     
    5051        this->setRadarVisibility(false);
    5152    }
    52    
     53
    5354    RaceCheckPoint::~RaceCheckPoint()
    5455    {
    5556    }
    56    
     57
    5758    void RaceCheckPoint::tick(float dt)
    5859    {
     
    6667    }
    6768
    68    
     69
    6970    void RaceCheckPoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    7071    {
     
    7576        XMLPortParam(RaceCheckPoint, "timelimit", setTimelimit, getTimeLimit, xmlelement, mode).defaultValues(0);
    7677    }
    77    
     78
    7879    void RaceCheckPoint::triggered(bool bIsTriggered)
    7980    {
     
    99100        }
    100101    }
    101    
     102
    102103    void RaceCheckPoint::setTimelimit(float timeLimit)
    103104    {
     
    110111                const std::string& message =  "You have " + multi_cast<std::string>(this->bTimeLimit_)
    111112                            + " seconds to reach the check point " + multi_cast<std::string>(this->bCheckpointIndex_+1);
    112                 orxout(level::message) << message << endl;
    113113                const_cast<GametypeInfo*>(gametype->getGametypeInfo())->sendAnnounceMessage(message);
     114                Host::Broadcast(message);
    114115            }
    115116        }
    116117    }
    117    
     118
    118119}
  • code/branches/output/src/modules/gametypes/SpaceRace.cc

    r8811 r8822  
    3838{
    3939    CreateUnloadableFactory(SpaceRace);
    40    
     40
    4141    SpaceRace::SpaceRace(BaseObject* creator) : Gametype(creator)
    4242    {
     
    4646        this->numberOfBots_ = 0;
    4747    }
    48    
     48
    4949    void SpaceRace::end()
    5050    {
    5151        this->Gametype::end();
    52          
     52
    5353        if (this->bTimeIsUp_)
    5454        {
     
    5959                        + "You didn't reach the check point " + multi_cast<std::string>(this->bCheckpointsReached_+1)
    6060                        + " before the time limit. You lose!";
    61             orxout(level::message) << message << endl;
    6261            const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
    6362            Host::Broadcast(message);
     
    7069            const std::string& message = "You win!! You have reached the last check point after "+ multi_cast<std::string>(s)
    7170                        + "." + multi_cast<std::string>(ms) + " seconds.";
    72             orxout(level::message) << message << endl;
    7371            const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
    7472            Host::Broadcast(message);
     73/*
    7574            float time = this->clock_.getSecondsPrecise();
    7675            this->scores_.insert(time);
    7776            std::set<float>::iterator it;
    7877            for (it=this->scores_.begin(); it!=this->scores_.end(); it++)
    79             orxout(level::message) << multi_cast<std::string>(*it) << endl;
     78                orxout(level::message) << multi_cast<std::string>(*it) << endl;
     79*/
    8080        }
    8181    }
     
    8686
    8787        std::string message("The match has started! Reach the check points as quickly as possible!");
    88         orxout(level::message) << message << endl;
    8988        Host::Broadcast(message);
    9089    }
    91    
     90
    9291    void SpaceRace::newCheckpointReached()
    9392    {
     
    9998                        + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms)
    10099                        + " seconds.";
    101         orxout(level::message) << message << endl;
    102100        const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
    103101        Host::Broadcast(message);
  • code/branches/output/src/modules/overlays/hud/ChatOverlay.cc

    r8811 r8822  
    8787
    8888        this->messages_.push_back(multi_cast<Ogre::DisplayString>(text));
    89         orxout(level::message) << "Chat: " << text << endl;
    9089
    9190        Timer* timer = new Timer();
Note: See TracChangeset for help on using the changeset viewer.