Fix bullet trails overlapping when the pass through wrap or bounce world edge
authoralfadur
Fri, 13 Apr 2018 00:17:30 +0200
changeset 13321 23ade5604f8d
parent 13320 b024cf25bde1
child 13322 b77a9380dd0f
Fix bullet trails overlapping when the pass through wrap or bounce world edge
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