hedgewars/uGears.pas
changeset 13574 7d2e2a5d4bff
parent 13350 e54d6db06f35
child 13575 5190d41a2440
--- a/hedgewars/uGears.pas	Sat Jul 28 12:58:12 2018 -0400
+++ b/hedgewars/uGears.pas	Sun Jul 29 11:32:56 2018 -0400
@@ -671,7 +671,7 @@
         rx:= leftX+GetRandom(rightX-leftX+400)-200;
         ry:= topY+GetRandom(LAND_HEIGHT-topY+400)-200
         end;
-    Gear^.X:= int2hwFloat(rx);
+    Gear^.X:= int2hwFloat(CalcWorldWrap(rx,Gear^.Radius));
     Gear^.Y:= int2hwFloat(ry);
     if CheckLandValue(rx, ry, $FFFF) and
        (TestCollisionYwithGear(Gear,-1) = 0) and