diff options
Diffstat (limited to 'Northstar.Client/mod/scripts')
-rw-r--r-- | Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut index 171ee7dc..95b7bdae 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut @@ -559,15 +559,28 @@ void function TryAuthWithLocalServer() if ( NSWasAuthSuccessful() ) { NSCompleteAuthWithLocalServer() + if ( GetConVarString( "mp_gamemode" ) == "solo" ) + SetConVarString( "mp_gamemode", "tdm" ) + + CloseAllDialogs() + + ClientCommand( "setplaylist tdm" ) + ClientCommand( "map mp_lobby" ) } + else + { + CloseAllDialogs() - if ( GetConVarString( "mp_gamemode" ) == "solo" ) - SetConVarString( "mp_gamemode", "tdm" ) + var reason = NSGetAuthFailReason() - CloseAllDialogs() + DialogData dialogData + dialogData.image = $"ui/menu/common/dialog_error" + dialogData.header = "#ERROR" + dialogData.message = Localize("#NS_SERVERBROWSER_CONNECTIONFAILED") + "\nERROR: " + reason + "\n" + Localize("#" + reason) - ClientCommand( "setplaylist tdm" ) - ClientCommand( "map mp_lobby" ) + AddDialogButton( dialogData, "#OK", null ) + OpenDialog( dialogData ) + } } void function CancelNSLocalAuth() |