# HG changeset patch # User nemo # Date 1542482949 18000 # Node ID d5d941737a6530874d11e89c949c088746ed7024 # Parent de21f6eb236683949545ca1e5b176a771906f46c verify impact before explosion rating, since the offsets might cause water splashes diff -r de21f6eb2366 -r d5d941737a65 hedgewars/uAIAmmoTests.pas --- a/hedgewars/uAIAmmoTests.pas Sat Nov 17 19:19:50 2018 +0100 +++ b/hedgewars/uAIAmmoTests.pas Sat Nov 17 14:29:09 2018 -0500 @@ -183,9 +183,13 @@ EX:= trunc(x); EY:= trunc(y); - if Level = 1 then - value:= RateExplosion(Me, EX, EY, 101, afTrackFall or afErasesLand) - else value:= RateExplosion(Me, EX, EY, 101); + if (((Me = CurrentHedgehog^.Gear) and TestColl(EX, EY, 3)) or + ((Me <> CurrentHedgehog^.Gear) and TestCollExcludingMe(Me^.Hedgehog^.Gear, EX, EY, 3))) then + begin + if Level = 1 then + value:= RateExplosion(Me, EX, EY, 101, afTrackFall or afErasesLand) + else value:= RateExplosion(Me, EX, EY, 101); + end; if (value = 0) and (Targ.Kind = gtHedgehog) and (Targ.Score > 0) then if GameFlags and gfSolidLand = 0 then value := 1024 - Metric(Targ.Point.X, Targ.Point.Y, EX, EY) div 64