hedgewars/uAI.pas
changeset 544 9e068d2398ca
parent 543 465e2ec8f05f
child 545 f527450337c1
--- a/hedgewars/uAI.pas	Sun Jul 01 11:02:47 2007 +0000
+++ b/hedgewars/uAI.pas	Sun Jul 01 20:16:19 2007 +0000
@@ -208,7 +208,6 @@
     AddAction(Actions, Me^.Message, aim_push, 250, 0, 0);
     if (Me^.Message and gm_Left) <> 0 then AddAction(Actions, aia_WaitXL, hwRound(Me^.X), 0, 0, 0)
                                       else AddAction(Actions, aia_WaitXR, hwRound(Me^.X), 0, 0, 0);
-    AddAction(Actions, Me^.Message, aim_release, 0, 0, 0);
     steps:= 0;
 
     while (not StopThinking) and (not PosInThinkStack(Me)) do
@@ -231,7 +230,7 @@
 
        if not CanGo then break;
        inc(steps);
-       Actions.actions[Actions.Count - 2].Param:= hwRound(Me^.X);
+       Actions.actions[Pred(Actions.Count)].Param:= hwRound(Me^.X);
        Rate:= RatePlace(Me);
        if Rate > BestRate then
           begin