[Fix] Stopped AI merchants from popping tasks like crazy!

This commit is contained in:
Allanis 2013-08-18 14:45:15 +01:00
parent a4d1ed9f6d
commit 028f77f78a

View File

@ -10,7 +10,9 @@ function control()
-- Runaway if enemy is near.
if task ~= "runaway" and enemy ~= nil and ai.dist(enemy) < 500 then
ai.poptask();
if task ~= "none" then
ai.poptask()
end
ai.pushtask(0, "runaway", enemy)
-- Enter hyperspace if possible.