Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 31, 2010, 3:37:40 AM (14 years ago)
Author:
landauf
Message:

merged consolecommands3 branch back to trunk.

note: the console command interface has changed completely, but the documentation is not yet up to date. just copy an existing command and change it to your needs, it's pretty self-explanatory. also the include files related to console commands are now located in core/command/. in the game it should work exactly like before, except for some changes in the auto-completion.

Location:
code/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/gametypes/Dynamicmatch.cc

    r7163 r7284  
    155155                    spaceship->getEngine()->setSpeedFactor(5);
    156156                    WeakPtr<Engine>* ptr = new WeakPtr<Engine>(spaceship->getEngine());
    157                     new Timer(10, false, &createExecutor(createFunctor(&Dynamicmatch::resetSpeedFactor, this))->setDefaultValue(0, ptr), true);
     157                    ExecutorPtr executor = createExecutor(createFunctor(&Dynamicmatch::resetSpeedFactor, this));
     158                    executor->setDefaultValue(0, ptr);
     159                    new Timer(10, false, executor, true);
    158160                }
    159161            }
     
    254256                    spaceship->getEngine()->setSpeedFactor(5);
    255257                    WeakPtr<Engine>* ptr = new WeakPtr<Engine>(spaceship->getEngine());
    256                     new Timer(10, false, &createExecutor(createFunctor(&Dynamicmatch::resetSpeedFactor, this))->setDefaultValue(0, ptr), true);
     258                    ExecutorPtr executor = createExecutor(createFunctor(&Dynamicmatch::resetSpeedFactor, this));
     259                    executor->setDefaultValue(0, ptr);
     260                    new Timer(10, false, executor, true);
    257261                }
    258262
  • code/trunk/src/orxonox/gametypes/Gametype.cc

    r7163 r7284  
    3333#include "core/ConfigValueIncludes.h"
    3434#include "core/GameMode.h"
    35 #include "core/ConsoleCommand.h"
     35#include "core/command/ConsoleCommand.h"
    3636
    3737#include "infos/PlayerInfo.h"
     
    7979        else
    8080            this->scoreboard_ = 0;
    81 
    82         /* HACK HACK HACK */
    83         this->hackAddBots_ = createConsoleCommand( createFunctor(&Gametype::addBots, this), "hackAddBots");
    84         this->hackKillBots_ = createConsoleCommand( createFunctor(&Gametype::killBots, this), "hackKillBots");
    85         CommandExecutor::addConsoleCommandShortcut( this->hackAddBots_ );
    86         CommandExecutor::addConsoleCommandShortcut( this->hackKillBots_ );
    87         /* HACK HACK HACK */
    8881    }
    8982
     
    9386        {
    9487            this->gtinfo_->destroy();
    95             if( this->hackAddBots_ )
    96                 delete this->hackAddBots_;
    97             if( this->hackKillBots_ )
    98                 delete this->hackKillBots_;
    9988        }
    10089    }
  • code/trunk/src/orxonox/gametypes/Gametype.h

    r6417 r7284  
    184184            // Config Values
    185185            std::string scoreboardTemplate_;
    186 
    187             /* HACK HACK HACK */
    188             ConsoleCommand* hackAddBots_;
    189             ConsoleCommand* hackKillBots_;
    190             /* HACK HACK HACK */
    191186    };
    192187}
  • code/trunk/src/orxonox/gametypes/TeamBaseMatch.cc

    r5929 r7284  
    3030
    3131#include "core/CoreIncludes.h"
    32 #include "core/Executor.h"
     32#include "core/command/Executor.h"
    3333#include "worldentities/pawns/TeamBaseMatchBase.h"
    3434#include "infos/PlayerInfo.h"
Note: See TracChangeset for help on using the changeset viewer.