[LifeMeterBattery] Added MaxLives metric, which limits the maximum amount of lives. Setting this to 0 will remove the limit.
This commit is contained in:
@@ -24,6 +24,7 @@ void LifeMeterBattery::Load( const PlayerState *pPlayerState, PlayerStageStats *
|
||||
PlayerNumber pn = pPlayerState->m_PlayerNumber;
|
||||
|
||||
MIN_SCORE_TO_KEEP_LIFE.Load(sType, "MinScoreToKeepLife");
|
||||
MAX_LIVES.Load(sType, "MaxLives");
|
||||
DANGER_THRESHOLD.Load(sType, "DangerThreshold");
|
||||
SUBTRACT_LIVES.Load(sType, "SubtractLives");
|
||||
MINES_SUBTRACT_LIVES.Load(sType, "MinesSubtractLives");
|
||||
@@ -120,6 +121,8 @@ void LifeMeterBattery::AddLives( int iLives )
|
||||
{
|
||||
if( iLives <= 0 )
|
||||
return;
|
||||
if( MAX_LIVES != 0 && m_iLivesLeft >= MAX_LIVES )
|
||||
return;
|
||||
|
||||
m_iTrailingLivesLeft = m_iLivesLeft;
|
||||
m_iLivesLeft += iLives;
|
||||
|
||||
Reference in New Issue
Block a user