- Timestamp:
- Jun 26, 2006, 12:59:13 AM (18 years ago)
- Location:
- trunk/src
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/collision_reaction/cr_object_damage.cc
r8724 r8777 56 56 float damage = 0.0f; 57 57 58 PRINTF( 4)("Dealing damage - Handling collision: %s vs %s\n",58 PRINTF(5)("Dealing damage - Handling collision: %s vs %s\n", 59 59 collision->getEntityA()->getClassName(), 60 60 collision->getEntityB()->getClassName()); -
trunk/src/world_entities/npcs/ground_turret.cc
r8724 r8777 180 180 this->setAbsDirSoft(Quaternion(-90, Vector(0,0,1)), 90); 181 181 Explosion::explode(this, Vector(10,10,10)); 182 183 this->toList(OM_DEAD); 182 184 } -
trunk/src/world_entities/weapons/aiming_turret.cc
r7350 r8777 152 152 } 153 153 154 void AimingTurret::destroy ()155 {}156 154 157 155 /** -
trunk/src/world_entities/weapons/aiming_turret.h
r6512 r8777 27 27 virtual void tick(float dt); 28 28 virtual void fire(); 29 virtual void destroy(); 29 30 30 31 31 virtual void draw() const; -
trunk/src/world_entities/weapons/cannon.cc
r7193 r8777 167 167 } 168 168 169 /**170 * is called, when the weapon is destroyed171 *172 * this is in conjunction with the hit function, so when a weapon is able to get173 * hit, it can also be destoryed.174 */175 void Cannon::destroy ()176 {}177 169 178 170 /** -
trunk/src/world_entities/weapons/cannon.h
r6512 r8777 24 24 25 25 virtual void fire(); 26 virtual void destroy();27 26 28 27 virtual void draw() const; -
trunk/src/world_entities/weapons/hyperblaster.cc
r7193 r8777 155 155 } 156 156 157 /** 158 * is called, when the weapon is destroyed 159 * 160 * this is in conjunction with the hit function, so when a weapon is able to get 161 * hit, it can also be destoryed. 162 */ 163 void Hyperblaster::destroy () 164 {} 157 -
trunk/src/world_entities/weapons/hyperblaster.h
r6810 r8777 23 23 24 24 virtual void fire(); 25 virtual void destroy();26 25 27 26 private: -
trunk/src/world_entities/weapons/targeting_turret.cc
r7193 r8777 162 162 } 163 163 164 void TargetingTurret::destroy ()165 {}166 167 164 /** 168 165 * draws the TargetingTurret -
trunk/src/world_entities/weapons/targeting_turret.h
r6637 r8777 27 27 virtual void tick(float dt); 28 28 virtual void fire(); 29 virtual void destroy();30 29 31 30 virtual void draw() const; … … 36 35 float lockedTime; 37 36 float neededLockTime; 38 }; 37 }; 39 38 40 39 #endif /* _TARGETING_TURRET_H */ -
trunk/src/world_entities/weapons/test_gun.cc
r7193 r8777 190 190 } 191 191 192 /** 193 * is called, when the weapon is destroyed 194 * 195 * this is in conjunction with the hit function, so when a weapon is able to get 196 * hit, it can also be destoryed. 197 */ 198 void TestGun::destroy () 199 {} 192 200 193 201 194 /** -
trunk/src/world_entities/weapons/test_gun.h
r6512 r8777 49 49 50 50 virtual void fire(); 51 virtual void destroy();52 51 53 52 virtual void draw() const; -
trunk/src/world_entities/weapons/turret.cc
r7193 r8777 149 149 pj->activate(); 150 150 } 151 152 void Turret::destroy ()153 {} -
trunk/src/world_entities/weapons/turret.h
r6512 r8777 24 24 virtual void tick(float dt); 25 25 virtual void fire(); 26 virtual void destroy();27 26 28 27 -
trunk/src/world_entities/weapons/weapon.h
r7779 r8777 173 173 virtual void fire() {}; 174 174 virtual void reload() {}; 175 virtual void destroy() {};176 175 177 176 -
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 -
trunk/src/world_entities/world_entity.h
r8724 r8777 95 95 96 96 virtual void hit(float damage); 97 virtual void destroy() {};97 virtual void destroy(); 98 98 99 99
Note: See TracChangeset
for help on using the changeset viewer.