Changeset 6079 for code/branches/particles2/src/modules/weapons
- Timestamp:
- Nov 17, 2009, 10:59:25 AM (15 years ago)
- Location:
- code/branches/particles2/src/modules/weapons/projectiles
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/particles2/src/modules/weapons/projectiles/Rocket.cc
r6066 r6079 35 35 #include "graphics/Model.h" 36 36 #include "objects/collisionshapes/ConeCollisionShape.h" 37 #include "infos/PlayerInfo.h" 38 #include "controllers/Controller.h" 39 #include "worldentities/CameraPosition.h" 37 40 38 41 namespace orxonox … … 69 72 this->destroyTimer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&Rocket::destroyObject, this))); 70 73 } 74 75 this->camPosition_ = new CameraPosition(this); 76 this->camPosition_->setPosition(0,0,0); 77 this->attach( this->camPosition_ ); 78 this->addCameraPosition( this->camPosition_ ); 71 79 } 72 80 … … 81 89 this->collisionShape_->destroy(); 82 90 this->model_->destroy(); 91 92 if (GameMode::isMaster() && this->owner_) 93 this->owner_->getPlayer()->startControl(this->originalControllableEntity_); 94 this->camPosition_->destroy(); 83 95 } 84 96 } … … 97 109 { 98 110 this->owner_ = owner; 111 112 this->originalControllableEntity_ = this->owner_->getPlayer()->getControllableEntity(); 113 this->owner_->getPlayer()->startControl(this); 99 114 } 100 115 -
code/branches/particles2/src/modules/weapons/projectiles/Rocket.h
r6066 r6079 110 110 inline float getDamage() const 111 111 { return this->damage_; } 112 virtual void fire(unsigned int firemode) {} 112 113 113 114 private: … … 116 117 float damage_; 117 118 bool bDestroy_; 119 ControllableEntity* originalControllableEntity_; 118 120 119 121 Model* model_; 122 CameraPosition* camPosition_; 120 123 ConeCollisionShape* collisionShape_; 121 124 Timer destroyTimer_;
Note: See TracChangeset
for help on using the changeset viewer.