Changeset 3531 in orxonox.OLD for orxonox/trunk/src/world_entities
- Timestamp:
- Mar 13, 2005, 10:50:43 PM (20 years ago)
- Location:
- orxonox/trunk/src/world_entities
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/npc.h
r3472 r3531 12 12 NPC (); 13 13 ~NPC (); 14 void destroy(void); 14 15 15 16 /* collision control */ -
orxonox/trunk/src/world_entities/player.cc
r3526 r3531 37 37 Player::~Player () 38 38 { 39 this->destroy(); 40 } 41 42 /** 43 \brief deletes all allocated memory of the Player 44 */ 45 void Player::destroy () 46 { 39 47 delete this->model; 48 49 static_cast<WorldEntity*>(this)->destroy(); 40 50 } 41 51 … … 72 82 } 73 83 74 /**75 \brief action that happens when the player is destroyed.76 */77 void Player::destroy ()78 {79 }80 84 81 85 /** -
orxonox/trunk/src/world_entities/player.h
r3471 r3531 18 18 public: 19 19 Player(bool isFree = false); 20 ~Player(); 20 virtual ~Player(); 21 void destroy(); 21 22 22 23 virtual void postSpawn(); 23 24 virtual void tick(float time); 24 25 virtual void hit(WorldEntity* weapon, Vector loc); 25 virtual void destroy();26 26 virtual void collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags); 27 27 virtual void command(Command* cmd); -
orxonox/trunk/src/world_entities/primitive.cc
r3526 r3531 39 39 } 40 40 41 void Primitive::destroy () 42 { 43 44 45 static_cast<WorldEntity*>(this)->destroy(); 46 } 47 48 41 49 void Primitive::tick (float time) 42 50 { … … 48 56 void Primitive::hit (WorldEntity* weapon, Vector loc) {} 49 57 50 void Primitive::destroy () {}51 58 52 59 void Primitive::collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags) {} -
orxonox/trunk/src/world_entities/primitive.h
r3524 r3531 12 12 public: 13 13 Primitive (PRIMITIVE_FORM form); 14 ~Primitive (); 15 14 virtual ~Primitive (); 15 void destroy(void); 16 16 17 virtual void tick (float time); 17 18 virtual void hit (WorldEntity* weapon, Vector loc); 18 virtual void destroy ();19 19 virtual void collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags); 20 20 virtual void draw (); -
orxonox/trunk/src/world_entities/skysphere.cc
r3526 r3531 57 57 Skysphere::~Skysphere() 58 58 { 59 this->destroy(); 60 } 61 62 void Skysphere::destroy(void) 63 { 64 59 65 PRINTF(3)("Deleting the SkySphere\n"); 60 66 delete skyMaterial; 61 67 free(sphereObj); 68 69 static_cast<WorldEntity*>(this)->destroy(); 62 70 } 63 64 71 65 72 /** -
orxonox/trunk/src/world_entities/skysphere.h
r3507 r3531 28 28 Skysphere(); 29 29 Skysphere(char* fileName); 30 ~Skysphere(); 30 virtual ~Skysphere(); 31 void destroy(); 31 32 32 33 void setRadius(float radius); -
orxonox/trunk/src/world_entities/world_entity.cc
r3474 r3531 47 47 { 48 48 // if( collisioncluster != NULL) delete collisioncluster; 49 } 49 this->destroy(); 50 } 51 52 /** 53 \brief Function to call if a WorldEntity is destroyed. deletes all alocated memory. 54 */ 55 void WorldEntity::destroy() 56 { 57 58 // delete everything of pNode. 59 static_cast<PNode*>(this)->destroy(); 60 } 61 50 62 51 63 /** … … 156 168 void WorldEntity::hit(WorldEntity* weapon, Vector loc) {} 157 169 158 /**159 \brief this function is called when the entity is to be destroied160 161 This can be called, if eg. something realy bad happens :)162 */163 void WorldEntity::destroy() {}164 170 165 171 -
orxonox/trunk/src/world_entities/world_entity.h
r3474 r3531 21 21 WorldEntity (bool isFree = false); 22 22 virtual ~WorldEntity (); 23 void destroy (); 24 23 25 24 26 OBJModel* model; //!< The model that should be loaded for this entity. … … 34 36 virtual void tick (float time); 35 37 virtual void hit (WorldEntity* weapon, Vector loc); 36 virtual void destroy ();37 38 virtual void collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags); 38 39 virtual void command (Command* cmd);
Note: See TracChangeset
for help on using the changeset viewer.