- Timestamp:
- Mar 9, 2014, 9:01:44 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/modularships/src/orxonox/worldentities/MovableEntity.cc
r9667 r9995 87 87 } 88 88 89 bool MovableEntity::customCollidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) 90 { 91 if (GameMode::isMaster() && enableCollisionDamage_) 92 { 93 Pawn* victim = orxonox_cast<Pawn*>(otherObject); 94 if (victim) 95 { 96 float damage = this->collisionDamage_ * (victim->getVelocity() - this->getVelocity()).length(); 97 victim->customHit(0, contactPoint, ownCollisionShape, damage); 98 } 99 } 100 101 return false; 102 } 103 89 104 90 105 void MovableEntity::registerVariables()
Note: See TracChangeset
for help on using the changeset viewer.