- Timestamp:
- May 23, 2011, 3:50:13 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gameimmersion/src/orxonox/controllers/HumanController.cc
r8379 r8541 52 52 SetConsoleCommand("HumanController", __CC_fire_name, &HumanController::fire ).addShortcut().keybindMode(KeybindMode::OnHold); 53 53 SetConsoleCommand("HumanController", "reload", &HumanController::reload ).addShortcut(); 54 SetConsoleCommand("HumanController", __CC_boost_name, &HumanController::toggleBoost ).addShortcut().keybindMode(KeybindMode::OnPress); 54 //SetConsoleCommand("HumanController", __CC_boost_name, &HumanController::toggleBoost ).addShortcut().keybindMode(KeybindMode::OnPress); 55 SetConsoleCommand("HumanController", "startBoost", &HumanController::startBoost ).addShortcut().keybindMode(KeybindMode::OnPress); 56 SetConsoleCommand("HumanController", "stopBoost", &HumanController::stopBoost ).addShortcut().keybindMode(KeybindMode::OnRelease); 55 57 SetConsoleCommand("HumanController", "greet", &HumanController::greet ).addShortcut(); 56 58 SetConsoleCommand("HumanController", "switchCamera", &HumanController::switchCamera ).addShortcut(); … … 171 173 /*static*/ void HumanController::toggleBoost() 172 174 { 175 COUT(0) << "Toggling boost!"; 173 176 if (HumanController::localController_s && HumanController::localController_s->controllableEntity_) 174 177 HumanController::localController_s->toggleBoosting(); … … 182 185 void HumanController::toggleBoosting(void) 183 186 { 187 /* 184 188 this->boosting_ = !this->boosting_; 185 189 … … 190 194 ModifyConsoleCommand(__CC_boost_name).keybindMode(KeybindMode::OnPress); 191 195 192 this->controllableEntity_->boost(this->boosting_); 193 } 196 this->controllableEntity_->boost(this->boosting_);*/ 197 } 198 199 void HumanController::startBoost() 200 { 201 COUT(0) << "Starting boost" << std::endl; 202 if (HumanController::localController_s && HumanController::localController_s->controllableEntity_) 203 HumanController::localController_s->setBoost(true); 204 } 205 206 void HumanController::stopBoost() 207 { 208 COUT(0) << "Stopping boost" << std::endl; 209 if (HumanController::localController_s && HumanController::localController_s->controllableEntity_) 210 HumanController::localController_s->setBoost(false); 211 } 212 213 void HumanController::setBoost(bool bBoost) 214 { 215 this->controllableEntity_->boost(bBoost); 216 } 194 217 195 218 void HumanController::greet()
Note: See TracChangeset
for help on using the changeset viewer.