Changeset 10349 for code/branches/core7/src/orxonox/gametypes/Gametype.cc
- Timestamp:
- Apr 6, 2015, 10:18:25 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/orxonox/gametypes/Gametype.cc
r10348 r10349 49 49 namespace orxonox 50 50 { 51 static const std::string __CC_addBots_name = "addBots"; 52 static const std::string __CC_killBots_name = "killBots"; 53 54 SetConsoleCommand("Gametype", __CC_addBots_name, &Gametype::addBots ).addShortcut().defaultValues(1); 55 SetConsoleCommand("Gametype", __CC_killBots_name, &Gametype::killBots).addShortcut().defaultValues(0); 56 51 57 RegisterUnloadableClass(Gametype); 52 58 … … 84 90 this->scoreboard_ = 0; 85 91 86 /* HACK HACK HACK */ 87 this->dedicatedAddBots_ = new ConsoleCommand( "dedicatedAddBots", createExecutor( createFunctor(&Gametype::addBots, this) ) ); 88 this->dedicatedKillBots_ = new ConsoleCommand( "dedicatedKillBots", createExecutor( createFunctor(&Gametype::killBots, this) ) ); 89 /* HACK HACK HACK */ 92 ModifyConsoleCommand(__CC_addBots_name).setObject(this); 93 ModifyConsoleCommand(__CC_killBots_name).setObject(this); 90 94 } 91 95 … … 95 99 { 96 100 this->gtinfo_->destroy(); 97 if( this->dedicatedAddBots_ ) 98 delete this->dedicatedAddBots_; 99 if( this->dedicatedKillBots_ ) 100 delete this->dedicatedKillBots_; 101 102 ModifyConsoleCommand(__CC_addBots_name).setObject(NULL); 103 ModifyConsoleCommand(__CC_killBots_name).setObject(NULL); 101 104 } 102 105 }
Note: See TracChangeset
for help on using the changeset viewer.