From 5fe775321407d662e088d80997bb2e88ca9824cb Mon Sep 17 00:00:00 2001
From: Allanis <allanis@saracraft.net>
Date: Sun, 15 Dec 2013 00:50:54 +0000
Subject: [PATCH] [Fix] Scout ai should probably work again.

---
 scripts/ai/tpl/scout.lua | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/scripts/ai/tpl/scout.lua b/scripts/ai/tpl/scout.lua
index 45299e3..0156971 100644
--- a/scripts/ai/tpl/scout.lua
+++ b/scripts/ai/tpl/scout.lua
@@ -23,11 +23,12 @@ function control()
 
     -- Nothing to do so check if we are too far from the planet.
     -- (If there is one).
-    planet = ai.rndplanet()
+    mem.approach = ai.rndplanet()
+    planet = mem.approach
 
     if planet ~= nil then
       if ai.dist(planet) > planet_dist then
-        ai.pushtask(0, "approach", planet)
+        ai.pushtask(0, "approach")
         return
       end
     end
@@ -40,7 +41,7 @@ function control()
 
     -- Check if we are near enough.
   elseif task == "approach" then
-    planet = ai.target()
+    planet = mem.approach
 
     if ai.dist(planet) < planet_dist + ai.minbrakedist() then
       ai.poptask()
@@ -89,7 +90,7 @@ end
 
 -- Approaches the target.
 function approach()
-  target = ai.target()
+  target = mem.approach
   ai.face(target)
   ai.accel()
 end