summaryrefslogtreecommitdiff
path: root/src/mapgen_math.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapgen_math.cpp')
-rw-r--r--src/mapgen_math.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mapgen_math.cpp b/src/mapgen_math.cpp
index 775d0523d..a8a093a4a 100644
--- a/src/mapgen_math.cpp
+++ b/src/mapgen_math.cpp
@@ -145,7 +145,7 @@ double sphere(double x, double y, double z, double d, int ITR = 1) {
}
-//////////////////////// Mapgen Singlenode parameter read/write
+//////////////////////// Mapgen Math parameter read/write
bool MapgenMathParams::readParams(Settings *settings) {
//params = settings->getJson("mg_math");
@@ -171,6 +171,8 @@ void MapgenMathParams::writeParams(Settings *settings) {
MapgenMath::MapgenMath(int mapgenid, MapgenMathParams *params_, EmergeManager *emerge) : MapgenV7(mapgenid, params_, emerge) {
mg_params = params_;
+ this->lighting = 0;
+ this->ridges = 0;
Json::Value & params = mg_params->params;
invert = params["invert"].empty() ? 1 : params["invert"].asBool(); //params["invert"].empty()?1:params["invert"].asBool();
@@ -238,7 +240,7 @@ MapgenMath::~MapgenMath() {
void MapgenMath::generateTerrain() {
- MapNode n_air(CONTENT_AIR), n_water_source(c_water_source, LIGHT_SUN);
+ MapNode n_air(CONTENT_AIR, LIGHT_SUN), n_water_source(c_water_source, LIGHT_SUN);
MapNode n_stone(c_stone, LIGHT_SUN);
u32 index = 0;
v3s16 em = vm->m_area.getExtent();
@@ -263,6 +265,7 @@ void MapgenMath::generateTerrain() {
if (vm->m_data[i].getContent() == CONTENT_IGNORE)
vm->m_data[i] = (y > water_level + biome->filler_height) ?
MapNode(biome->c_filler) : n_stone;
+// vm->m_data[i] = n_stone;
} else if (y <= water_level) {
vm->m_data[i] = n_water_source;
} else {