From acf98f2bdcf42a17effe5c0a75f3da7f89c4d825 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sun, 23 Apr 2023 04:50:48 +0200 Subject: [PATCH] Fix wrong check for light level Introduced in 13c5c099905f5c30e09da7794d15d01d8b8fbc0f --- Source/lighting.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/lighting.cpp b/Source/lighting.cpp index 156a43f98..5a60bb8fd 100644 --- a/Source/lighting.cpp +++ b/Source/lighting.cpp @@ -241,8 +241,9 @@ void DoLighting(Point position, uint8_t radius, DisplacementOf 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); }