From 439e892abdaeac36bb76f3df2c8f926f76791477 Mon Sep 17 00:00:00 2001
From: pwarszawski
Date: Sat, 7 Nov 2026 15:35:35 +0100
Subject: [PATCH] AI: use the locomotive releaser only when starting off
The rule "wyluzuj lokomotywe, to szybciej ruszymy" released the
locomotive's own brake whenever power was asked for and the locomotive
cylinder held more than 0.4 bar. It had no speed condition, so it also
fired in motion, at 50-75 km/h, right after an application. On a
locomotive with the EStED distributor (E186) this vented the control
reservoir; with the pipe not yet recharged the locomotive brake then
faded to nothing at the next application.
The rule is meant for starting off, so it now applies only below
1 km/h.
---
vehicle/Driver.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/vehicle/Driver.cpp b/vehicle/Driver.cpp
index 2311ffacf..8d2a3fac6 100644
--- a/vehicle/Driver.cpp
+++ b/vehicle/Driver.cpp
@@ -8292,8 +8292,11 @@ void TController::control_releaser() {
}
}
// wyluzuj lokomotywÄ™, to szybciej ruszymy
+ // this rule is for starting off, so only below 1 km/h: at speed, just after an application, it would vent
+ // the control reservoir of a locomotive that may have to brake again before the pipe has refilled it
if( mvOccupied->BrakePress > 0.4
- && mvOccupied->Hamulec->GetCRP() > 4.9 ) {
+ && mvOccupied->Hamulec->GetCRP() > 4.9
+ && mvOccupied->Vel < 1.0 ) {
actuate = true;
}
// keep engine brakes released during coupling/uncoupling