16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 14:39:18 +02:00

fixed recognition of train stops.

This commit is contained in:
tmj-fstate
2017-02-05 00:58:24 +01:00
parent 589b6d5301
commit fdb95d3b63
6 changed files with 42 additions and 42 deletions

View File

@@ -5910,7 +5910,7 @@ TDynamicObject::ConnectedEnginePowerSource( TDynamicObject const *Caller ) const
// NOTE: the order should be reversed in flipped vehicles, but we ignore this out of laziness
if( ( nullptr != NextConnected )
&& ( NextConnected != Caller )
&& ( MoverParameters->Couplers[1].CouplingFlag & ctrain_controll == ctrain_controll ) ) {
&& ( ( MoverParameters->Couplers[1].CouplingFlag & ctrain_controll ) == ctrain_controll ) ) {
auto source = NextConnected->ConnectedEnginePowerSource( this );
if( source != TPowerSource::NotDefined ) {
@@ -5921,7 +5921,7 @@ TDynamicObject::ConnectedEnginePowerSource( TDynamicObject const *Caller ) const
// ...then rear...
if( ( nullptr != PrevConnected )
&& ( PrevConnected != Caller )
&& ( MoverParameters->Couplers[ 0 ].CouplingFlag & ctrain_controll == ctrain_controll ) ) {
&& ( ( MoverParameters->Couplers[ 0 ].CouplingFlag & ctrain_controll ) == ctrain_controll ) ) {
auto source = PrevConnected->ConnectedEnginePowerSource( this );
if( source != TPowerSource::NotDefined ) {