Skip to content
Snippets Groups Projects
Commit 6cc7671b authored by dg's avatar dg
Browse files

hum

git-svn-id: http://svn.net-core.org/repos/t-engine4@6300 51575b47-30f0-44d4-a5cc-537603b46e54
parent d8504692
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
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