This commit is contained in:
parent
fdfbef475f
commit
6220f2fc85
1 changed files with 16 additions and 1 deletions
|
@ -357,7 +357,22 @@ void CProjectile::think(int _frames)
|
||||||
|
|
||||||
if ( groundHeight < 0 )
|
if ( groundHeight < 0 )
|
||||||
{
|
{
|
||||||
moveY = groundHeight;
|
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;
|
Pos.vy += moveY;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue