This commit is contained in:
Charles 2001-07-28 15:44:00 +00:00
parent dda6189111
commit 58b8952233
2 changed files with 24 additions and 0 deletions

View File

@ -252,6 +252,18 @@ void CNpcCartPlatform::processMovement( int _frames )
setCollisionAngle( heading );
testPos2 = Pos;
testPos2.vx += 32;
yDiff = CGameScene::getCollision()->getHeightFromGroundCart( testPos2.vx, testPos2.vy, sensorDist + 1 );
if ( yDiff <= sensorDist )
{
// only use if there is ground present
testPos2.vy += yDiff;
}
switch ( CGameScene::getCollision()->getCollisionBlock( testPos2.vx, testPos2.vy - 8 ) & COLLISION_TYPE_MASK )
{
case COLLISION_TYPE_FLAG_DAMAGE:

View File

@ -244,6 +244,18 @@ void CNpcGhostTrainPlatform::processMovement( int _frames )
setCollisionAngle( heading );
testPos2 = Pos;
testPos2.vx += 32;
yDiff = CGameScene::getCollision()->getHeightFromGroundCart( testPos2.vx, testPos2.vy, sensorDist + 1 );
if ( yDiff <= sensorDist )
{
// only use if there is ground present
testPos2.vy += yDiff;
}
switch ( CGameScene::getCollision()->getCollisionBlock( testPos2.vx, testPos2.vy - 8 ) & COLLISION_TYPE_MASK )
{
case COLLISION_TYPE_FLAG_DAMAGE: