hedgewars/uAI.pas
changeset 250 d7f744a9bf28
parent 196 993cf173218b
child 295 8834f3cb620e
--- a/hedgewars/uAI.pas	Sat Nov 18 23:48:24 2006 +0000
+++ b/hedgewars/uAI.pas	Sun Nov 19 12:11:28 2006 +0000
@@ -133,11 +133,17 @@
                   begin
                   AddAction(MadeActions, aia_HJump, 0, 305);
                   AddAction(MadeActions, aia_HJump, 0, 350);
+                  if (Me.dX < 0) then AddAction(MadeActions, aia_WaitXL, round(AltMe.X), 0)
+                                 else AddAction(MadeActions, aia_WaitXR, round(AltMe.X), 0);
                   end;
        if (BotLevel < 3) and (GoInfo.JumpType = jmpLJump) then // ljump support
           if Push(ticks, Actions, AltMe, Me^.Message) then
              with ThinkStack.States[Pred(ThinkStack.Count)] do
+                  begin
                   AddAction(MadeActions, aia_LJump, 0, 305);
+                  if (Me.dX < 0) then AddAction(MadeActions, aia_WaitXL, round(AltMe.X), 0)
+                                 else AddAction(MadeActions, aia_WaitXR, round(AltMe.X), 0);
+                  end;
 
        if not CanGo then break;
        inc(steps);