Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 21, 2016, 4:47:39 PM (8 years ago)
Author:
sagerj
Message:

everything beneath weaponmode changed to push/release - wm modified only need to implement timer/ticker

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/sagerjFS16/src/orxonox/controllers/HumanController.cc

    r11170 r11174  
    4040namespace orxonox
    4141{
    42     extern const std::string __CC_fire_name = "fire";
     42    extern const std::string __CC_push_name = "push";
    4343    extern const std::string __CC_suicide_name = "suicide";
    4444    extern const std::string __CC_release_name = "release";
     
    5252    SetConsoleCommand("HumanController", "toggleFormationFlight",  &HumanController::toggleFormationFlight).addShortcut().keybindMode(KeybindMode::OnPress);
    5353    SetConsoleCommand("HumanController", "FFChangeMode",           &HumanController::FFChangeMode).addShortcut().keybindMode(KeybindMode::OnPress);
    54     SetConsoleCommand("HumanController", __CC_fire_name,           &HumanController::fire          ).addShortcut().keybindMode(KeybindMode::OnHold);
     54    SetConsoleCommand("HumanController", __CC_push_name,           &HumanController::push          ).addShortcut().keybindMode(KeybindMode::OnHold);
    5555    SetConsoleCommand("HumanController", __CC_release_name,        &HumanController::release       ).addShortcut().keybindMode(KeybindMode::OnRelease);
    5656    SetConsoleCommand("HumanController", "reload",                 &HumanController::reload        ).addShortcut();
     
    157157    }
    158158
    159     void HumanController::fire(unsigned int firemode)
    160     {
    161         if (HumanController::localController_s)
    162             HumanController::localController_s->doFire(firemode);
    163     }
    164 
    165     void HumanController::doFire(unsigned int firemode)
    166     {
    167         if (HumanController::localController_s && HumanController::localController_s->controllableEntity_)
    168         {
    169             HumanController::localController_s->controllableEntity_->fire(firemode);
     159    void HumanController::push(unsigned int firemode)
     160    {
     161        if (HumanController::localController_s)
     162            HumanController::localController_s->doPush(firemode);
     163    }
     164
     165    void HumanController::doPush(unsigned int firemode)
     166    {
     167        if (HumanController::localController_s && HumanController::localController_s->controllableEntity_)
     168        {
     169            HumanController::localController_s->controllableEntity_->push(firemode);
    170170            //if human fires, set slaves free. See FormationController::forceFreeSlaves()
    171171            if (HumanController::localController_s->state_==MASTER && HumanController::localController_s->formationMode_ == NORMAL)
Note: See TracChangeset for help on using the changeset viewer.