network crash fixes

This commit is contained in:
2023-04-30 14:10:04 +03:00
parent 6806c89dcb
commit 8303cd6b97
5 changed files with 9 additions and 3 deletions

View File

@@ -19,6 +19,7 @@ namespace Game
public static bool StartServer(bool listenServer = true)
{
Cleanup();
ConnectedClients = new List<NetworkConnection>(MaximumClients);
@@ -78,6 +79,7 @@ namespace Game
foreach (Type type in NetworkedTypes)
Console.Print("tracking networked type: " + type.Name);
#endif
GameModeManager.Init();
if (listenServer)
return ConnectServer(listenServer: true);