# HG changeset patch # User mbait # Date 1273178966 0 # Node ID 670324167e4226469bc18ea01b8f9ecb72341b3b # Parent 858105ae769c9076ae8267bcd0a50aa6f91c54c2 Teleport AI: * check if teleport target not higher then screen top diff -r 858105ae769c -r 670324167e42 hedgewars/uAIAmmoTests.pas --- a/hedgewars/uAIAmmoTests.pas Thu May 06 18:01:04 2010 +0000 +++ b/hedgewars/uAIAmmoTests.pas Thu May 06 20:49:26 2010 +0000 @@ -653,7 +653,7 @@ if bonuses.Count = 0 then begin if Me^.Health <= 100 then begin maxTop := Targ.Y - cHHRadius * 2; - while(not TestColl(Targ.X, maxTop, cHHRadius) and (maxTop > topY)) do + while(not TestColl(Targ.X, maxTop, cHHRadius) and (maxTop > topY + cHHRadius * 2 + 1)) do dec(maxTop, cHHRadius*2); if(not TestColl(Targ.X, maxTop + cHHRadius, cHHRadius)) then begin ap.AttackPutX := Targ.X;