hedgewars/uGearsRender.pas
changeset 9505 56e0cca99e20
parent 9285 8e8b908970c2
child 9521 8054d9d775fd
child 9655 e154ccca4dad
--- a/hedgewars/uGearsRender.pas	Tue Oct 08 23:38:45 2013 +0400
+++ b/hedgewars/uGearsRender.pas	Wed Oct 09 20:16:34 2013 -0400
@@ -671,6 +671,25 @@
                     end;
                 amGirder: begin
                     DrawSpriteRotated(sprHandConstruction, hx, hy, sign, aangle);
+                    if WorldEdge = weWrap then
+                        begin
+                        if hwRound(Gear^.X) < leftX+256 then
+                            DrawSpriteClipped(sprGirder,
+                                            rightX+(ox-leftX)-256,
+                                            oy-256,
+                                            LongInt(topY)+WorldDy,
+                                            LongInt(rightX)+WorldDx,
+                                            cWaterLine+WorldDy,
+                                            LongInt(leftX)+WorldDx);
+                        if hwRound(Gear^.X) > rightX-256 then
+                            DrawSpriteClipped(sprGirder,
+                                            leftX-(rightX-ox)-256,
+                                            oy-256,
+                                            LongInt(topY)+WorldDy,
+                                            LongInt(rightX)+WorldDx,
+                                            cWaterLine+WorldDy,
+                                            LongInt(leftX)+WorldDx)
+                        end;
                     DrawSpriteClipped(sprGirder,
                                     ox-256,
                                     oy-256,