hedgewars/uGearsUtils.pas
changeset 7603 e9c3c67b5dfd
parent 7599 74db5b16a776
child 7614 3ae60c8a15f2
equal deleted inserted replaced
7602:a620319d377e 7603:e9c3c67b5dfd
   567     repeat
   567     repeat
   568         x:= Left + LongInt(GetRandom(Delta));
   568         x:= Left + LongInt(GetRandom(Delta));
   569         repeat
   569         repeat
   570             inc(x, Delta);
   570             inc(x, Delta);
   571             cnt:= 0;
   571             cnt:= 0;
   572             if hasBorder then
   572             y:= min(1024, topY) - 2 * Gear^.Radius;
   573                  y:= min(1024, topY+4)
       
   574             else y:= min(1024, topY) - 2 * Gear^.Radius;
       
   575             while y < cWaterLine do
   573             while y < cWaterLine do
   576                 begin
   574                 begin
   577                 repeat
   575                 repeat
   578                     inc(y, 2);
   576                     inc(y, 2);
   579                 until (y >= cWaterLine) or
   577                 until (y >= cWaterLine) or
   605                     else
   603                     else
   606                         ar[cnt].Y:= y - Gear^.Radius;
   604                         ar[cnt].Y:= y - Gear^.Radius;
   607                     inc(cnt)
   605                     inc(cnt)
   608                     end;
   606                     end;
   609 
   607 
   610                 inc(y, 45)
   608                 inc(y, 10)
   611                 end;
   609                 end;
   612 
   610 
   613             if cnt > 0 then
   611             if cnt > 0 then
   614                 with ar[GetRandom(cnt)] do
   612                 with ar[GetRandom(cnt)] do
   615                     begin
   613                     begin