Changeset 9969 for code/trunk
- Timestamp:
- Jan 4, 2014, 2:14:06 PM (11 years ago)
- Location:
- code/trunk/src/orxonox/gametypes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/gametypes/Gametype.cc
r9939 r9969 35 35 #include "core/GameMode.h" 36 36 #include "core/command/ConsoleCommand.h" 37 #include "gamestates/GSLevel.h" 37 38 38 39 #include "infos/PlayerInfo.h" … … 61 62 this->bAutoStart_ = false; 62 63 this->bForceSpawn_ = false; 64 this->bAutoEnd_ = true; 63 65 this->numberOfBots_ = 0; 64 66 … … 104 106 SetConfigValue(bAutoStart_, false); 105 107 SetConfigValue(bForceSpawn_, false); 108 SetConfigValue(bAutoEnd_, true); 106 109 SetConfigValue(numberOfBots_, 0); 107 110 SetConfigValue(scoreboardTemplate_, "defaultScoreboard"); … … 144 147 { 145 148 this->addBots(this->numberOfBots_); 146 147 149 this->gtinfo_->start(); 148 149 150 this->spawnPlayersIfRequested(); 150 151 } … … 153 154 { 154 155 this->gtinfo_->end(); 156 if (this->bAutoEnd_) 157 this->showMenuTimer_.setTimer(2.5f, true, createExecutor(createFunctor(&Gametype::showMenu, this))); 155 158 156 159 for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it) … … 515 518 this->time_ = t; 516 519 } 520 521 void Gametype::showMenu() 522 { 523 GSLevel::startMainMenu(); 524 } 517 525 } -
code/trunk/src/orxonox/gametypes/Gametype.h
r9667 r9969 40 40 #include "tools/interfaces/Tickable.h" 41 41 #include "infos/GametypeInfo.h" 42 #include "tools/Timer.h" 42 43 43 44 namespace orxonox … … 158 159 inline unsigned int getNumberOfPlayers() const 159 160 { return this->players_.size(); } 160 161 void showMenu(); 161 162 162 163 … … 175 176 bool bAutoStart_; 176 177 bool bForceSpawn_; 178 bool bAutoEnd_; 177 179 178 180 float time_; … … 197 199 ConsoleCommand* dedicatedKillBots_; 198 200 /* HACK HACK HACK */ 199 201 Timer showMenuTimer_; 200 202 }; 201 203 }
Note: See TracChangeset
for help on using the changeset viewer.