From 96be688d1374d33234869625394bbc039d78364b Mon Sep 17 00:00:00 2001 From: pwarszawski Date: Wed, 30 Sep 2026 14:51:36 +0200 Subject: [PATCH] Send the reverser position, not the absolute direction, when activating a cab CabActivisation() passed DirAbsolute (DirActive * CabActive) as the value of the "Direction" command, which every receiving vehicle stores as its own DirActive. Every other sender passes DirActive. With the cab at the rear end (CabActive = -1) the two have opposite signs, so the other units got their reverser flipped against the controlling one. It shows whenever a rear cab is activated after the reverser has been set: - the AI takes over an occupied cab (TakeControl() calls CabActivisation(true)), e.g. an EN57 inserted with reardriver and a starting velocity: the motor car drives the train backwards; - a vehicle without automatic cab activation (SA134) driven by the AI from the start: the cab is activated by a driver hint after the reverser is set, and the two units pull against each other. Fixes #169. --- McZapkie/Mover.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/McZapkie/Mover.cpp b/McZapkie/Mover.cpp index 83c918e2..68b88918 100644 --- a/McZapkie/Mover.cpp +++ b/McZapkie/Mover.cpp @@ -2901,7 +2901,7 @@ 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); + SendCtrlToNext("Direction", DirActive, CabActive); if (InactiveCabFlag & activation::springbrakeoff) { SpringBrakeActivate(false);