This commit is contained in:
Charles 2001-07-12 14:10:26 +00:00
parent c33c668be3
commit 3626fc1ecc
8 changed files with 46 additions and 9 deletions

View file

@ -345,10 +345,12 @@ void CNpcDualPlatform::collidedWith( CThing *_thisThing )
CPlayer *player;
DVECTOR playerPos;
CRECT collisionArea;
CRECT playerCollisionArea;
// Only interested in SBs feet colliding with the box (pkg)
player=(CPlayer*)_thisThing;
playerPos=player->getPos();
playerCollisionArea = player->getCollisionArea();
collisionArea=getCollisionArea();
s32 threshold = abs( collisionArea.y2 - collisionArea.y1 );
@ -358,7 +360,8 @@ void CNpcDualPlatform::collidedWith( CThing *_thisThing )
threshold = 16;
}
if( playerPos.vx >= collisionArea.x1 && playerPos.vx <= collisionArea.x2 )
//if( playerPos.vx >= collisionArea.x1 && playerPos.vx <= collisionArea.x2 )
if( playerCollisionArea.x2 >= collisionArea.x1 && playerCollisionArea.x1 <= collisionArea.x2 )
{
if ( checkCollisionDelta( _thisThing, threshold, collisionArea ) )
{