From 12db299967f6514b72da5fbe5c8b580d5ca22b5d Mon Sep 17 00:00:00 2001 From: Will Castro <39478251+VITALISED@users.noreply.github.com> Date: Fri, 7 Jan 2022 00:19:17 +1100 Subject: [PATCH] Fix localised gamemodes extending to all game modes (fuck you Fifty) --- .../scripts/vscripts/ui/menu_ns_serverbrowser.nut | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut index 465e59b6d..75e6a0c93 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut @@ -107,8 +107,11 @@ void function UpdatePrivateMatchModesAndMaps() } array realModes = [ "private_match" ] - realModes.extend( GetPrivateMatchModes() ) - + + foreach(string mode in GetPrivateMatchModes()) + { + realModes.append(mode) + } foreach( int enum_, string mode in realModes ) { string localized = GetGameModeDisplayName( mode ) @@ -141,10 +144,8 @@ void function InitServerBrowserMenu() foreach ( int enum_, string map in filterArguments.filterMaps ) Hud_DialogList_AddListItem( Hud_GetChild( file.menu, "SwtBtnSelectMap" ) , map, string( enum_ ) ) - - filterArguments.filterGamemodes = GetPrivateMatchModes() filterArguments.filterGamemodes.insert(0, "SWITCH_ANY") - + // GetGameModeDisplayName( mode ) requires server talk even if it can be entirely client side foreach ( int enum_, string mode in filterArguments.filterGamemodes ) Hud_DialogList_AddListItem( Hud_GetChild( file.menu, "SwtBtnSelectGamemode" ) , mode, string( enum_ ) ) @@ -724,8 +725,7 @@ void function CheckGamemode( serverStruct t ) if (filterArguments.filterGamemode != "SWITCH_ANY" && filterArguments.filterGamemode == t.serverGamemode) { file.serversArrayFiltered.append( t ) - } - else if (filterArguments.filterGamemode == "SWITCH_ANY") + } else if (filterArguments.filterGamemode == "SWITCH_ANY") { file.serversArrayFiltered.append( t ) }