hedgewars/uGearsUtils.pas
changeset 11478 8c95d5a4366c
parent 11477 e425a6eb9da3
child 11479 846a3b3a3d1c
--- a/hedgewars/uGearsUtils.pas	Thu Dec 31 12:47:33 2015 -0500
+++ b/hedgewars/uGearsUtils.pas	Thu Dec 31 15:11:44 2015 -0500
@@ -939,9 +939,9 @@
             while (cnt < 1000) do
                 begin
                 inc(cnt);
-                x:= leftX+GetRandom(rightX-leftX-16)+8;
-                y:= topY+GetRandom(LAND_HEIGHT-topY-16)+8;
-                if NoGearsToAvoid(x, y, 100, 100) then
+                x:= leftX+GetRandom(rightX-leftX-32)+16;
+                y:= topY+GetRandom(LAND_HEIGHT-topY-32)+16;
+                if NoGearsToAvoid(x, y, 100 div max(1,cnt div 100), 100 div max(1,cnt div 100)) then
                     begin
                     Gear^.State:= Gear^.State or gsttmpFlag;
                     Gear^.X:= int2hwFloat(x);