--- a/hedgewars/uAI.pas Fri May 16 13:21:18 2008 +0000
+++ b/hedgewars/uAI.pas Sat May 17 11:36:24 2008 +0000
@@ -329,7 +329,12 @@
if (BestActions.Pos >= BestActions.Count)
and (TurnTimeLeft > cStopThinkTime) then
begin
- TryDo(Gear^.Message = 0, 'Engine bug: AI may break demos playing', true);
+ if Gear^.Message <> 0 then
+ begin
+ StopMessages(Gear^.Message);
+ TryDo((Gear^.Message and gmAllStoppable) = 0, 'Engine bug: AI may break demos playing', true);
+ end;
+ if Gear^.Message <> 0 then exit;
StartThink(Gear);
StartTicks:= GameTicks
end else ProcessAction(BestActions, Gear)