--- 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.