Changeset 6295 for code/branches/presentation2/src/orxonox/worldentities
- Timestamp:
- Dec 9, 2009, 4:54:20 PM (15 years ago)
- Location:
- code/branches/presentation2/src/orxonox/worldentities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/orxonox/worldentities/MovableEntity.cc
r5929 r6295 79 79 if (victim) 80 80 { 81 victim->damage(this->collisionDamage_ * (victim->getVelocity() - this->getVelocity()).length()); 81 float damage = this->collisionDamage_ * (victim->getVelocity() - this->getVelocity()).length(); 82 victim->hit(0, contactPoint, damage); 82 83 } 83 84 } -
code/branches/presentation2/src/orxonox/worldentities/pawns/Pawn.cc
r6112 r6295 38 38 #include "PawnManager.h" 39 39 #include "infos/PlayerInfo.h" 40 #include "controllers/Controller.h" 40 41 #include "gametypes/Gametype.h" 41 42 #include "graphics/ParticleSpawner.h" … … 176 177 } 177 178 179 void Pawn::hit(Pawn* originator, btManifoldPoint& contactpoint, float damage) 180 { 181 if (this->getGametype() && this->getGametype()->allowPawnHit(this, originator)) 182 { 183 this->damage(damage, originator); 184 185 if ( this->getController() ) 186 this->getController()->hit(originator, contactpoint, damage); 187 188 // play hit effect 189 } 190 } 191 178 192 void Pawn::kill() 179 193 { -
code/branches/presentation2/src/orxonox/worldentities/pawns/Pawn.h
r6111 r6295 75 75 { return this->lastHitOriginator_; } 76 76 77 virtual void damage(float damage, Pawn* originator = 0);78 77 virtual void hit(Pawn* originator, const Vector3& force, float damage); 78 virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage); 79 79 virtual void kill(); 80 80 … … 131 131 virtual void spawneffect(); 132 132 133 virtual void damage(float damage, Pawn* originator = 0); 134 133 135 bool bAlive_; 134 136
Note: See TracChangeset
for help on using the changeset viewer.