Don't send maze_size parameter when not needed, as it overwrites template_filter qmlfrontend
authorunc0rr
Sun, 06 Dec 2015 20:35:58 +0300
branchqmlfrontend
changeset 11452 2572afe532af
parent 11451 321d0ce43568
child 11453 42a9dd7b724c
Don't send maze_size parameter when not needed, as it overwrites template_filter
hedgewars/uFLGameConfig.pas
--- a/hedgewars/uFLGameConfig.pas	Sun Dec 06 20:20:09 2015 +0300
+++ b/hedgewars/uFLGameConfig.pas	Sun Dec 06 20:35:58 2015 +0300
@@ -61,19 +61,23 @@
                 ipcToEngine('escript ' + getScriptPath(script));
             ipcToEngine('eseed ' + seed);
             ipcToEngine('e$mapgen ' + intToStr(mapgen));
-            ipcToEngine('e$template_filter ' + intToStr(template));
+            if (mapgen = 1) or (mapgen = 2) then
+                ipcToEngine('e$maze_size ' + intToStr(mazeSize));
+            else
+                ipcToEngine('e$template_filter ' + intToStr(template));
             ipcToEngine('e$feature_size ' + intToStr(featureSize));
-            ipcToEngine('e$maze_size ' + intToStr(mazeSize));
         end;
     gtLocal: begin
             if script <> 'Normal' then
                 ipcToEngine('escript ' + getScriptPath(script));
             ipcToEngine('eseed ' + seed);
             ipcToEngine('e$mapgen ' + intToStr(mapgen));
-            ipcToEngine('e$template_filter ' + intToStr(template));
+            if (mapgen = 1) or (mapgen = 2) then
+                ipcToEngine('e$maze_size ' + intToStr(mazeSize));
+            else
+                ipcToEngine('e$template_filter ' + intToStr(template));
             ipcToEngine('e$feature_size ' + intToStr(featureSize));
             ipcToEngine('e$theme ' + theme);
-            ipcToEngine('e$maze_size ' + intToStr(mazeSize));
 
             sendSchemeConfig(scheme);