# HG changeset patch
# User alfadur
# Date 1523571450 -7200
# Node ID 23ade5604f8d980bcc42d78c7110aabe600caf66
# Parent  b024cf25bde1b20f93fcd66ed54359f9347d1be6
Fix bullet trails overlapping when the pass through wrap or bounce world edge

diff -r b024cf25bde1 -r 23ade5604f8d hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Thu Apr 12 16:56:06 2018 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Fri Apr 13 00:17:30 2018 +0200
@@ -1277,7 +1277,7 @@
                     VGear^.Tint:= $FFFFFF00 or ($FF * (i + 1) div (steps));
 
                     // reached edge of land. assume infinite beam. Extend it way out past camera
-                    if (round(toX) and LAND_WIDTH_MASK <> 0)
+                    if ((round(toX) and LAND_WIDTH_MASK <> 0) and (not (WorldEdge in [weBounce, weWrap])))
                     or (round(toY) and LAND_HEIGHT_MASK <> 0) then
                         // only extend if not under water
                         if not CheckCoordInWater(round(toX), round(toY)) then