mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-22 10:19:52 +01:00
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.
This commit is contained in:
@@ -2901,7 +2901,7 @@ bool TMoverParameters::CabActivisation(bool const Enforce)
|
|||||||
CabMaster = true;
|
CabMaster = true;
|
||||||
SecuritySystem.set_enabled(true); // activate the alerter TODO: make it part of control based cab selection
|
SecuritySystem.set_enabled(true); // activate the alerter TODO: make it part of control based cab selection
|
||||||
SendCtrlToNext("CabActivisation", 1, CabActive);
|
SendCtrlToNext("CabActivisation", 1, CabActive);
|
||||||
SendCtrlToNext("Direction", DirAbsolute, CabActive);
|
SendCtrlToNext("Direction", DirActive, CabActive);
|
||||||
if (InactiveCabFlag & activation::springbrakeoff)
|
if (InactiveCabFlag & activation::springbrakeoff)
|
||||||
{
|
{
|
||||||
SpringBrakeActivate(false);
|
SpringBrakeActivate(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user