From de16e73f6242e8e22ef7656d1a533155fc706561 Mon Sep 17 00:00:00 2001 From: Thad Ward Date: Sat, 30 Aug 2003 11:13:14 +0000 Subject: [PATCH] remove unused iDancePadType member variable make beginnerhelper not miss steps on fast songs. (kinda ugly but it works. what was happening is there wasn't a tap note at the position checked during the updates around the tap note that was missed, so Step was never called for it) --- stepmania/src/BeginnerHelper.cpp | 34 ++++++++++++++++++++------------ stepmania/src/BeginnerHelper.h | 2 +- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/stepmania/src/BeginnerHelper.cpp b/stepmania/src/BeginnerHelper.cpp index db8fcd4cb0..b2c1bd4804 100644 --- a/stepmania/src/BeginnerHelper.cpp +++ b/stepmania/src/BeginnerHelper.cpp @@ -30,6 +30,7 @@ BeginnerHelper::BeginnerHelper() LOG->Trace("BeginnerHelper::BeginnerHelper()"); m_bFlashEnabled = false; m_bInitialized = false; + m_fLastBeatChecked = 0; this->AddChild(&m_sBackground); } @@ -220,29 +221,36 @@ void BeginnerHelper::Update( float fDeltaTime ) if(!m_bInitialized) return; + // the beat we want to check on this update + float fCurBeat = GAMESTATE->m_fSongBeat + 0.5f; + for(int pn = 0; pn < NUM_PLAYERS; pn++ ) { if( !( GAMESTATE->IsPlayerEnabled(pn) && GAMESTATE->m_pCurNotes[pn]->GetDifficulty() == DIFFICULTY_BEGINNER) ) continue; // skip - int iStep = 0; if( (m_NoteData[pn].IsThereATapAtRow( BeatToNoteRowNotRounded((GAMESTATE->m_fSongBeat+0.01f)) ) ) ) FlashOnce(); - if((m_NoteData[pn].IsThereATapAtRow( BeatToNoteRowNotRounded((GAMESTATE->m_fSongBeat+0.5f))))) + for(float fBeat=m_fLastBeatChecked; fBeatm_fSongBeat+0.5f)) ) == TAP_TAP ) - { - switch(k) + if((m_NoteData[pn].IsThereATapAtRow( BeatToNoteRowNotRounded(fBeat)))) + { + int iStep = 0; + for( int k=0; k