Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9235 in orxonox.OLD for trunk/src/world_entities/projectiles


Ignore:
Timestamp:
Jul 5, 2006, 4:39:02 PM (18 years ago)
Author:
bensch
Message:

merged the presentation back

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  
    3535  this->setClassID(CL_GUIDED_MISSILE, "GuidedMissile");
    3636
    37   this->loadModel("models/projectiles/orx-rocket.obj", .3);
     37  this->loadModel("models/projectiles/orx-rocket.obj", 2.0);
    3838  this->loadExplosionSound("sound/explosions/explosion_4.wav");
    3939
     
    8888    GuidedMissile::trailParticles->setLifeSpan(1.0, .3);
    8989    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);
    9393    GuidedMissile::trailParticles->setColor(0.0, 1,0,0,.7);
    9494    GuidedMissile::trailParticles->setColor(0.2, .8,.8,0,.5);
     
    135135{
    136136  if (this->hitEntity != entity)
    137     this->destroy();
     137    this->destroy( entity );
    138138  this->hitEntity = entity;
    139139}
     
    180180 *  the function gets called, when the projectile is destroyed
    181181 */
    182 void GuidedMissile::destroy ()
    183 {
    184   Projectile::destroy();
     182void GuidedMissile::destroy (WorldEntity* killer)
     183{
     184
     185  printf("THIS SHOULD WORLk\n");
     186
     187  Projectile::destroy( killer );
    185188  PRINTF(5)("DESTROY GuidedMissile\n");
    186189  this->lifeCycle = .95; //!< @todo calculate this usefully.
  • trunk/src/world_entities/projectiles/guided_missile.h

    r6622 r9235  
    2626    virtual void collidesWith(WorldEntity* entity, const Vector& location);
    2727
    28     virtual void destroy ();
     28    virtual void destroy (WorldEntity* killer);
    2929
    3030    virtual void tick (float time);
  • trunk/src/world_entities/projectiles/hyperblast.cc

    r8362 r9235  
    126126 *  the function gets called, when the projectile is destroyed
    127127*/
    128 void Hyperblast::destroy ()
     128void Hyperblast::destroy (WorldEntity* killer)
    129129{
    130   Projectile::destroy();
     130  Projectile::destroy( killer );
    131131
    132132  PRINTF(5)("DESTROY Hyperblast\n");
  • trunk/src/world_entities/projectiles/hyperblast.h

    r6821 r9235  
    2727    virtual void collidesWith(WorldEntity* entity, const Vector& location);
    2828
    29     virtual void destroy ();
     29    virtual void destroy (WorldEntity* killer);
    3030
    3131    virtual void tick (float time);
  • trunk/src/world_entities/projectiles/laser.cc

    r9061 r9235  
    4242
    4343  this->setMinEnergy(10);
    44   this->setHealthMax(10);
     44  this->setHealthMax(0);
    4545  this->lifeSpan = 5.0;
    4646
     
    8888  }
    8989
    90   this->setHealth(10);
     90  this->setDamage(0);
     91  this->setHealth(0);
    9192}
    9293
     
    107108{
    108109  if (this->hitEntity != entity && entity->isA(CL_NPC))
    109     this->destroy();
     110    this->destroy( entity );
    110111  this->hitEntity = entity;
    111112}
     
    128129 *  the function gets called, when the projectile is destroyed
    129130*/
    130 void Laser::destroy ()
     131void Laser::destroy (WorldEntity* killer)
    131132{
    132   Projectile::destroy();
     133  Projectile::destroy( killer );
    133134  PRINTF(5)("DESTROY Laser\n");
    134135  this->lifeCycle = .95; //!< @todo calculate this usefully.
  • trunk/src/world_entities/projectiles/laser.h

    r6622 r9235  
    2727    virtual void collidesWith(WorldEntity* entity, const Vector& location);
    2828
    29     virtual void destroy ();
     29    virtual void destroy (WorldEntity* killer);
    3030
    3131    virtual void tick (float dt);
  • trunk/src/world_entities/projectiles/projectile.cc

    r8362 r9235  
    4141  /* character attributes */
    4242  this->setHealth(1.0f);
    43   this->setDamage(100.0f); // default damage of a projectile set to 100.0 damage points
     43  this->setDamage(1.0f); // default damage of a projectile set to 100.0 damage points
    4444
    4545  this->explosionBuffer = NULL;
     
    162162
    163163  if (this->tickLifeCycle(dt))
    164     this->destroy();
     164    this->destroy( NULL );
    165165}
    166166
     
    169169 *  the function gets called, when the projectile is destroyed
    170170*/
    171 void Projectile::destroy ()
     171void Projectile::destroy (WorldEntity* killer)
    172172{
    173173  if (this->explosionBuffer != NULL)
  • trunk/src/world_entities/projectiles/projectile.h

    r7460 r9235  
    4141    virtual void deactivate() = 0;
    4242
    43     virtual void destroy ();
     43    virtual void destroy (WorldEntity* killer);
    4444
    4545    virtual void tick (float dt);
  • trunk/src/world_entities/projectiles/rocket.cc

    r8362 r9235  
    128128{
    129129  if (this->hitEntity != entity)
    130     this->destroy();
     130    this->destroy( entity );
    131131  this->hitEntity = entity;
    132132}
     
    149149 *  the function gets called, when the projectile is destroyed
    150150*/
    151 void Rocket::destroy ()
     151void Rocket::destroy (WorldEntity* killer)
    152152{
    153   Projectile::destroy();
     153  Projectile::destroy( killer );
    154154
    155155  PRINTF(5)("DESTROY Rocket\n");
  • trunk/src/world_entities/projectiles/rocket.h

    r6622 r9235  
    2727    virtual void collidesWith(WorldEntity* entity, const Vector& location);
    2828
    29     virtual void destroy ();
     29    virtual void destroy (WorldEntity* killer);
    3030
    3131    virtual void tick (float time);
  • trunk/src/world_entities/projectiles/test_bullet.cc

    r8362 r9235  
    119119{
    120120  if (this->hitEntity != entity && entity->isA(CL_NPC))
    121     this->destroy();
     121    this->destroy( entity );
    122122  this->hitEntity = entity;
    123123}
     
    147147 *  the function gets called, when the projectile is destroyed
    148148*/
    149 void TestBullet::destroy ()
     149void TestBullet::destroy (WorldEntity* killer)
    150150{
    151151  PRINTF(5)("DESTROY TestBullet\n");
  • trunk/src/world_entities/projectiles/test_bullet.h

    r6624 r9235  
    2727    virtual void collidesWith(WorldEntity* entity, const Vector& location);
    2828
    29     virtual void destroy ();
     29    virtual void destroy (WorldEntity* killer);
    3030
    3131    virtual void tick (float time);
Note: See TracChangeset for help on using the changeset viewer.