hedgewars/uLand.pas
changeset 11881 34ede05e4d4f
parent 11826 7654e2357934
child 12086 ba1807589eaa
--- a/hedgewars/uLand.pas	Tue Nov 15 00:42:44 2016 +0100
+++ b/hedgewars/uLand.pas	Tue Nov 15 01:25:37 2016 +0100
@@ -630,36 +630,33 @@
     //if ((GameFlags and gfForts) <> 0) or (Pathz[ptMapCurrent] <> '') then
     //    FillChar(Land,SizeOf(TCollisionArray),0);*)
 
-    if (GameFlags and gfForts) = 0 then
-        if cPathz[ptMapCurrent] <> '' then
-            begin
-            map:= cPathz[ptMapCurrent] + '/map.png';
-            mask:= cPathz[ptMapCurrent] + '/mask.png';
-            if (not(pfsExists(map)) and pfsExists(mask)) then
-                begin
-                maskOnly:= true;
-                LoadMask;
-                GenLandSurface
-                end
-            else LoadMap;
-            end
-        else
+    if cPathz[ptMapCurrent] <> '' then
+        begin
+        map:= cPathz[ptMapCurrent] + '/map.png';
+        mask:= cPathz[ptMapCurrent] + '/mask.png';
+        if (not(pfsExists(map)) and pfsExists(mask)) then
             begin
-            WriteLnToConsole('Generating land...');
-            case cMapGen of
-                mgRandom: GenTemplated(EdgeTemplates[SelectTemplate]);
-                mgMaze  : begin ResizeLand(4096,2048); GenMaze; end;
-                mgPerlin: begin ResizeLand(4096,2048); GenPerlin; end;
-                mgDrawn : GenDrawnMap;
-                mgForts : begin GameFlags:= (GameFlags or gfForts or gfDivideTeams); MakeFortsMap(); end;
-            else
-                OutError('Unknown mapgen', true);
-            end;
-            if cMapGen <> mgForts then
-                GenLandSurface
+            maskOnly:= true;
+            LoadMask;
+            GenLandSurface
             end
+        else LoadMap;
+        end
     else
-        MakeFortsMap;
+        begin
+        WriteLnToConsole('Generating land...');
+        case cMapGen of
+            mgRandom: GenTemplated(EdgeTemplates[SelectTemplate]);
+            mgMaze  : begin ResizeLand(4096,2048); GenMaze; end;
+            mgPerlin: begin ResizeLand(4096,2048); GenPerlin; end;
+            mgDrawn : GenDrawnMap;
+            mgForts : begin GameFlags:= (GameFlags or gfForts or gfDivideTeams); MakeFortsMap(); end;
+        else
+            OutError('Unknown mapgen', true);
+        end;
+        if cMapGen <> mgForts then
+            GenLandSurface
+        end;
 
     AddProgress;