Changeset 9348 for code/trunk/src/orxonox/infos
- Timestamp:
- Aug 30, 2012, 11:08:17 PM (12 years ago)
- Location:
- code/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:ignore
-
old new 1 .project 1 2 build 2 3 codeblocks 4 dependencies 3 5 vs 4 dependencies
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
code/trunk/src/orxonox/infos/GametypeInfo.cc
r9016 r9348 68 68 { 69 69 RegisterObject(GametypeInfo); 70 70 71 71 this->bStarted_ = false; 72 72 this->bEnded_ = false; … … 165 165 if(this->bStarted_) 166 166 { return;} 167 167 168 168 this->bStarted_ = true; 169 169 this->changedStarted(); 170 171 170 171 172 172 } 173 173 … … 195 195 if(this->startCountdown_ == countdown || countdown < 0.0f) 196 196 return; 197 197 198 198 this->startCountdown_ = countdown; 199 199 // Set the counter to the ceiling of the current countdown. … … 225 225 if(this->counter_ == 0) 226 226 return; 227 227 228 228 this->counter_--; 229 229 this->changedCountdownCounter(); … … 325 325 if(this->spawned_ == spawned) 326 326 return; 327 327 328 328 this->spawned_ = spawned; 329 329 // Clear the notifications if the Player has spawned. … … 395 395 // TODO: Replace with notifications. 396 396 397 void GametypeInfo::sendAnnounceMessage(const std::string& message) 397 void GametypeInfo::sendAnnounceMessage(const std::string& message) const 398 398 { 399 399 if (GameMode::isMaster()) … … 404 404 } 405 405 406 void GametypeInfo::sendAnnounceMessage(const std::string& message, unsigned int clientID) 406 void GametypeInfo::sendAnnounceMessage(const std::string& message, unsigned int clientID) const 407 407 { 408 408 if (GameMode::isMaster()) … … 415 415 } 416 416 417 void GametypeInfo::sendKillMessage(const std::string& message, unsigned int clientID) 417 void GametypeInfo::sendKillMessage(const std::string& message, unsigned int clientID) const 418 418 { 419 419 if (GameMode::isMaster()) … … 426 426 } 427 427 428 void GametypeInfo::sendDeathMessage(const std::string& message, unsigned int clientID) 428 void GametypeInfo::sendDeathMessage(const std::string& message, unsigned int clientID) const 429 429 { 430 430 if (GameMode::isMaster()) … … 437 437 } 438 438 439 void GametypeInfo::sendStaticMessage(const std::string& message, unsigned int clientID, const ColourValue& colour) 439 void GametypeInfo::sendStaticMessage(const std::string& message, unsigned int clientID, const ColourValue& colour) const 440 440 { 441 441 if (GameMode::isMaster()) … … 448 448 } 449 449 450 void GametypeInfo::sendFadingMessage(const std::string& message, unsigned int clientID) 450 void GametypeInfo::sendFadingMessage(const std::string& message, unsigned int clientID) const 451 451 { 452 452 if (GameMode::isMaster()) … … 459 459 } 460 460 461 void GametypeInfo::dispatchAnnounceMessage(const std::string& message) 461 void GametypeInfo::dispatchAnnounceMessage(const std::string& message) const 462 462 { 463 463 for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it) … … 465 465 } 466 466 467 void GametypeInfo::dispatchKillMessage(const std::string& message) 467 void GametypeInfo::dispatchKillMessage(const std::string& message) const 468 468 { 469 469 for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it) … … 471 471 } 472 472 473 void GametypeInfo::dispatchDeathMessage(const std::string& message) 473 void GametypeInfo::dispatchDeathMessage(const std::string& message) const 474 474 { 475 475 for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it) … … 477 477 } 478 478 479 void GametypeInfo::dispatchStaticMessage(const std::string& message, const ColourValue& colour) 479 void GametypeInfo::dispatchStaticMessage(const std::string& message, const ColourValue& colour) const 480 480 { 481 481 for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it) … … 483 483 } 484 484 485 void GametypeInfo::dispatchFadingMessage(const std::string& message) 485 void GametypeInfo::dispatchFadingMessage(const std::string& message) const 486 486 { 487 487 for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it) -
code/trunk/src/orxonox/infos/GametypeInfo.h
r9016 r9348 68 68 { return this->bStarted_; } 69 69 void changedStarted(void); // Is called when the game has changed to started. 70 70 71 71 /** 72 72 @brief Get whether the game has ended yet. … … 108 108 { return this->readyToSpawn_; } 109 109 void changedReadyToSpawn(bool ready); // Inform the GametypeInfo that the local player has changed its spawned status. 110 110 111 111 /** 112 112 @brief Get whether the local player is spawned. … … 119 119 inline const std::string& getHUDTemplate() const 120 120 { return this->hudtemplate_; } 121 122 inline unsigned int getNumberOfPlayers() const123 { return this->spawnedPlayers_.size(); }124 121 125 void sendAnnounceMessage(const std::string& message) ;126 void sendAnnounceMessage(const std::string& message, unsigned int clientID) ;127 void sendKillMessage(const std::string& message, unsigned int clientID) ;128 void sendDeathMessage(const std::string& message, unsigned int clientID) ;129 void sendStaticMessage(const std::string& message, unsigned int clientID, const ColourValue& colour) ;130 void sendFadingMessage(const std::string& message, unsigned int clientID) ;122 void sendAnnounceMessage(const std::string& message) const; 123 void sendAnnounceMessage(const std::string& message, unsigned int clientID) const; 124 void sendKillMessage(const std::string& message, unsigned int clientID) const; 125 void sendDeathMessage(const std::string& message, unsigned int clientID) const; 126 void sendStaticMessage(const std::string& message, unsigned int clientID, const ColourValue& colour) const; 127 void sendFadingMessage(const std::string& message, unsigned int clientID) const; 131 128 132 void dispatchAnnounceMessage(const std::string& message) ;133 void dispatchKillMessage(const std::string& message) ;134 void dispatchDeathMessage(const std::string& message) ;135 void dispatchStaticMessage(const std::string& message,const ColourValue& colour) ;136 void dispatchFadingMessage(const std::string& message) ;137 129 void dispatchAnnounceMessage(const std::string& message) const; 130 void dispatchKillMessage(const std::string& message) const; 131 void dispatchDeathMessage(const std::string& message) const; 132 void dispatchStaticMessage(const std::string& message,const ColourValue& colour) const; 133 void dispatchFadingMessage(const std::string& message) const; 134 138 135 protected: 139 136 void start(void); // Inform the GametypeInfo that the game has started. … … 165 162 unsigned int counter_; //!< The current integer value of the start countdown, the start countdown counter. 166 163 std::string hudtemplate_; 167 164 168 165 std::set<PlayerInfo*> spawnedPlayers_; //!< A set of players that are currently spawned. 169 166 bool spawned_; //!< Whether the local Player is currently spawned. -
code/trunk/src/orxonox/infos/PlayerInfo.cc
r9257 r9348 173 173 this->changedControllableEntity(); 174 174 175 175 RadarViewable* radarviewable = orxonox_cast<RadarViewable*>(entity); 176 176 if (radarviewable != NULL) 177 177 radarviewable->setRadarName(this->getName());
Note: See TracChangeset
for help on using the changeset viewer.