diff --git a/src/gui/start_race_feedback.cpp b/src/gui/start_race_feedback.cpp index 626c40ff4..8dc37f055 100644 --- a/src/gui/start_race_feedback.cpp +++ b/src/gui/start_race_feedback.cpp @@ -28,7 +28,7 @@ enum WidgetTokens WTOK_MSG }; -StartRaceFeedback::StartRaceFeedback() +StartRaceFeedback::StartRaceFeedback() : m_updated( false ) { //Add some feedback so people know they are going to start the race widget_manager->reset(); @@ -50,8 +50,7 @@ void StartRaceFeedback::update(float DELTA) //I consider that in this case, a static variable is cleaner than a //member variable of this class. -Coz - static bool updated = false; - if( updated == true ) race_manager->startNew(); - else updated = true; + if( m_updated == true ) race_manager->startNew(); + else m_updated = true; } diff --git a/src/gui/start_race_feedback.hpp b/src/gui/start_race_feedback.hpp index 10ac4a415..55dab40a8 100644 --- a/src/gui/start_race_feedback.hpp +++ b/src/gui/start_race_feedback.hpp @@ -22,6 +22,8 @@ class StartRaceFeedback: public BaseGUI { + bool m_updated; + public: StartRaceFeedback(); ~StartRaceFeedback();