don't spawn things on ice. it's too unpredictable what'll happen to them
authornemo
Wed, 09 Aug 2017 12:22:05 -0400
changeset 12445 28bf941e13a0
parent 12444 832b969ea00c
child 12446 48ee3777e42e
don't spawn things on ice. it's too unpredictable what'll happen to them
hedgewars/uGearsUtils.pas
--- a/hedgewars/uGearsUtils.pas	Sun Jul 30 19:06:57 2017 -0400
+++ b/hedgewars/uGearsUtils.pas	Wed Aug 09 12:22:05 2017 -0400
@@ -881,7 +881,7 @@
                     inc(y, 2);
                 until (y >= cWaterLine) or
                         ((not ignoreOverlap) and (CountNonZeroz(x, y, Gear^.Radius - 1, 1, $FFFF) = 0)) or
-                        (ignoreOverlap and (CountNonZeroz(x, y, Gear^.Radius - 1, 1, lfLandMask) = 0));
+                        (ignoreOverlap and (CountNonZeroz(x, y, Gear^.Radius - 1, 1, lfLandMask and (not lfIce)) = 0));
 
                 sy:= y;
 
@@ -889,7 +889,7 @@
                     inc(y);
                 until (y >= cWaterLine) or
                         ((not ignoreOverlap) and (CountNonZeroz(x, y, Gear^.Radius - 1, 1, $FFFF) <> 0)) or
-                        (ignoreOverlap and (CountNonZeroz(x, y, Gear^.Radius - 1, 1, lfLandMask) <> 0));
+                        (ignoreOverlap and (CountNonZeroz(x, y, Gear^.Radius - 1, 1, lfLandMask and (not lfIce)) <> 0));
 
                 if (y - sy > Gear^.Radius * 2) and (y < cWaterLine)
                     and (((Gear^.Kind = gtExplosives)