From f99e13cb782450013cf6b9710c4c3a7159b43e4a Mon Sep 17 00:00:00 2001 From: Alayan Date: Wed, 26 Aug 2020 18:26:01 +0200 Subject: [PATCH] Fix #4219 --- src/modes/world.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modes/world.cpp b/src/modes/world.cpp index 48643311f..bee2a8b2b 100644 --- a/src/modes/world.cpp +++ b/src/modes/world.cpp @@ -350,6 +350,8 @@ void World::reset(bool restart) // when the race result gui was being shown. In this case restore the // race gui (note that the race result gui is cached and so never really // destroyed). + bool reset_streak = restart && !m_saved_race_gui; + if(m_saved_race_gui) { m_race_gui = m_saved_race_gui; @@ -388,7 +390,7 @@ void World::reset(bool restart) { PlayerManager::trackEvent(RaceManager::get()->getTrackName(), AchievementsStatus::TR_EGG_HUNT_STARTED); } - if (restart) + if (reset_streak) PlayerManager::onRaceEnd(true /* previous race aborted */); } }