mirror of
https://github.com/rmroc451/TweaksAndThings.git
synced 2025-12-18 02:09:37 -06:00
one more of the ill fated traincontroller shared usages while on host processing.
This commit is contained in:
@@ -34,8 +34,7 @@ internal class AutoEngineerPlanner_HandleCommand_Patch
|
|||||||
{
|
{
|
||||||
TweaksAndThingsPlugin tweaksAndThings = SingletonPluginBase<TweaksAndThingsPlugin>.Shared;
|
TweaksAndThingsPlugin tweaksAndThings = SingletonPluginBase<TweaksAndThingsPlugin>.Shared;
|
||||||
if (!tweaksAndThings.IsEnabled() || !tweaksAndThings.SafetyFirst() || (sender.IsRemote && !tweaksAndThings.SafetyFirstClientEnforce()) || command.MaxSpeedMph <= governedSpeed) return true;
|
if (!tweaksAndThings.IsEnabled() || !tweaksAndThings.SafetyFirst() || (sender.IsRemote && !tweaksAndThings.SafetyFirstClientEnforce()) || command.MaxSpeedMph <= governedSpeed) return true;
|
||||||
BaseLocomotive loco = TrainController.Shared.SelectedLocomotive;
|
BaseLocomotive loco = __instance._locomotive;
|
||||||
if (TrainController.Shared.TryGetCarForId(command.LocomotiveId, out Car c)) loco = (BaseLocomotive)c;
|
|
||||||
|
|
||||||
if (SafetyFirstGoverningApplies(loco))
|
if (SafetyFirstGoverningApplies(loco))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user