- Timestamp:
- Mar 24, 2016, 3:56:35 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/sagerjFS16/src/orxonox/controllers/HumanController.cc
r11071 r11153 42 42 extern const std::string __CC_fire_name = "fire"; 43 43 extern const std::string __CC_suicide_name = "suicide"; 44 extern const std::string __CC_release_name = "release"; 44 45 45 46 SetConsoleCommand("HumanController", "moveFrontBack", &HumanController::moveFrontBack ).addShortcut().setAsInputCommand(); … … 52 53 SetConsoleCommand("HumanController", "FFChangeMode", &HumanController::FFChangeMode).addShortcut().keybindMode(KeybindMode::OnPress); 53 54 SetConsoleCommand("HumanController", __CC_fire_name, &HumanController::fire ).addShortcut().keybindMode(KeybindMode::OnHold); 55 SetConsoleCommand("HumanController", __CC_release_name, &HumanController::release ).addShortcut().keybindMode(KeybindMode::OnRelease); 54 56 SetConsoleCommand("HumanController", "reload", &HumanController::reload ).addShortcut(); 55 57 SetConsoleCommand("HumanController", "boost", &HumanController::boost ).addShortcut().setAsInputCommand().keybindMode(KeybindMode::OnPressAndRelease); … … 167 169 HumanController::localController_s->controllableEntity_->fire(firemode); 168 170 //if human fires, set slaves free. See FormationController::forceFreeSlaves() 171 if (HumanController::localController_s->state_==MASTER && HumanController::localController_s->formationMode_ == NORMAL) 172 { 173 HumanController::localController_s->forceFreeSlaves(); 174 } 175 } 176 } 177 178 void HumanController::release(unsigned int firemode) 179 { 180 if (HumanController::localController_s) 181 HumanController::localController_s->doRelease(firemode); 182 } 183 184 void HumanController::doRelease(unsigned int firemode) 185 { 186 if (HumanController::localController_s && HumanController::localController_s->controllableEntity_) 187 { 188 HumanController::localController_s->controllableEntity_->release(firemode); 189 //if human releases, set slaves free. See FormationController::forceFreeSlaves() 169 190 if (HumanController::localController_s->state_==MASTER && HumanController::localController_s->formationMode_ == NORMAL) 170 191 {
Note: See TracChangeset
for help on using the changeset viewer.