Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mod reloading for MAD #780

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ void function ConnectWithPassword( var button )
if ( GetTopNonDialogMenu() == file.menu )
{
TriggerConnectToServerCallbacks()
thread ThreadedAuthAndConnectToServer( Hud_GetUTF8Text( Hud_GetChild( file.menu, "EnterPasswordBox" ) ) )
thread ThreadedAuthAndConnectToServer( Hud_GetUTF8Text( Hud_GetChild( file.menu, "EnterPasswordBox" ) ), true )
GeckoEidechse marked this conversation as resolved.
Show resolved Hide resolved
}
}
13 changes: 2 additions & 11 deletions Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut
Original file line number Diff line number Diff line change
Expand Up @@ -1050,13 +1050,6 @@ void function OnServerSelected_Threaded( var button )
}
}

// Make Northstar aware new mods have been added
if ( downloadedMods > 0 )
{
print( "Some new mods have been downloaded or enabled, reloading mods." )
NSReloadMods();
}

if ( server.requiresPassword )
{
OnCloseServerBrowserMenu()
Expand All @@ -1065,12 +1058,12 @@ void function OnServerSelected_Threaded( var button )
else
{
TriggerConnectToServerCallbacks()
thread ThreadedAuthAndConnectToServer()
thread ThreadedAuthAndConnectToServer( "", downloadedMods != 0 )
}
}


void function ThreadedAuthAndConnectToServer( string password = "" )
void function ThreadedAuthAndConnectToServer( string password = "", bool modsChanged = false )
{
if ( NSIsAuthenticatingWithServer() )
return
Expand Down Expand Up @@ -1098,8 +1091,6 @@ void function ThreadedAuthAndConnectToServer( string password = "" )

if ( NSWasAuthSuccessful() )
{
bool modsChanged = false

// disable all RequiredOnClient mods that are not required by the server and are currently enabled
foreach ( string modName in NSGetModNames() )
{
Expand Down
Loading