Changeset 8858 for code/trunk/src/orxonox/gametypes/LastManStanding.cc
- Timestamp:
- Aug 23, 2011, 12:45:53 AM (13 years ago)
- Location:
- code/trunk
- Files:
-
- 2 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/orxonox/gametypes/LastManStanding.cc
r8327 r8858 30 30 31 31 #include "core/CoreIncludes.h" 32 #include " network/Host.h"32 #include "chat/ChatManager.h" 33 33 #include "infos/PlayerInfo.h" 34 34 #include "worldentities/pawns/Pawn.h" … … 90 90 const std::string& message = ""; // resets Camper-Warning-message 91 91 this->gtinfo_->sendFadingMessage(message,it->first->getClientID()); 92 } 92 } 93 93 } 94 94 return true; … … 105 105 this->playersAlive--; 106 106 const std::string& message = victim->getPlayer()->getName() + " has lost all lives"; 107 COUT(0) << message << std::endl; 108 Host::Broadcast(message); 107 ChatManager::message(message); 109 108 } 110 109 … … 128 127 { 129 128 Gametype::end(); 130 129 131 130 for (std::map<PlayerInfo*, int>::iterator it = this->playerLives_.begin(); it != this->playerLives_.end(); ++it) 132 131 { … … 148 147 return 0; 149 148 } 150 149 151 150 int LastManStanding::getNumPlayersAlive() const 152 151 { … … 190 189 this->timeToAct_[player]=timeRemaining+3.0f+respawnDelay;//reset timer 191 190 this->playerDelayTime_[player]=respawnDelay; 192 191 193 192 std::map<PlayerInfo*, Player>::iterator it = this->players_.find(player); 194 193 if (it != this->players_.end()) … … 198 197 const std::string& message = ""; // resets Camper-Warning-message 199 198 this->gtinfo_->sendFadingMessage(message,it->first->getClientID()); 200 } 199 } 201 200 } 202 201 … … 239 238 } 240 239 for (std::map<PlayerInfo*, float>::iterator it = this->timeToAct_.begin(); it != this->timeToAct_.end(); ++it) 241 { 240 { 242 241 if (playerGetLives(it->first)<=0)//Players without lives shouldn't be affected by time. 243 continue; 242 continue; 244 243 it->second-=dt;//Decreases punishment time. 245 if (!inGame_[it->first])//Manages respawn delay - player is forced to respawn after the delaytime is used up. 244 if (!inGame_[it->first])//Manages respawn delay - player is forced to respawn after the delaytime is used up. 246 245 { 247 246 playerDelayTime_[it->first]-=dt;
Note: See TracChangeset
for help on using the changeset viewer.