Changeset 6115
- Timestamp:
- Nov 21, 2009, 12:11:25 PM (15 years ago)
- Location:
- code/branches/presentation2/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/modules/weapons/projectiles/Rocket.cc
r6107 r6115 63 63 this->model_ = new Model(this); 64 64 this->model_->setMeshSource("rocket.mesh"); 65 66 67 68 65 this->attach(this->model_); 66 ParticleSpawner* fire = new ParticleSpawner(this); 67 this->attach(fire); 68 fire->setOrientation(this->getOrientation()); 69 69 fire->setSource("Orxonox/rocketfire"); 70 70 … … 79 79 80 80 this->destroyTimer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&Rocket::destroyObject, this))); 81 82 83 81 } 84 82 … … 86 84 this->camPosition_->setPosition(0,10,40); 87 85 this->camPosition_->setSyncMode(0x0); 86 this->camPosition_->setAllowMouseLook(true); 88 87 this->attach( this->camPosition_ ); 89 88 this->addCameraPosition( this->camPosition_ ); … … 98 97 if(this->isInitialized()) 99 98 { 100 101 99 if (GameMode::isMaster() && this->player_.get()) 102 100 { … … 229 227 void Rocket::rotateYaw(const Vector2& value) 230 228 { 231 this->localAngularVelocity_.y += value.x; 229 ControllableEntity::rotateYaw(value); 230 231 if( !this->isInMouseLook() ) 232 this->localAngularVelocity_.y += value.x; 232 233 } 233 234 … … 240 241 void Rocket::rotatePitch(const Vector2& value) 241 242 { 242 this->localAngularVelocity_.x += value.x; 243 ControllableEntity::rotatePitch(value); 244 245 if( !this->isInMouseLook() ) 246 this->localAngularVelocity_.x += value.x; 243 247 } 244 248 … … 251 255 void Rocket::rotateRoll(const Vector2& value) 252 256 { 253 this->localAngularVelocity_.z += value.x; 257 ControllableEntity::rotateRoll(value); 258 259 if( !this->isInMouseLook() ) 260 this->localAngularVelocity_.z += value.x; 254 261 } 255 262 -
code/branches/presentation2/src/orxonox/controllers/NewHumanController.cc
r6114 r6115 235 235 NewHumanController::localController_s->controlMode_ = 0; 236 236 } 237 238 void NewHumanController::changedControllableEntity() 239 { 240 this->controlMode_ = 0; 241 this->currentYaw_ = 0; 242 this->currentPitch_ = 0; 243 } 237 244 } -
code/branches/presentation2/src/orxonox/controllers/NewHumanController.h
r6111 r6115 51 51 52 52 static void changeMode(); 53 54 virtual void changedControllableEntity(); 53 55 54 56 protected: … … 56 58 57 59 unsigned int controlMode_; 58 static NewHumanController* localController_s;60 static NewHumanController* localController_s; 59 61 private: 60 62 float currentYaw_; 61 63 float currentPitch_; 62 64 OrxonoxOverlay* crossHairOverlay_; 63 float 65 float overlaySize_; 64 66 ClassTreeMask targetMask_; 65 67 };
Note: See TracChangeset
for help on using the changeset viewer.