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

Location:
code/branches/sagerjFS16/src/orxonox/controllers
Files:
4 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)
  • code/branches/sagerjFS16/src/orxonox/controllers/HumanController.h

    r11164 r11174  
    6161            virtual void pitch(const Vector2& value);
    6262
    63             static void fire(unsigned int firemode);
    64             virtual void doFire(unsigned int firemode);
     63            static void push(unsigned int firemode);
     64            virtual void doPush(unsigned int firemode);
    6565            static void release(unsigned int firemode);
    6666            virtual void doRelease(unsigned int firemode);
  • code/branches/sagerjFS16/src/orxonox/controllers/NewHumanController.cc

    r11170 r11174  
    276276    }
    277277
    278     void NewHumanController::doFire(unsigned int firemode)
     278    void NewHumanController::doPush(unsigned int firemode)
    279279    {
    280280        if (!this->controllableEntity_)
     
    291291        else
    292292        {
    293             HumanController::doFire(firemode); //call for formationflight
     293            HumanController::doPush(firemode); //call for formationflight
    294294        }
    295295    }
  • code/branches/sagerjFS16/src/orxonox/controllers/NewHumanController.h

    r11166 r11174  
    5454            static void decelerate();
    5555
    56             virtual void doFire(unsigned int firemode) override;
     56            virtual void doPush(unsigned int firemode) override;
    5757            virtual void doRelease(unsigned int firemode) override;
    5858
Note: See TracChangeset for help on using the changeset viewer.