This commit is contained in:
Charles 2001-07-31 18:52:10 +00:00
parent 8f7bb1e61b
commit a84e8bbf51
2 changed files with 30 additions and 12 deletions

View File

@ -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
{

View File

@ -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 );