This commit is contained in:
Charles 2001-07-03 16:12:55 +00:00
parent fdfbef475f
commit 6220f2fc85

View file

@ -356,9 +356,24 @@ void CProjectile::think(int _frames)
s32 groundHeight = CGameScene::getCollision()->getHeightFromGround( Pos.vx, Pos.vy + moveY, 16 ); s32 groundHeight = CGameScene::getCollision()->getHeightFromGround( Pos.vx, Pos.vy + moveY, 16 );
if ( groundHeight < 0 ) if ( groundHeight < 0 )
{
int blockType;
blockType = CGameScene::getCollision()->getCollisionBlock( Pos.vx, Pos.vy + moveY ) & COLLISION_TYPE_MASK;
if ( blockType == COLLISION_TYPE_FLAG_DESTRUCTABLE_FLOOR )
{
DVECTOR newPos;
newPos.vx = Pos.vx;
newPos.vy = ( ( ( Pos.vy + moveY ) >> 4 ) + 1 ) << 4;
GameScene.GetLevel().destroyMapTile( newPos );
}
else
{ {
moveY = groundHeight; moveY = groundHeight;
} }
}
Pos.vy += moveY; Pos.vy += moveY;
} }