public static bool Prefix(LocoControllerShunter __instance) { var sim = __instance.sim; sim.throttle.SetValue(sim.engineOn ? ThrottleNotching.Notched(__instance.targetThrottle) : 0.0f); return(false); }
public static void Postfix(LocoKeyboardInputShunter __instance) { if (__instance.currentInputSpeedThrottle == 0.0f && __instance.throttleVelo == 0.0f) { __instance.setThrottleDelegate(ThrottleNotching.Notched(__instance.control.targetThrottle)); } }