diff --git a/scripts/ai/tpl/merchant.lua b/scripts/ai/tpl/merchant.lua index 7f7c609..0ad310b 100644 --- a/scripts/ai/tpl/merchant.lua +++ b/scripts/ai/tpl/merchant.lua @@ -30,7 +30,7 @@ function control() end -- See if another enemy is closer. - if enemy ~= target then + if enemy nil and enemy ~= target then ai.poptask() ai.pushtask(0, "runaway", enemy) end