Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2007, 4:14:41 PM (17 years ago)
Author:
marcscha
Message:

Fixes and cleanups

Location:
branches/playability/src/world_entities/projectiles
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/world_entities/projectiles/hbolt.cc

    r10180 r10261  
    113113}
    114114
    115 /*
    116 void HBolt::collidesWith(WorldEntity* entity, const Vector& location)
     115
     116void HBolt::hit (WorldEntity* entity, float damage)
    117117{
    118118  printf("Collision with HBolt\n");
     
    120120    this->destroy( entity );
    121121  this->hitEntity = entity;
    122   dynamic_cast<SpaceShip*>(entity)->damage( this->getPhysDamage(), this->getElecDamage());
     122 // dynamic_cast<SpaceShip*>(entity)->damage( this->getPhysDamage(), this->getElecDamage());
    123123  this->deactivate();
    124 }*/
     124}
    125125
    126126
  • branches/playability/src/world_entities/projectiles/hbolt.h

    r10180 r10261  
    2727    virtual void deactivate();
    2828
    29 //     virtual void collidesWith(WorldEntity* entity, const Vector& location);
     29    virtual void hit (WorldEntity* entity, float damage);
    3030
    3131    virtual void destroy (WorldEntity* killer);
  • branches/playability/src/world_entities/projectiles/lbolt.cc

    r10180 r10261  
    115115}
    116116
    117 /*
    118 void LBolt::collidesWith(WorldEntity* entity, const Vector& location)
     117
     118void LBolt::hit (WorldEntity* entity, float damage)
    119119{
    120120  PRINTF(0)("Collision with LBolt\n");
     
    122122    this->destroy( entity );
    123123  this->hitEntity = entity;
    124   dynamic_cast<SpaceShip*>(entity)->damage(this->getDamage(),0);
    125 //   this->deactivate();
    126 }*/
     124  this->deactivate();
     125}
    127126
    128127/**
  • branches/playability/src/world_entities/projectiles/lbolt.h

    r10180 r10261  
    2727    virtual void deactivate();
    2828
    29 //     virtual void collidesWith(WorldEntity* entity, const Vector& location);
     29    virtual void hit (WorldEntity* entity, float damage);
    3030
    3131    virtual void destroy (WorldEntity* killer);
  • branches/playability/src/world_entities/projectiles/mbolt.cc

    r10180 r10261  
    7575
    7676  dynamic_cast<StaticModel*>(this->getModel())->rebuild();
    77   this->buildObbTree(4);
     77  //this->buildObbTree(4);
    7878 
    7979  this->trail = new Trail(6, 4, .1, this);
     
    141141}
    142142
    143 /*
    144 void MBolt::collidesWith(WorldEntity* entity, const Vector& location)
     143void MBolt::hit (WorldEntity* entity, float damage)
    145144{
    146145
     
    148147    this->destroy( entity );
    149148  this->hitEntity = entity;
    150   dynamic_cast<SpaceShip*>(entity)->damage(this->getPhysDamage(),this->getElecDamage());
     149 // dynamic_cast<SpaceShip*>(entity)->damage(this->getPhysDamage(),this->getElecDamage());
    151150  //this->destroy(this);
    152151  this->deactivate();
     
    154153  return;
    155154
    156   //dynamic_cast<SpaceShip*>(entity)->damage( this->getPhysDamage(), this->getElecDamage());
    157   //entity->destroy(this);
    158   //this->deactivate();
    159 }*/
     155}
    160156
    161157/**
  • branches/playability/src/world_entities/projectiles/mbolt.h

    r10180 r10261  
    2828    virtual void deactivate();
    2929
    30 //     virtual void collidesWith(WorldEntity* entity, const Vector& location);
     30    virtual void hit (WorldEntity* entity, float damage);
    3131
    3232    virtual void destroy (WorldEntity* killer);
  • branches/playability/src/world_entities/projectiles/spike_ball.cc

    r10260 r10261  
    124124  }
    125125  this->setDamage(5);
    126   this->setHealth(0);
     126  this->setHealth(10);
    127127  this->setRotationAxis(VECTOR_RAND(1));
    128128  this->setAngle();
  • branches/playability/src/world_entities/projectiles/swarm_projectile.cc

    r10196 r10261  
    129129
    130130
    131 void SwarmProjectile::collidesWith(WorldEntity* entity, const Vector& location)
     131void SwarmProjectile::hit (WorldEntity* entity, float damage)
    132132{
    133133  if (this->hitEntity != entity)
     
    135135  this->hitEntity = entity;
    136136  //dynamic_cast<SpaceShip*>(entity)->damage(this->getPhysDamage(),this->getElecDamage());
    137   this->destroy(this);
     137 // this->destroy(this);
     138  this->deactivate();
    138139}
    139140
  • branches/playability/src/world_entities/projectiles/swarm_projectile.h

    r10132 r10261  
    2626    virtual void deactivate();
    2727
    28     virtual void collidesWith(WorldEntity* entity, const Vector& location);
     28    virtual void hit (WorldEntity* entity, float damage);
    2929
    3030    virtual void destroy (WorldEntity* killer);
Note: See TracChangeset for help on using the changeset viewer.