# HG changeset patch # User unc0rr # Date 1200865662 0 # Node ID 5ac69a012b69ac43828707a9a4d65057c5f1f76f # Parent b6849ece8feefc52f9de76c43c4308ec50b27b98 - Small cleanup - Fix assert not to disturb when rewinding save diff -r b6849ece8fee -r 5ac69a012b69 hedgewars/uAI.pas --- a/hedgewars/uAI.pas Sun Jan 20 21:21:59 2008 +0000 +++ b/hedgewars/uAI.pas Sun Jan 20 21:47:42 2008 +0000 @@ -52,7 +52,7 @@ 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 end; @@ -325,7 +325,7 @@ if (BestActions.Pos >= BestActions.Count) and (TurnTimeLeft > cStopThinkTime) then begin - TryDo(Gear^.Message = 0, 'Engine bug: AI may break demos playing', true); + TryDo((Gear^.Message = 0) and (gameType <> gmtSave), 'Engine bug: AI may break demos playing', true); StartThink(Gear); StartTicks:= GameTicks end else ProcessAction(BestActions, Gear) diff -r b6849ece8fee -r 5ac69a012b69 hedgewars/uAIActions.pas --- a/hedgewars/uAIActions.pas Sun Jan 20 21:21:59 2008 +0000 +++ b/hedgewars/uAIActions.pas Sun Jan 20 21:47:42 2008 +0000 @@ -127,7 +127,7 @@ end else begin inc(timedelta); - if timedelta > 2000 then + if timedelta > 1700 then begin timedelta:= 0; FreeActionsList