17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 03:59:19 +02:00

Fix EP fuse auto-(dis)engaging

When the Autorewident function is enabled, the EP fuse switch will no longer automatically engage or disengage if the player is controlling the train. This would happen for example when approaching a station.
This commit is contained in:
jakubg1
2026-08-24 00:24:15 +02:00
parent df9ba73a88
commit f8cb5e4431
2 changed files with 5 additions and 2 deletions

View File

@@ -1584,7 +1584,7 @@ class TMoverParameters
double BatteryVoltage = 0.0; /*Winger - baterie w elektrykach*/ double BatteryVoltage = 0.0; /*Winger - baterie w elektrykach*/
bool Battery = false; /*Czy sa zalaczone baterie*/ bool Battery = false; /*Czy sa zalaczone baterie*/
start_t BatteryStart = start_t::manual; start_t BatteryStart = start_t::manual;
bool EpFuse = true; /*Czy sa zalavzone baterie*/ bool EpFuse = true; /*Czy jest wlaczony hamulec EP*/
double EpForce = 0.0; /*Poziom zadanej sily EP*/ double EpForce = 0.0; /*Poziom zadanej sily EP*/
bool Signalling = false; /*Czy jest zalaczona sygnalizacja hamowania ostatniego wagonu*/ bool Signalling = false; /*Czy jest zalaczona sygnalizacja hamowania ostatniego wagonu*/
bool Radio = false; /*Czy jest zalaczony radiotelefon*/ bool Radio = false; /*Czy jest zalaczony radiotelefon*/

View File

@@ -2236,7 +2236,10 @@ void TController::AutoRewident()
} }
BrakeSystem = consist_brake_system(); BrakeSystem = consist_brake_system();
mvOccupied->EpFuseSwitch( BrakeSystem == TBrakeSystem::ElectroPneumatic ); // Change the EP fuse state only when AI is in charge, don't fiddle with controls when the user is controlling the vehicle
if (AIControllFlag) {
mvOccupied->EpFuseSwitch(BrakeSystem == TBrakeSystem::ElectroPneumatic);
}
if( OrderCurrentGet() & ( Obey_train | Bank ) ) { if( OrderCurrentGet() & ( Obey_train | Bank ) ) {
// 4. Przeliczanie siły hamowania // 4. Przeliczanie siły hamowania