Skip to content
Snippets Groups Projects
Commit 28b23f7a authored by DarkGod's avatar DarkGod
Browse files

felxible

parent b18a4f77
No related branches found
No related tags found
No related merge requests found
......@@ -152,6 +152,8 @@ function _M:setTarget(target, last_seen)
end
end
_M.AI_SEEN_CACHE_DELAY = 10 * 100
--- Returns the seen coords of the target
-- This will usually return the exact coords, but if the target is only partially visible (or not at all)
-- it will return estimates, to throw the AI a bit off (up to 10 tiles error)
......@@ -166,11 +168,11 @@ function _M:aiSeeTargetPos(target)
-- Guess Cache turn to update position guess (so it's consistent during a turn)
-- Start at -1000 to make sure ti gets run the first time.
LSeen.GCache_turn = LSeen.GCache_turn or game.turn - 1000
LSeen.GCache_turn = LSeen.GCache_turn or game.turn - self.AI_SEEN_CACHE_DELAY
-- Guess Cache known turn for spread calculation (self.ai_state.target_last_seen.turn
-- can't be used because it's needed by FOV code)
LSeen.GCknown_turn = LSeen.GCknown_turn or game.turn - 1000
LSeen.GCknown_turn = LSeen.GCknown_turn or game.turn - self.AI_SEEN_CACHE_DELAY
-- Check if target is currently seen
local see, chance = self:canSee(target)
......
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