public static void StopRemoteControl(bool instant = false) { RemoteControlling = null; _cachedRCHandler?.Stop(instant); _cachedRCHandler = null; Main.DisablePlayerSwitching = false; }
public static void RemoteControl(DeloreanTimeMachine timeMachine) { if (timeMachine == null) { return; } if (RemoteControlling != null) { RemoteControlling.Circuits?.GetHandler <RcHandler>().StopRC(); } _cachedRCHandler = timeMachine?.Circuits?.GetHandler <RcHandler>(); _cachedRCHandler?.StartRC(); RemoteControlling = timeMachine; Main.DisablePlayerSwitching = true; }