Changeset 8574 for code/branches/gameimmersion/src/orxonox/controllers
- Timestamp:
- May 25, 2011, 6:23:51 PM (14 years ago)
- Location:
- code/branches/gameimmersion/src/orxonox/controllers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gameimmersion/src/orxonox/controllers/HumanController.cc
r8541 r8574 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); 55 SetConsoleCommand("HumanController", "startBoost", &HumanController::startBoost ).addShortcut().keybindMode(KeybindMode::OnPress); 56 SetConsoleCommand("HumanController", "stopBoost", &HumanController::stopBoost ).addShortcut().keybindMode(KeybindMode::OnRelease); 54 SetConsoleCommand("HumanController", __CC_boost_name, &HumanController::toggleBoost ).addShortcut().keybindMode(KeybindMode::OnPress); 57 55 SetConsoleCommand("HumanController", "greet", &HumanController::greet ).addShortcut(); 58 56 SetConsoleCommand("HumanController", "switchCamera", &HumanController::switchCamera ).addShortcut(); … … 173 171 /*static*/ void HumanController::toggleBoost() 174 172 { 175 COUT(0) << "Toggling boost!"; 173 COUT(3) << "Toggling boost!" << endl; // TODO: Remove! 176 174 if (HumanController::localController_s && HumanController::localController_s->controllableEntity_) 177 175 HumanController::localController_s->toggleBoosting(); … … 185 183 void HumanController::toggleBoosting(void) 186 184 { 187 /*188 185 this->boosting_ = !this->boosting_; 189 186 … … 194 191 ModifyConsoleCommand(__CC_boost_name).keybindMode(KeybindMode::OnPress); 195 192 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 } 193 this->controllableEntity_->boost(this->boosting_); 194 } 217 195 218 196 void HumanController::greet() -
code/branches/gameimmersion/src/orxonox/controllers/HumanController.h
r8541 r8574 64 64 static void reload(); 65 65 66 static void startBoost(); 67 static void stopBoost(); 68 static void toggleBoost(); // Static method,toggles boosting. 69 void setBoost(bool); 66 static void toggleBoost(); // Static method, toggles boosting. 70 67 /** 71 68 @brief Check whether the HumanController is in boosting mode.
Note: See TracChangeset
for help on using the changeset viewer.