- Timestamp:
- May 3, 2010, 1:40:16 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/rocket/src/modules/weapons/RocketController.cc
r6817 r6834 32 32 #include "weapons/projectiles/SimpleRocket.h" 33 33 #include "util/Debug.h" 34 34 #include "weapons/weaponmodes/SimpleRocketFire.h" 35 35 36 36 namespace orxonox … … 45 45 46 46 RegisterObject(RocketController); 47 SimpleRocket*rocket = new SimpleRocket(this);48 rocket->setController(this);47 this->rocket = new SimpleRocket(this); 48 this->rocket->setController(dynamic_cast<RocketController*>(this)); 49 49 this->setControllableEntity(dynamic_cast<ControllableEntity*> (rocket)); 50 51 50 } 52 51 … … 62 61 63 62 SimpleRocket *rocket = static_cast<SimpleRocket*>(this->getControllableEntity()); 64 65 66 rocket->rotateYaw(0.2); 67 //rocket->moveFrontBack(2); 63 double rd = rand(); 64 if (rd > 0.5) rocket->rotateRoll(5); 65 else rocket->rotatePitch(5); 68 66 69 67 }
Note: See TracChangeset
for help on using the changeset viewer.