Changeset 8822 for code/branches/output/src/modules
- Timestamp:
- Aug 4, 2011, 12:45:06 AM (13 years ago)
- Location:
- code/branches/output/src/modules
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/output/src/modules/gametypes/RaceCheckPoint.cc
r8811 r8822 29 29 #include "RaceCheckPoint.h" 30 30 31 #include "util/Convert.h" 31 32 #include "core/CoreIncludes.h" 32 33 #include "core/XMLPort.h" 34 #include "network/Host.h" 33 35 #include "SpaceRace.h" 34 #include "util/Convert.h"35 36 36 37 namespace orxonox 37 38 { 38 39 CreateFactory(RaceCheckPoint); 39 40 40 41 RaceCheckPoint::RaceCheckPoint(BaseObject* creator): DistanceTrigger(creator), RadarViewable(creator, static_cast<WorldEntity*>(this)) 41 42 { … … 50 51 this->setRadarVisibility(false); 51 52 } 52 53 53 54 RaceCheckPoint::~RaceCheckPoint() 54 55 { 55 56 } 56 57 57 58 void RaceCheckPoint::tick(float dt) 58 59 { … … 66 67 } 67 68 68 69 69 70 void RaceCheckPoint::XMLPort(Element& xmlelement, XMLPort::Mode mode) 70 71 { … … 75 76 XMLPortParam(RaceCheckPoint, "timelimit", setTimelimit, getTimeLimit, xmlelement, mode).defaultValues(0); 76 77 } 77 78 78 79 void RaceCheckPoint::triggered(bool bIsTriggered) 79 80 { … … 99 100 } 100 101 } 101 102 102 103 void RaceCheckPoint::setTimelimit(float timeLimit) 103 104 { … … 110 111 const std::string& message = "You have " + multi_cast<std::string>(this->bTimeLimit_) 111 112 + " seconds to reach the check point " + multi_cast<std::string>(this->bCheckpointIndex_+1); 112 orxout(level::message) << message << endl;113 113 const_cast<GametypeInfo*>(gametype->getGametypeInfo())->sendAnnounceMessage(message); 114 Host::Broadcast(message); 114 115 } 115 116 } 116 117 } 117 118 118 119 } -
code/branches/output/src/modules/gametypes/SpaceRace.cc
r8811 r8822 38 38 { 39 39 CreateUnloadableFactory(SpaceRace); 40 40 41 41 SpaceRace::SpaceRace(BaseObject* creator) : Gametype(creator) 42 42 { … … 46 46 this->numberOfBots_ = 0; 47 47 } 48 48 49 49 void SpaceRace::end() 50 50 { 51 51 this->Gametype::end(); 52 52 53 53 if (this->bTimeIsUp_) 54 54 { … … 59 59 + "You didn't reach the check point " + multi_cast<std::string>(this->bCheckpointsReached_+1) 60 60 + " before the time limit. You lose!"; 61 orxout(level::message) << message << endl;62 61 const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message); 63 62 Host::Broadcast(message); … … 70 69 const std::string& message = "You win!! You have reached the last check point after "+ multi_cast<std::string>(s) 71 70 + "." + multi_cast<std::string>(ms) + " seconds."; 72 orxout(level::message) << message << endl;73 71 const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message); 74 72 Host::Broadcast(message); 73 /* 75 74 float time = this->clock_.getSecondsPrecise(); 76 75 this->scores_.insert(time); 77 76 std::set<float>::iterator it; 78 77 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 */ 80 80 } 81 81 } … … 86 86 87 87 std::string message("The match has started! Reach the check points as quickly as possible!"); 88 orxout(level::message) << message << endl;89 88 Host::Broadcast(message); 90 89 } 91 90 92 91 void SpaceRace::newCheckpointReached() 93 92 { … … 99 98 + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) 100 99 + " seconds."; 101 orxout(level::message) << message << endl;102 100 const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message); 103 101 Host::Broadcast(message); -
code/branches/output/src/modules/overlays/hud/ChatOverlay.cc
r8811 r8822 87 87 88 88 this->messages_.push_back(multi_cast<Ogre::DisplayString>(text)); 89 orxout(level::message) << "Chat: " << text << endl;90 89 91 90 Timer* timer = new Timer();
Note: See TracChangeset
for help on using the changeset viewer.