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:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/controllers/NewHumanController.cc

    r7184 r7284  
    3737
    3838#include "core/CoreIncludes.h"
    39 #include "core/ConsoleCommand.h"
     39#include "core/command/ConsoleCommand.h"
    4040#include "worldentities/ControllableEntity.h"
    4141#include "worldentities/pawns/Pawn.h"
     
    4949namespace orxonox
    5050{
    51     SetConsoleCommand(NewHumanController, changeMode, false).keybindMode(KeybindMode::OnPress);
    52     SetConsoleCommand(NewHumanController, accelerate, false).keybindMode(KeybindMode::OnPress);
    53     SetConsoleCommand(NewHumanController, decelerate, false).keybindMode(KeybindMode::OnPress);
    54     SetConsoleCommand(NewHumanController, unfire,      true).keybindMode(KeybindMode::OnRelease);
     51    SetConsoleCommand("NewHumanController", "changeMode", &NewHumanController::changeMode).keybindMode(KeybindMode::OnPress);
     52    SetConsoleCommand("NewHumanController", "accelerate", &NewHumanController::accelerate).keybindMode(KeybindMode::OnPress);
     53    SetConsoleCommand("NewHumanController", "decelerate", &NewHumanController::decelerate).keybindMode(KeybindMode::OnPress);
     54    SetConsoleCommand("NewHumanController", "unfire",     &NewHumanController::unfire    ).keybindMode(KeybindMode::OnRelease).addShortcut();
    5555
    5656    CreateUnloadableFactory(NewHumanController);
Note: See TracChangeset for help on using the changeset viewer.