--- a/hedgewars/uAI.pas Tue Jul 05 21:41:48 2011 +0400
+++ b/hedgewars/uAI.pas Thu Jul 07 12:34:07 2011 +0400
@@ -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
@@ -262,8 +265,6 @@
Push(ticks, Actions, Me^, Me^.Message xor 3); // aia_Left xor 3 = aia_Right
end;
- ThreadSwitch();
-
if BestRate > BaseRate then exit
end
end;
@@ -284,7 +285,6 @@
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;