[Fix] AI target loss.
This commit is contained in:
parent
910eb656a5
commit
82e074044e
@ -44,6 +44,13 @@ end
|
|||||||
-- Runs away.
|
-- Runs away.
|
||||||
function runaway()
|
function runaway()
|
||||||
target = ai.targetid()
|
target = ai.targetid()
|
||||||
|
|
||||||
|
if not ai.exists(target) then
|
||||||
|
ai.pustask()
|
||||||
|
ai.pushtask(0, "hyperspace")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
dir = ai.face(target, 1)
|
dir = ai.face(target, 1)
|
||||||
ai.accel()
|
ai.accel()
|
||||||
if ai.hasturrets() then
|
if ai.hasturrets() then
|
||||||
|
Loading…
Reference in New Issue
Block a user