fix FadeToFail

do FadeToFail for LIFE_TIME
This commit is contained in:
Chris Danford
2005-05-09 02:58:30 +00:00
parent 4a3a87e25b
commit 68c6b6a126
5 changed files with 34 additions and 5 deletions
+13 -3
View File
@@ -1411,7 +1411,7 @@ void ScreenGameplay::Update( float fDeltaTime )
{
case STATE_DANCING:
/* Set STATSMAN->m_CurStageStats.bFailed for failed players. In, FAIL_IMMEDIATE, send
* SM_BeginFailed if all players failed, and kill dead Oni players. */
* SM_BeginFailed if all players failed, and kill dead Oni players. */
FOREACH_EnabledPlayer( pn )
{
SongOptions::FailType ft = GAMESTATE->GetPlayerFailType(pn);
@@ -1436,8 +1436,18 @@ void ScreenGameplay::Update( float fDeltaTime )
LOG->Trace("Player %d failed", (int)pn);
STATSMAN->m_CurStageStats.m_player[pn].bFailed = true; // fail
if( lt == SongOptions::LIFE_BATTERY &&
ft == SongOptions::FAIL_IMMEDIATE )
//
// Check for and do Oni die.
//
bool bAllowOniDie = false;
switch( lt )
{
case SongOptions::LIFE_BATTERY:
case SongOptions::LIFE_TIME:
bAllowOniDie = true;
break;
}
if( bAllowOniDie && ft == SongOptions::FAIL_IMMEDIATE )
{
if( !STATSMAN->m_CurStageStats.AllFailedEarlier() ) // if not the last one to fail
{