Changeset 5766 in orxonox.OLD for trunk/src/world_entities/weapons
- Timestamp:
- Nov 24, 2005, 6:03:24 PM (19 years ago)
- Location:
- trunk/src/world_entities/weapons
- Files:
-
- 3 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/weapons/projectile.cc
r5511 r5766 38 38 this->lifeCycle = 0.0; 39 39 this->lifeSpan = 1.0f; /* sec */ 40 this->target = NULL; 40 41 41 42 this->remove(); … … 98 99 } 99 100 101 102 103 void Projectile::setTarget(PNode* target) 104 { 105 106 if (this->target == NULL) 107 this->target = new PNode(); 108 this->target->setParent(target); 109 } 110 111 100 112 /** 101 113 * signal tick, time dependent things will be handled here -
trunk/src/world_entities/weapons/projectile.h
r5500 r5766 31 31 inline bool isChageable() { return this->bChargeable; }; 32 32 33 void setTarget(PNode* target); 33 34 34 35 /** @brief This is called, when the Projectile is Emitted */ … … 54 55 55 56 Vector velocity; //!< velocity of the projectile. 57 58 PNode* target; //!< A target for guided Weapons. 56 59 }; 57 60 -
trunk/src/world_entities/weapons/turret.cc
r5750 r5766 138 138 pj->setVelocity(this->getVelocity()+(this->getAbsDir().apply(Vector(1,0,0))*100.0 + VECTOR_RAND(13) 139 139 /*target->getAbsCoor() - this->getAbsCoor()*/)*.5);//this->getVelocity()); 140 140 141 141 142 pj->setParent(NullParent::getInstance());
Note: See TracChangeset
for help on using the changeset viewer.