[Fix] Fixed occasional warning in ai.
This commit is contained in:
parent
ee259281cc
commit
5ddd5d7615
@ -14,7 +14,7 @@ function atk_g_think()
|
|||||||
target = ai.target()
|
target = ai.target()
|
||||||
|
|
||||||
-- Get new target if it's closer.
|
-- Get new target if it's closer.
|
||||||
if enemy ~= target then
|
if enemy ~= target and enemy ~= nil then
|
||||||
dist = ai.dist(ai.pos(target))
|
dist = ai.dist(ai.pos(target))
|
||||||
range = ai.getweaprange()
|
range = ai.getweaprange()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user