fix comparison to FailType instead of LifeType
This commit is contained in:
@@ -1335,6 +1335,8 @@ void ScreenGameplay::Update( float fDeltaTime )
|
|||||||
FOREACH_EnabledPlayer( pn )
|
FOREACH_EnabledPlayer( pn )
|
||||||
{
|
{
|
||||||
SongOptions::FailType ft = GAMESTATE->GetPlayerFailType(pn);
|
SongOptions::FailType ft = GAMESTATE->GetPlayerFailType(pn);
|
||||||
|
SongOptions::LifeType lt = GAMESTATE->m_SongOptions.m_LifeType;
|
||||||
|
|
||||||
if( ft == SongOptions::FAIL_OFF )
|
if( ft == SongOptions::FAIL_OFF )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -1347,15 +1349,15 @@ void ScreenGameplay::Update( float fDeltaTime )
|
|||||||
|
|
||||||
/* If recovery is enabled, only set fail if both are failing.
|
/* If recovery is enabled, only set fail if both are failing.
|
||||||
* There's no way to recover mid-song in battery mode. */
|
* There's no way to recover mid-song in battery mode. */
|
||||||
if( GAMESTATE->m_SongOptions.m_LifeType != SongOptions::LIFE_BATTERY &&
|
if( lt != SongOptions::LIFE_BATTERY &&
|
||||||
PREFSMAN->m_bTwoPlayerRecovery && !GAMESTATE->AllAreDead() )
|
PREFSMAN->m_bTwoPlayerRecovery && !GAMESTATE->AllAreDead() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
LOG->Trace("Player %d failed", (int)pn);
|
LOG->Trace("Player %d failed", (int)pn);
|
||||||
STATSMAN->m_CurStageStats.m_player[pn].bFailed = true; // fail
|
STATSMAN->m_CurStageStats.m_player[pn].bFailed = true; // fail
|
||||||
|
|
||||||
if( ft == SongOptions::LIFE_BATTERY &&
|
if( lt == SongOptions::LIFE_BATTERY &&
|
||||||
ft == SongOptions::FAIL_IMMEDIATE )
|
ft == SongOptions::FAIL_IMMEDIATE )
|
||||||
{
|
{
|
||||||
if( !STATSMAN->m_CurStageStats.AllFailedEarlier() ) // if not the last one to fail
|
if( !STATSMAN->m_CurStageStats.AllFailedEarlier() ) // if not the last one to fail
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user