Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 2, 2014, 8:38:07 PM (11 years ago)
Author:
noep
Message:

Cleaned up the process passing the collisionshape which was hit to the Pawn. Started implementation of ModularSpaceShip and ShipPart.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/modularships/src/orxonox/worldentities/MovableEntity.cc

    r9995 r10011  
    7272    }
    7373
    74     bool MovableEntity::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
     74    bool MovableEntity::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
    7575    {
    7676        if (GameMode::isMaster() && enableCollisionDamage_)
     
    8080            {
    8181                float damage = this->collisionDamage_ * (victim->getVelocity() - this->getVelocity()).length();
    82                 victim->hit(0, contactPoint, damage);
     82                victim->hit(0, contactPoint, ownCollisionShape, damage);
    8383            }
    8484        }
     
    8686        return false;
    8787    }
    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 
    10488
    10589    void MovableEntity::registerVariables()
Note: See TracChangeset for help on using the changeset viewer.