mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-19 20:24:59 +01:00
fix: a stopped diesel engine no longer stops the others every frame (eu07/maszyna#80)
dizel_Momentum() relayed MainSwitch 0 to the consist every frame while the engine stood still, whatever stopped it. In a train with mixed JointEngineStart flags an engine stopped from mainb_off stopped the engines behind it once it spun down, and the stopped engine of the cab's vehicle knocked out the one started from mainb_on. The stop is now relayed only when the engine stalls while running, as on master an engine stalling in a joint start still stops the others.
This commit is contained in:
@@ -8161,8 +8161,13 @@ double TMoverParameters::dizel_Momentum(double Fill, double n, double dt)
|
||||
|
||||
if (enrot <= 0 && false == dizel_spinup)
|
||||
{
|
||||
// a stopped engine doesn't stop those started on their own
|
||||
MainSwitch(false, MainSwitchRange());
|
||||
// an engine stalling stops those started together with it, once. one already stopped, from its own switch or
|
||||
// another vehicle's, or not started at all, has nothing to stop: it stays quiet, rather than stop every frame
|
||||
// the engines started on their own or from the separate switches (eu07/maszyna#80)
|
||||
if (true == Mains)
|
||||
{
|
||||
MainSwitch(false, MainSwitchRange());
|
||||
}
|
||||
enrot = 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user