[Fix] AI target loss.
This commit is contained in:
parent
910eb656a5
commit
82e074044e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user