This commit is contained in:
parent
2a6beb64f7
commit
bccc161ff2
2 changed files with 19 additions and 10 deletions
|
@ -768,10 +768,10 @@ if(PadGetDown(0)&PAD_TRIANGLE)
|
||||||
|
|
||||||
// Only do the weapon change stuff on the first frame. As the buttons pressed do not
|
// Only do the weapon change stuff on the first frame. As the buttons pressed do not
|
||||||
// change over these frames there is no point in doing it every frame
|
// change over these frames there is no point in doing it every frame
|
||||||
if(i==0)
|
if(i==0&&m_currentPlayerModeClass->getState()!=STATE_CELEBRATE)
|
||||||
{
|
{
|
||||||
m_tryingToManuallyPickupWeapon=false;
|
m_tryingToManuallyPickupWeapon=false;
|
||||||
m_tryingToAutomaticallyPickupWeapon=false;
|
m_tryingToAutomaticallyPickupWeapon=false;
|
||||||
|
|
||||||
// Weapon collect/drop/swap stuff..
|
// Weapon collect/drop/swap stuff..
|
||||||
if(m_currentMode==PLAYER_MODE_BASICUNARMED)
|
if(m_currentMode==PLAYER_MODE_BASICUNARMED)
|
||||||
|
|
|
@ -462,18 +462,27 @@ const struct PlayerMetrics *CPlayerModeBase::getPlayerMetrics()
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
int CPlayerModeBase::setState(int _state)
|
int CPlayerModeBase::setState(int _state)
|
||||||
{
|
{
|
||||||
CPlayerState *nextState;
|
|
||||||
int ret=false;
|
int ret=false;
|
||||||
|
|
||||||
nextState=getStateTable()[_state];
|
if(m_currentState==STATE_CELEBRATE&&_state!=STATE_IDLE)
|
||||||
if(nextState)
|
|
||||||
{
|
{
|
||||||
m_player->resetPlayerCollisionSizeToBase();
|
|
||||||
m_currentStateClass=nextState;
|
|
||||||
m_currentStateClass->enter(this);
|
|
||||||
m_currentState=(PLAYER_STATE)_state;
|
|
||||||
ret=true;
|
ret=true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CPlayerState *nextState;
|
||||||
|
|
||||||
|
nextState=getStateTable()[_state];
|
||||||
|
if(nextState)
|
||||||
|
{
|
||||||
|
m_player->resetPlayerCollisionSizeToBase();
|
||||||
|
m_currentStateClass=nextState;
|
||||||
|
m_currentStateClass->enter(this);
|
||||||
|
m_currentState=(PLAYER_STATE)_state;
|
||||||
|
ret=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue