Changeset 3053 for code/trunk/src/orxonox/objects/controllers
- Timestamp:
- May 25, 2009, 4:19:14 AM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/weapons (added) merged: 2898,2901,2912,2914-2915,2918-2924,2969,2979,2981,2983,2987,3012
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/objects/controllers/AIController.cc
r3049 r3053 111 111 112 112 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); 114 114 115 115 SUPER(AIController, tick, dt); -
code/trunk/src/orxonox/objects/controllers/HumanController.cc
r3038 r3053 46 46 SetConsoleCommand(HumanController, rotateRoll, true).setAsInputCommand(); 47 47 SetConsoleCommand(HumanController, fire, true).keybindMode(KeybindMode::OnHold); 48 SetConsoleCommand(HumanController, altFire, true).keybindMode(KeybindMode::OnHold);48 SetConsoleCommand(HumanController, reload, true); 49 49 SetConsoleCommand(HumanController, boost, true).keybindMode(KeybindMode::OnHold); 50 50 SetConsoleCommand(HumanController, greet, true); … … 109 109 } 110 110 111 void HumanController::fire( )111 void HumanController::fire(unsigned int firemode) 112 112 { 113 113 if (HumanController::localController_s && HumanController::localController_s->controllableEntity_) 114 HumanController::localController_s->controllableEntity_->fire( WeaponMode::fire);114 HumanController::localController_s->controllableEntity_->fire(firemode); 115 115 } 116 116 117 void HumanController:: altFire()117 void HumanController::reload() 118 118 { 119 119 if (HumanController::localController_s && HumanController::localController_s->controllableEntity_) 120 HumanController::localController_s->controllableEntity_-> fire(WeaponMode::altFire);120 HumanController::localController_s->controllableEntity_->reload(); 121 121 } 122 122 -
code/trunk/src/orxonox/objects/controllers/HumanController.h
r2662 r3053 51 51 static void rotateRoll(const Vector2& value); 52 52 53 static void fire( );54 static void altFire();53 static void fire(unsigned int firemode); 54 static void reload(); 55 55 56 56 static void boost(); -
code/trunk/src/orxonox/objects/controllers/WaypointPatrolController.cc
r3049 r3053 68 68 69 69 if (this->getControllableEntity() && this->isCloseAtTarget(1000) && this->isLookingAtTarget(Ogre::Math::PI / 20.0)) 70 this->getControllableEntity()->fire( WeaponMode::fire);70 this->getControllableEntity()->fire(0); 71 71 } 72 72 else
Note: See TracChangeset
for help on using the changeset viewer.