- Timestamp:
- Nov 24, 2005, 3:28:38 PM (19 years ago)
- Location:
- branches/guidedmissile/src/world_entities/weapons
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/guidedmissile/src/world_entities/weapons/guided_missile.cc
r5759 r5760 47 47 this->energyMax = 10; 48 48 this->remove(); 49 this->lifeSpan = 2; 49 this->lifeSpan = 5; 50 this->agility = 1; 50 51 51 52 this->emitter = new ParticleEmitter(Vector(0,1,0), M_2_PI, 100, 5); … … 80 81 ParticleSystem* GuidedMissile::trailParticles = NULL; 81 82 ParticleSystem* GuidedMissile::explosionParticles = NULL; 83 84 85 void GuidedMissile::setTarget(PNode* target) 86 { 87 88 this->target.setParent(target); 89 90 } 91 82 92 83 93 void GuidedMissile::activate() … … 147 157 { 148 158 //Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.1); 159 velocity += ((target.getAbsCoor() - this->getAbsCoor()).getNormalized())*agility; 149 160 Vector v = this->velocity * (time); 150 161 this->shiftCoor(v); -
branches/guidedmissile/src/world_entities/weapons/guided_missile.h
r5759 r5760 40 40 41 41 ParticleEmitter* emitter; 42 Aim* target; 42 PNode target; 43 float agility; 43 44 44 45 WorldEntity* hitEntity; // FIXME TEMPORARY
Note: See TracChangeset
for help on using the changeset viewer.