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 );
|
||||
|
||||
Reference in New Issue
Block a user