From 17d127a14609bfa6eecc5502debc61041cac5e61 Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Sat, 22 Dec 2012 00:42:47 +0000 Subject: [PATCH] plop git-svn-id: http://svn.net-core.org/repos/t-engine4@6189 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/modules/tome/class/NPC.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/modules/tome/class/NPC.lua b/game/modules/tome/class/NPC.lua index 5939a76d2f..910df7c523 100644 --- a/game/modules/tome/class/NPC.lua +++ b/game/modules/tome/class/NPC.lua @@ -88,7 +88,7 @@ function _M:lineFOV(tx, ty, extra_block, block, sx, sy) sy = sy or self.y local act = game.level.map(tx, ty, engine.Map.ACTOR) local sees_target = core.fov.distance(sx, sy, tx, ty) <= self.sight and game.level.map.lites(tx, ty) or - act and self:canSee(act) and core.fov.distance(sx, sy, tx, ty) <= math.max(self.sight, (self.heightened_senses or 0) + (self.infravision or 0)) + act and self:canSee(act) and core.fov.distance(sx, sy, tx, ty) <= math.max(self.sight, math.min(self.sight, (self.heightened_senses or 0) + (self.infravision or 0))) local darkVisionRange if self:knowTalent(self.T_DARK_VISION) then -- GitLab