[Orxonox-commit 6645] r11283 - in code/branches/SpaceRace_HS16/src: modules/gametypes orxonox/infos
bberabi at orxonox.net
bberabi at orxonox.net
Mon Nov 14 14:34:29 CET 2016
Author: bberabi
Date: 2016-11-14 14:34:29 +0100 (Mon, 14 Nov 2016)
New Revision: 11283
Modified:
code/branches/SpaceRace_HS16/src/modules/gametypes/SpaceRace.cc
code/branches/SpaceRace_HS16/src/orxonox/infos/Bot.cc
code/branches/SpaceRace_HS16/src/orxonox/infos/GametypeInfo.h
Log:
asdas
Modified: code/branches/SpaceRace_HS16/src/modules/gametypes/SpaceRace.cc
===================================================================
--- code/branches/SpaceRace_HS16/src/modules/gametypes/SpaceRace.cc 2016-11-14 13:14:59 UTC (rev 11282)
+++ code/branches/SpaceRace_HS16/src/modules/gametypes/SpaceRace.cc 2016-11-14 13:34:29 UTC (rev 11283)
@@ -78,7 +78,6 @@
void SpaceRace::start()
{
Gametype::start();
-
if (true)
{
this->spawnPlayersIfRequested();
@@ -137,7 +136,7 @@
- // spawns the players when the countdown starts, but deactivates their engines
+ /* // spawns the players when the countdown starts, but deactivates their engines
if (this->isStartCountdownRunning() && !this->cantMove_)
{
this->spawnPlayersIfRequested();
@@ -148,31 +147,16 @@
}
-gtInfo_->setStartCountdown(10.0);
+gtinfo_->setStartCountdown(50.0);
- /*this->spawnPlayersIfRequested();
- this->cantMove_ = true;
- for (Engine* engine : ObjectList<Engine>()){
- engine->setActive(false);
- }
-
-
- std::string message("BE FAST BE FIRST");
- this->getGametypeInfo()->sendAnnounceMessage(message);
- ChatManager::message(message);
-Timer* countdownTimer = new Timer();
- countdownTimer->setTimer(11, false, createExecutor(createFunctor(&SpaceRace::countdownFinished, this)));*/
-
-
-
// activate the engines when the countdown ends
if (!this->isStartCountdownRunning() && this->cantMove_)
{
@@ -186,7 +170,7 @@
std::string message = "RACE STARTED!";
this->getGametypeInfo()->sendAnnounceMessage(message);
ChatManager::message(message);
- }
+ }*/
}
@@ -198,10 +182,13 @@
int s = this->clock_.getSeconds();
int ms = this->clock_.getMilliseconds() % 1000;
- const std::string& message = "Checkpoint " + multi_cast<std::string>(checkpoint->getCheckpointIndex() + 1)
- + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) + " seconds.";
- this->getGametypeInfo()->sendAnnounceMessage(message);
+
+
+ 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.";
+ this->getGametypeInfo()->sendAnnounceMessage(message);
ChatManager::message(message);
+
}
void SpaceRace::countdownFinished()
@@ -214,6 +201,8 @@
for (Engine* engine : ObjectList<Engine>())
engine->setActive(true);
+
+
}
Modified: code/branches/SpaceRace_HS16/src/orxonox/infos/Bot.cc
===================================================================
--- code/branches/SpaceRace_HS16/src/orxonox/infos/Bot.cc 2016-11-14 13:14:59 UTC (rev 11282)
+++ code/branches/SpaceRace_HS16/src/orxonox/infos/Bot.cc 2016-11-14 13:34:29 UTC (rev 11283)
@@ -67,6 +67,8 @@
{
static const std::string names[] =
{
+ "Berkay Berabi",
+ "Louis Meile"
"Dr. Julius No",
"Rosa Klebb",
"Auric Goldfinger",
Modified: code/branches/SpaceRace_HS16/src/orxonox/infos/GametypeInfo.h
===================================================================
--- code/branches/SpaceRace_HS16/src/orxonox/infos/GametypeInfo.h 2016-11-14 13:14:59 UTC (rev 11282)
+++ code/branches/SpaceRace_HS16/src/orxonox/infos/GametypeInfo.h 2016-11-14 13:34:29 UTC (rev 11283)
@@ -132,11 +132,12 @@
void dispatchDeathMessage(const std::string& message) const;
void dispatchStaticMessage(const std::string& message,const ColourValue& colour) const;
void dispatchFadingMessage(const std::string& message) const;
+ void setStartCountdown(float countdown); // Set the start countdown to the input value.
+
protected:
void start(void); // Inform the GametypeInfo that the game has started.
void end(void); // Inform the GametypeInfo that the game has ended.
- void setStartCountdown(float countdown); // Set the start countdown to the input value.
void countdownStartCountdown(float countDown); // Count down the start countdown by the specified value.
void countDown(); // Count down the start countdown counter.
void startStartCountdown(void); // Inform the GametypeInfo about the start of the start countdown.
More information about the Orxonox-commit
mailing list