Example #1
0
 public static void FixedUpdate_Postfix(int ___frame)
 {
     if (___frame >= 11 && SimulatedWorld.Initialized)
     {
         SimulatedWorld.OnGameLoadCompleted();
     }
 }
Example #2
0
 public static void FixedUpdate_Postfix(int ___frame)
 {
     if (___frame >= 11 && SimulatedWorld.Initialized)
     {
         SimulatedWorld.OnGameLoadCompleted();
         if (!LocalPlayer.IsMasterClient)
         {
             MultiplayerClientSession.Instance.DisplayPingIndicator();
         }
     }
 }
Example #3
0
        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();
        }