From ac38c0c6d2c207648a3a96d163d28d4e140df609 Mon Sep 17 00:00:00 2001 From: Shibari <ShibariTOME@Gmail.com> Date: Wed, 22 May 2019 06:25:34 -0400 Subject: [PATCH] Fix light radius letting Players (but not NPCs) see beyond their max vision radius --- game/modules/tome/class/Player.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua index 0e243140c0..011ef9fc8c 100644 --- a/game/modules/tome/class/Player.lua +++ b/game/modules/tome/class/Player.lua @@ -665,7 +665,12 @@ function _M:playerFOV() local lradius = self.lite if self.radiance_aura and lradius < self.radiance_aura then lradius = self.radiance_aura end if self.lite <= 0 then game.level.map:applyLite(self.x, self.y) - else self:computeFOV(lradius, "block_sight", function(x, y, dx, dy, sqdist) game.level.map:applyLite(x, y) end, true, true, true) end + else + self:computeFOV(lradius, "block_sight", function(x, y, dx, dy, sqdist) + game.level.map:applyExtraLite(x, y) + end, + true, true, true) + end -- For each entity, generate lite local uid, e = next(game.level.entities) -- GitLab