Move "30misses" to a GiveUp metric. It's not very different from FailEndOfSong.
Only fail when giving up if died earlier.
This commit is contained in:
@@ -1010,7 +1010,8 @@ NextScreen=@GetGameplayNextScreen()
|
||||
PlayerType=Player
|
||||
StartGivesUp=1
|
||||
BackGivesUp=0
|
||||
GivingUpFails=1
|
||||
GivingUpGoesToPrevScreen=0
|
||||
GivingUpGoesToNextScreen=0
|
||||
InitialBackgroundBrightness=1
|
||||
MusicFadeOutSeconds=0.5
|
||||
UseForcedModifiersInBeginner=0
|
||||
@@ -1193,7 +1194,6 @@ PlayerP2TwoPlayersTwoSidesX=SCREEN_CENTER_X+160
|
||||
PlayerP1OnePlayerTwoSidesX=SCREEN_CENTER_X
|
||||
PlayerP2OnePlayerTwoSidesX=SCREEN_CENTER_X
|
||||
StopCourseEarly=0
|
||||
GivingUpGoesToNextScreen=0
|
||||
|
||||
[ScreenGameplayExtra]
|
||||
Class=ScreenGameplay
|
||||
|
||||
@@ -1290,7 +1290,7 @@ SongOptions::FailType GameState::GetPlayerFailType( PlayerNumber pn ) const
|
||||
if( this->IsCourseMode() )
|
||||
{
|
||||
if( PREFSMAN->m_bMinimum1FullSongInCourses && GAMESTATE->IsCourseMode() && GAMESTATE->GetCourseSongIndex()==0 )
|
||||
ft = max( ft, SongOptions::FAIL_COMBO_OF_30_MISSES ); // take the least harsh of the two FailTypes
|
||||
ft = max( ft, SongOptions::FAIL_END_OF_SONG ); // take the least harsh of the two FailTypes
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -95,8 +95,9 @@ ScreenGameplay::ScreenGameplay( CString sName ) : ScreenWithMenuElements(sName)
|
||||
MUSIC_FADE_OUT_SECONDS.Load( sName, "MusicFadeOutSeconds" );
|
||||
START_GIVES_UP.Load( sName, "StartGivesUp" );
|
||||
BACK_GIVES_UP.Load( sName, "BackGivesUp" );
|
||||
GIVING_UP_FAILS.Load( sName, "GivingUpFails" );
|
||||
GIVING_UP_GOES_TO_PREV_SCREEN.Load( sName, "GivingUpGoesToPrevScreen" );
|
||||
GIVING_UP_GOES_TO_NEXT_SCREEN.Load( sName, "GivingUpGoesToNextScreen" );
|
||||
GIVE_UP_AFTER_30_MISSES.Load( sName, "GiveUpAfter30Misses" );
|
||||
USE_FORCED_MODIFIERS_IN_BEGINNER.Load( sName, "UseForcedModifiersInBeginner" );
|
||||
FORCED_MODIFIERS_IN_BEGINNER.Load( sName, "ForcedModifiersInBeginner" );
|
||||
}
|
||||
@@ -1428,10 +1429,6 @@ void ScreenGameplay::Update( float fDeltaTime )
|
||||
if( GAMESTATE->m_pPlayerState[pn]->m_HealthState < PlayerState::DEAD )
|
||||
bAllFailed = false;
|
||||
break;
|
||||
case SongOptions::FAIL_COMBO_OF_30_MISSES:
|
||||
if( STATSMAN->m_CurStageStats.m_player[pn].iCurMissCombo < 30 )
|
||||
bAllFailed = false;
|
||||
break;
|
||||
case SongOptions::FAIL_END_OF_SONG:
|
||||
bAllFailed = false; // wait until the end of the song to fail.
|
||||
break;
|
||||
@@ -1556,29 +1553,17 @@ void ScreenGameplay::Update( float fDeltaTime )
|
||||
}
|
||||
|
||||
//
|
||||
// update give up timer
|
||||
// update give up
|
||||
//
|
||||
if( !m_GiveUpTimer.IsZero() && m_GiveUpTimer.Ago() > 2.5f )
|
||||
bool bGiveUpTimerFired = !m_GiveUpTimer.IsZero() && m_GiveUpTimer.Ago() > 2.5f;
|
||||
if( bGiveUpTimerFired || GAMESTATE->AllHaveComboOf30OrMoreMisses() )
|
||||
{
|
||||
m_GiveUpTimer.SetZero();
|
||||
|
||||
if( GIVING_UP_FAILS )
|
||||
if( GIVING_UP_GOES_TO_PREV_SCREEN )
|
||||
{
|
||||
/* Unless we're in FailOff, giving up means failing the song. */
|
||||
switch( GAMESTATE->m_SongOptions.m_FailType )
|
||||
{
|
||||
case SongOptions::FAIL_IMMEDIATE:
|
||||
case SongOptions::FAIL_COMBO_OF_30_MISSES:
|
||||
case SongOptions::FAIL_END_OF_SONG:
|
||||
FOREACH_EnabledPlayer(p)
|
||||
{
|
||||
STATSMAN->m_CurStageStats.m_player[p].bFailed = true; // fail
|
||||
m_pLifeMeter[p]->ForceFail();
|
||||
STATSMAN->m_CurStageStats.m_player[p].SetLifeRecordAt( 0, STATSMAN->m_CurStageStats.fGameplaySeconds );
|
||||
}
|
||||
}
|
||||
BackOutFromGameplay();
|
||||
|
||||
this->PostScreenMessage( SM_NotesEnded, 0 );
|
||||
}
|
||||
else if( GIVING_UP_GOES_TO_NEXT_SCREEN )
|
||||
{
|
||||
@@ -1587,9 +1572,9 @@ void ScreenGameplay::Update( float fDeltaTime )
|
||||
}
|
||||
else
|
||||
{
|
||||
BackOutFromGameplay();
|
||||
return;
|
||||
this->PostScreenMessage( SM_NotesEnded, 0 );
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -2233,6 +2218,10 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
|
||||
|
||||
if( !STATSMAN->m_CurStageStats.m_player[p].bFailed )
|
||||
STATSMAN->m_CurStageStats.m_player[p].iSongsPassed++;
|
||||
|
||||
// set a life record at the point of failue
|
||||
if( STATSMAN->m_CurStageStats.m_player[p].bFailed )
|
||||
STATSMAN->m_CurStageStats.m_player[p].SetLifeRecordAt( 0, STATSMAN->m_CurStageStats.fGameplaySeconds );
|
||||
}
|
||||
|
||||
/* If all players have *really* failed (bFailed, not the life meter or
|
||||
|
||||
@@ -50,8 +50,9 @@ protected:
|
||||
ThemeMetric<float> MUSIC_FADE_OUT_SECONDS;
|
||||
ThemeMetric<bool> START_GIVES_UP;
|
||||
ThemeMetric<bool> BACK_GIVES_UP;
|
||||
ThemeMetric<bool> GIVING_UP_FAILS;
|
||||
ThemeMetric<bool> GIVING_UP_GOES_TO_PREV_SCREEN;
|
||||
ThemeMetric<bool> GIVING_UP_GOES_TO_NEXT_SCREEN;
|
||||
ThemeMetric<bool> GIVE_UP_AFTER_30_MISSES;
|
||||
ThemeMetric<bool> USE_FORCED_MODIFIERS_IN_BEGINNER;
|
||||
ThemeMetric<CString> FORCED_MODIFIERS_IN_BEGINNER;
|
||||
|
||||
|
||||
@@ -408,9 +408,8 @@ static void DefaultFailType( int &sel, bool ToSel, const ConfOption *pConfOption
|
||||
switch( sel )
|
||||
{
|
||||
case 0: so.m_FailType = SongOptions::FAIL_IMMEDIATE; break;
|
||||
case 1: so.m_FailType = SongOptions::FAIL_COMBO_OF_30_MISSES; break;
|
||||
case 2: so.m_FailType = SongOptions::FAIL_END_OF_SONG; break;
|
||||
case 3: so.m_FailType = SongOptions::FAIL_OFF; break;
|
||||
case 1: so.m_FailType = SongOptions::FAIL_END_OF_SONG; break;
|
||||
case 2: so.m_FailType = SongOptions::FAIL_OFF; break;
|
||||
default:
|
||||
ASSERT(0);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@ CString SongOptions::GetString() const
|
||||
switch( m_FailType )
|
||||
{
|
||||
case FAIL_IMMEDIATE: break;
|
||||
case FAIL_COMBO_OF_30_MISSES: sReturn += "Fail30Misses, "; break;
|
||||
case FAIL_END_OF_SONG: sReturn += "FailEndOfSong, "; break;
|
||||
case FAIL_OFF: sReturn += "FailOff, "; break;
|
||||
default: ASSERT(0);
|
||||
@@ -119,7 +118,6 @@ void SongOptions::FromString( CString sOptions )
|
||||
else if( sBit == "normal-drain" ) m_DrainType = DRAIN_NORMAL;
|
||||
else if( sBit == "failarcade" ||
|
||||
sBit == "failimmediate" ) m_FailType = FAIL_IMMEDIATE;
|
||||
else if( sBit == "fail30misses" ) m_FailType = FAIL_COMBO_OF_30_MISSES;
|
||||
else if( sBit == "failendofsong" ) m_FailType = FAIL_END_OF_SONG;
|
||||
else if( sBit == "failoff" ) m_FailType = FAIL_OFF;
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ struct SongOptions
|
||||
int m_iBatteryLives;
|
||||
enum FailType {
|
||||
FAIL_IMMEDIATE=0, // fail when life touches 0
|
||||
FAIL_COMBO_OF_30_MISSES, // fail when 30 misses in a row, or on end of song if life touched 0
|
||||
FAIL_END_OF_SONG, // fail on end of song if life touched 0
|
||||
FAIL_OFF }; // never fail
|
||||
FailType m_FailType;
|
||||
|
||||
Reference in New Issue
Block a user