hedgewars/uLandObjects.pas
changeset 10560 9f09196d92a6
parent 10490 b30b8d39d662
child 10877 baad1cc9b749
equal deleted inserted replaced
10556:c4ca0fc00c3b 10560:9f09196d92a6
   251     until (x1 < Longint(leftX)+150) or (k = 0) or (k = 16) or (x1 < i);
   251     until (x1 < Longint(leftX)+150) or (k = 0) or (k = 16) or (x1 < i);
   252 
   252 
   253     inc(x1, 2);
   253     inc(x1, 2);
   254     if k = 16 then
   254     if k = 16 then
   255         begin
   255         begin
   256         while (x2 < (rightX-150)) and (CountNonZeroz(x2, y) = 0) do
   256         while (x2 < (LongInt(rightX)-150)) and (CountNonZeroz(x2, y) = 0) do
   257             inc(x2, 2);
   257             inc(x2, 2);
   258         i:= x2 + 12;
   258         i:= x2 + 12;
   259         repeat
   259         repeat
   260         inc(x2, 2);
   260         inc(x2, 2);
   261         k:= CountNonZeroz(x2, y)
   261         k:= CountNonZeroz(x2, y)
   262         until (x2 >= (rightX-150)) or (k = 0) or (k = 16) or (x2 > i) or (x2 - x1 >= 768);
   262         until (x2 >= (LongInt(rightX)-150)) or (k = 0) or (k = 16) or (x2 > i) or (x2 - x1 >= 768);
   263 
   263 
   264         if (x2 < (rightX - 150)) and (k = 16) and (x2 - x1 > 250) and (x2 - x1 < 768)
   264         if (x2 < (LongInt(rightX) - 150)) and (k = 16) and (x2 - x1 > 250) and (x2 - x1 < 768)
   265         and (not CheckIntersect(x1 - 32, y - 64, x2 - x1 + 64, 144)) then
   265         and (not CheckIntersect(x1 - 32, y - 64, x2 - x1 + 64, 144)) then
   266                 break;
   266                 break;
   267         end;
   267         end;
   268 x1:= 0;
   268 x1:= 0;
   269 until y > (LAND_HEIGHT-125);
   269 until y > (LAND_HEIGHT-125);