[Orxonox-commit 5139] r9804 - code/trunk/src/modules/gametypes

jo at orxonox.net jo at orxonox.net
Thu Nov 21 23:44:16 CET 2013


Author: jo
Date: 2013-11-21 23:44:16 +0100 (Thu, 21 Nov 2013)
New Revision: 9804

Modified:
   code/trunk/src/modules/gametypes/SpaceRace.cc
Log:
Cleaning up the spacerace output.

Modified: code/trunk/src/modules/gametypes/SpaceRace.cc
===================================================================
--- code/trunk/src/modules/gametypes/SpaceRace.cc	2013-11-21 22:20:31 UTC (rev 9803)
+++ code/trunk/src/modules/gametypes/SpaceRace.cc	2013-11-21 22:44:16 UTC (rev 9804)
@@ -54,8 +54,6 @@
 
     void SpaceRace::end()
     {
-        this->Gametype::end();
-
         this->clock_.capture();
         int s = this->clock_.getSeconds();
         int ms = static_cast<int>(this->clock_.getMilliseconds() - 1000*s);
@@ -71,9 +69,12 @@
             message = "You win!! You have reached the last check point after "+ multi_cast<std::string>(s)
                         + "." + multi_cast<std::string>(ms) + " seconds.";
         }
-
-        this->getGametypeInfo()->sendAnnounceMessage(message);
-        ChatManager::message(message);
+        if (!this->hasEnded())
+        {
+            this->getGametypeInfo()->sendAnnounceMessage(message);
+            ChatManager::message(message);
+        }
+        this->Gametype::end();
     }
 
     void SpaceRace::tick(float dt)




More information about the Orxonox-commit mailing list