- Timestamp:
- Apr 21, 2016, 4:47:39 PM (9 years ago)
- File:
-
- 1 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)
Note: See TracChangeset
for help on using the changeset viewer.