aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Client/mod/scripts/vscripts
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-30 19:04:13 +0000
committerGitHub <noreply@github.com>2021-12-30 19:04:13 +0000
commit62afd5efe64889b7e6fd8e45279e87a55026a3da (patch)
treed38c0dc1d90daead50946d15d65d99f5ef0d44b5 /Northstar.Client/mod/scripts/vscripts
parentbde589963e9030bdae5bfad1cbf068c0ad6e078a (diff)
parentdf310780fc6cd6650baedda53b521a5a335b805f (diff)
downloadNorthstarMods-62afd5efe64889b7e6fd8e45279e87a55026a3da.tar.gz
NorthstarMods-62afd5efe64889b7e6fd8e45279e87a55026a3da.zip
Merge pull request #37 from F1F7Y/main
Fix minor bugs in server browser
Diffstat (limited to 'Northstar.Client/mod/scripts/vscripts')
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut5
1 files changed, 5 insertions, 0 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 6dcdabd8..a989da12 100644
--- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut
@@ -701,6 +701,7 @@ void function FilterServerList()
printt("---------------------------------------------")
Hud_SetText( Hud_GetChild( file.menu, "InGamePlayerCount" ), string( totalPlayers ) )
+ Hud_SetText( Hud_GetChild( file.menu, "TotalServerCount" ), string( NSGetServerCount() ) )
}
void function CheckGamemode( serverStruct t )
@@ -776,6 +777,9 @@ void function OnServerButtonClicked(var button)
void function CheckDoubleClick(int scriptID, bool wasClickNav)
{
+ if ( NSGetServerCount() == 0 ) return
+
+
file.focusedServerIndex = file.serversArrayFiltered[ file.scrollOffset + scriptID ].serverIndex
int serverIndex = file.scrollOffset + scriptID
@@ -807,6 +811,7 @@ void function DisplayFocusedServerInfo( int scriptID)
var menu = GetMenu( "ServerBrowserMenu" )
int serverIndex = file.scrollOffset + scriptID
+ if (serverIndex < 0) serverIndex = 0
Hud_SetVisible( Hud_GetChild( menu, "BtnServerDescription" ), true )