- Timestamp:
- Apr 2, 2014, 8:38:07 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/modularships/src/orxonox/worldentities/MovableEntity.cc
r9995 r10011 72 72 } 73 73 74 bool MovableEntity::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)74 bool MovableEntity::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) 75 75 { 76 76 if (GameMode::isMaster() && enableCollisionDamage_) … … 80 80 { 81 81 float damage = this->collisionDamage_ * (victim->getVelocity() - this->getVelocity()).length(); 82 victim->hit(0, contactPoint, damage);82 victim->hit(0, contactPoint, ownCollisionShape, damage); 83 83 } 84 84 } … … 86 86 return false; 87 87 } 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 104 88 105 89 void MovableEntity::registerVariables()
Note: See TracChangeset
for help on using the changeset viewer.