Changeset 9235 in orxonox.OLD for trunk/src/world_entities/projectiles
- Timestamp:
- Jul 5, 2006, 4:39:02 PM (18 years ago)
- Location:
- trunk/src/world_entities/projectiles
- Files:
-
- 12 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/projectiles/guided_missile.cc
r8362 r9235 35 35 this->setClassID(CL_GUIDED_MISSILE, "GuidedMissile"); 36 36 37 this->loadModel("models/projectiles/orx-rocket.obj", .3);37 this->loadModel("models/projectiles/orx-rocket.obj", 2.0); 38 38 this->loadExplosionSound("sound/explosions/explosion_4.wav"); 39 39 … … 88 88 GuidedMissile::trailParticles->setLifeSpan(1.0, .3); 89 89 GuidedMissile::trailParticles->setRadius(0.0, .5); 90 GuidedMissile::trailParticles->setRadius(0.2, 2.0);91 GuidedMissile::trailParticles->setRadius(.5, .8);92 GuidedMissile::trailParticles->setRadius(1.0, .8);90 GuidedMissile::trailParticles->setRadius(0.2, 4.0); 91 GuidedMissile::trailParticles->setRadius(.5, 1.5); 92 GuidedMissile::trailParticles->setRadius(1.0, 1.5); 93 93 GuidedMissile::trailParticles->setColor(0.0, 1,0,0,.7); 94 94 GuidedMissile::trailParticles->setColor(0.2, .8,.8,0,.5); … … 135 135 { 136 136 if (this->hitEntity != entity) 137 this->destroy( );137 this->destroy( entity ); 138 138 this->hitEntity = entity; 139 139 } … … 180 180 * the function gets called, when the projectile is destroyed 181 181 */ 182 void GuidedMissile::destroy () 183 { 184 Projectile::destroy(); 182 void GuidedMissile::destroy (WorldEntity* killer) 183 { 184 185 printf("THIS SHOULD WORLk\n"); 186 187 Projectile::destroy( killer ); 185 188 PRINTF(5)("DESTROY GuidedMissile\n"); 186 189 this->lifeCycle = .95; //!< @todo calculate this usefully. -
trunk/src/world_entities/projectiles/guided_missile.h
r6622 r9235 26 26 virtual void collidesWith(WorldEntity* entity, const Vector& location); 27 27 28 virtual void destroy ( );28 virtual void destroy (WorldEntity* killer); 29 29 30 30 virtual void tick (float time); -
trunk/src/world_entities/projectiles/hyperblast.cc
r8362 r9235 126 126 * the function gets called, when the projectile is destroyed 127 127 */ 128 void Hyperblast::destroy ( )128 void Hyperblast::destroy (WorldEntity* killer) 129 129 { 130 Projectile::destroy( );130 Projectile::destroy( killer ); 131 131 132 132 PRINTF(5)("DESTROY Hyperblast\n"); -
trunk/src/world_entities/projectiles/hyperblast.h
r6821 r9235 27 27 virtual void collidesWith(WorldEntity* entity, const Vector& location); 28 28 29 virtual void destroy ( );29 virtual void destroy (WorldEntity* killer); 30 30 31 31 virtual void tick (float time); -
trunk/src/world_entities/projectiles/laser.cc
r9061 r9235 42 42 43 43 this->setMinEnergy(10); 44 this->setHealthMax( 10);44 this->setHealthMax(0); 45 45 this->lifeSpan = 5.0; 46 46 … … 88 88 } 89 89 90 this->setHealth(10); 90 this->setDamage(0); 91 this->setHealth(0); 91 92 } 92 93 … … 107 108 { 108 109 if (this->hitEntity != entity && entity->isA(CL_NPC)) 109 this->destroy( );110 this->destroy( entity ); 110 111 this->hitEntity = entity; 111 112 } … … 128 129 * the function gets called, when the projectile is destroyed 129 130 */ 130 void Laser::destroy ( )131 void Laser::destroy (WorldEntity* killer) 131 132 { 132 Projectile::destroy( );133 Projectile::destroy( killer ); 133 134 PRINTF(5)("DESTROY Laser\n"); 134 135 this->lifeCycle = .95; //!< @todo calculate this usefully. -
trunk/src/world_entities/projectiles/laser.h
r6622 r9235 27 27 virtual void collidesWith(WorldEntity* entity, const Vector& location); 28 28 29 virtual void destroy ( );29 virtual void destroy (WorldEntity* killer); 30 30 31 31 virtual void tick (float dt); -
trunk/src/world_entities/projectiles/projectile.cc
r8362 r9235 41 41 /* character attributes */ 42 42 this->setHealth(1.0f); 43 this->setDamage(1 00.0f); // default damage of a projectile set to 100.0 damage points43 this->setDamage(1.0f); // default damage of a projectile set to 100.0 damage points 44 44 45 45 this->explosionBuffer = NULL; … … 162 162 163 163 if (this->tickLifeCycle(dt)) 164 this->destroy( );164 this->destroy( NULL ); 165 165 } 166 166 … … 169 169 * the function gets called, when the projectile is destroyed 170 170 */ 171 void Projectile::destroy ( )171 void Projectile::destroy (WorldEntity* killer) 172 172 { 173 173 if (this->explosionBuffer != NULL) -
trunk/src/world_entities/projectiles/projectile.h
r7460 r9235 41 41 virtual void deactivate() = 0; 42 42 43 virtual void destroy ( );43 virtual void destroy (WorldEntity* killer); 44 44 45 45 virtual void tick (float dt); -
trunk/src/world_entities/projectiles/rocket.cc
r8362 r9235 128 128 { 129 129 if (this->hitEntity != entity) 130 this->destroy( );130 this->destroy( entity ); 131 131 this->hitEntity = entity; 132 132 } … … 149 149 * the function gets called, when the projectile is destroyed 150 150 */ 151 void Rocket::destroy ( )151 void Rocket::destroy (WorldEntity* killer) 152 152 { 153 Projectile::destroy( );153 Projectile::destroy( killer ); 154 154 155 155 PRINTF(5)("DESTROY Rocket\n"); -
trunk/src/world_entities/projectiles/rocket.h
r6622 r9235 27 27 virtual void collidesWith(WorldEntity* entity, const Vector& location); 28 28 29 virtual void destroy ( );29 virtual void destroy (WorldEntity* killer); 30 30 31 31 virtual void tick (float time); -
trunk/src/world_entities/projectiles/test_bullet.cc
r8362 r9235 119 119 { 120 120 if (this->hitEntity != entity && entity->isA(CL_NPC)) 121 this->destroy( );121 this->destroy( entity ); 122 122 this->hitEntity = entity; 123 123 } … … 147 147 * the function gets called, when the projectile is destroyed 148 148 */ 149 void TestBullet::destroy ( )149 void TestBullet::destroy (WorldEntity* killer) 150 150 { 151 151 PRINTF(5)("DESTROY TestBullet\n"); -
trunk/src/world_entities/projectiles/test_bullet.h
r6624 r9235 27 27 virtual void collidesWith(WorldEntity* entity, const Vector& location); 28 28 29 virtual void destroy ( );29 virtual void destroy (WorldEntity* killer); 30 30 31 31 virtual void tick (float time);
Note: See TracChangeset
for help on using the changeset viewer.