Stopped the errors caused my the server client trying to save

This commit is contained in:
Twirlbug 2023-06-27 20:29:30 -05:00
parent c98bbd72ce
commit 8e4c603cad

View file

@ -17,7 +17,12 @@ namespace SRMultiplayer.Patches
{ {
if (!Globals.IsMultiplayer) return; if (!Globals.IsMultiplayer) return;
NetworkClient.Instance.Disconnect(); //only handle the client if the client is the one disconnecting
if (!Globals.IsServer)
{
NetworkClient.Instance.Disconnect();
}
//if server ahndle the shutdown
NetworkServer.Instance.Disconnect(); NetworkServer.Instance.Disconnect();
} }
} }