[Orxonox-commit 5314] r9977 - in code/trunk: data/gui/scripts src/orxonox/gametypes
jo at orxonox.net
jo at orxonox.net
Sat Jan 4 21:42:47 CET 2014
Author: jo
Date: 2014-01-04 21:42:47 +0100 (Sat, 04 Jan 2014)
New Revision: 9977
Modified:
code/trunk/data/gui/scripts/MiscConfigMenu.lua
code/trunk/src/orxonox/gametypes/Gametype.cc
code/trunk/src/orxonox/gametypes/Gametype.h
Log:
So far so good. Unfortunately I did not figure out what is wrong with the timer.
Modified: code/trunk/data/gui/scripts/MiscConfigMenu.lua
===================================================================
--- code/trunk/data/gui/scripts/MiscConfigMenu.lua 2014-01-04 20:06:17 UTC (rev 9976)
+++ code/trunk/data/gui/scripts/MiscConfigMenu.lua 2014-01-04 20:42:47 UTC (rev 9977)
@@ -29,7 +29,7 @@
table.insert(P.commandList, "LevelManager defaultLevelName_")
table.insert(P.commandList, "Gametype initialStartCountdown_")
table.insert(P.commandList, "Gametype bAutoStart_")
- --table.insert(P.commandList, "Gametype bAutoEnd_")
+ table.insert(P.commandList, "Gametype bAutoEnd_")
table.insert(P.commandList, "Gametype numberOfBots_")
table.insert(P.commandList, "UnderAttack gameTime_")
table.insert(P.commandList, "TeamDeathmatch teams_")
@@ -54,7 +54,7 @@
table.insert(P.nameList, "Default level")
table.insert(P.nameList, "Start countdown")
table.insert(P.nameList, "Autostart")
- --table.insert(P.nameList, "Autoend")
+ table.insert(P.nameList, "Autoend")
table.insert(P.nameList, "Number of Bots")
table.insert(P.nameList, "UnderAttack: game time")
table.insert(P.nameList, "TeamDeathmatch: Number of teams")
Modified: code/trunk/src/orxonox/gametypes/Gametype.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/Gametype.cc 2014-01-04 20:06:17 UTC (rev 9976)
+++ code/trunk/src/orxonox/gametypes/Gametype.cc 2014-01-04 20:42:47 UTC (rev 9977)
@@ -34,7 +34,7 @@
#include "core/config/ConfigValueIncludes.h"
#include "core/GameMode.h"
#include "core/command/ConsoleCommand.h"
-//#include "gamestates/GSLevel.h"
+#include "gamestates/GSLevel.h"
#include "infos/PlayerInfo.h"
#include "infos/Bot.h"
@@ -61,7 +61,7 @@
this->bAutoStart_ = false;
this->bForceSpawn_ = false;
- //this->bAutoEnd_ = true;
+ this->bAutoEnd_ = true;
this->numberOfBots_ = 0;
this->timeLimit_ = 0;
@@ -105,7 +105,7 @@
SetConfigValue(initialStartCountdown_, 3.0f);
SetConfigValue(bAutoStart_, false);
SetConfigValue(bForceSpawn_, false);
- //SetConfigValue(bAutoEnd_, true);
+ SetConfigValue(bAutoEnd_, true);
SetConfigValue(numberOfBots_, 0);
SetConfigValue(scoreboardTemplate_, "defaultScoreboard");
}
@@ -153,8 +153,11 @@
void Gametype::end()
{
this->gtinfo_->end();
- //if (this->bAutoEnd_)
- // this->showMenuTimer_.setTimer(2.5f, true, createExecutor(createFunctor(&Gametype::showMenu, this)));
+ if (this->bAutoEnd_)
+ {
+ GSLevel::startMainMenu();
+ //this->showMenuTimer_.setTimer(2.5f, true, createExecutor(createFunctor(&Gametype::showMenu, this)));
+ }
for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
{
@@ -518,8 +521,8 @@
this->time_ = t;
}
- //void Gametype::showMenu()
- //{
- // GSLevel::startMainMenu();
- //}
+ void Gametype::showMenu()
+ {
+ GSLevel::startMainMenu();
+ }
}
Modified: code/trunk/src/orxonox/gametypes/Gametype.h
===================================================================
--- code/trunk/src/orxonox/gametypes/Gametype.h 2014-01-04 20:06:17 UTC (rev 9976)
+++ code/trunk/src/orxonox/gametypes/Gametype.h 2014-01-04 20:42:47 UTC (rev 9977)
@@ -158,7 +158,7 @@
*/
inline unsigned int getNumberOfPlayers() const
{ return this->players_.size(); }
- //void showMenu();
+ void showMenu();
protected:
@@ -175,7 +175,7 @@
bool bAutoStart_;
bool bForceSpawn_;
- //bool bAutoEnd_;
+ bool bAutoEnd_;
float time_;
float timeLimit_;
More information about the Orxonox-commit
mailing list