[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
+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()