Skip to content
Snippets Groups Projects
Commit ac38c0c6 authored by Chris Davidson's avatar Chris Davidson
Browse files

Fix light radius letting Players (but not NPCs) see beyond their max vision radius

parent b4aed7b8
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment