This should probably fix feedback that hogs weren't spawning on left side of map.
authornemo
Fri, 25 Sep 2015 23:30:21 -0400
changeset 11196 0f6916065849
parent 11195 ba192ec1f201
child 11197 283b6e6cf7ea
This should probably fix feedback that hogs weren't spawning on left side of map.
hedgewars/uGearsUtils.pas
--- a/hedgewars/uGearsUtils.pas	Wed Sep 23 07:49:46 2015 +0200
+++ b/hedgewars/uGearsUtils.pas	Fri Sep 25 23:30:21 2015 -0400
@@ -852,7 +852,6 @@
     repeat
         x:= Left + max(LAND_WIDTH div 2048, LongInt(GetRandom(Delta)));
         repeat
-            inc(x, Delta);
             cnt:= 0;
             y:= min(1024, topY) - Gear^.Radius shl 1;
             while y < cWaterLine do
@@ -902,8 +901,9 @@
                     ar2[cnt2].y:= y;
                     inc(cnt2)
                     end
-                end
-        until (x + Delta > Right);
+                end;
+            inc(x, Delta)
+        until (x > Right);
 
         dec(Delta, 60)
     until (cnt2 > 0) or (Delta < 70);