# HG changeset patch # User sheepluva # Date 1492951113 -7200 # Node ID 1b5a4807f8f4d9d179c84e4a8a954f51b10652e4 # Parent a2049a645e297bb3b4746ac7a523b6519cde372c fix fort mode's edge adjustments getting lost with weWrap. issue #181 diff -r a2049a645e29 -r 1b5a4807f8f4 hedgewars/uLandUtils.pas --- a/hedgewars/uLandUtils.pas Sun Apr 23 04:47:13 2017 +0200 +++ b/hedgewars/uLandUtils.pas Sun Apr 23 14:38:33 2017 +0200 @@ -42,6 +42,7 @@ lx:= LongInt(LAND_WIDTH) - 1; +// use maximum available map width if there is no special world edge if WorldEdge = weNone then begin playWidth:= LAND_WIDTH; @@ -50,6 +51,13 @@ EXIT; end; +// keep fort distance consistent if we're in wrap mode on fort map +if (cMapGen = mgForts) and (WorldEdge = weWrap) then + begin + // edges were adjusted already in MakeFortsMap() in uLand + EXIT; + end; + ly:= LongInt(LAND_HEIGHT) - 1; // find most left land pixels and set leftX accordingly