aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Client/mod
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-25 04:51:27 +0000
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-25 04:51:27 +0000
commite4faa247edaf389d4d52e3a3129af540bb19a0ac (patch)
tree5b8d2d8c99be13dc385e6162640197003a5330ed /Northstar.Client/mod
parente88a2a62c7a7d1352fc3ffa88a016f2a2d7b0ad7 (diff)
downloadNorthstarMods-e4faa247edaf389d4d52e3a3129af540bb19a0ac.tar.gz
NorthstarMods-e4faa247edaf389d4d52e3a3129af540bb19a0ac.zip
fix server browser showing n-1 servers
Diffstat (limited to 'Northstar.Client/mod')
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut7
1 files changed, 6 insertions, 1 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 97072ab5..03009764 100644
--- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut
@@ -135,7 +135,10 @@ void function UpdateShownPage()
return
}
- for ( int i = 0; ( file.page * BUTTONS_PER_PAGE ) + i < NSGetServerCount() - 1 && i < serverButtons.len(); i++ )
+ // this trycatch likely isn't necessary, but i can't test whether this'll error on higher pagecounts and want to go sleep
+ try
+ {
+ for ( int i = 0; ( file.page * BUTTONS_PER_PAGE ) + i < NSGetServerCount() && i < serverButtons.len(); i++ )
{
int serverIndex = ( file.page * BUTTONS_PER_PAGE ) + i
@@ -143,6 +146,8 @@ void function UpdateShownPage()
Hud_SetVisible( serverButtons[ i ], true )
SetButtonRuiText( serverButtons[ i ], NSGetServerName( serverIndex ) )
}
+ }
+ catch(ex) {}
}
void function OnServerFocused( var button )