hedgewars/uAIMisc.pas
changeset 8954 1e8b390ab011
parent 8953 d0e5c1002fe1
child 8955 b8cae4fe8edb
--- a/hedgewars/uAIMisc.pas	Fri May 03 21:38:16 2013 -0400
+++ b/hedgewars/uAIMisc.pas	Fri May 03 22:18:23 2013 -0400
@@ -503,6 +503,10 @@
                     begin
                     dX:= 0.005 * dmg + 0.01 * Density;
                     dY:= dX;
+                    if (Kind = gtExplosives) and 
+                       (((abs(dY) > 0.15) and (abs(dX) < 0.02)) or
+                        ((abs(dY) < 0.15) and (abs(dX) < 0.15))) then
+                        dX:= 0;
                     if (x and LAND_WIDTH_MASK = 0) and ((y+cHHRadius+2) and LAND_HEIGHT_MASK = 0) and
                        (Land[y+cHHRadius+2, x] and lfIndestructible <> 0) then
                          fallDmg:= trunc(TraceFall(x, y, pX, pY, dX, dY, 0, Kind) * dmgMod)