hedgewars/uLandObjects.pas
changeset 1773 bc6ad6136675
parent 1753 2ccba26f1aa4
child 1776 dd5648e250e4
equal deleted inserted replaced
1772:0fe436fb5f81 1773:bc6ad6136675
   271                    y:= 5000;
   271                    y:= 5000;
   272                    x:= 5000;
   272                    x:= 5000;
   273                    end
   273                    end
   274                 end;
   274                 end;
   275              inc(y, 3);
   275              inc(y, 3);
   276          until y > LAND_HEIGHT - Height;
   276          until y > LAND_HEIGHT - 1 - Height;
   277          inc(x, getrandom(6) + 3)
   277          inc(x, getrandom(6) + 3)
   278      until x > LAND_WIDTH - Width;
   278      until x > LAND_WIDTH - 1 - Width;
   279      Result:= cnt <> 0;
   279      Result:= cnt <> 0;
   280      if Result then
   280      if Result then
   281         begin
   281         begin
   282         i:= getrandom(cnt);
   282         i:= getrandom(cnt);
   283         BlitImageAndGenerateCollisionInfo(ar[i].x, ar[i].y, 0, Obj.Surf);
   283         BlitImageAndGenerateCollisionInfo(ar[i].x, ar[i].y, 0, Obj.Surf);