Added: 70% PassMark Fail Type
This commit is contained in:
@@ -359,8 +359,8 @@ void LifeMeterBar::ChangeLife( TapNoteScore score )
|
||||
m_iComboToRegainLife = max( m_iComboToRegainLife, NewComboToRegainLife );
|
||||
}
|
||||
|
||||
/* If we've already failed, there's no point in letting them fill up the bar again. */
|
||||
if( GAMESTATE->m_CurStageStats.bFailed[m_PlayerNumber] )
|
||||
/* If we've already failed, there's no point in letting them fill up the bar again. Except for passmark mode */
|
||||
if( GAMESTATE->m_CurStageStats.bFailed[m_PlayerNumber] && GAMESTATE->m_SongOptions.m_FailType != SongOptions::FAIL_PASSMARK)
|
||||
fDeltaLife = 0;
|
||||
|
||||
switch( GAMESTATE->m_SongOptions.m_DrainType )
|
||||
|
||||
@@ -933,11 +933,31 @@ bool ScreenGameplay::AllAreInDanger()
|
||||
|
||||
bool ScreenGameplay::AllAreFailing()
|
||||
{
|
||||
|
||||
if( GAMESTATE->m_SongOptions.m_FailType == SongOptions::FAIL_PASSMARK )
|
||||
{
|
||||
bool bFoundAPasser = true; // assume nobody passed until proven otherwise
|
||||
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
if( GAMESTATE->IsPlayerEnabled(PlayerNumber(p)) )
|
||||
if( (m_pLifeMeter[p]->GetLife()) > 0.7f ) // 70 % is the pass mark
|
||||
{
|
||||
bFoundAPasser = false;
|
||||
}
|
||||
}
|
||||
return bFoundAPasser;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
if( GAMESTATE->IsPlayerEnabled(PlayerNumber(p)) )
|
||||
if( (m_pLifeMeter[p] && !m_pLifeMeter[p]->IsFailing()) ||
|
||||
(m_pCombinedLifeMeter && !m_pCombinedLifeMeter->IsFailing((PlayerNumber)p)) )
|
||||
return false;
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1081,7 +1101,7 @@ void ScreenGameplay::Update( float fDeltaTime )
|
||||
// show it if everyone is already failing: it's already too late and it's
|
||||
// annoying for it to show for the entire duration of a song.
|
||||
//
|
||||
if( GAMESTATE->m_SongOptions.m_FailType != SongOptions::FAIL_OFF )
|
||||
if( GAMESTATE->m_SongOptions.m_FailType != SongOptions::FAIL_OFF || GAMESTATE->m_SongOptions.m_FailType != SongOptions::FAIL_PASSMARK )
|
||||
{
|
||||
if( AllAreInDanger() && !AllAreFailing() )
|
||||
m_Background.TurnDangerOn();
|
||||
@@ -1608,7 +1628,8 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
|
||||
GAMESTATE->m_CurStageStats.iSongsPassed[p]++;
|
||||
}
|
||||
|
||||
if( GAMESTATE->m_SongOptions.m_FailType == SongOptions::FAIL_END_OF_SONG && AllAreFailing() )
|
||||
|
||||
if( (GAMESTATE->m_SongOptions.m_FailType == SongOptions::FAIL_END_OF_SONG || GAMESTATE->m_SongOptions.m_FailType == SongOptions::FAIL_PASSMARK ) && AllAreFailing() )
|
||||
{
|
||||
if( m_DancingState == STATE_OUTRO ) // ScreenGameplay already ended
|
||||
return; // ignore
|
||||
|
||||
@@ -314,7 +314,8 @@ static void DefaultFailType( int &sel, bool ToSel, const CStringArray &choices )
|
||||
{
|
||||
case 0: so.m_FailType = SongOptions::FAIL_ARCADE; break;
|
||||
case 1: so.m_FailType = SongOptions::FAIL_END_OF_SONG; break;
|
||||
case 2: so.m_FailType = SongOptions::FAIL_OFF; break;
|
||||
case 2: so.m_FailType = SongOptions::FAIL_PASSMARK; break;
|
||||
case 3: so.m_FailType = SongOptions::FAIL_OFF; break;
|
||||
default:
|
||||
ASSERT(0);
|
||||
}
|
||||
@@ -444,7 +445,7 @@ static const ConfOption g_ConfOptions[] =
|
||||
ConfOption( "Progressive\nLifebar", ProgressiveLifebar, "OFF","1","2","3","4","5","6","7","8"),
|
||||
ConfOption( "Progressive\nStage Lifebar",ProgressiveStageLifebar, "OFF","1","2","3","4","5","6","7","8","INSANITY"),
|
||||
ConfOption( "Progressive\nNonstop Lifebar",ProgressiveNonstopLifebar,"OFF","1","2","3","4","5","6","7","8","INSANITY"),
|
||||
ConfOption( "Default\nFail Type", DefaultFailType, "ARCADE","END OF SONG","OFF" ),
|
||||
ConfOption( "Default\nFail Type", DefaultFailType, "ARCADE","END OF SONG","PASSMARK","OFF" ),
|
||||
ConfOption( "Coins Per\nCredit", CoinsPerCredit, "1","2","3","4","5","6","7","8" ),
|
||||
ConfOption( "Joint\nPremium", JointPremium, "OFF","ON" ),
|
||||
ConfOption( "Show Song\nOptions", ShowSongOptions, "HIDE","SHOW","ASK" ),
|
||||
|
||||
@@ -49,6 +49,7 @@ CString SongOptions::GetString() const
|
||||
{
|
||||
case FAIL_ARCADE: break;
|
||||
case FAIL_END_OF_SONG: sReturn += "FailEndOfSong, "; break;
|
||||
case FAIL_PASSMARK: sReturn += "FailPassMark"; break;
|
||||
case FAIL_OFF: sReturn += "FailOff, "; break;
|
||||
}
|
||||
|
||||
@@ -116,6 +117,7 @@ void SongOptions::FromString( CString sOptions )
|
||||
else if( sBit == "death" ) m_DrainType = DRAIN_SUDDEN_DEATH;
|
||||
else if( sBit == "normal-drain" ) m_DrainType = DRAIN_NORMAL;
|
||||
else if( sBit == "failarcade" ) m_FailType = FAIL_ARCADE;
|
||||
else if( sBit == "failpassmark" ) m_FailType = FAIL_PASSMARK;
|
||||
else if( sBit == "failendofsong" ) m_FailType = FAIL_END_OF_SONG;
|
||||
else if( sBit == "failoff" ) m_FailType = FAIL_OFF;
|
||||
else if( sBit == "assisttick" ) m_bAssistTick = on;
|
||||
|
||||
@@ -20,7 +20,7 @@ struct SongOptions
|
||||
enum DrainType { DRAIN_NORMAL, DRAIN_NO_RECOVER, DRAIN_SUDDEN_DEATH };
|
||||
DrainType m_DrainType; // only used with LifeBar
|
||||
int m_iBatteryLives;
|
||||
enum FailType { FAIL_ARCADE=0, FAIL_END_OF_SONG, FAIL_OFF };
|
||||
enum FailType { FAIL_ARCADE=0, FAIL_END_OF_SONG, FAIL_PASSMARK, FAIL_OFF };
|
||||
FailType m_FailType;
|
||||
float m_fMusicRate;
|
||||
bool m_bAssistTick, m_bAutoSync, m_bSaveScore;
|
||||
|
||||
Reference in New Issue
Block a user