hedgewars/uLandUtils.pas
changeset 12311 1b5a4807f8f4
parent 11704 1694b379c83f
child 15164 794dc7237ca1
--- 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