This commit is contained in:
parent
fdfbef475f
commit
6220f2fc85
1 changed files with 16 additions and 1 deletions
|
@ -356,9 +356,24 @@ void CProjectile::think(int _frames)
|
|||
s32 groundHeight = CGameScene::getCollision()->getHeightFromGround( Pos.vx, Pos.vy + moveY, 16 );
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Pos.vy += moveY;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue