- Timestamp:
- May 1, 2010, 12:37:53 PM (15 years ago)
- Location:
- code/branches/rocket/src/modules/weapons
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/rocket/src/modules/weapons/RocketController.cc
r6811 r6813 43 43 44 44 RegisterObject(RocketController); 45 SimpleRocket* rocket = new SimpleRocket(this); 46 rocket->setController(this); 47 this->setControllableEntity(dynamic_cast<ControllableEntity*> (rocket)); 45 48 46 49 } … … 69 72 */ 70 73 71 //void setRocket(SimpleRocket* rocket, RocketController* contr) {72 // contr->setControllableEntity(dynamic_cast<ControllableEntity*> rocket);73 //}74 74 } -
code/branches/rocket/src/modules/weapons/RocketController.h
r6811 r6813 49 49 RocketController(BaseObject* creator); 50 50 virtual ~RocketController(){}; 51 void setRocket(SimpleRocket* rocket, RocketController* contr);52 51 53 52 virtual void tick(float dt); -
code/branches/rocket/src/modules/weapons/projectiles/SimpleRocket.cc
r6810 r6813 59 59 this->lifetime_ = 100; 60 60 //this->camera_ = null; 61 RocketController* myRController = new RocketController(this);62 this->setController(myRController);61 //RocketController* myRController = new RocketController(this); 62 //this->setController(creator); 63 63 //myRController->setRocket(this, myRController); 64 64 … … 68 68 //this->controllableEntity_->setController(this->controller_); 69 69 70 if (GameMode::isMaster())71 {70 //if (GameMode::isMaster()) 71 //{ 72 72 /* this->setCollisionType(WorldEntity::Kinematic); 73 73 this->setVelocity(0,0,-100);*/ … … 92 92 93 93 this->destroyTimer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&SimpleRocket::destroyObject, this))); 94 }94 // } 95 95 96 96 } -
code/branches/rocket/src/modules/weapons/weaponmodes/SimpleRocketFire.cc
r6810 r6813 31 31 #include "util/Math.h" 32 32 #include "core/CoreIncludes.h" 33 #include "weapons/ projectiles/SimpleRocket.h"33 #include "weapons/RocketController.h" 34 34 35 35 #include "weaponsystem/Weapon.h" … … 61 61 void SimpleRocketFire::fire() 62 62 { 63 SimpleRocket* rocket = new SimpleRocket(this); 63 //SimpleRocket* rocket = new SimpleRocket(this); 64 RocketController* con = new RocketController(this); 65 64 66 65 67 /* this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
Note: See TracChangeset
for help on using the changeset viewer.