Mod switching

This commit is contained in:
Bob Da Ross
2022-02-14 20:19:30 -06:00
parent cf51b5f0e7
commit 4bd456a05b
6 changed files with 330 additions and 29 deletions

View File

@@ -114,7 +114,7 @@ namespace SeamlessClientPlugin
public const ushort SeamlessClientNetID = 2936;
private static System.Timers.Timer PingTimer = new System.Timers.Timer(3000);
private static System.Timers.Timer PingTimer = new System.Timers.Timer(500);
public static bool IsSwitching = false;
public static bool RanJoin = false;
@@ -123,10 +123,9 @@ namespace SeamlessClientPlugin
public void Init(object gameInstance)
{
Patches.GetPatches();
TryShow("Running Seamless Client Plugin v[" + Version + "]");
// PingTimer.Elapsed += PingTimer_Elapsed;
// PingTimer.Start();
@@ -134,7 +133,6 @@ namespace SeamlessClientPlugin
}
public void Update()
{
if (MyAPIGateway.Multiplayer == null)
@@ -143,11 +141,14 @@ namespace SeamlessClientPlugin
if (!Initilized)
{
Patches.GetPatches();
TryShow("Initilizing Communications!");
RunInitilizations();
}
}
public static void RunInitilizations()
@@ -158,7 +159,6 @@ namespace SeamlessClientPlugin
public static void DisposeInitilizations()
{
PingTimer.Stop();
MyAPIGateway.Multiplayer?.UnregisterSecureMessageHandler(SeamlessClientNetID, MessageHandler);
Initilized = false;