Changeset 8777 in orxonox.OLD for trunk/src/world_entities/world_entity.cc
- Timestamp:
- Jun 26, 2006, 12:59:13 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/world_entity.cc
r8724 r8777 38 38 #include "collision_handle.h" 39 39 #include "collision_event.h" 40 #include "game_rules.h" 41 #include "kill.h" 40 42 41 43 #include <stdarg.h> … … 82 84 83 85 // registering default reactions: 84 //this->subscribeReaction(CREngine::CR_OBJECT_DAMAGE, CL_WORLD_ENTITY);86 this->subscribeReaction(CREngine::CR_OBJECT_DAMAGE, CL_WORLD_ENTITY); 85 87 86 88 this->toList(OM_NULL); … … 736 738 this->decreaseHealth(damage); 737 739 740 PRINTF(0)("Hit me: %s now only %f/%f health\n", this->getClassName(), this->getHealth(), this->getHealthMax()); 741 738 742 if( this->getHealth() > 0) 739 743 { … … 744 748 this->destroy(); 745 749 746 // if( State::getGameRules() != NULL) 747 // State::getGameRules()->registerKill(Kill(NULL, this)); 748 } 750 if( State::getGameRules() != NULL) 751 State::getGameRules()->registerKill(Kill(NULL, this)); 752 } 753 } 754 755 756 /** 757 * destoys the world entity 758 */ 759 void WorldEntity::destroy() 760 { 761 PRINTF(0)("Destroy\n"); 762 this->toList(OM_DEAD); 749 763 } 750 764
Note: See TracChangeset
for help on using the changeset viewer.