public static void FixedUpdate_Postfix(int ___frame) { if (___frame >= 11 && SimulatedWorld.Initialized) { SimulatedWorld.OnGameLoadCompleted(); } }
public static void FixedUpdate_Postfix(int ___frame) { if (___frame >= 11 && SimulatedWorld.Initialized) { SimulatedWorld.OnGameLoadCompleted(); if (!LocalPlayer.IsMasterClient) { MultiplayerClientSession.Instance.DisplayPingIndicator(); } } }
private static void OnHostCurrentGameClick() { // Make sure to save the game before enabling the multiplayer mod GameSave.AutoSave(); int port = Config.DefaultPort; Log.Info($"Listening server on port {port}"); var session = NebulaBootstrapper.Instance.CreateMultiplayerHostSession(); session.StartServer(port, true); // Manually call the OnGameLoadCompleted here since we are already in a game. SimulatedWorld.OnGameLoadCompleted(); GameMain.Resume(); }