[Orxonox-commit 5317] r9980 - code/trunk/src/orxonox/gametypes

jo at orxonox.net jo at orxonox.net
Sat Jan 4 23:20:26 CET 2014


Author: jo
Date: 2014-01-04 23:20:26 +0100 (Sat, 04 Jan 2014)
New Revision: 9980

Modified:
   code/trunk/src/orxonox/gametypes/Gametype.cc
   code/trunk/src/orxonox/gametypes/Gametype.h
Log:
Adding delay timer to show the main menu after a game ended automatically.

Modified: code/trunk/src/orxonox/gametypes/Gametype.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/Gametype.cc	2014-01-04 20:53:50 UTC (rev 9979)
+++ code/trunk/src/orxonox/gametypes/Gametype.cc	2014-01-04 22:20:26 UTC (rev 9980)
@@ -154,9 +154,8 @@
     {
         this->gtinfo_->end();
         if (this->bAutoEnd_)
-	{
-            GSLevel::startMainMenu();
-            //this->showMenuTimer_.setTimer(2.5f, true, createExecutor(createFunctor(&Gametype::showMenu, this)));
+        {
+            this->showMenuTimer_.setTimer(3.0f, true, createExecutor(createFunctor(&Gametype::showMenu, this)));
         }
 
         for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)

Modified: code/trunk/src/orxonox/gametypes/Gametype.h
===================================================================
--- code/trunk/src/orxonox/gametypes/Gametype.h	2014-01-04 20:53:50 UTC (rev 9979)
+++ code/trunk/src/orxonox/gametypes/Gametype.h	2014-01-04 22:20:26 UTC (rev 9980)
@@ -39,7 +39,7 @@
 #include "core/class/SubclassIdentifier.h"
 #include "tools/interfaces/Tickable.h"
 #include "infos/GametypeInfo.h"
-//#include "tools/Timer.h"
+#include "tools/Timer.h"
 
 namespace orxonox
 {
@@ -198,7 +198,7 @@
             ConsoleCommand* dedicatedAddBots_;
             ConsoleCommand* dedicatedKillBots_;
             /* HACK HACK HACK */
-            //Timer showMenuTimer_;
+            Timer showMenuTimer_;
     };
 }
 




More information about the Orxonox-commit mailing list