diff --git a/TweaksAndThings/Patches/AutoEngineerPlanner_HandleCommand_Patch.cs b/TweaksAndThings/Patches/AutoEngineerPlanner_HandleCommand_Patch.cs index a750b54..8d2f982 100644 --- a/TweaksAndThings/Patches/AutoEngineerPlanner_HandleCommand_Patch.cs +++ b/TweaksAndThings/Patches/AutoEngineerPlanner_HandleCommand_Patch.cs @@ -34,8 +34,7 @@ internal class AutoEngineerPlanner_HandleCommand_Patch { TweaksAndThingsPlugin tweaksAndThings = SingletonPluginBase.Shared; if (!tweaksAndThings.IsEnabled() || !tweaksAndThings.SafetyFirst() || (sender.IsRemote && !tweaksAndThings.SafetyFirstClientEnforce()) || command.MaxSpeedMph <= governedSpeed) return true; - BaseLocomotive loco = TrainController.Shared.SelectedLocomotive; - if (TrainController.Shared.TryGetCarForId(command.LocomotiveId, out Car c)) loco = (BaseLocomotive)c; + BaseLocomotive loco = __instance._locomotive; if (SafetyFirstGoverningApplies(loco)) {