Adjust torch light calculation to expand the area of effect for nearby torches as it was too small before

This commit is contained in:
2026-03-29 13:51:40 +00:00
parent 5f3b6b8e29
commit 3c8c481713
+1 -1
View File
@@ -70,7 +70,7 @@ class Window < Gosu::Window
# Only calculate torch lights if the setting is enabled, to save performance
if $bus.get(:settings, :torches_lightup)
torches = $bus.get(:nearby_torches,
[cam_x - SCREEN_SIZE[0] / 2, cam_y - SCREEN_SIZE[1] / 2, SCREEN_SIZE[0] * 2, SCREEN_SIZE[1] * 2]
[cam_x - SCREEN_SIZE[0], cam_y - SCREEN_SIZE[1], SCREEN_SIZE[0] * 4, SCREEN_SIZE[1] * 4]
) || []
torch_lights = torches.map { |t| [t[0] - cam_x, SCREEN_SIZE[1] - (t[1] - cam_y)] }.flatten
end