public static void Reset() { lock (Client.eventLock) { if (singleton != null) { singleton.workerEnabled = false; Client.fixedUpdateEvent.Remove(singleton.FixedUpdate); if (singleton.registered) { singleton.UnregisterGameHooks(); } } singleton = new VesselWorker(); Client.fixedUpdateEvent.Add(singleton.FixedUpdate); LockSystem.fetch.RegisterAcquireHook(singleton.CheckMasterAcquire); } }
public static void Reset() { lock (Client.eventLock) { if (singleton != null) { singleton.workerEnabled = false; Client.fixedUpdateEvent.Remove(singleton.FixedUpdate); if (singleton.registered) { singleton.UnregisterGameHooks(); if (singleton.wasSpectating) { InputLockManager.RemoveControlLock(DARK_SPECTATE_LOCK); } } } singleton = new VesselWorker(); Client.fixedUpdateEvent.Add(singleton.FixedUpdate); LockSystem.fetch.RegisterAcquireHook(singleton.CheckMasterAcquire); } }
public static void Reset() { lock (Client.eventLock) { if (singleton != null) { Client.fixedUpdateEvent.Remove(singleton.FixedUpdate); } singleton = new VesselWorker(); Client.fixedUpdateEvent.Add(singleton.FixedUpdate); } }