This commit is contained in:
parent
e86f9c4eb4
commit
80f03fee23
@ -2541,7 +2541,7 @@ int CPlayer::moveVertical(int _moveDistance)
|
|||||||
if(m_currentMode!=PLAYER_MODE_DEAD)
|
if(m_currentMode!=PLAYER_MODE_DEAD)
|
||||||
{
|
{
|
||||||
// Lock the camera, kill the player and let him fall to his death..
|
// Lock the camera, kill the player and let him fall to his death..
|
||||||
setMode(PLAYER_MODE_DEAD);
|
dieYouPorousFreak(DEATHTYPE__FALL_TO_DEATH);
|
||||||
m_lockCamera=true;
|
m_lockCamera=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -138,6 +138,7 @@ typedef enum
|
|||||||
DEATHTYPE__DRYUP,
|
DEATHTYPE__DRYUP,
|
||||||
DEATHTYPE__SQUASH,
|
DEATHTYPE__SQUASH,
|
||||||
DEATHTYPE__LIQUID,
|
DEATHTYPE__LIQUID,
|
||||||
|
DEATHTYPE__FALL_TO_DEATH,
|
||||||
} DEATH_TYPE;
|
} DEATH_TYPE;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -76,8 +76,15 @@ void CPlayerModeDead::enter()
|
|||||||
case DEATHTYPE__LIQUID:
|
case DEATHTYPE__LIQUID:
|
||||||
deathAnim=ANIM_SPONGEBOB_DEATHFORWARDS;
|
deathAnim=ANIM_SPONGEBOB_DEATHFORWARDS;
|
||||||
break;
|
break;
|
||||||
|
case DEATHTYPE__FALL_TO_DEATH:
|
||||||
|
deathAnim=-1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(deathAnim!=-1)
|
||||||
|
{
|
||||||
|
m_player->setAnimNo(deathAnim);
|
||||||
}
|
}
|
||||||
m_player->setAnimNo(deathAnim);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
@ -89,9 +96,12 @@ void CPlayerModeDead::enter()
|
|||||||
void CPlayerModeDead::think()
|
void CPlayerModeDead::think()
|
||||||
{
|
{
|
||||||
m_deadTime++;
|
m_deadTime++;
|
||||||
if(m_deadTime<m_player->getAnimFrameCount())
|
if(m_player->getDeathType()!=DEATHTYPE__FALL_TO_DEATH)
|
||||||
{
|
{
|
||||||
m_player->setAnimFrame(m_deadTime);
|
if(m_deadTime<m_player->getAnimFrameCount())
|
||||||
|
{
|
||||||
|
m_player->setAnimFrame(m_deadTime);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_player->moveVertical(5);
|
m_player->moveVertical(5);
|
||||||
|
Loading…
Reference in New Issue
Block a user