hedgewars/uLandObjects.pas
changeset 4159 64e677349124
parent 3976 abaf741a4e21
child 4357 a1fcfc341a52
equal deleted inserted replaced
4158:08f4627ad2b3 4159:64e677349124
   290                    y:= 5000;
   290                    y:= 5000;
   291                    x:= 5000;
   291                    x:= 5000;
   292                    end
   292                    end
   293                 end;
   293                 end;
   294              inc(y, 3);
   294              inc(y, 3);
   295          until y > int64(LAND_HEIGHT) - 1 - Height;
   295          until y >= LAND_HEIGHT - Height;
   296          inc(x, getrandom(6) + 3)
   296          inc(x, getrandom(6) + 3)
   297      until x > int64(LAND_WIDTH) - 1 - Width;
   297      until x >= LAND_WIDTH - Width;
   298      bRes:= cnt <> 0;
   298      bRes:= cnt <> 0;
   299      if bRes then
   299      if bRes then
   300         begin
   300         begin
   301         i:= getrandom(cnt);
   301         i:= getrandom(cnt);
   302         BlitImageAndGenerateCollisionInfo(ar[i].x, ar[i].y, 0, Obj.Surf);
   302         BlitImageAndGenerateCollisionInfo(ar[i].x, ar[i].y, 0, Obj.Surf);
   339                 y:= 5000;
   339                 y:= 5000;
   340                 x:= 5000;
   340                 x:= 5000;
   341                 end
   341                 end
   342             end;
   342             end;
   343             inc(y, 12);
   343             inc(y, 12);
   344         until y > int64(LAND_HEIGHT) - 1 - Height - 8;
   344         until y >= LAND_HEIGHT - Height - 8;
   345         inc(x, getrandom(12) + 12)
   345         inc(x, getrandom(12) + 12)
   346     until x > int64(LAND_WIDTH) - 1 - Width;
   346     until x >= LAND_WIDTH - Width;
   347     bRes:= cnt <> 0;
   347     bRes:= cnt <> 0;
   348     if bRes then
   348     if bRes then
   349         begin
   349         begin
   350         i:= getrandom(cnt);
   350         i:= getrandom(cnt);
   351         r.x:= ar[i].X;
   351         r.x:= ar[i].X;