hedgewars/uAI.pas
branchhedgeroid
changeset 5495 272ed78e59a7
parent 5399 cdef954f8aec
parent 5396 4a0a8f32b7e3
child 5504 96d735b83d43
--- a/hedgewars/uAI.pas	Thu Aug 04 17:41:07 2011 +0200
+++ b/hedgewars/uAI.pas	Thu Aug 04 17:44:55 2011 +0200
@@ -74,6 +74,9 @@
        with CurrentHedgehog^ do
             a:= CurAmmoType;
        aa:= a;
+       
+       ThreadSwitch();
+       
        repeat
         if (CanUseAmmo[a]) and
            ((not isMoved) or ((AmmoTests[a].flags and amtest_OnTurn) = 0)) then
@@ -279,10 +282,9 @@
       begin
       WalkMe:= BackMe;
       Walk(@WalkMe);
-      if (StartTicks > GameTicks - 1500) and not StopThinking then SDL_Delay(2000);
+      if (StartTicks > GameTicks - 1500) and not StopThinking then SDL_Delay(1000);
       if BestActions.Score < -1023 then
          begin
-         addfilelog('AI: best score ' + inttostr(bestactions.score));
          BestActions.Count:= 0;
          AddAction(BestActions, aia_Skip, 0, 250, 0, 0);
          end;