Get correct track groups for soccer/battle mode
This commit is contained in:
parent
0766df61f2
commit
2888f6ee2d
@ -198,7 +198,13 @@ void TracksScreen::beforeAddingWidget()
|
||||
RibbonWidget* tabs = getWidget<RibbonWidget>("trackgroups");
|
||||
tabs->clearAllChildren();
|
||||
|
||||
const std::vector<std::string>& 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<std::string>& groups =
|
||||
is_arena ? track_manager->getAllArenaGroups(is_soccer)
|
||||
: track_manager->getAllTrackGroups();
|
||||
const int group_amount = (int)groups.size();
|
||||
|
||||
if (group_amount > 1)
|
||||
|
Loading…
Reference in New Issue
Block a user