Changeset 11174 for code/branches/sagerjFS16/src/orxonox/controllers
- Timestamp:
- Apr 21, 2016, 4:47:39 PM (9 years ago)
- Location:
- code/branches/sagerjFS16/src/orxonox/controllers
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/sagerjFS16/src/orxonox/controllers/HumanController.cc
r11170 r11174 40 40 namespace orxonox 41 41 { 42 extern const std::string __CC_ fire_name = "fire";42 extern const std::string __CC_push_name = "push"; 43 43 extern const std::string __CC_suicide_name = "suicide"; 44 44 extern const std::string __CC_release_name = "release"; … … 52 52 SetConsoleCommand("HumanController", "toggleFormationFlight", &HumanController::toggleFormationFlight).addShortcut().keybindMode(KeybindMode::OnPress); 53 53 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); 55 55 SetConsoleCommand("HumanController", __CC_release_name, &HumanController::release ).addShortcut().keybindMode(KeybindMode::OnRelease); 56 56 SetConsoleCommand("HumanController", "reload", &HumanController::reload ).addShortcut(); … … 157 157 } 158 158 159 void HumanController:: fire(unsigned int firemode)160 { 161 if (HumanController::localController_s) 162 HumanController::localController_s->do Fire(firemode);163 } 164 165 void HumanController::do Fire(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); 170 170 //if human fires, set slaves free. See FormationController::forceFreeSlaves() 171 171 if (HumanController::localController_s->state_==MASTER && HumanController::localController_s->formationMode_ == NORMAL) -
code/branches/sagerjFS16/src/orxonox/controllers/HumanController.h
r11164 r11174 61 61 virtual void pitch(const Vector2& value); 62 62 63 static void fire(unsigned int firemode);64 virtual void do Fire(unsigned int firemode);63 static void push(unsigned int firemode); 64 virtual void doPush(unsigned int firemode); 65 65 static void release(unsigned int firemode); 66 66 virtual void doRelease(unsigned int firemode); -
code/branches/sagerjFS16/src/orxonox/controllers/NewHumanController.cc
r11170 r11174 276 276 } 277 277 278 void NewHumanController::do Fire(unsigned int firemode)278 void NewHumanController::doPush(unsigned int firemode) 279 279 { 280 280 if (!this->controllableEntity_) … … 291 291 else 292 292 { 293 HumanController::do Fire(firemode); //call for formationflight293 HumanController::doPush(firemode); //call for formationflight 294 294 } 295 295 } -
code/branches/sagerjFS16/src/orxonox/controllers/NewHumanController.h
r11166 r11174 54 54 static void decelerate(); 55 55 56 virtual void do Fire(unsigned int firemode) override;56 virtual void doPush(unsigned int firemode) override; 57 57 virtual void doRelease(unsigned int firemode) override; 58 58
Note: See TracChangeset
for help on using the changeset viewer.