mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-23 01:39:19 +02:00
Fix lightsset logic
This commit is contained in:
@@ -7352,6 +7352,13 @@ void TDynamicObject::SetLights() {
|
||||
// set lights on given side if there's no coupling with another vehicle, turn them off otherwise
|
||||
auto const *frontvehicle{(isfrontcaboccupied ? vehicle->Prev(coupling::coupler) : vehicle->Next(coupling::coupler))};
|
||||
auto const *rearvehicle{(isfrontcaboccupied ? vehicle->Next(coupling::coupler) : vehicle->Prev(coupling::coupler))};
|
||||
|
||||
if (MoverParameters->LightsPos == 18)
|
||||
{
|
||||
frontvehicle = nullptr;
|
||||
rearvehicle = nullptr;
|
||||
}
|
||||
|
||||
vehicle->RaLightsSet(
|
||||
( frontvehicle == nullptr ? frontlights : 0 ),
|
||||
( rearvehicle == nullptr ? rearlights : 0 ) );
|
||||
|
||||
Reference in New Issue
Block a user