# HG changeset patch # User unc0rr # Date 1339677336 -14400 # Node ID 304d3d98662e75964e645de3ecb9919c6150669f # Parent 0ee403b190b5b45e52e23a7492487d9877b6ba6e AI loves to jump diff -r 0ee403b190b5 -r 304d3d98662e hedgewars/uAI.pas --- 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