# HG changeset patch # User unc0rr # Date 1303209595 -14400 # Node ID a2a67433633d6ee073298fad3f65420ab1083c1d # Parent 1620a02d52823f982529548b69fef27797435a84 Use cWaterLine instead of LAND_HEIGHT, fix mortar handler aswell diff -r 1620a02d5282 -r a2a67433633d hedgewars/uAIAmmoTests.pas --- a/hedgewars/uAIAmmoTests.pas Tue Apr 19 14:20:52 2011 +0400 +++ b/hedgewars/uAIAmmoTests.pas Tue Apr 19 14:39:55 2011 +0400 @@ -467,9 +467,9 @@ dY:= dY + cGravity; EX:= hwRound(x); EY:= hwRound(y); - until TestCollExcludingMe(Me, EX, EY, 5) or (EY > 1000); + until TestCollExcludingMe(Me, EX, EY, 5) or (EY > cWaterLine); - if (EY < 1000) and not dY.isNegative then + if (EY < cWaterLine) and not dY.isNegative then begin value:= RateExplosion(Me, EX, EY, 91); if (value = 0) then @@ -622,7 +622,7 @@ x:= Me^.X; y:= Me^.Y; if (Targ.X) - hwRound(x) >= 0 then ap.Angle:= cMaxAngle div 4 - else ap.Angle:= - cMaxAngle div 4; + else ap.Angle:= - cMaxAngle div 4; valueResult:= RateShove(Me, hwRound(x) + 10 * hwSign(int2hwFloat(Targ.X) - x), hwRound(y), 15, 30); if valueResult <= 0 then valueResult:= BadTurn else inc(valueResult); TestBaseballBat:= valueResult; @@ -706,7 +706,7 @@ // 58 (instead of 60) for better prediction (hh moves after explosion of one of the rockets) end end; -until fexit or (Y > _1024); +until fexit or (Y.Round > cWaterLine); for i:= 0 to 5 do inc(valueResult, dmg[i]); t:= valueResult;