fix incorrect credit deduction when in free play + DelayedCreditReconcile

This commit is contained in:
Glenn Maynard
2004-11-07 01:11:26 +00:00
parent 32e799c41e
commit c1ffc40f86
+9 -5
View File
@@ -418,11 +418,15 @@ void ModeChoice::Apply( PlayerNumber pn ) const
// players joined. If enough players aren't joined, then // players joined. If enough players aren't joined, then
// we need to subtract credits for the sides that will be // we need to subtract credits for the sides that will be
// joined as a result of applying this option. // joined as a result of applying this option.
int iNumCreditsRequired = GetCreditsRequiredToPlayStyle(m_pStyle); if( PREFSMAN->m_iCoinMode == COIN_PAY )
int iNumCreditsPaid = GetNumCreditsPaid(); {
int iNumCreditsRequired = GetCreditsRequiredToPlayStyle(m_pStyle);
int iNumCreditsOwed = iNumCreditsRequired - iNumCreditsPaid; int iNumCreditsPaid = GetNumCreditsPaid();
GAMESTATE->m_iCoins -= iNumCreditsOwed * PREFSMAN->m_iCoinsPerCredit; int iNumCreditsOwed = iNumCreditsRequired - iNumCreditsPaid;
GAMESTATE->m_iCoins -= iNumCreditsOwed * PREFSMAN->m_iCoinsPerCredit;
LOG->Trace( "Deducted %i coins, %i remaining",
iNumCreditsOwed * PREFSMAN->m_iCoinsPerCredit, GAMESTATE->m_iCoins );
}
// If only one side is joined and we picked a style // If only one side is joined and we picked a style