Exemple #1
0
 private void InitializationEAC()
 {
     try
     {
         ConsoleSystem.Log("[VirtualServer]: ParseEncryptionHash запускается...");
         EACServer.DoStartup();
         Timer.SetInterval(EACServer.DoUpdate, 1f);
         ConsoleSystem.Log("[VirtualServer]: ParseEncryptionHash успешно запущен!");
     }
     catch (Exception ex)
     {
         ConsoleSystem.LogError("[VirtualServer]: Исключение в InitializationEAC(): " + ex.Message);
     }
 }
Exemple #2
0
 public void OpenConnection()
 {
     this.useQueryPort   = (ConVar.Server.queryport <= 0 ? false : ConVar.Server.queryport != ConVar.Server.port);
     Network.Net.sv.ip   = ConVar.Server.ip;
     Network.Net.sv.port = ConVar.Server.port;
     if (!Network.Net.sv.Start())
     {
         UnityEngine.Debug.LogWarning("Couldn't Start Server.");
         return;
     }
     this.StartSteamServer();
     Network.Net.sv.callbackHandler = this;
     Network.Net.sv.cryptography    = new NetworkCryptographyServer();
     EACServer.DoStartup();
     base.InvokeRepeating("EACUpdate", 1f, 1f);
     base.InvokeRepeating("DoTick", 1f, 1f / (float)ConVar.Server.tickrate);
     base.InvokeRepeating("DoHeartbeat", 1f, 1f);
     this.runFrameUpdate = true;
     Interface.CallHook("IOnServerInitialized");
 }
 public void OpenConnection()
 {
     this.useQueryPort = ConVar.Server.queryport > 0 && ConVar.Server.queryport != ConVar.Server.port;
     ((Network.Server)Network.Net.sv).ip   = (__Null)ConVar.Server.ip;
     ((Network.Server)Network.Net.sv).port = (__Null)ConVar.Server.port;
     if (!((Network.Server)Network.Net.sv).Start())
     {
         Debug.LogWarning((object)"Couldn't Start Server.");
     }
     else
     {
         this.StartSteamServer();
         ((Network.Server)Network.Net.sv).callbackHandler = (__Null)this;
         ((NetworkPeer)Network.Net.sv).cryptography       = (__Null) new NetworkCryptographyServer();
         EACServer.DoStartup();
         ((MonoBehaviour)this).InvokeRepeating("EACUpdate", 1f, 1f);
         ((MonoBehaviour)this).InvokeRepeating("DoTick", 1f, 1f / (float)ConVar.Server.tickrate);
         ((MonoBehaviour)this).InvokeRepeating("DoHeartbeat", 1f, 1f);
         this.runFrameUpdate = true;
         Interface.CallHook("IOnServerInitialized");
     }
 }