[Orxonox-commit 7373] r11989 - code/branches/RacingBots_FS18/src/modules/gametypes
andera at orxonox.net
andera at orxonox.net
Thu May 24 15:20:53 CEST 2018
Author: andera
Date: 2018-05-24 15:20:52 +0200 (Thu, 24 May 2018)
New Revision: 11989
Modified:
code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRace.cc
Log:
new headlines at the beginning of the game
Modified: code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRace.cc
===================================================================
--- code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRace.cc 2018-05-24 13:05:14 UTC (rev 11988)
+++ code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRace.cc 2018-05-24 13:20:52 UTC (rev 11989)
@@ -223,7 +223,11 @@
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.");
@@ -233,22 +237,21 @@
+ "after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) + " seconds.";
this->getGametypeInfo()->sendAnnounceMessage(message);
ChatManager::message(message);*/
- if(checkpoint->getCheckpointIndex()==19){
- const 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 and WON THE GAME.";
+
- }
-
}
void SpaceRace::countdownFinished()//activates the engines of all players
{
- std::string message("RACE STARTED ");
+ std::string message("RACE STARTED");
this->getGametypeInfo()->sendAnnounceMessage(message);
ChatManager::message(message);
+
+ 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);
}
More information about the Orxonox-commit
mailing list