This commit is contained in:
parent
58f7b9a09c
commit
2b53245342
3 changed files with 27 additions and 15 deletions
|
@ -29,6 +29,7 @@ void CNpcMasherHazard::init()
|
||||||
CNpcHazard::init();
|
CNpcHazard::init();
|
||||||
|
|
||||||
m_state = MASHER_DROPPING;
|
m_state = MASHER_DROPPING;
|
||||||
|
m_pauseTimer = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -38,6 +39,8 @@ void CNpcMasherHazard::processMovement( int _frames )
|
||||||
switch ( m_state )
|
switch ( m_state )
|
||||||
{
|
{
|
||||||
case MASHER_DROPPING:
|
case MASHER_DROPPING:
|
||||||
|
{
|
||||||
|
if ( m_pauseTimer <= 0 )
|
||||||
{
|
{
|
||||||
s8 yMovement = 3 * _frames;
|
s8 yMovement = 3 * _frames;
|
||||||
|
|
||||||
|
@ -61,6 +64,11 @@ void CNpcMasherHazard::processMovement( int _frames )
|
||||||
|
|
||||||
Pos.vy += yMovement;
|
Pos.vy += yMovement;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_pauseTimer -= _frames;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -70,6 +78,8 @@ void CNpcMasherHazard::processMovement( int _frames )
|
||||||
if ( m_base.vx - Pos.vx == 0 && m_base.vy - Pos.vy == 0 )
|
if ( m_base.vx - Pos.vx == 0 && m_base.vy - Pos.vy == 0 )
|
||||||
{
|
{
|
||||||
m_state = MASHER_DROPPING;
|
m_state = MASHER_DROPPING;
|
||||||
|
|
||||||
|
m_pauseTimer = GameState::getOneSecondInFrames();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,6 +33,8 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
MASHER_STATE m_state;
|
MASHER_STATE m_state;
|
||||||
|
|
||||||
|
int m_pauseTimer;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -64,7 +64,7 @@ void CRestartPointTrigger::collidedWith(CThing *_thisThing)
|
||||||
collisionArea=getCollisionArea();
|
collisionArea=getCollisionArea();
|
||||||
respawnPos.vx=collisionArea.x1+((collisionArea.x2-collisionArea.x1)/2);
|
respawnPos.vx=collisionArea.x1+((collisionArea.x2-collisionArea.x1)/2);
|
||||||
respawnPos.vy=collisionArea.y2;
|
respawnPos.vy=collisionArea.y2;
|
||||||
((CPlayer*)_thisThing)->setRespawnPosAndRingTelephone(respawnPos);
|
((CPlayer*)_thisThing)->setRespawnPos(respawnPos);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue