From c15073a49a6f7814deef65f9d935289468914cb1 Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Fri, 24 Dec 2021 20:05:14 +0000 Subject: fix grace period being allowed in titans --- .../mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'Northstar.Client/mod/scripts') 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 de4a663e..97072ab5 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut @@ -127,6 +127,14 @@ void function UpdateShownPage() Hud_SetVisible( Hud_GetChild( menu, "NextModeIcon" ), false ) Hud_SetVisible( Hud_GetChild( menu, "NextGameModeName" ), false ) + if ( NSGetServerCount() == 0 ) + { + Hud_SetEnabled( serverButtons[ 0 ], true ) + Hud_SetVisible( serverButtons[ 0 ], true ) + SetButtonRuiText( serverButtons[ 0 ], "#NS_SERVERBROWSER_NOSERVERS" ) + return + } + for ( int i = 0; ( file.page * BUTTONS_PER_PAGE ) + i < NSGetServerCount() - 1 && i < serverButtons.len(); i++ ) { int serverIndex = ( file.page * BUTTONS_PER_PAGE ) + i @@ -135,13 +143,6 @@ void function UpdateShownPage() Hud_SetVisible( serverButtons[ i ], true ) SetButtonRuiText( serverButtons[ i ], NSGetServerName( serverIndex ) ) } - - if ( NSGetServerCount() == 0 ) - { - Hud_SetEnabled( serverButtons[ 0 ], true ) - Hud_SetVisible( serverButtons[ 0 ], true ) - SetButtonRuiText( serverButtons[ 0 ], "#NS_SERVERBROWSER_NOSERVERS" ) - } } void function OnServerFocused( var button ) -- cgit v1.2.3 From e4faa247edaf389d4d52e3a3129af540bb19a0ac Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Sat, 25 Dec 2021 04:51:27 +0000 Subject: fix server browser showing n-1 servers --- Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Northstar.Client/mod/scripts') 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 ) -- cgit v1.2.3