From 420846a012e6ed13cc88ea3dd495aa05a821c0ad Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Sat, 16 Sep 2006 19:56:00 +0000 Subject: [PATCH] oops, missed one. --- stepmania/src/LifeMeterBattery.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stepmania/src/LifeMeterBattery.cpp b/stepmania/src/LifeMeterBattery.cpp index 78d3026e1d..855f3a31af 100644 --- a/stepmania/src/LifeMeterBattery.cpp +++ b/stepmania/src/LifeMeterBattery.cpp @@ -61,7 +61,7 @@ void LifeMeterBattery::Load( const PlayerState *pPlayerState, PlayerStageStats * Refresh(); } -#include "RageLog.h" + void LifeMeterBattery::OnSongEnded() { if( m_pPlayerStageStats->bFailedEarlier ) @@ -74,10 +74,11 @@ void LifeMeterBattery::OnSongEnded() const Course *pCourse = GAMESTATE->m_pCurCourse; if( pCourse && pCourse->m_vEntries[GAMESTATE->GetCourseSongIndex()].iGainLives > -1 ) - m_iLivesLeft += pCourse->m_vEntries[GAMESTATE->m_iCurrentStageIndex].iGainLives; + m_iLivesLeft += pCourse->m_vEntries[GAMESTATE->GetCourseSongIndex()].iGainLives; else m_iLivesLeft += ( GAMESTATE->m_pCurSteps[pn]->GetMeter()>=8 ? 2 : 1 ); m_iLivesLeft = min( m_iLivesLeft, GAMESTATE->m_SongOptions.GetSong().m_iBatteryLives ); + if( m_iTrailingLivesLeft < m_iLivesLeft ) m_soundGainLife.Play(); }