Mapgen V6: Add flag to stop mud flow
authorkwolekr <kwolekr@minetest.net>
Sun, 12 Jan 2014 23:20:53 +0000 (18:20 -0500)
committerkwolekr <kwolekr@minetest.net>
Sun, 12 Jan 2014 23:21:28 +0000 (18:21 -0500)
src/mapgen.cpp
src/mapgen.h
src/mapgen_v6.cpp

index 3d5c7b3ccb2a3261eec2317c3dd869e6f058786a..4433a2a58343b61cf50ef0429f2e53a5022ff44d 100644 (file)
@@ -47,6 +47,7 @@ FlagDesc flagdesc_mapgen[] = {
        {"v6_biome_blend", MGV6_BIOME_BLEND},
        {"flat",           MG_FLAT},
        {"nolight",        MG_NOLIGHT},
+       {"v6_nomudflow",   MGV6_NOMUDFLOW},
        {NULL,             0}
 };
 
index feec60e19b09220ced3890a61ca7f5a210ca02a3..aa66982c3d999dad17da319b968652ae8a87e6f2 100644 (file)
@@ -38,6 +38,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #define MG_NOLIGHT       0x40
 #define MGV7_MOUNTAINS   0x80
 #define MGV7_RIDGES      0x100
+#define MGV6_NOMUDFLOW   0x200
 
 /////////////////// Ore generation flags
 // Use absolute value of height to determine ore placement
index 3e152861c047e69985594b727497bfa68017e99b..a27ca2e0aaf88fc1bf12be756f52daa752be3e11 100644 (file)
@@ -439,7 +439,8 @@ void MapgenV6::makeChunk(BlockMakeData *data) {
                addDirtGravelBlobs();
 
                // Flow mud away from steep edges
-               flowMud(mudflow_minpos, mudflow_maxpos);
+               if (!(flags & MGV6_NOMUDFLOW))
+                       flowMud(mudflow_minpos, mudflow_maxpos);
 
        }