Add FailAtEnd, which means "check failure only at the very
end of the song" (intended for use with "PassMark", which needs a better name). This isn't called "FailEndOfSong" to avoid confusion, and was the prompting for renaming FailEndOfSong.)
This commit is contained in:
@@ -1604,7 +1604,7 @@ void ScreenGameplay::Update( float fDeltaTime )
|
||||
SongOptions::FailType ft = GAMESTATE->GetPlayerFailType( pi->GetPlayerState() );
|
||||
SongOptions::LifeType lt = GAMESTATE->m_SongOptions.GetCurrent().m_LifeType;
|
||||
|
||||
if( ft == SongOptions::FAIL_OFF )
|
||||
if( ft == SongOptions::FAIL_OFF || ft == SongOptions::FAIL_AT_END )
|
||||
continue;
|
||||
|
||||
// check for individual fail
|
||||
@@ -1649,7 +1649,8 @@ void ScreenGameplay::Update( float fDeltaTime )
|
||||
if( pi->m_pLifeMeter && !pi->m_pLifeMeter->IsFailing() )
|
||||
bAllFailed = false;
|
||||
break;
|
||||
case SongOptions::FAIL_END_OF_SONG:
|
||||
case SongOptions::FAIL_IMMEDIATE_CONTINUE:
|
||||
case SongOptions::FAIL_AT_END:
|
||||
bAllFailed = false; // wait until the end of the song to fail.
|
||||
break;
|
||||
case SongOptions::FAIL_OFF:
|
||||
|
||||
@@ -451,7 +451,8 @@ static void DefaultFailType( int &sel, bool ToSel, const ConfOption *pConfOption
|
||||
{
|
||||
case 0: so.m_FailType = SongOptions::FAIL_IMMEDIATE; break;
|
||||
case 1: so.m_FailType = SongOptions::FAIL_IMMEDIATE_CONTINUE; break;
|
||||
case 2: so.m_FailType = SongOptions::FAIL_OFF; break;
|
||||
case 2: so.m_FailType = SongOptions::FAIL_AT_END; break;
|
||||
case 3: so.m_FailType = SongOptions::FAIL_OFF; break;
|
||||
default:
|
||||
ASSERT(0);
|
||||
}
|
||||
@@ -652,7 +653,7 @@ static void InitializeConfOptions()
|
||||
ADD( ConfOption( "ProgressiveLifebar", MovePref, "Off","|1","|2","|3","|4","|5","|6","|7","|8") );
|
||||
ADD( ConfOption( "ProgressiveStageLifebar", MovePref, "Off","|1","|2","|3","|4","|5","|6","|7","|8","Insanity") );
|
||||
ADD( ConfOption( "ProgressiveNonstopLifebar", MovePref, "Off","|1","|2","|3","|4","|5","|6","|7","|8","Insanity") );
|
||||
ADD( ConfOption( "DefaultFailType", DefaultFailType, "Immediate","End of Song","Off" ) );
|
||||
ADD( ConfOption( "DefaultFailType", DefaultFailType, "Immediate","Delayed","End of Song","Off" ) );
|
||||
ADD( ConfOption( "CoinsPerCredit", CoinsPerCredit, "|1","|2","|3","|4","|5","|6","|7","|8","|9","|10","|11","|12","|13","|14","|15","|16" ) );
|
||||
ADD( ConfOption( "Premium", PremiumM, "Off","Double for 1 Credit","Joint Premium" ) );
|
||||
ADD( ConfOption( "ShowSongOptions", ShowSongOptions, "Hide","Show","Ask" ) );
|
||||
|
||||
@@ -61,6 +61,7 @@ void SongOptions::GetMods( vector<RString> &AddTo ) const
|
||||
{
|
||||
case FAIL_IMMEDIATE: break;
|
||||
case FAIL_IMMEDIATE_CONTINUE: AddTo.push_back("FailImmediateContinue"); break;
|
||||
case FAIL_AT_END: AddTo.push_back("FailAtEnd"); break;
|
||||
case FAIL_OFF: AddTo.push_back("FailOff"); break;
|
||||
default: ASSERT(0);
|
||||
}
|
||||
@@ -154,6 +155,7 @@ void SongOptions::FromString( const RString &sOptions )
|
||||
sBit == "failimmediate" ) m_FailType = FAIL_IMMEDIATE;
|
||||
else if( sBit == "failendofsong" ||
|
||||
sBit == "failimmediatecontinue" ) m_FailType = FAIL_IMMEDIATE_CONTINUE;
|
||||
else if( sBit == "failatend" ) m_FailType = FAIL_AT_END;
|
||||
else if( sBit == "failoff" ) m_FailType = FAIL_OFF;
|
||||
|
||||
else if( sBit == "faildefault" )
|
||||
|
||||
@@ -25,6 +25,7 @@ public:
|
||||
enum FailType {
|
||||
FAIL_IMMEDIATE=0, // fail immediately when life touches 0
|
||||
FAIL_IMMEDIATE_CONTINUE, // fail immediately when life touches 0, but allow playing the rest of the song
|
||||
FAIL_AT_END, // fail if life is at 0 when the song ends
|
||||
FAIL_OFF }; // never fail
|
||||
FailType m_FailType;
|
||||
float m_fMusicRate, m_SpeedfMusicRate;
|
||||
|
||||
Reference in New Issue
Block a user