Changeset 6157 for code/branches/presentation2/src/orxonox
- Timestamp:
- Nov 26, 2009, 9:58:16 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/orxonox/controllers/NewHumanController.cc
r6149 r6157 98 98 if( this->controllableEntity_ && !this->controllableEntity_->isInMouseLook() ) 99 99 { 100 this->updateTarget(); 100 101 this->crossHairOverlay_->setPosition(Vector2(static_cast<float>(this->currentYaw_)/2*-1+.5-overlaySize_/2, static_cast<float>(this->currentPitch_)/2*-1+.5-overlaySize_/2)); 101 102 this->crossHairOverlay_->show(); … … 145 146 */ 146 147 147 if (firemode == 1 && this->controlMode_ == 1) { 148 if (firemode == 1 && this->controlMode_ == 1) 149 { 148 150 //unlocked steering, steer on right mouse click 149 151 HumanController::yaw(Vector2(this->currentYaw_, 0)); 150 152 HumanController::pitch(Vector2(this->currentPitch_, 0)); 151 153 } 152 else { 153 if( !NewHumanController::localController_s->getControllableEntity()->isInMouseLook() ) 154 this->updateTarget(); 155 154 else 156 155 HumanController::localController_s->getControllableEntity()->fire(firemode); 157 }158 156 159 157 } … … 285 283 void NewHumanController::accelerate() 286 284 { 287 if ( NewHumanController::localController_s ) { 285 if ( NewHumanController::localController_s ) 286 { 288 287 NewHumanController::localController_s->acceleration_ += 0.08; 289 288 NewHumanController::localController_s->acceleration_ = clamp(NewHumanController::localController_s->acceleration_ + 0.08f, 0.0f, 1.0f); … … 293 292 void NewHumanController::decelerate() 294 293 { 295 if ( NewHumanController::localController_s ) { 294 if ( NewHumanController::localController_s ) 295 { 296 296 NewHumanController::localController_s->acceleration_ = clamp(NewHumanController::localController_s->acceleration_ - 0.05f, 0.0f, 1.0f); 297 297 }
Note: See TracChangeset
for help on using the changeset viewer.