Changeset 8854 in orxonox.OLD for branches/multi_player_map/src
- Timestamp:
- Jun 28, 2006, 2:42:19 PM (18 years ago)
- Location:
- branches/multi_player_map/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/multi_player_map/src/lib/collision_reaction/cr_object_damage.cc
r8838 r8854 63 63 if( collision->isEntityACollide()) { 64 64 damage = collision->getEntityB()->getDamage(); 65 collision->getEntityA()->hit(damage );65 collision->getEntityA()->hit(damage, , collision->getEntityB()); 66 66 } 67 67 PRINTF(4)("Dealing damage - %f damage to %s \n", damage, collision->getEntityA()->getClassName()); … … 69 69 if( collision->isEntityBCollide()) { 70 70 damage = collision->getEntityA()->getDamage(); 71 collision->getEntityB()->hit(damage );71 collision->getEntityB()->hit(damage, collision->getEntityA()); 72 72 } 73 73 PRINTF(4)("Dealing damage - %f damage to %s \n", damage, collision->getEntityB()->getClassName()); -
branches/multi_player_map/src/world_entities/world_entity.cc
r8845 r8854 735 735 * @param damage damage to be dealt 736 736 */ 737 void WorldEntity::hit(float damage )737 void WorldEntity::hit(float damage, WorldEntity* killer) 738 738 { 739 739 this->decreaseHealth(damage); … … 750 750 751 751 if( State::getGameRules() != NULL) 752 State::getGameRules()->registerKill(Kill( NULL, this));752 State::getGameRules()->registerKill(Kill(killer, this)); 753 753 } 754 754 } -
branches/multi_player_map/src/world_entities/world_entity.h
r8832 r8854 94 94 CollisionHandle* getCollisionHandle(CREngine::CRType type) const { return this->collisionHandles[type]; } 95 95 96 virtual void hit(float damage );96 virtual void hit(float damage, WorldEntity* killer); 97 97 virtual void destroy(); 98 98 … … 184 184 std::string modelFileName; //!< model's file name 185 185 int modelFileName_handle; //!< handle for syncing var 186 187 int list_write; //!< entity's list 186 187 int list_write; //!< entity's list 188 188 int list_handle; //!< handle for list changes 189 189
Note: See TracChangeset
for help on using the changeset viewer.