Changeset 8822 for code/branches/output/src/orxonox
- Timestamp:
- Aug 4, 2011, 12:45:06 AM (13 years ago)
- Location:
- code/branches/output/src/orxonox/gametypes
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/output/src/orxonox/gametypes/Asteroids.cc
r8809 r8822 74 74 75 75 std::string message("The match has started! Reach the first chekpoint within 15 seconds! But be aware, there may be pirates around..."); 76 orxout(level::message) << message << endl;77 76 Host::Broadcast(message); 78 77 … … 84 83 85 84 std::string message("The match has ended."); 86 orxout(level::message) << message << endl;87 85 Host::Broadcast(message); 88 86 } -
code/branches/output/src/orxonox/gametypes/Deathmatch.cc
r8809 r8822 48 48 49 49 std::string message("The match has started!"); 50 orxout(level::message) << message << endl;51 50 Host::Broadcast(message); 52 51 } … … 57 56 58 57 std::string message("The match has ended."); 59 orxout(level::message) << message << endl;60 58 Host::Broadcast(message); 61 59 } … … 66 64 67 65 const std::string& message = player->getName() + " entered the game"; 68 orxout(level::message) << message << endl;69 66 Host::Broadcast(message); 70 67 } … … 77 74 { 78 75 const std::string& message = player->getName() + " left the game"; 79 orxout(level::message) << message << endl;80 76 Host::Broadcast(message); 81 77 } … … 91 87 { 92 88 const std::string& message = player->getOldName() + " changed name to " + player->getName(); 93 orxout(level::message) << message << endl;94 89 Host::Broadcast(message); 95 90 } … … 113 108 message = victim->getPlayer()->getName() + " died"; 114 109 115 orxout(level::message) << message << endl;116 110 Host::Broadcast(message); 117 111 } … … 127 121 { 128 122 const std::string& message = player->getName() + " scores!"; 129 orxout(level::message) << message << endl;130 123 Host::Broadcast(message); 131 124 } -
code/branches/output/src/orxonox/gametypes/Dynamicmatch.cc
r8809 r8822 343 343 Gametype::playerEntered(player); 344 344 const std::string& message = player->getName() + " entered the game"; 345 orxout(level::message) << message << endl;346 345 Host::Broadcast(message); 347 346 } … … 359 358 } 360 359 const std::string& message = player->getName() + " left the game"; 361 orxout(level::message) << message << endl;362 360 Host::Broadcast(message); 363 361 //remove player from map … … 617 615 { 618 616 const std::string& message = player->getOldName() + " changed name to " + player->getName(); 619 orxout(level::message) << message << endl;620 617 Host::Broadcast(message); 621 618 } … … 630 627 { 631 628 std::string message("Dynamicmatch started!"); 632 orxout(level::message) << message << endl;633 629 Host::Broadcast(message); 634 630 } … … 647 643 { 648 644 std::string message("Earn points:\n\n\n\tIf you're red: Chase the blue player!\n\n\tIf you're blue shoot at a red player or hide.\n\n\tIf you're green: You've got the licence to kill red players!"); 649 orxout(level::message) << message << endl;650 645 Host::Broadcast(message); 651 646 callInstructions_.setTimer(10, false, createExecutor(createFunctor(&Dynamicmatch::furtherInstructions, this))); … … 655 650 { 656 651 std::string message("After 3 Minutes the game is over."); 657 orxout(level::message) << message << endl;658 652 Host::Broadcast(message); 659 653 }*/ … … 663 657 664 658 std::string message("Time out. Press F2 to see the points you scored."); 665 orxout(level::message) << message << endl;666 659 Host::Broadcast(message); 667 660 } -
code/branches/output/src/orxonox/gametypes/LastManStanding.cc
r8809 r8822 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 orxout(level::message) << message << endl;108 107 Host::Broadcast(message); 109 108 } … … 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; -
code/branches/output/src/orxonox/gametypes/LastTeamStanding.cc
r8809 r8822 119 119 this->teamsAlive--; 120 120 const std::string& message = victim->getPlayer()->getName() + " has lost all lives"; 121 orxout(level::message) << message << endl;122 121 Host::Broadcast(message); 123 122 } -
code/branches/output/src/orxonox/gametypes/UnderAttack.cc
r8809 r8822 70 70 this->end(); //end gametype 71 71 std::string message("Ship destroyed! Team 0 has won!"); 72 orxout(level::message) << message << endl;73 72 Host::Broadcast(message); 74 73 this->gameEnded_ = true; … … 153 152 this->end(); 154 153 std::string message("Time is up! Team 1 has won!"); 155 orxout(level::message) << message << endl;156 154 Host::Broadcast(message); 157 155 … … 173 171 const std::string& message = multi_cast<std::string>(timesequence_) + " seconds left!"; 174 172 /* 175 orxout(level::message) << message << endl;176 173 Host::Broadcast(message); 177 174 */
Note: See TracChangeset
for help on using the changeset viewer.