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

Fix for open doors light signals when no direction was ever chosen

This commit is contained in:
Królik Uszasty
2022-03-03 19:59:05 +01:00
parent 0508fa7660
commit 5891061093

View File

@@ -6075,7 +6075,7 @@ TController::determine_consist_state() {
|| ( vehicle->Couplers[ end::rear ].stretch_duration > 0.0 );
// check door state
{
auto const switchsides { p->DirectionGet() != iDirection };
auto const switchsides{ p->DirectionGet() != (iDirection == 0 ? mvOccupied->CabOccupied : iDirection) };
auto const &rightdoor { vehicle->Doors.instances[ ( switchsides ? side::left : side::right ) ] };
auto const &leftdoor { vehicle->Doors.instances[ ( switchsides ? side::right : side::left ) ] };
if( vehicle->Doors.close_control != control_t::autonomous ) {