changable regen combos
This commit is contained in:
@@ -341,9 +341,8 @@ void LifeMeterBar::ChangeLife( TapNoteScore score )
|
||||
case TNS_GREAT:
|
||||
case TNS_GOOD:
|
||||
m_iMissCombo = 0;
|
||||
m_iComboToRegainLife--;
|
||||
CLAMP( m_iComboToRegainLife, 0, 10);
|
||||
if ( m_iComboToRegainLife )
|
||||
m_iComboToRegainLife = max( m_iComboToRegainLife-1, 0 );
|
||||
if ( m_iComboToRegainLife > 0 )
|
||||
fDeltaLife = 0.0f;
|
||||
break;
|
||||
case TNS_BOO:
|
||||
@@ -352,8 +351,11 @@ void LifeMeterBar::ChangeLife( TapNoteScore score )
|
||||
// do this after; only successive boo/miss will
|
||||
// increase the amount of life lost.
|
||||
m_iMissCombo++;
|
||||
m_iComboToRegainLife += 5;
|
||||
CLAMP( m_iComboToRegainLife, 0, 10);
|
||||
/* Increase by m_iRegenComboAfterMiss; never push it beyond m_iMaxRegenComboAfterMiss
|
||||
* but don't reduce it if it's already past. */
|
||||
const int NewComboToRegainLife = min( PREFSMAN->m_iMaxRegenComboAfterMiss,
|
||||
m_iComboToRegainLife + PREFSMAN->m_iRegenComboAfterMiss );
|
||||
m_iComboToRegainLife = max( m_iComboToRegainLife, NewComboToRegainLife );
|
||||
}
|
||||
|
||||
switch( GAMESTATE->m_SongOptions.m_DrainType )
|
||||
@@ -370,7 +372,13 @@ void LifeMeterBar::ChangeLife( TapNoteScore score )
|
||||
// check if this step would cause a fail
|
||||
if( m_fLifePercentage + fDeltaLife <= FAIL_THRESHOLD
|
||||
&& m_fLifePercentage > FAIL_THRESHOLD )
|
||||
m_iComboToRegainLife = 10;
|
||||
{
|
||||
/* Increase by m_iRegenComboAfterFail; never push it beyond m_iMaxRegenComboAfterFail
|
||||
* but don't reduce it if it's already past. */
|
||||
const int NewComboToRegainLife = min( PREFSMAN->m_iMaxRegenComboAfterFail,
|
||||
m_iComboToRegainLife + PREFSMAN->m_iRegenComboAfterFail );
|
||||
m_iComboToRegainLife = max( m_iComboToRegainLife, NewComboToRegainLife );
|
||||
}
|
||||
|
||||
m_fLifePercentage += fDeltaLife;
|
||||
CLAMP( m_fLifePercentage, 0, 1 );
|
||||
|
||||
@@ -62,6 +62,10 @@ PrefsManager::PrefsManager()
|
||||
m_fJudgeWindowBooSeconds = 0.180f;
|
||||
m_fJudgeWindowOKSeconds = 0.250f; // allow enough time to take foot off and put back on
|
||||
m_fLifeDifficultyScale = 1.0f;
|
||||
m_iRegenComboAfterFail = 10; // cumulative
|
||||
m_iRegenComboAfterMiss = 5; // cumulative
|
||||
m_iMaxRegenComboAfterFail = 10;
|
||||
m_iMaxRegenComboAfterMiss = 10;
|
||||
m_bDelayedEscape = true;
|
||||
m_bInstructions = true;
|
||||
m_bShowDontDie = true;
|
||||
@@ -217,6 +221,10 @@ void PrefsManager::ReadGlobalPrefsFromDisk()
|
||||
ini.GetValue( "Options", "JudgeWindowBooSeconds", m_fJudgeWindowBooSeconds );
|
||||
ini.GetValue( "Options", "JudgeWindowOKSeconds", m_fJudgeWindowOKSeconds );
|
||||
ini.GetValue( "Options", "LifeDifficultyScale", m_fLifeDifficultyScale );
|
||||
ini.GetValue( "Options", "RegenComboAfterFail", m_iRegenComboAfterFail );
|
||||
ini.GetValue( "Options", "RegenComboAfterMiss", m_iRegenComboAfterMiss );
|
||||
ini.GetValue( "Options", "MaxRegenComboAfterFail", m_iMaxRegenComboAfterFail );
|
||||
ini.GetValue( "Options", "MaxRegenComboAfterMiss", m_iMaxRegenComboAfterMiss );
|
||||
ini.GetValue( "Options", "DelayedEscape", m_bDelayedEscape );
|
||||
ini.GetValue( "Options", "HiddenSongs", m_bHiddenSongs );
|
||||
ini.GetValue( "Options", "Vsync", m_bVsync );
|
||||
@@ -340,6 +348,10 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
|
||||
ini.SetValue( "Options", "JudgeWindowBooSeconds", m_fJudgeWindowBooSeconds );
|
||||
ini.SetValue( "Options", "JudgeWindowOKSeconds", m_fJudgeWindowOKSeconds );
|
||||
ini.SetValue( "Options", "LifeDifficultyScale", m_fLifeDifficultyScale );
|
||||
ini.SetValue( "Options", "RegenComboAfterFail", m_iRegenComboAfterFail );
|
||||
ini.SetValue( "Options", "RegenComboAfterMiss", m_iRegenComboAfterMiss );
|
||||
ini.SetValue( "Options", "MaxRegenComboAfterFail", m_iMaxRegenComboAfterFail );
|
||||
ini.SetValue( "Options", "MaxRegenComboAfterMiss", m_iMaxRegenComboAfterMiss );
|
||||
ini.SetValue( "Options", "DelayedEscape", m_bDelayedEscape );
|
||||
ini.SetValue( "Options", "HiddenSongs", m_bHiddenSongs );
|
||||
ini.SetValue( "Options", "Vsync", m_bVsync );
|
||||
|
||||
@@ -55,6 +55,10 @@ public:
|
||||
float m_fJudgeWindowGoodSeconds;
|
||||
float m_fJudgeWindowBooSeconds;
|
||||
float m_fJudgeWindowOKSeconds;
|
||||
int m_iRegenComboAfterFail;
|
||||
int m_iRegenComboAfterMiss;
|
||||
int m_iMaxRegenComboAfterFail;
|
||||
int m_iMaxRegenComboAfterMiss;
|
||||
bool m_bAutoPlay;
|
||||
bool m_bDelayedEscape;
|
||||
bool m_bInstructions, m_bShowDontDie, m_bShowSelectGroup;
|
||||
|
||||
Reference in New Issue
Block a user