Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 24, 2016, 3:56:35 PM (8 years ago)
Author:
sagerj
Message:

added release functions in various classes: weaponmode, weaponsystem, humancontroller, newhumancontroller, discharger

File:
1 edited

Legend:

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

    r11142 r11153  
    5454    SetConsoleCommand("NewHumanController", "accelerate", &NewHumanController::accelerate).keybindMode(KeybindMode::OnPress);
    5555    SetConsoleCommand("NewHumanController", "decelerate", &NewHumanController::decelerate).keybindMode(KeybindMode::OnPress);
    56     SetConsoleCommand("NewHumanController", "unfire",     &NewHumanController::unfire    ).keybindMode(KeybindMode::OnRelease).addShortcut();
     56    SetConsoleCommand("NewHumanController", "release",    &NewHumanController::release    ).keybindMode(KeybindMode::OnRelease).addShortcut();
    5757
    5858    RegisterUnloadableClass(NewHumanController);
     
    344344    }
    345345
    346     void NewHumanController::unfire()
     346    void NewHumanController::release(unsigned int firemode)
    347347    {
    348348        if (NewHumanController::localController_s)
    349             NewHumanController::localController_s->doUnfire();
    350         orxout() << "unfire" << endl;
    351     }
    352 
    353     void NewHumanController::doUnfire()
    354     {
    355         this->firemode_ = -1;
    356         hideArrows();
     349            NewHumanController::localController_s->doRelease();
     350        orxout() << "Trigger" << endl;
     351    }
     352
     353    void NewHumanController::doRelease(unsigned int firemode)
     354    {
     355        // this->firemode_ = -1; (outdated code from unfire)
     356        // hideArrows();
     357        if (!this->controllableEntity_)
     358            return;
     359
     360        this->firemode_ = firemode;
     361
     362        HumanController::doRelease(firemode); //call for formationflight
    357363    }
    358364
Note: See TracChangeset for help on using the changeset viewer.