hedgewars/uAI.pas
changeset 7026 8d1724e1337e
parent 6992 b8f3d8991e92
child 7028 0f60591f3a16
--- a/hedgewars/uAI.pas	Sat May 05 17:19:33 2012 +0100
+++ b/hedgewars/uAI.pas	Sat May 05 17:29:04 2012 +0100
@@ -45,23 +45,23 @@
 
 procedure FreeActionsList;
 begin
-AddFileLog('FreeActionsList called');
-if hasThread <> 0 then
+    AddFileLog('FreeActionsList called');
+    if hasThread <> 0 then
     begin
-    AddFileLog('Waiting AI thread to finish');
-    StopThinking:= true;
-    repeat
-        SDL_Delay(10)
-    until hasThread = 0
+        AddFileLog('Waiting AI thread to finish');
+        StopThinking:= true;
+        repeat
+            SDL_Delay(10)
+        until hasThread = 0
     end;
 
-with CurrentHedgehog^ do
-    if Gear <> nil then
-        if BotLevel <> 0 then
-            StopMessages(Gear^.Message);
+    with CurrentHedgehog^ do
+        if Gear <> nil then
+            if BotLevel <> 0 then
+                StopMessages(Gear^.Message);
 
-BestActions.Count:= 0;
-BestActions.Pos:= 0
+    BestActions.Count:= 0;
+    BestActions.Pos:= 0
 end;
 
 
@@ -445,7 +445,7 @@
 
 procedure freeModule;
 begin
-
+    FreeActionsList();
 end;
 
 end.