diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index b3a9cc8dc6..a2c588eb1f 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -1193,20 +1193,22 @@ RString StepMania::SaveScreenshot( RString sDir, bool bSaveCompressed, bool bMak return sFileName; } -void StepMania::InsertCoin( int iNum ) +void StepMania::InsertCoin( int iNum, bool bCountInBookkeeping ) { - for( int i = 0; i < iNum; ++i ) + if( bCountInBookkeeping ) + { LIGHTSMAN->PulseCoinCounter(); + BOOKKEEPER->CoinInserted(); + } GAMESTATE->m_iCoins += iNum; LOG->Trace("%i coins inserted, %i needed to play", GAMESTATE->m_iCoins, PREFSMAN->m_iCoinsPerCredit.Get() ); - BOOKKEEPER->CoinInserted(); SCREENMAN->PlayCoinSound(); MESSAGEMAN->Broadcast( Message_CoinInserted ); } void StepMania::InsertCredit() { - InsertCoin( PREFSMAN->m_iCoinsPerCredit ); + InsertCoin( PREFSMAN->m_iCoinsPerCredit, false ); } /* Returns true if the key has been handled and should be discarded, false if diff --git a/stepmania/src/StepMania.h b/stepmania/src/StepMania.h index f1f069a8c0..5b6b297b2a 100644 --- a/stepmania/src/StepMania.h +++ b/stepmania/src/StepMania.h @@ -17,7 +17,7 @@ namespace StepMania // If successful, return filename of screenshot in sDir, else return "" RString SaveScreenshot( RString sDir, bool bSaveCompressed, bool bMakeSignature, int iIndex = -1 ); - void InsertCoin( int iNum = 1 ); + void InsertCoin( int iNum = 1, bool bCountInBookkeeping = true ); void InsertCredit(); void GetPreferredVideoModeParams( VideoModeParams ¶msOut );