From 2888f6ee2d32dedb71bfd588acf4815bbea04e54 Mon Sep 17 00:00:00 2001 From: Deve Date: Sun, 7 Oct 2018 21:45:48 +0200 Subject: [PATCH] Get correct track groups for soccer/battle mode --- src/states_screens/online/tracks_screen.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/states_screens/online/tracks_screen.cpp b/src/states_screens/online/tracks_screen.cpp index 26a329d12..a774f3f44 100644 --- a/src/states_screens/online/tracks_screen.cpp +++ b/src/states_screens/online/tracks_screen.cpp @@ -197,8 +197,14 @@ void TracksScreen::beforeAddingWidget() RibbonWidget* tabs = getWidget("trackgroups"); tabs->clearAllChildren(); - - const std::vector& groups = track_manager->getAllTrackGroups(); + + RaceManager::MinorRaceModeType minor_mode = race_manager->getMinorMode(); + bool is_soccer = minor_mode == RaceManager::MINOR_MODE_SOCCER; + bool is_arena = is_soccer || minor_mode == RaceManager::MINOR_MODE_BATTLE; + + const std::vector& groups = + is_arena ? track_manager->getAllArenaGroups(is_soccer) + : track_manager->getAllTrackGroups(); const int group_amount = (int)groups.size(); if (group_amount > 1)