This commit is contained in:
Paul 2001-01-29 19:23:04 +00:00
parent e0e6d5d853
commit da3fa8f6e9
3 changed files with 13 additions and 11 deletions

View File

@ -146,11 +146,11 @@ void CPlayer::think(int _frames)
Pos.vx+=m_moveVel.vx>>VELOCITY_SHIFT;
if(Pos.vx<350)
{
// if(m_currentState==STATE_RUN)
// {
// setState(STATE_IDLE);
if(m_currentState==STATE_RUN)
{
setState(STATE_IDLE);
// setAnimNo(ANIM_PLAYER_ANIM_RUNSTOP);
// }
}
Pos.vx=350;
m_moveVel.vx=0;
}

View File

@ -98,6 +98,11 @@ void CPlayerStateIdle::think(CPlayer *_player)
int control;
control=getPadInput(_player);
if(advanceAnimFrameAndCheckForEndOfAnim(_player))
{
setNextIdleAnim(_player);
}
if(control&CPadConfig::getButton(CPadConfig::PAD_CFG_JUMP))
{
setState(_player,STATE_JUMP);
@ -114,10 +119,6 @@ void CPlayerStateIdle::think(CPlayer *_player)
{
setState(_player,STATE_DUCK);
}
else if(advanceAnimFrameAndCheckForEndOfAnim(_player))
{
setNextIdleAnim(_player);
}
}

View File

@ -106,15 +106,16 @@ void CPlayerStateRun::think(CPlayer *_player)
{
setState(_player,STATE_JUMP);
}
else if(control&CPadConfig::getButton(CPadConfig::PAD_CFG_DOWN))
if(control&CPadConfig::getButton(CPadConfig::PAD_CFG_DOWN))
{
setState(_player,STATE_DUCK);
}
else if(control&CPadConfig::getButton(CPadConfig::PAD_CFG_ACTION))
if(control&CPadConfig::getButton(CPadConfig::PAD_CFG_ACTION))
{
setState(_player,STATE_RUNATTACK);
}
else if(control&CPadConfig::getButton(CPadConfig::PAD_CFG_LEFT))
if(control&CPadConfig::getButton(CPadConfig::PAD_CFG_LEFT))
{
moveLeft(_player);
}