Exemplo n.º 1
0
 public override void OnAfterCampaignStart(Game game)
 {
     if (GameNetwork.IsDedicatedServer)
     {
         NetworkMain.InitializeAsDedicatedServer();
     }
     else
     {
         NetworkMain.Initialize();
     }
 }
Exemplo n.º 2
0
 internal static void Tick(float dt)
 {
     if (NetworkMain.IsInitialized)
     {
         if (NetworkMain.GameClient != null)
         {
             NetworkMain.GameClient.Update();
         }
         if (NetworkMain._diamondClientApplication != null)
         {
             NetworkMain._diamondClientApplication.Update();
         }
         GameNetwork.Tick(dt);
     }
     if (Module.CurrentModule.StartupInfo.StartupType == GameStartupType.Singleplayer || NetworkMain._checkingConnection || DateTime.Now.Ticks - NetworkMain._lastInternetConnectionCheck <= 300000000L)
     {
         return;
     }
     NetworkMain._checkingConnection = true;
     Task.Run((Action)(() => NetworkMain.CheckInternetConnection()));
 }
Exemplo n.º 3
0
        public static string GetUserCurrentRegion()
        {
            LobbyClient gameClient = NetworkMain.GameClient;

            return((gameClient != null ? (gameClient.LoggedIn ? 1 : 0) : 0) != 0 ? NetworkMain.GameClient.PlayerData.LastRegion : NetworkMain.GetUserDefaultRegion());
        }