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