# HG changeset patch # User alfadur # Date 1502367217 14400 # Node ID 8c5475bb4db75700de8378a4cc308cd304cc090d # Parent 8b89fe2115ad0e686f07713428610e68b4007b7a block spawning on ice slopes diff -r 8b89fe2115ad -r 8c5475bb4db7 hedgewars/uGearsUtils.pas --- a/hedgewars/uGearsUtils.pas Wed Aug 09 15:36:05 2017 -0400 +++ b/hedgewars/uGearsUtils.pas Thu Aug 10 08:13:37 2017 -0400 @@ -893,11 +893,9 @@ inc(y); until (y >= cWaterLine) or (ignoreOverlap and - ((CountLand(x, y, Gear^.Radius - 1, 1, $FFFF, lfIce) <> 0) or - (CountLand(x, y+1, Gear^.Radius - 1, Gear^.Radius + 1, lfIce, 0) > Gear^.Radius))) or + (CountLand(x, y, Gear^.Radius - 1, 1, $FFFF, 0) <> 0)) or (not ignoreOverlap and - ((CountLand(x, y, Gear^.Radius - 1, 1, lfLandMask, lfIce) <> 0) or - (CountLand(x, y+1, Gear^.Radius - 1, Gear^.Radius + 1, lfIce, 0) > Gear^.Radius))); + (CountLand(x, y, Gear^.Radius - 1, 1, lfLandMask, 0) <> 0)); if (y - sy > Gear^.Radius * 2) and (y < cWaterLine) and (((Gear^.Kind = gtExplosives) @@ -908,7 +906,9 @@ or ((Gear^.Kind <> gtExplosives) and (ignoreNearObjects or NoGearsToAvoid(x, y - Gear^.Radius, 110, 110)) - )) then + and (isSteadyPosition(x, y+1, Gear^.Radius - 1, 3, lfIce) + or (CountLand(x, y+1, Gear^.Radius - 1, Gear^.Radius+1, $FFFF, lfIce) <> 0) + ))) then begin ar[cnt].X:= x; if withFall then