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