Now really proper fix
authorunc0rr
Wed, 14 Feb 2007 23:26:31 +0000
changeset 445 fb66abeb551f
parent 444 e3aaa862a28e
child 446 692c75d46a4b
Now really proper fix
hedgewars/uAI.pas
--- a/hedgewars/uAI.pas	Wed Feb 14 22:51:07 2007 +0000
+++ b/hedgewars/uAI.pas	Wed Feb 14 23:26:31 2007 +0000
@@ -25,7 +25,7 @@
 
 implementation
 uses uTeams, uConsts, SDLh, uAIMisc, uGears, uAIAmmoTests, uAIActions, uMisc,
-     uAmmos;
+     uAmmos, uConsole;
 
 var BestActions: TActions;
     ThinkThread: PSDL_Thread = nil;
@@ -44,7 +44,12 @@
    end;
 
    with CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog] do
-     if Gear <> nil then Gear^.Message:= 0;
+     if Gear <> nil then
+        if BotLevel <> 0 then
+           begin
+           if (Gear^.Message and gm_Left) <> 0 then ParseCommand('-left', true);
+           if (Gear^.Message and gm_Right) <> 0 then ParseCommand('-right', true);
+           end;
      
 BestActions.Count:= 0;
 BestActions.Pos:= 0