From f4f0b2bb101d8fbd490e81d68a81a38e3444b55c Mon Sep 17 00:00:00 2001 From: maj00r Date: Sun, 6 Sep 2026 14:45:12 +0200 Subject: [PATCH] Propagate the reverser setting, not its absolute direction. CabActivisation() sent DirAbsolute under the "Direction" command, while DirectionForward() and DirectionBackward() send DirActive under the same name. The receiving end (TMoverParameters::RunInternalCommand) assigns the value straight to DirActive and derives DirAbsolute from its own CabActive, so the two senders only agree while CabActive is 1. Activating a rear cab therefore left every other member of the consist with the reverser set the opposite way. The symptom was an EMU that stalled and then accelerated backwards after control changed hands. It was intermittent because the reverser sweep in sync_consist_reversers() normally repairs the members through the other two call sites - except on an EZT, where the first DirectionBackward() at DirActive 1 is consumed by the high-current switch and propagates nothing, leaving the state set by CabActivisation() in place. Seen on an EN57 driven from the rear cab: the occupied car held DirActive 1 with CabActive -1, the motor car and the far cab held DirActive -1 with the same CabActive, so their DirAbsolute came out inverted. --- McZapkie/Mover.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/McZapkie/Mover.cpp b/McZapkie/Mover.cpp index 37411d1f..ea63ff0f 100644 --- a/McZapkie/Mover.cpp +++ b/McZapkie/Mover.cpp @@ -2901,7 +2901,9 @@ bool TMoverParameters::CabActivisation(bool const Enforce) CabMaster = true; SecuritySystem.set_enabled(true); // activate the alerter TODO: make it part of control based cab selection SendCtrlToNext("CabActivisation", 1, CabActive); - SendCtrlToNext("Direction", DirAbsolute, CabActive); + // the handler assigns the value straight to DirActive, so send that and not DirAbsolute - + // the two differ in sign in a rear cab, which left the rest of the consist pulling the other way + SendCtrlToNext("Direction", DirActive, CabActive); if (InactiveCabFlag & activation::springbrakeoff) { SpringBrakeActivate(false);