This commit is contained in:
parent
8f7bb1e61b
commit
a84e8bbf51
@ -131,6 +131,19 @@ void CNpcFallingHazard::processMovement( int _frames )
|
||||
groundHeight = CGameScene::getCollision()->getHeightFromGround( Pos.vx, Pos.vy, yMovement + 16 );
|
||||
|
||||
if ( groundHeight < yMovement )
|
||||
{
|
||||
switch ( CGameScene::getCollision()->getCollisionBlock( Pos.vx, Pos.vy + groundHeight + 8 ) & COLLISION_TYPE_MASK )
|
||||
{
|
||||
case COLLISION_TYPE_FLAG_SOLID:
|
||||
{
|
||||
// drop down
|
||||
|
||||
Pos.vy += yMovement;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
if ( m_soundId == NOT_PLAYING )
|
||||
{
|
||||
@ -146,6 +159,10 @@ void CNpcFallingHazard::processMovement( int _frames )
|
||||
m_bounceDir = getRnd() % 2;
|
||||
|
||||
m_bouncePos = Pos;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -24,6 +24,7 @@ public:
|
||||
void init();
|
||||
void setWaypoints( sThingHazard *ThisHazard );
|
||||
void render();
|
||||
bool alwaysThink() {return(m_bounceFinish);}
|
||||
protected:
|
||||
void processMovement( int _frames );
|
||||
void processTimer( int _frames );
|
||||
|
Loading…
Reference in New Issue
Block a user