Changeset 10261 in orxonox.OLD for branches/playability/src/world_entities/projectiles
- Timestamp:
- Jan 17, 2007, 4:14:41 PM (18 years ago)
- Location:
- branches/playability/src/world_entities/projectiles
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/projectiles/hbolt.cc
r10180 r10261 113 113 } 114 114 115 /* 116 void HBolt:: collidesWith(WorldEntity* entity, const Vector& location)115 116 void HBolt::hit (WorldEntity* entity, float damage) 117 117 { 118 118 printf("Collision with HBolt\n"); … … 120 120 this->destroy( entity ); 121 121 this->hitEntity = entity; 122 dynamic_cast<SpaceShip*>(entity)->damage( this->getPhysDamage(), this->getElecDamage());122 // dynamic_cast<SpaceShip*>(entity)->damage( this->getPhysDamage(), this->getElecDamage()); 123 123 this->deactivate(); 124 } */124 } 125 125 126 126 -
branches/playability/src/world_entities/projectiles/hbolt.h
r10180 r10261 27 27 virtual void deactivate(); 28 28 29 // virtual void collidesWith(WorldEntity* entity, const Vector& location);29 virtual void hit (WorldEntity* entity, float damage); 30 30 31 31 virtual void destroy (WorldEntity* killer); -
branches/playability/src/world_entities/projectiles/lbolt.cc
r10180 r10261 115 115 } 116 116 117 /* 118 void LBolt:: collidesWith(WorldEntity* entity, const Vector& location)117 118 void LBolt::hit (WorldEntity* entity, float damage) 119 119 { 120 120 PRINTF(0)("Collision with LBolt\n"); … … 122 122 this->destroy( entity ); 123 123 this->hitEntity = entity; 124 dynamic_cast<SpaceShip*>(entity)->damage(this->getDamage(),0); 125 // this->deactivate(); 126 }*/ 124 this->deactivate(); 125 } 127 126 128 127 /** -
branches/playability/src/world_entities/projectiles/lbolt.h
r10180 r10261 27 27 virtual void deactivate(); 28 28 29 // virtual void collidesWith(WorldEntity* entity, const Vector& location);29 virtual void hit (WorldEntity* entity, float damage); 30 30 31 31 virtual void destroy (WorldEntity* killer); -
branches/playability/src/world_entities/projectiles/mbolt.cc
r10180 r10261 75 75 76 76 dynamic_cast<StaticModel*>(this->getModel())->rebuild(); 77 this->buildObbTree(4);77 //this->buildObbTree(4); 78 78 79 79 this->trail = new Trail(6, 4, .1, this); … … 141 141 } 142 142 143 /* 144 void MBolt::collidesWith(WorldEntity* entity, const Vector& location) 143 void MBolt::hit (WorldEntity* entity, float damage) 145 144 { 146 145 … … 148 147 this->destroy( entity ); 149 148 this->hitEntity = entity; 150 dynamic_cast<SpaceShip*>(entity)->damage(this->getPhysDamage(),this->getElecDamage());149 // dynamic_cast<SpaceShip*>(entity)->damage(this->getPhysDamage(),this->getElecDamage()); 151 150 //this->destroy(this); 152 151 this->deactivate(); … … 154 153 return; 155 154 156 //dynamic_cast<SpaceShip*>(entity)->damage( this->getPhysDamage(), this->getElecDamage()); 157 //entity->destroy(this); 158 //this->deactivate(); 159 }*/ 155 } 160 156 161 157 /** -
branches/playability/src/world_entities/projectiles/mbolt.h
r10180 r10261 28 28 virtual void deactivate(); 29 29 30 // virtual void collidesWith(WorldEntity* entity, const Vector& location);30 virtual void hit (WorldEntity* entity, float damage); 31 31 32 32 virtual void destroy (WorldEntity* killer); -
branches/playability/src/world_entities/projectiles/spike_ball.cc
r10260 r10261 124 124 } 125 125 this->setDamage(5); 126 this->setHealth( 0);126 this->setHealth(10); 127 127 this->setRotationAxis(VECTOR_RAND(1)); 128 128 this->setAngle(); -
branches/playability/src/world_entities/projectiles/swarm_projectile.cc
r10196 r10261 129 129 130 130 131 void SwarmProjectile:: collidesWith(WorldEntity* entity, const Vector& location)131 void SwarmProjectile::hit (WorldEntity* entity, float damage) 132 132 { 133 133 if (this->hitEntity != entity) … … 135 135 this->hitEntity = entity; 136 136 //dynamic_cast<SpaceShip*>(entity)->damage(this->getPhysDamage(),this->getElecDamage()); 137 this->destroy(this); 137 // this->destroy(this); 138 this->deactivate(); 138 139 } 139 140 -
branches/playability/src/world_entities/projectiles/swarm_projectile.h
r10132 r10261 26 26 virtual void deactivate(); 27 27 28 virtual void collidesWith(WorldEntity* entity, const Vector& location);28 virtual void hit (WorldEntity* entity, float damage); 29 29 30 30 virtual void destroy (WorldEntity* killer);
Note: See TracChangeset
for help on using the changeset viewer.