18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-20 09:15:01 +01:00

Merge pull request #286 from MaSzyna-EU07/fix/dimmer-position-bounds

fix(lights): keep the headlight dimmer position within the DimmerList
This commit is contained in:
2026-11-09 12:50:35 +00:00
committed by GitHub
5 changed files with 178 additions and 27 deletions

View File

@@ -7431,9 +7431,7 @@ void TDynamicObject::RaLightsSet(int head, int rear)
bool tRight = MoverParameters->iLights[vehicleend] & (light::auxiliary_right | light::headlight_right); // a tu z prawej
if (Controller == Humandriver) {
int &currentDimPos = MoverParameters->modernDimmerPosition;
auto &dimmerPositions = MoverParameters->dimPositions;
TMoverParameters::dimPosition dps = dimmerPositions[currentDimPos];
auto const dps{MoverParameters->currentDimPosition()};
// domyślnie
HighBeamLights = false;
@@ -7495,9 +7493,7 @@ void TDynamicObject::SetLightDimmings()
if (Controller == Humandriver)
{
int &currentDimPos = MoverParameters->modernDimmerPosition;
auto &dimmerPositions = MoverParameters->dimPositions;
TMoverParameters::dimPosition dps = dimmerPositions[currentDimPos];
auto const dps{MoverParameters->currentDimPosition()};
// domyślnie
HighBeamLights = false;