hedgewars/uAI.pas
changeset 7250 304d3d98662e
parent 7216 53f5e48b8375
child 7375 16ae2e1c9005
--- a/hedgewars/uAI.pas	Thu Jun 14 00:34:50 2012 +0200
+++ b/hedgewars/uAI.pas	Thu Jun 14 16:35:36 2012 +0400
@@ -284,9 +284,15 @@
                             AddAction(MadeActions, aia_LookRight, 0, 200, 0, 0);
                         end;
             if (BotLevel < 3) and (GoInfo.JumpType = jmpLJump) then // ljump support
+                begin
+                // push current position so we proceed from it after checking jump opportunities
+                if CanGo then Push(ticks, Actions, Me^, Me^.Message);
+                // first check where we go after jump
                 if Push(ticks, Actions, AltMe, Me^.Message) then
                     with Stack.States[Pred(Stack.Count)] do
                         AddAction(MadeActions, aia_LJump, 0, 305 + random(50), 0, 0);
+                break
+                end;
 
             // 'not CanGO' means we can't go straight, possible jumps are checked above
             if not CanGo then