Changeset 8169 in orxonox.OLD for branches/cr/src
- Timestamp:
- Jun 6, 2006, 2:05:33 AM (19 years ago)
- Location:
- branches/cr/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cr/src/lib/collision_reaction/cr_object_damage.cc
r8168 r8169 60 60 // the collision damage been dealed by the entity 61 61 if( collision->isEntityACollide()) { 62 damage = collision->getEntityB()->get HealthMax();62 damage = collision->getEntityB()->getDamage(); 63 63 collision->getEntityA()->decreaseHealth(damage); 64 64 } … … 66 66 67 67 if( collision->isEntityBCollide()) { 68 damage = collision->getEntityA()->get HealthMax();68 damage = collision->getEntityA()->getDamage(); 69 69 collision->getEntityB()->decreaseHealth(damage); 70 70 } -
branches/cr/src/world_entities/projectiles/projectile.cc
r7460 r8169 38 38 this->target = NULL; 39 39 this->removeNode(); 40 41 /* character attributes */ 42 this->setHealth(1.0f); 43 this->setDamage(100.0f); // default damage of a projectile set to 100.0 damage points 40 44 41 45 this->explosionBuffer = NULL; -
branches/cr/src/world_entities/world_entity.cc
r8168 r8169 61 61 this->healthMax = 1.0f; 62 62 this->health = 1.0f; 63 this->damage = 0.0f; // no damage dealt by a default entity 63 64 this->scaling = 1.0f; 64 65 -
branches/cr/src/world_entities/world_entity.h
r8106 r8169 106 106 107 107 /* --- Character Attribute Block --- */ 108 /** @returns the damage dealt by this world entity */ 109 float getDamage() const { return this->damage; } 110 /** sets the damage dealt to @param damage damage per second */ 111 void setDamage(float damage) { this->damage = damage; } 108 112 /** @returns the Energy of the entity */ 109 113 float getHealth() const { return this->health; }; … … 142 146 private: 143 147 /// TODO maybe we will move the following three entries and the corresponding functions to Playable AND NPC 148 float damage; //!< the damage dealt to other objects by colliding. 144 149 float health; //!< The Energy of this Entity, if the Entity has any energy at all. 145 150 float healthMax; //!< The Maximal energy this entity can take.
Note: See TracChangeset
for help on using the changeset viewer.