diff --git a/stepmania/src/ScoreDisplayCalories.cpp b/stepmania/src/ScoreDisplayCalories.cpp index 33837ae256..c0b8e5a45e 100644 --- a/stepmania/src/ScoreDisplayCalories.cpp +++ b/stepmania/src/ScoreDisplayCalories.cpp @@ -36,6 +36,8 @@ void ScoreDisplayCalories::LoadFromNode( const CString& sDir, const XNode* pNode m_sMessageOnStep = ssprintf("StepP%d",m_PlayerNumber+1); + UpdateNumber(); + MESSAGEMAN->Subscribe( this, m_sMessageOnStep ); } @@ -43,13 +45,19 @@ void ScoreDisplayCalories::PlayCommand( const CString &sCommandName ) { if( sCommandName == m_sMessageOnStep ) { - float fCals = STATSMAN->m_CurStageStats.m_player[m_PlayerNumber].fCaloriesBurned; - this->SetTargetNumber( fCals ); + UpdateNumber(); } RollingNumbers::PlayCommand( sCommandName ); } +void ScoreDisplayCalories::UpdateNumber() +{ + float fCals = STATSMAN->m_CurStageStats.m_player[m_PlayerNumber].fCaloriesBurned; + fCals += STATSMAN->GetAccumStageStats().m_player[m_PlayerNumber].fCaloriesBurned; + SetTargetNumber( fCals ); +} + /* * (c) 2001-2004 Chris Danford * All rights reserved. diff --git a/stepmania/src/ScoreDisplayCalories.h b/stepmania/src/ScoreDisplayCalories.h index 45c61f3ad0..aa265678b5 100644 --- a/stepmania/src/ScoreDisplayCalories.h +++ b/stepmania/src/ScoreDisplayCalories.h @@ -30,6 +30,8 @@ public: void PlayCommand( const CString &sCommandName ); + void UpdateNumber(); + // // Commands //