1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-26 18:21:04 +00:00

Mgfractal: Make non-fractal terrain optional (#8702)

Enabled by default.
Only allow spawn on fractal, not on seabed terrain.
Various codestyle and comment improvements.
This commit is contained in:
Paramat 2019-07-25 19:58:35 +01:00 committed by GitHub
parent ecd20de64d
commit 245a31d6b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 73 additions and 46 deletions

View file

@ -1,7 +1,7 @@
/*
Minetest
Copyright (C) 2015-2018 paramat
Copyright (C) 2015-2018 kwolekr, Ryan Kwolek <kwolekr@minetest.net>
Copyright (C) 2015-2019 paramat
Copyright (C) 2015-2016 kwolekr, Ryan Kwolek
Fractal formulas from http://www.bugman123.com/Hypercomplex/index.html
by Paul Nylander, and from http://www.fractalforums.com, thank you.
@ -25,13 +25,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "mapgen.h"
///////////// Mapgen Fractal flags
#define MGFRACTAL_TERRAIN 0x01
class BiomeManager;
extern FlagDesc flagdesc_mapgen_fractal[];
struct MapgenFractalParams : public MapgenParams
{
u32 spflags = 0;
u32 spflags = MGFRACTAL_TERRAIN;
float cave_width = 0.09f;
s16 large_cave_depth = -33;
s16 lava_depth = -256;
@ -60,6 +64,7 @@ struct MapgenFractalParams : public MapgenParams
void writeParams(Settings *settings) const;
};
class MapgenFractal : public MapgenBasic
{
public:
@ -89,5 +94,5 @@ private:
float julia_y;
float julia_z;
float julia_w;
Noise *noise_seabed;
Noise *noise_seabed = nullptr;
};