[Fix] AI target loss.

This commit is contained in:
Allanis 2013-03-16 22:56:25 +00:00
parent 910eb656a5
commit 82e074044e

View File

@ -44,6 +44,13 @@ end
-- Runs away.
function runaway()
target = ai.targetid()
if not ai.exists(target) then
ai.pustask()
ai.pushtask(0, "hyperspace")
return
end
dir = ai.face(target, 1)
ai.accel()
if ai.hasturrets() then