make landspray build across too
authornemo
Sun, 20 Oct 2013 18:25:58 -0400
changeset 9563 225dfd449480
parent 9561 aab34634a17b
child 9565 7f786eb439aa
make landspray build across too
hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Sat Oct 19 23:44:40 2013 -0400
+++ b/hedgewars/uGearsHandlersMess.pas	Sun Oct 20 18:25:58 2013 -0400
@@ -700,6 +700,13 @@
         draw:= true;
     xx:= hwRound(Gear^.X);
     yy:= hwRound(Gear^.Y);
+    if draw and (WorldEdge = weWrap) and ((xx < leftX+3) or (xx > rightX-3)) then
+        begin
+        if xx < leftX+3 then 
+             xx:= rightX-3
+        else xx:= leftX+3;
+        Gear^.X:= int2hwFloat(xx)
+        end
     end
 else if GameTicks and $7 = 0 then
     begin