Rearrange the test a bit to make the separation a bit clearer, also try snuggling crates up a bit closer to other things.
authornemo
Wed, 03 Mar 2010 14:49:10 +0000
changeset 2923 e33ecd95aa1a
parent 2922 34efcb0681d8
child 2924 908851e59958
Rearrange the test a bit to make the separation a bit clearer, also try snuggling crates up a bit closer to other things.
hedgewars/uGears.pas
--- a/hedgewars/uGears.pas	Wed Mar 03 14:35:48 2010 +0000
+++ b/hedgewars/uGears.pas	Wed Mar 03 14:49:10 2010 +0000
@@ -2115,12 +2115,16 @@
 			repeat
 				inc(y);
 			until (y >= LAND_HEIGHT) or (CountNonZeroz(x, y, Gear^.Radius - 1, 1) <> 0);
-
-// Flag the check for gtExplosives for reuse by other things that need a solid platform?
-			if (y - sy > Gear^.Radius * 2)
-				and (((Gear^.Kind <> gtExplosives) and (y < LAND_HEIGHT)) or ((Gear^.Kind = gtExplosives) and (y < LAND_HEIGHT-1)))
-				and (CheckGearsNear(x, y - Gear^.Radius, [gtFlame, gtHedgehog, gtMine, gtCase, gtExplosives], 110, 110) = nil)
-                and ((Gear^.Kind <> gtExplosives) or (CountNonZeroz(x, y+1, Gear^.Radius - 1, Gear^.Radius+1) > Gear^.Radius)) then
+            
+            if (y - sy > Gear^.Radius * 2) and
+               (((Gear^.Kind = gtExplosives)
+			       and (y < LAND_HEIGHT-1)
+			       and (CheckGearsNear(x, y - Gear^.Radius, [gtFlame, gtHedgehog, gtMine, gtCase, gtExplosives], 60, 60) = nil)
+                   and (CountNonZeroz(x, y+1, Gear^.Radius - 1, Gear^.Radius+1) > Gear^.Radius)) 
+               or
+                 ((Gear^.Kind <> gtExplosives)
+			       and (y < LAND_HEIGHT)
+				   and (CheckGearsNear(x, y - Gear^.Radius, [gtFlame, gtHedgehog, gtMine, gtCase, gtExplosives], 110, 110) = nil))) then
 				begin
 				ar[cnt].X:= x;
 				if withFall then ar[cnt].Y:= sy + Gear^.Radius