Implemented the work around for #3671 (GP aborted if an unlock screen

is shown between races).
This commit is contained in:
hiker 2019-03-29 08:23:05 +11:00
parent d245676441
commit 1994fba62b

9
src/states_screens/race_result_gui.cpp Normal file → Executable file
View File

@ -182,7 +182,9 @@ void RaceResultGUI::enableAllButtons()
// If something was unlocked
// -------------------------
int n = (int)PlayerManager::getCurrentPlayer()->getRecentlyCompletedChallenges().size();
if (n > 0)
if (n > 0 &&
(race_manager->getMajorMode() != RaceManager::MAJOR_MODE_GRAND_PRIX ||
race_manager->getTrackNumber() + 1 == race_manager->getNumOfTracks() ) )
{
top->setText(n == 1 ? _("You completed a challenge!")
: _("You completed challenges!"));
@ -289,7 +291,10 @@ void RaceResultGUI::eventCallback(GUIEngine::Widget* widget,
// ---------------------------------------------------------
int n = (int)PlayerManager::getCurrentPlayer()
->getRecentlyCompletedChallenges().size();
if (n>0)
if (n > 0 &&
(race_manager->getMajorMode() != RaceManager::MAJOR_MODE_GRAND_PRIX ||
race_manager->getTrackNumber() + 1 == race_manager->getNumOfTracks() ) )
{
if (name == "top")
{