Browse Source

Fix wrong check for light level

Introduced in 13c5c09990
pull/6027/head
Anders Jenbo 3 years ago
parent
commit
acf98f2bdc
  1. 5
      Source/lighting.cpp

5
Source/lighting.cpp

@ -241,8 +241,9 @@ void DoLighting(Point position, uint8_t radius, DisplacementOf<int8_t> offset)
// Allow for dim lights in crypt and nest
if (IsAnyOf(leveltype, DTYPE_NEST, DTYPE_CRYPT)) {
SetLight(position, LightFalloffs[radius][0]);
} else if (GetLight(position) > LightFalloffs[radius][0]) {
if (GetLight(position) > LightFalloffs[radius][0])
SetLight(position, LightFalloffs[radius][0]);
} else {
SetLight(position, 0);
}

Loading…
Cancel
Save