hedgewars/uGears.pas
changeset 2923 e33ecd95aa1a
parent 2915 a02f276035e8
child 2933 02af54eb7e1e
equal deleted inserted replaced
2922:34efcb0681d8 2923:e33ecd95aa1a
  2113 			sy:= y;
  2113 			sy:= y;
  2114 
  2114 
  2115 			repeat
  2115 			repeat
  2116 				inc(y);
  2116 				inc(y);
  2117 			until (y >= LAND_HEIGHT) or (CountNonZeroz(x, y, Gear^.Radius - 1, 1) <> 0);
  2117 			until (y >= LAND_HEIGHT) or (CountNonZeroz(x, y, Gear^.Radius - 1, 1) <> 0);
  2118 
  2118             
  2119 // Flag the check for gtExplosives for reuse by other things that need a solid platform?
  2119             if (y - sy > Gear^.Radius * 2) and
  2120 			if (y - sy > Gear^.Radius * 2)
  2120                (((Gear^.Kind = gtExplosives)
  2121 				and (((Gear^.Kind <> gtExplosives) and (y < LAND_HEIGHT)) or ((Gear^.Kind = gtExplosives) and (y < LAND_HEIGHT-1)))
  2121 			       and (y < LAND_HEIGHT-1)
  2122 				and (CheckGearsNear(x, y - Gear^.Radius, [gtFlame, gtHedgehog, gtMine, gtCase, gtExplosives], 110, 110) = nil)
  2122 			       and (CheckGearsNear(x, y - Gear^.Radius, [gtFlame, gtHedgehog, gtMine, gtCase, gtExplosives], 60, 60) = nil)
  2123                 and ((Gear^.Kind <> gtExplosives) or (CountNonZeroz(x, y+1, Gear^.Radius - 1, Gear^.Radius+1) > Gear^.Radius)) then
  2123                    and (CountNonZeroz(x, y+1, Gear^.Radius - 1, Gear^.Radius+1) > Gear^.Radius)) 
       
  2124                or
       
  2125                  ((Gear^.Kind <> gtExplosives)
       
  2126 			       and (y < LAND_HEIGHT)
       
  2127 				   and (CheckGearsNear(x, y - Gear^.Radius, [gtFlame, gtHedgehog, gtMine, gtCase, gtExplosives], 110, 110) = nil))) then
  2124 				begin
  2128 				begin
  2125 				ar[cnt].X:= x;
  2129 				ar[cnt].X:= x;
  2126 				if withFall then ar[cnt].Y:= sy + Gear^.Radius
  2130 				if withFall then ar[cnt].Y:= sy + Gear^.Radius
  2127 							else ar[cnt].Y:= y - Gear^.Radius;
  2131 							else ar[cnt].Y:= y - Gear^.Radius;
  2128 				inc(cnt)
  2132 				inc(cnt)