[LifeMeterBattery] Fixed a bug where MinesSubtractLives was not being honored. Also added LifeChanged message to changing of life on holds.

This commit is contained in:
AJ Kelly
2011-06-17 01:06:01 -05:00
parent bd336c9a76
commit 5386525448
2 changed files with 13 additions and 2 deletions
+6 -1
View File
@@ -5,9 +5,14 @@ from StepMania 4 alpha 5 to sm-ssc v1.2.5, see Changelog_sm-ssc.txt.
________________________________________________________________________________
================================================================================
StepMania 5.0 Preview 2 | 20110???
StepMania 5.0 Preview 2 | 201106??
--------------------------------------------------------------------------------
2011/06/17
----------
* [LifeMeterBattery] Fixed a bug where MinesSubtractLives was not being honored.
Also added LifeChanged message to changing of life on holds. [AJ]
2011/06/15
----------
* [TimingData] Added many lua bindings for the other timing segments. GetWarps,
+7 -1
View File
@@ -155,7 +155,7 @@ void LifeMeterBattery::ChangeLife( TapNoteScore score )
SubtractLives(MINES_SUBTRACT_LIVES);
else
{
if( score < MIN_SCORE_TO_KEEP_LIFE && SUBTRACT_LIVES > 0 )
if( score < MIN_SCORE_TO_KEEP_LIFE && score > TNS_CheckpointMiss && SUBTRACT_LIVES > 0 )
SubtractLives(SUBTRACT_LIVES);
}
@@ -175,6 +175,12 @@ void LifeMeterBattery::ChangeLife( HoldNoteScore score, TapNoteScore tscore )
AddLives(HELD_ADD_LIVES);
if( score == HNS_LetGo && LET_GO_SUBTRACT_LIVES > 0 )
SubtractLives(LET_GO_SUBTRACT_LIVES);
Message msg( "LifeChanged" );
msg.SetParam( "Player", m_pPlayerState->m_PlayerNumber );
msg.SetParam( "LifeMeter", LuaReference::CreateFromPush(*this) );
msg.SetParam( "LivesLeft", GetLivesLeft() );
MESSAGEMAN->Broadcast( msg );
}
void LifeMeterBattery::HandleTapScoreNone()