From 7210df525bda8f819a0db6319b548d5b443c4fca Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 19 Sep 2006 09:42:25 +0000 Subject: [PATCH] remove coin debouncing; InputFilter does better generic debouncing on all inputs --- stepmania/src/StepMania.cpp | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index 74313c99f6..bca84c286d 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -1208,28 +1208,8 @@ RString StepMania::SaveScreenshot( RString sDir, bool bSaveCompressed, bool bMak return sFileName; } -static Preference g_iCoinSettleTime( "CoinSettleTime", 0.03f ); - void StepMania::InsertCoin( int iNum, const RageTimer *pTime ) { - if( pTime != NULL ) - { - /* If a time is supplied for the button press, don't allow coin inserts - * in very rapid succession, to be sure one insert signal isn't counted - * as two coins. Use pTime, and never the current time, or we'll drop - * coins if multiple coins are inserted during a screen load. */ - static RageTimer LastCoin( RageZeroTimer ); - - float fAgo = *pTime - LastCoin; - if( !LastCoin.IsZero() && fAgo < g_iCoinSettleTime.Get() ) - { - LOG->Trace("Ignored coin input (%f since last accepted)", fAgo ); - return; - } - - LastCoin = *pTime; - } - GAMESTATE->m_iCoins += iNum; LOG->Trace("%i coins inserted, %i needed to play", GAMESTATE->m_iCoins, PREFSMAN->m_iCoinsPerCredit.Get() ); BOOKKEEPER->CoinInserted();