]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/mapgen_v6.cpp
Fix MinGW build
[dragonfireclient.git] / src / mapgen_v6.cpp
index a411f966b6038231986c098589d99a81700909c9..64f3b9ed9527a4f848114557f79bb13de10c6b6a 100644 (file)
@@ -149,8 +149,8 @@ bool MapgenV6::block_is_underground(u64 seed, v3s16 blockpos)
 
 float MapgenV6::baseTerrainLevel(float terrain_base, float terrain_higher,
                                                                        float steepness, float height_select) { 
-       float base   = water_level + terrain_base;
-       float higher = water_level + terrain_higher;
+       float base   = 1 + terrain_base;
+       float higher = 1 + terrain_higher;
 
        // Limit higher ground level to at least base
        if(higher < base)
@@ -445,6 +445,12 @@ void MapgenV6::makeChunk(BlockMakeData *data) {
        // Generate some trees, and add grass, if a jungle
        if (flags & MG_TREES)
                placeTreesAndJungleGrass();
+       
+       // Generate the registered decorations
+       for (unsigned int i = 0; i != emerge->decorations.size(); i++) {
+               Decoration *deco = emerge->decorations[i];
+               deco->placeDeco(this, blockseed + i, node_min, node_max);
+       }
 
        // Generate the registered ores
        for (unsigned int i = 0; i != emerge->ores.size(); i++) {
@@ -453,8 +459,9 @@ void MapgenV6::makeChunk(BlockMakeData *data) {
        }
 
        // Calculate lighting
-       calcLighting(node_min - v3s16(1, 1, 1) * MAP_BLOCKSIZE,
-                                node_max + v3s16(1, 0, 1) * MAP_BLOCKSIZE);
+       if (!(flags & MG_NOLIGHT))
+               calcLighting(node_min - v3s16(1, 1, 1) * MAP_BLOCKSIZE,
+                                        node_max + v3s16(1, 0, 1) * MAP_BLOCKSIZE);
        
        this->generating = false;
 }