--[[
--    Dummy AI - Does nothing excpet brake and then float around.
--]]

-- Required control rate.
control_rate = 2

function create()
  ai.pushtask(0, "idle")
  ai.pushtask(0, "brake")
end

-- No need for control.
function control()

end

-- No response.
function attacked(attacker)

end

-- Does nothing.
function idle()

end

-- Brake the pilot.
function brake()
  ai.brake()
  if ai.isstopped() then
    ai.stop()
    ai.poptask()
  end
end