Changeset 9959 in orxonox.OLD for branches/playability/src
- Timestamp:
- Nov 26, 2006, 11:44:49 AM (18 years ago)
- Location:
- branches/playability/src/world_entities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/projectiles/projectile.cc
r9958 r9959 122 122 123 123 124 125 void Projectile::collidesWith (WorldEntity* entity, const Vector& location) 124 void Projectile::collidesWith (SpaceShip* target, const Vector& location) 126 125 { 127 //if (entity->isA(CL_SPACE_SHIP)) /* FIXME make sure that entity is a spaceship*/ 128 // entity->damage(this->physDamage, this->elecDamage); /* and do some damage*/ 129 this->destroy(entity); 126 target->damage(this->physDamage, this->elecDamage); 127 this->destroy(target); 130 128 } 131 129 -
branches/playability/src/world_entities/projectiles/projectile.h
r9958 r9959 12 12 #include "world_entity.h" 13 13 #include "loading/fast_factory.h" 14 #include "space_ships/space_ship.h" 14 15 15 16 #include "sound_source.h" … … 44 45 virtual void destroy (WorldEntity* killer); 45 46 46 virtual void collidesWith (WorldEntity* entity, const Vector& location); //!< collision handler as used in diverse weapons 47 virtual void collidesWith (SpaceShip* target, const Vector& location); //!< collision handler; used against SpaceShip as most target will be 48 47 49 48 50 virtual void tick (float dt); … … 63 65 float lifeSpan; //!< The entire lifespan of the Shoot. in seconds 64 66 67 float physDamage; //!< damage to shield and armor 68 float elecDamage; //!< damage to elctronic 69 65 70 Vector flightDirection; //!< DOF direction in which the shoot flighs 66 71 … … 73 78 OrxSound::SoundBuffer explosionBuffer; 74 79 OrxSound::SoundBuffer engineBuffer; 75 76 int physDamage; //!< damage to shield and armor77 int elecDamage; //!< damage to elctronic78 80 }; 79 81 -
branches/playability/src/world_entities/space_ships/space_ship.cc
r9958 r9959 50 50 // #include "lib/gui/gl_gui/glgui_bar.h" 51 51 // #include "lib/gui/gl_gui/glgui_pushbutton.h" 52 53 52 54 53
Note: See TracChangeset
for help on using the changeset viewer.