verify impact before explosion rating, since the offsets might cause water splashes
--- 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