Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 6, 2009, 3:53:50 PM (16 years ago)
Author:
danielh
Message:
  • some changes to the base framework
  • added DroppedItem
  • implemented usable items and a test UsableItem (Jump), console command to use an item is "useItem"
  • added ModifierType::Acceleration
Location:
code/branches/pickups
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickups

    • Property svn:ignore set to
      build
      dependencies
  • code/branches/pickups/src/orxonox/objects/controllers/HumanController.cc

    r2662 r2900  
    4848    SetConsoleCommand(HumanController, boost,         true).keybindMode(KeybindMode::OnHold);
    4949    SetConsoleCommand(HumanController, greet,         true);
    50     SetConsoleCommand(HumanController, use,           true);
    5150    SetConsoleCommand(HumanController, switchCamera,  true);
    5251    SetConsoleCommand(HumanController, mouseLook,     true);
     
    5554    SetConsoleCommand(HumanController, killBots,      true).defaultValues(0);
    5655    SetConsoleCommand(HumanController, dropItems,     true);
     56    SetConsoleCommand(HumanController, useItem,       true);
    5757
    5858    CreateUnloadableFactory(HumanController);
     
    132132    }
    133133
    134     void HumanController::use()
    135     {
    136         if (HumanController::localController_s && HumanController::localController_s->controllableEntity_)
    137             HumanController::localController_s->controllableEntity_->use();
    138     }
    139 
    140134    void HumanController::switchCamera()
    141135    {
     
    160154    }
    161155
     156    void HumanController::useItem()
     157    {
     158        if (HumanController::localController_s && HumanController::localController_s->controllableEntity_)
     159            HumanController::localController_s->controllableEntity_->useItem();
     160    }
     161
    162162    void HumanController::addBots(unsigned int amount)
    163163    {
  • code/branches/pickups/src/orxonox/objects/controllers/HumanController.h

    r2662 r2900  
    5656            static void boost();
    5757            static void greet();
    58             static void use();
    5958            static void switchCamera();
    6059            static void mouseLook();
    6160            static void dropItems();
     61            static void useItem();
    6262
    6363            static void suicide();
Note: See TracChangeset for help on using the changeset viewer.