From fec72f87aae1ddc05ecfef8713c4735d94100fa4 Mon Sep 17 00:00:00 2001 From: staphen Date: Fri, 7 Mar 2025 09:42:31 -0500 Subject: [PATCH] Swap offsets in distance formula for light cones --- Source/lighting.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/lighting.cpp b/Source/lighting.cpp index d98e1efc3..c8b6fe9c9 100644 --- a/Source/lighting.cpp +++ b/Source/lighting.cpp @@ -361,8 +361,8 @@ void MakeLightTable() for (int offsetX = 0; offsetX < 8; offsetX++) { for (int y = 0; y < 16; y++) { for (int x = 0; x < 16; x++) { - int a = (8 * x - offsetY); - int b = (8 * y - offsetX); + int a = (8 * x - offsetX); + int b = (8 * y - offsetY); LightConeInterpolations[offsetX][offsetY][x][y] = static_cast(sqrt(a * a + b * b)); } }