# HG changeset patch # User unc0rr # Date 1203970320 0 # Node ID 928d2830fd0c780a9a4b8a2bc9804aefa1af68e0 # Parent a6f442173822e7bfca549b0b191b5016d962d767 Make AI aware of new high jump technique (there's still an issue with two successive jumps) diff -r a6f442173822 -r 928d2830fd0c hedgewars/uAI.pas --- a/hedgewars/uAI.pas Mon Feb 25 18:10:12 2008 +0000 +++ b/hedgewars/uAI.pas Mon Feb 25 20:12:00 2008 +0000 @@ -220,13 +220,17 @@ if Push(ticks, Actions, AltMe, Me^.Message) then with Stack.States[Pred(Stack.Count)] do begin - AddAction(MadeActions, aia_HJump, 0, 305, 0, 0); + if Me^.dX.isNegative then AddAction(MadeActions, aia_LookRight, 0, 200, 0, 0) + else AddAction(MadeActions, aia_LookLeft, 0, 200, 0, 0); + AddAction(MadeActions, aia_HJump, 0, 305 + random(50), 0, 0); AddAction(MadeActions, aia_HJump, 0, 350, 0, 0); + if Me^.dX.isNegative then AddAction(MadeActions, aia_LookLeft, 0, 200, 0, 0) + else AddAction(MadeActions, aia_LookRight, 0, 200, 0, 0); end; if (BotLevel < 3) and (GoInfo.JumpType = jmpLJump) then // ljump support if Push(ticks, Actions, AltMe, Me^.Message) then with Stack.States[Pred(Stack.Count)] do - AddAction(MadeActions, aia_LJump, 0, 305, 0, 0); + AddAction(MadeActions, aia_LJump, 0, 305 + random(50), 0, 0); if not CanGo then break; inc(steps);