# HG changeset patch # User unc0rr # Date 1343131961 -14400 # Node ID fe0f07667f24d0d8953c0e9ceca940c2278f7501 # Parent 76772043ba7f3fecdc769813898172c9b84073ce Prefer to bat enemy away dealing the same amount of damage diff -r 76772043ba7f -r fe0f07667f24 hedgewars/uAIAmmoTests.pas --- a/hedgewars/uAIAmmoTests.pas Tue Jul 24 16:10:09 2012 +0400 +++ b/hedgewars/uAIAmmoTests.pas Tue Jul 24 16:12:41 2012 +0400 @@ -709,10 +709,10 @@ x:= hwRound(Me^.X); y:= hwRound(Me^.Y); - a:= 0; + a:= cMaxAngle div 2; valueResult:= 0; - while a <= cMaxAngle div 2 do + while a >= 0 do begin dx:= sin(a / cMaxAngle * pi) * 0.5; dy:= cos(a / cMaxAngle * pi) * 0.5; @@ -736,7 +736,7 @@ valueResult:= v1 end; - a:= a + 15 + random(cMaxAngle div 16) + a:= a - 15 - random(cMaxAngle div 16) end; if valueResult <= 0 then