Changeset 8858 for code/trunk/src/orxonox/gametypes
- Timestamp:
- Aug 23, 2011, 12:45:53 AM (13 years ago)
- Location:
- code/trunk
- Files:
-
- 9 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/Asteroids.cc
r7655 r8858 30 30 31 31 #include "core/CoreIncludes.h" 32 #include " network/Host.h"32 #include "chat/ChatManager.h" 33 33 #include "worldentities/pawns/Pawn.h" 34 34 … … 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 COUT(0) << message << std::endl; 77 Host::Broadcast(message); 76 ChatManager::message(message); 78 77 79 78 } … … 84 83 85 84 std::string message("The match has ended."); 86 COUT(0) << message << std::endl; 87 Host::Broadcast(message); 85 ChatManager::message(message); 88 86 } 89 87 } -
code/trunk/src/orxonox/gametypes/Deathmatch.cc
r6417 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" … … 48 48 49 49 std::string message("The match has started!"); 50 COUT(0) << message << std::endl; 51 Host::Broadcast(message); 50 ChatManager::message(message); 52 51 } 53 52 … … 57 56 58 57 std::string message("The match has ended."); 59 COUT(0) << message << std::endl; 60 Host::Broadcast(message); 58 ChatManager::message(message); 61 59 } 62 60 … … 66 64 67 65 const std::string& message = player->getName() + " entered the game"; 68 COUT(0) << message << std::endl; 69 Host::Broadcast(message); 66 ChatManager::message(message); 70 67 } 71 68 … … 77 74 { 78 75 const std::string& message = player->getName() + " left the game"; 79 COUT(0) << message << std::endl; 80 Host::Broadcast(message); 76 ChatManager::message(message); 81 77 } 82 78 … … 91 87 { 92 88 const std::string& message = player->getOldName() + " changed name to " + player->getName(); 93 COUT(0) << message << std::endl; 94 Host::Broadcast(message); 89 ChatManager::message(message); 95 90 } 96 91 … … 113 108 message = victim->getPlayer()->getName() + " died"; 114 109 115 COUT(0) << message << std::endl; 116 Host::Broadcast(message); 110 ChatManager::message(message); 117 111 } 118 112 … … 127 121 { 128 122 const std::string& message = player->getName() + " scores!"; 129 COUT(0) << message << std::endl; 130 Host::Broadcast(message); 123 ChatManager::message(message); 131 124 } 132 125 } -
code/trunk/src/orxonox/gametypes/Dynamicmatch.cc
r8729 r8858 49 49 #include "core/CoreIncludes.h" 50 50 #include "core/command/Executor.h" 51 #include " network/Host.h"51 #include "chat/ChatManager.h" 52 52 #include "infos/PlayerInfo.h" 53 53 #include "worldentities/pawns/Pawn.h" … … 342 342 numberOf[chaser]++; 343 343 Gametype::playerEntered(player); 344 const std::string& message6 = player->getName() + " entered the game"; 345 COUT(0) << message6 << std::endl; 346 Host::Broadcast(message6); 344 const std::string& message = player->getName() + " entered the game"; 345 ChatManager::message(message); 347 346 } 348 347 … … 359 358 } 360 359 const std::string& message = player->getName() + " left the game"; 361 COUT(0) << message << std::endl; 362 Host::Broadcast(message); 360 ChatManager::message(message); 363 361 //remove player from map 364 362 playerParty_.erase (player); … … 617 615 { 618 616 const std::string& message = player->getOldName() + " changed name to " + player->getName(); 619 COUT(0) << message << std::endl; 620 Host::Broadcast(message); 617 ChatManager::message(message); 621 618 } 622 619 … … 630 627 { 631 628 std::string message("Dynamicmatch started!"); 632 COUT(0) << message << std::endl; 633 Host::Broadcast(message); 629 ChatManager::message(message); 634 630 } 635 631 else if(tutorial) // Announce selectionphase … … 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 COUT(0) << message << std::endl; 650 Host::Broadcast(message); 645 ChatManager::message(message); 651 646 callInstructions_.setTimer(10, false, createExecutor(createFunctor(&Dynamicmatch::furtherInstructions, this))); 652 647 } … … 655 650 { 656 651 std::string message("After 3 Minutes the game is over."); 657 COUT(0) << message << std::endl; 658 Host::Broadcast(message); 652 ChatManager::message(message); 659 653 }*/ 660 654 void Dynamicmatch::end() … … 663 657 664 658 std::string message("Time out. Press F2 to see the points you scored."); 665 COUT(0) << message << std::endl; 666 Host::Broadcast(message); 659 ChatManager::message(message); 667 660 } 668 661 SpawnPoint* Dynamicmatch::getBestSpawnPoint(PlayerInfo* player) const -
code/trunk/src/orxonox/gametypes/Gametype.cc
r8706 r8858 297 297 } 298 298 else 299 COUT(2) << "Warning: Killed Pawn was not in the playerlist" << std::endl;299 orxout(internal_warning) << "Killed Pawn was not in the playerlist" << endl; 300 300 } 301 301 } … … 344 344 } 345 345 346 COUT(2) << "Warning: Fallback SpawnPoint was used,because there were no active SpawnPoints." << endl;346 orxout(internal_warning) << "Fallback SpawnPoint was used because there were no active SpawnPoints." << endl; 347 347 return fallbackSpawnPoint; 348 348 } … … 444 444 else 445 445 { 446 COUT(1) << "Error: No SpawnPoints in current Gametype" << std::endl;446 orxout(user_error) << "No SpawnPoints in current Gametype" << endl; 447 447 abort(); 448 448 } … … 461 461 else 462 462 { 463 COUT(1) << "Error: No SpawnPoints in current Gametype" << std::endl;463 orxout(user_error) << "No SpawnPoints in current Gametype" << endl; 464 464 abort(); 465 465 } -
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; -
code/trunk/src/orxonox/gametypes/LastTeamStanding.cc
r8706 r8858 30 30 31 31 #include "core/CoreIncludes.h" 32 #include "network/NetworkPrereqs.h" 33 #include "network/Host.h" 32 #include "chat/ChatManager.h" 34 33 #include "infos/PlayerInfo.h" 35 34 #include "worldentities/pawns/Pawn.h" … … 119 118 this->teamsAlive--; 120 119 const std::string& message = victim->getPlayer()->getName() + " has lost all lives"; 121 COUT(0) << message << std::endl; 122 Host::Broadcast(message); 120 ChatManager::message(message); 123 121 } 124 122 return allow; -
code/trunk/src/orxonox/gametypes/TeamBaseMatch.cc
r8327 r8858 141 141 return; 142 142 143 COUT(0) << "Points standing:" << std::endl << "Team 1: "<< pointsTeam1_ << std::endl << "Team 2: " << pointsTeam2_ << std::endl;144 if(pointsTeam1_ >=1700 && pointsTeam1_ < 2000) COUT(0) << "Team 1 is near victory!" << std::endl;145 if(pointsTeam2_ >=1700 && pointsTeam2_ < 2000) COUT(0) << "Team 2 is near victory!" << std::endl;143 orxout(message) << "Points standing:" << '\n' << "Team 1: "<< pointsTeam1_ << '\n' << "Team 2: " << pointsTeam2_ << endl; 144 if(pointsTeam1_ >=1700 && pointsTeam1_ < 2000) orxout(message) << "Team 1 is near victory!" << endl; 145 if(pointsTeam2_ >=1700 && pointsTeam2_ < 2000) orxout(message) << "Team 2 is near victory!" << endl; 146 146 } 147 147 … … 179 179 if (this->pointsTeam1_ > this->pointsTeam2_) 180 180 { 181 COUT(0) << "Team 1 has won the match" << std::endl;181 orxout(message) << "Team 1 has won the match" << endl; 182 182 winningteam = 0; 183 183 } 184 184 else 185 185 { 186 COUT(0) << "Team 2 has won the match" << std::endl;186 orxout(message) << "Team 2 has won the match" << endl; 187 187 winningteam = 1; 188 188 } -
code/trunk/src/orxonox/gametypes/UnderAttack.cc
r8327 r8858 32 32 #include "core/CoreIncludes.h" 33 33 #include "core/ConfigValueIncludes.h" 34 #include " network/Host.h"34 #include "chat/ChatManager.h" 35 35 #include "worldentities/pawns/Destroyer.h" 36 36 #include "infos/PlayerInfo.h" … … 70 70 this->end(); //end gametype 71 71 std::string message("Ship destroyed! Team 0 has won!"); 72 COUT(0) << message << std::endl; 73 Host::Broadcast(message); 72 ChatManager::message(message); 74 73 this->gameEnded_ = true; 75 74 … … 153 152 this->end(); 154 153 std::string message("Time is up! Team 1 has won!"); 155 COUT(0) << message << std::endl; 156 Host::Broadcast(message); 154 ChatManager::message(message); 157 155 158 156 for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it) … … 173 171 const std::string& message = multi_cast<std::string>(timesequence_) + " seconds left!"; 174 172 /* 175 COUT(0) << message << std::endl; 176 Host::Broadcast(message); 173 ChatManager::message(message); 177 174 */ 178 175 this->gtinfo_->sendAnnounceMessage(message);
Note: See TracChangeset
for help on using the changeset viewer.