Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 25, 2011, 6:23:51 PM (14 years ago)
Author:
dafrick
Message:

Reverting boost changes.

Location:
code/branches/gameimmersion/src/orxonox/controllers
Files:
2 edited

Legend:

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

    r8541 r8574  
    5252    SetConsoleCommand("HumanController", __CC_fire_name,           &HumanController::fire          ).addShortcut().keybindMode(KeybindMode::OnHold);
    5353    SetConsoleCommand("HumanController", "reload",                 &HumanController::reload        ).addShortcut();
    54     //SetConsoleCommand("HumanController", __CC_boost_name,          &HumanController::toggleBoost   ).addShortcut().keybindMode(KeybindMode::OnPress);
    55     SetConsoleCommand("HumanController", "startBoost",             &HumanController::startBoost    ).addShortcut().keybindMode(KeybindMode::OnPress);
    56     SetConsoleCommand("HumanController", "stopBoost",              &HumanController::stopBoost     ).addShortcut().keybindMode(KeybindMode::OnRelease);
     54    SetConsoleCommand("HumanController", __CC_boost_name,          &HumanController::toggleBoost   ).addShortcut().keybindMode(KeybindMode::OnPress);
    5755    SetConsoleCommand("HumanController", "greet",                  &HumanController::greet         ).addShortcut();
    5856    SetConsoleCommand("HumanController", "switchCamera",           &HumanController::switchCamera  ).addShortcut();
     
    173171    /*static*/ void HumanController::toggleBoost()
    174172    {
    175         COUT(0) << "Toggling boost!";
     173        COUT(3) << "Toggling boost!" << endl; // TODO: Remove!
    176174        if (HumanController::localController_s && HumanController::localController_s->controllableEntity_)
    177175            HumanController::localController_s->toggleBoosting();
     
    185183    void HumanController::toggleBoosting(void)
    186184    {
    187             /*
    188185        this->boosting_ = !this->boosting_;
    189186       
     
    194191            ModifyConsoleCommand(__CC_boost_name).keybindMode(KeybindMode::OnPress);
    195192
    196         this->controllableEntity_->boost(this->boosting_);*/
    197     }
    198    
    199     void HumanController::startBoost()
    200     {
    201             COUT(0) << "Starting boost" << std::endl;
    202             if (HumanController::localController_s && HumanController::localController_s->controllableEntity_)
    203                     HumanController::localController_s->setBoost(true);
    204     }
    205    
    206     void HumanController::stopBoost()
    207     {
    208             COUT(0) << "Stopping boost" << std::endl;
    209             if (HumanController::localController_s && HumanController::localController_s->controllableEntity_)
    210                     HumanController::localController_s->setBoost(false);
    211     }
    212    
    213     void HumanController::setBoost(bool bBoost)
    214     {
    215             this->controllableEntity_->boost(bBoost);
    216     }       
     193        this->controllableEntity_->boost(this->boosting_);
     194    }
    217195
    218196    void HumanController::greet()
  • code/branches/gameimmersion/src/orxonox/controllers/HumanController.h

    r8541 r8574  
    6464            static void reload();
    6565
    66             static void startBoost();
    67             static void stopBoost();
    68             static void toggleBoost(); // Static method,toggles boosting.
    69             void setBoost(bool);
     66            static void toggleBoost(); // Static method, toggles boosting.
    7067            /**
    7168            @brief Check whether the HumanController is in boosting mode.
Note: See TracChangeset for help on using the changeset viewer.