summaryrefslogtreecommitdiff
path: root/src/mapgen_v7.cpp
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2013-06-27 17:06:52 -0400
committerkwolekr <kwolekr@minetest.net>2013-06-27 22:35:35 -0400
commit2e292b67a0a02b045969034c06aaf92b42a83a81 (patch)
tree499310d109cbd737633eb99a245e0054a0c458d7 /src/mapgen_v7.cpp
parent18882a4d2603488bdfb5a519a8bedf300b154940 (diff)
downloadminetest-2e292b67a0a02b045969034c06aaf92b42a83a81.tar.gz
minetest-2e292b67a0a02b045969034c06aaf92b42a83a81.tar.bz2
minetest-2e292b67a0a02b045969034c06aaf92b42a83a81.zip
Add Lua on_mapgen_init callback, and minetest.set_mapgen_params API
Diffstat (limited to 'src/mapgen_v7.cpp')
-rw-r--r--src/mapgen_v7.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mapgen_v7.cpp b/src/mapgen_v7.cpp
index 870e7343e..861cdde62 100644
--- a/src/mapgen_v7.cpp
+++ b/src/mapgen_v7.cpp
@@ -77,7 +77,6 @@ MapgenV7::MapgenV7(int mapgenid, MapgenV7Params *params, EmergeManager *emerge)
this->seed = (int)params->seed;
this->water_level = params->water_level;
this->flags = params->flags;
- this->lighting = 1;
this->ridges = 1;
this->csize = v3s16(1, 1, 1) * params->chunksize * MAP_BLOCKSIZE;
@@ -215,9 +214,9 @@ void MapgenV7::makeChunk(BlockMakeData *data) {
updateLiquid(&data->transforming_liquid, full_node_min, full_node_max);
- if (this->lighting)
+ if (!(flags & MG_NOLIGHT))
calcLighting(node_min - v3s16(1, 0, 1) * MAP_BLOCKSIZE,
- node_max + v3s16(1, 0, 1) * MAP_BLOCKSIZE);
+ node_max + v3s16(1, 0, 1) * MAP_BLOCKSIZE);
//setLighting(node_min - v3s16(1, 0, 1) * MAP_BLOCKSIZE,
// node_max + v3s16(1, 0, 1) * MAP_BLOCKSIZE, 0xFF);