diff --git a/src/modes/soccer_world.hpp b/src/modes/soccer_world.hpp index 83756b626..cc9b10a36 100644 --- a/src/modes/soccer_world.hpp +++ b/src/modes/soccer_world.hpp @@ -328,6 +328,8 @@ public: virtual const std::string& getIdent() const OVERRIDE; virtual void update(int ticks) OVERRIDE; + + bool shouldDrawTimer() const OVERRIDE { return !isStartPhase(); } // ------------------------------------------------------------------------ void onCheckGoalTriggered(bool first_goal); // ------------------------------------------------------------------------ diff --git a/src/modes/tutorial_world.hpp b/src/modes/tutorial_world.hpp index 863f28581..d52d3f3db 100644 --- a/src/modes/tutorial_world.hpp +++ b/src/modes/tutorial_world.hpp @@ -45,6 +45,7 @@ public: return WorldWithRank::getRescueTransform(index); } + bool shouldDrawTimer() const OVERRIDE { return false; } }; // class TutorialWorld diff --git a/src/modes/world.hpp b/src/modes/world.hpp index f6a58075b..2737d541b 100644 --- a/src/modes/world.hpp +++ b/src/modes/world.hpp @@ -327,7 +327,7 @@ public: /** The code that draws the timer should call this first to know * whether the game mode wants a timer drawn. */ virtual bool shouldDrawTimer() const - { return isRacePhase() && getClockMode() != CLOCK_NONE; } + { return isActiveRacePhase() && getClockMode() != CLOCK_NONE; } // ------------------------------------------------------------------------ /** \return whether this world can generate/have highscores */ bool useHighScores() const { return m_use_highscores; } diff --git a/src/modes/world_status.hpp b/src/modes/world_status.hpp index 0147b7474..ac8d3058f 100644 --- a/src/modes/world_status.hpp +++ b/src/modes/world_status.hpp @@ -156,6 +156,9 @@ public: bool isRacePhase() const { return m_phase>=GO_PHASE && m_phase=GO_PHASE && + m_phaseisRacePhase()) return; if (!m_enabled) return; + //drawGlobalTimer checks if it should display in the current phase/mode + drawGlobalTimer(); if (!m_is_tutorial) { - //stop displaying timer as soon as race is over - if (world->getPhase()isLinearRaceMode() && race_manager->hasGhostKarts() && race_manager->getNumberOfKarts() >= 2 )