[Orxonox-commit 7380] r11997 - code/branches/RacingBots_FS18/src/modules/gametypes
andera at orxonox.net
andera at orxonox.net
Thu May 24 15:56:47 CEST 2018
Author: andera
Date: 2018-05-24 15:56:47 +0200 (Thu, 24 May 2018)
New Revision: 11997
Modified:
code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRace.cc
Log:
Modified: code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRace.cc
===================================================================
--- code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRace.cc 2018-05-24 13:54:42 UTC (rev 11996)
+++ code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRace.cc 2018-05-24 13:56:47 UTC (rev 11997)
@@ -192,11 +192,10 @@
std::string message;
if (this->bTimeIsUp_)
{
- message = multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) + " seconds !!\n"
- + "You loose!";
+ message = "TIME IS UP! YOU LOOSE!";
}
else if(this->bLost){
- message = multi_cast<std::string>(s)+"You could not reach the last checkpoint before your opponents. YOU LOOSE!";
+ message = "YOU LOOSE!";
}
@@ -223,11 +222,7 @@
int s = this->clock_.getSeconds();
int ms = this->clock_.getMilliseconds() % 1000;
- if(checkpoint->getCheckpointIndex()==18){
- const std::string& message = player->getName() + "reached the last checkpoint after "
- + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) + " seconds and WON THE GAME.";
- }
std::string message(player->getName() + " reached the checkpoint " + multi_cast<std::string>(checkpoint->getCheckpointIndex() + 1)
+ " after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) + " seconds.");
@@ -248,12 +243,14 @@
this->getGametypeInfo()->sendAnnounceMessage(message);
ChatManager::message(message);
+
+
+ for (Engine* engine : ObjectList<Engine>())
+ engine->setActive(true);
+
std::string message2("Press W for forward acceleration, press W+space for boost!");
this->getGametypeInfo()->sendAnnounceMessage(message2);
ChatManager::message(message2);
-
- for (Engine* engine : ObjectList<Engine>())
- engine->setActive(true);
}
void SpaceRace::playerEntered(PlayerInfo* player)
More information about the Orxonox-commit
mailing list