- Small cleanup
authorunc0rr
Sun, 20 Jan 2008 21:47:42 +0000
changeset 740 5ac69a012b69
parent 739 b6849ece8fee
child 741 8bf8c0ac8d94
- Small cleanup - Fix assert not to disturb when rewinding save
hedgewars/uAI.pas
hedgewars/uAIActions.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)
--- 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