mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-21 00:39:53 +00:00
Revert "revert to old value if fail to set the transport"
This reverts commit 84ee48ecb2841e3e4a1d9434ff9ca569873c1ad0.
This commit is contained in:
parent
b9899fa0f6
commit
1366e2cbd3
@ -255,14 +255,8 @@ public class QSBCore : ModBehaviour
|
||||
|
||||
public override void Configure(IModConfig config)
|
||||
{
|
||||
var useKcpTransport = UseKcpTransport;
|
||||
UseKcpTransport = config.GetSettingsValue<bool>("useKcpTransport") || DebugSettings.AutoStart;
|
||||
if (!QSBNetworkManager.UpdateTransport())
|
||||
{
|
||||
UseKcpTransport = useKcpTransport;
|
||||
config.SetSettingsValue("useKcpTransport", useKcpTransport);
|
||||
Helper.Storage.Save(config, Constants.ModConfigFileName);
|
||||
}
|
||||
QSBNetworkManager.UpdateTransport();
|
||||
|
||||
DefaultServerIP = config.GetSettingsValue<string>("defaultServerIP");
|
||||
IncompatibleModsAllowed = config.GetSettingsValue<bool>("incompatibleModsAllowed");
|
||||
|
@ -164,11 +164,11 @@ public class QSBNetworkManager : NetworkManager, IAddComponentOnStart
|
||||
ConfigureNetworkManager();
|
||||
}
|
||||
|
||||
public static bool UpdateTransport()
|
||||
public static void UpdateTransport()
|
||||
{
|
||||
if (QSBCore.IsInMultiplayer)
|
||||
{
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
if (singleton != null)
|
||||
{
|
||||
@ -178,7 +178,6 @@ public class QSBNetworkManager : NetworkManager, IAddComponentOnStart
|
||||
{
|
||||
MenuManager.Instance.OnLanguageChanged(); // hack to update text
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private void InitPlayerName() =>
|
||||
|
Loading…
x
Reference in New Issue
Block a user