Light color calculation fix

This commit is contained in:
2025-01-07 04:50:48 +01:00
parent e2b5a6d9a1
commit a7bf952ed6

View File

@@ -87,9 +87,9 @@ light_array::update() {
( ( lights & light::headlight_right | light::highbeamlight_right) ? 1.f : 0.f ) };
light.color = {
light.owner->MoverParameters->refR / 255,
light.owner->MoverParameters->refG / 255,
light.owner->MoverParameters->refB / 255
static_cast<float>(light.owner->MoverParameters->refR) / 255.0f,
static_cast<float>(light.owner->MoverParameters->refG) / 255.0f,
static_cast<float>(light.owner->MoverParameters->refB) / 255.0f
};
if (light.owner->DimHeadlights && !light.owner->HighBeamLights) // tylko przyciemnione