From d834608f0daf619e27c4dca3505610c72b1f895e Mon Sep 17 00:00:00 2001 From: Thad Ward Date: Sun, 24 Aug 2003 23:43:42 +0000 Subject: [PATCH] Better, cleaner solution for conditionally initializing the BeginnerHelper. --- stepmania/src/ScreenGameplay.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 02e487372b..14a8442ea4 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -776,18 +776,14 @@ void ScreenGameplay::LoadNextSong() /* Set up song-specific graphics. */ - bool UseBeginnerhelper = false; // Beginner steps are always the same on both players.. Just get the # of 1 player that's using the Beginner steps, and go on. - m_iPOB = 0; + m_iPOB = -1; for( int pb=0; pbIsPlayerEnabled(pb) && GAMESTATE->m_PreferredDifficulty[pb] == DIFFICULTY_BEGINNER ) - { - UseBeginnerhelper = true; m_iPOB = pb; - } /* TODO: fall back on m_Background if nobody is on beginner. */ - if( PREFSMAN->m_bShowBeginnerHelper && UseBeginnerhelper) + if( PREFSMAN->m_bShowBeginnerHelper && m_iPOB != -1) { m_Background.Unload(); // BeginnerHelper has it's own BG control. m_Background.StopAnimating(); @@ -997,7 +993,7 @@ void ScreenGameplay::Update( float fDeltaTime ) // Check to see what we animate on this one /* tip: Store a NoteData inside BeginnerHelper, Load it above and handle all of this * within BeginnerHelper::Update. */ - if( PREFSMAN->m_bShowBeginnerHelper ) + if( PREFSMAN->m_bShowBeginnerHelper && m_iPOB != -1) { int iStep = 0; if( (m_Player[m_iPOB].IsThereATapAtRow( BeatToNoteRowNotRounded((GAMESTATE->m_fSongBeat+0.1f)) ) ) )