From 6cc7671baaac5f7889f0f6e6eada46fe5b5e378b Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Sun, 30 Dec 2012 18:04:49 +0000
Subject: [PATCH] hum

git-svn-id: http://svn.net-core.org/repos/t-engine4@6300 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 d05ef9d823..25f59ab115 100644
--- a/game/modules/tome/class/NPC.lua
+++ b/game/modules/tome/class/NPC.lua
@@ -183,7 +183,7 @@ function _M:seen_by(who)
 		end
 		return
 	end
-	if who.ai_state and who.ai_state.target_last_seen then
+	if who.ai_state and who.ai_state.target_last_seen and type(who.ai_state.target_last_seen) == "table" then
 		-- Don't believe allies if they saw the target far, far away
 		if who.ai_state.target_last_seen.x and who.ai_state.target_last_seen.y and core.fov.distance(self.x, self.y, who.ai_state.target_last_seen.x, who.ai_state.target_last_seen.y) > self.sight then return end
 		-- Don't believe allies if they saw the target over 10 turns ago
-- 
GitLab