Changeset 8858 for code/trunk/src/modules/gametypes
- Timestamp:
- Aug 23, 2011, 12:45:53 AM (13 years ago)
- Location:
- code/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:ignore
-
old new 1 1 build 2 2 codeblocks 3 vs 3 4 dependencies
-
- Property svn:mergeinfo changed
/code/branches/output (added) merged: 8739-8740,8765,8771-8772,8774-8780,8787-8789,8794-8799,8801,8803-8812,8814,8816-8817,8820,8822,8825-8837,8840,8844,8846,8848-8850,8853-8854
- Property svn:ignore
-
code/trunk/src/modules/gametypes/RaceCheckPoint.cc
r8767 r8858 29 29 #include "RaceCheckPoint.h" 30 30 31 #include "util/Convert.h" 31 32 #include "core/CoreIncludes.h" 32 33 #include "core/XMLPort.h" 33 #include " util/Convert.h"34 #include "chat/ChatManager.h" 34 35 35 36 #include "SpaceRace.h" … … 110 111 { 111 112 const std::string& message = "You have " + multi_cast<std::string>(this->bTimeLimit_) 112 + " seconds to reach the check point " + multi_cast<std::string>(this->bCheckpointIndex_+1) + "\n"; 113 COUT(3) << message; 113 + " seconds to reach the check point " + multi_cast<std::string>(this->bCheckpointIndex_+1); 114 114 const_cast<GametypeInfo*>(gametype->getGametypeInfo())->sendAnnounceMessage(message); 115 ChatManager::message(message); 115 116 } 116 117 } -
code/trunk/src/modules/gametypes/SpaceRace.cc
r8767 r8858 30 30 31 31 #include "core/CoreIncludes.h" 32 #include " network/Host.h"32 #include "chat/ChatManager.h" 33 33 #include "util/Convert.h" 34 34 #include "util/Math.h" … … 54 54 this->clock_.capture(); 55 55 int s = this->clock_.getSeconds(); 56 int ms = this->clock_.getMilliseconds()-1000*s;56 int ms = static_cast<int>(this->clock_.getMilliseconds()-1000*s); 57 57 const std::string& message = multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) + " seconds !!\n" 58 58 + "You didn't reach the check point " + multi_cast<std::string>(this->checkpointsReached_+1) 59 59 + " before the time limit. You lose!"; 60 COUT(3) << message;61 60 const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message); 61 ChatManager::message(message); 62 62 } 63 63 else … … 65 65 this->clock_.capture(); 66 66 int s = this->clock_.getSeconds(); 67 int ms = this->clock_.getMilliseconds()-1000*s;67 int ms = static_cast<int>(this->clock_.getMilliseconds()-1000*s); 68 68 const std::string& message = "You win!! You have reached the last check point after "+ multi_cast<std::string>(s) 69 69 + "." + multi_cast<std::string>(ms) + " seconds."; 70 COUT(3) << message << std::endl;71 70 const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message); 71 ChatManager::message(message); 72 /* 72 73 float time = this->clock_.getSecondsPrecise(); 73 74 this->scores_.insert(time); 74 75 std::set<float>::iterator it; 75 76 for (it=this->scores_.begin(); it!=this->scores_.end(); it++) 76 COUT(3) << multi_cast<std::string>(*it) << std::endl; 77 orxout(level::message) << multi_cast<std::string>(*it) << endl; 78 */ 77 79 } 78 80 } … … 83 85 84 86 std::string message("The match has started! Reach the check points as quickly as possible!"); 85 COUT(3) << message << std::endl;86 87 const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message); 88 ChatManager::message(message); 87 89 } 88 90 … … 92 94 this->clock_.capture(); 93 95 int s = this->clock_.getSeconds(); 94 int ms = this->clock_.getMilliseconds()-1000*s;96 int ms = static_cast<int>(this->clock_.getMilliseconds()-1000*s); 95 97 const std::string& message = "Checkpoint " + multi_cast<std::string>(this->getCheckpointsReached()) 96 98 + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) 97 + " seconds.\n"; 98 COUT(3) << message; 99 + " seconds."; 99 100 const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message); 101 ChatManager::message(message); 100 102 } 101 103
Note: See TracChangeset
for help on using the changeset viewer.