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