Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 25, 2009, 4:19:14 AM (15 years ago)
Author:
landauf
Message:

merged weapons branch back to trunk

Location:
code/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/objects/controllers/AIController.cc

    r3049 r3053  
    111111
    112112        if (this->getControllableEntity() && this->bShooting_ && this->isCloseAtTarget(1000) && this->isLookingAtTarget(Ogre::Math::PI / 20.0))
    113             this->getControllableEntity()->fire(WeaponMode::fire);
     113            this->getControllableEntity()->fire(0);
    114114
    115115        SUPER(AIController, tick, dt);
  • code/trunk/src/orxonox/objects/controllers/HumanController.cc

    r3038 r3053  
    4646    SetConsoleCommand(HumanController, rotateRoll,    true).setAsInputCommand();
    4747    SetConsoleCommand(HumanController, fire,          true).keybindMode(KeybindMode::OnHold);
    48     SetConsoleCommand(HumanController, altFire,       true).keybindMode(KeybindMode::OnHold);
     48    SetConsoleCommand(HumanController, reload,        true);
    4949    SetConsoleCommand(HumanController, boost,         true).keybindMode(KeybindMode::OnHold);
    5050    SetConsoleCommand(HumanController, greet,         true);
     
    109109    }
    110110
    111     void HumanController::fire()
     111    void HumanController::fire(unsigned int firemode)
    112112    {
    113113        if (HumanController::localController_s && HumanController::localController_s->controllableEntity_)
    114             HumanController::localController_s->controllableEntity_->fire(WeaponMode::fire);
     114            HumanController::localController_s->controllableEntity_->fire(firemode);
    115115    }
    116116
    117     void HumanController::altFire()
     117    void HumanController::reload()
    118118    {
    119119        if (HumanController::localController_s && HumanController::localController_s->controllableEntity_)
    120             HumanController::localController_s->controllableEntity_->fire(WeaponMode::altFire);
     120            HumanController::localController_s->controllableEntity_->reload();
    121121    }
    122122
  • code/trunk/src/orxonox/objects/controllers/HumanController.h

    r2662 r3053  
    5151            static void rotateRoll(const Vector2& value);
    5252
    53             static void fire();
    54             static void altFire();
     53            static void fire(unsigned int firemode);
     54            static void reload();
    5555
    5656            static void boost();
  • code/trunk/src/orxonox/objects/controllers/WaypointPatrolController.cc

    r3049 r3053  
    6868
    6969            if (this->getControllableEntity() && this->isCloseAtTarget(1000) && this->isLookingAtTarget(Ogre::Math::PI / 20.0))
    70                 this->getControllableEntity()->fire(WeaponMode::fire);
     70                this->getControllableEntity()->fire(0);
    7171        }
    7272        else
Note: See TracChangeset for help on using the changeset viewer.