This commit is contained in:
Charles 2001-07-18 16:09:39 +00:00
parent 58f7b9a09c
commit 2b53245342
3 changed files with 27 additions and 15 deletions

View File

@ -29,6 +29,7 @@ void CNpcMasherHazard::init()
CNpcHazard::init();
m_state = MASHER_DROPPING;
m_pauseTimer = 0;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -38,6 +39,8 @@ void CNpcMasherHazard::processMovement( int _frames )
switch ( m_state )
{
case MASHER_DROPPING:
{
if ( m_pauseTimer <= 0 )
{
s8 yMovement = 3 * _frames;
@ -61,6 +64,11 @@ void CNpcMasherHazard::processMovement( int _frames )
Pos.vy += yMovement;
}
}
else
{
m_pauseTimer -= _frames;
}
break;
}
@ -70,6 +78,8 @@ void CNpcMasherHazard::processMovement( int _frames )
if ( m_base.vx - Pos.vx == 0 && m_base.vy - Pos.vy == 0 )
{
m_state = MASHER_DROPPING;
m_pauseTimer = GameState::getOneSecondInFrames();
}
else
{

View File

@ -33,6 +33,8 @@ protected:
};
MASHER_STATE m_state;
int m_pauseTimer;
};
#endif

View File

@ -64,7 +64,7 @@ void CRestartPointTrigger::collidedWith(CThing *_thisThing)
collisionArea=getCollisionArea();
respawnPos.vx=collisionArea.x1+((collisionArea.x2-collisionArea.x1)/2);
respawnPos.vy=collisionArea.y2;
((CPlayer*)_thisThing)->setRespawnPosAndRingTelephone(respawnPos);
((CPlayer*)_thisThing)->setRespawnPos(respawnPos);
break;
}