summaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_vmanip.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/lua_api/l_vmanip.cpp')
-rw-r--r--src/script/lua_api/l_vmanip.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/script/lua_api/l_vmanip.cpp b/src/script/lua_api/l_vmanip.cpp
index 7316fb200..254a7e5a6 100644
--- a/src/script/lua_api/l_vmanip.cpp
+++ b/src/script/lua_api/l_vmanip.cpp
@@ -110,9 +110,10 @@ int LuaVoxelManip::l_write_to_map(lua_State *L)
MAP_LOCK_REQUIRED;
LuaVoxelManip *o = checkobject(L, 1);
+ bool update_light = lua_isboolean(L, 2) ? lua_toboolean(L, 2) : true;
GET_ENV_PTR;
ServerMap *map = &(env->getServerMap());
- if (o->is_mapgen_vm) {
+ if (o->is_mapgen_vm || !update_light) {
o->vm->blitBackAll(&(o->modified_blocks));
} else {
voxalgo::blit_back_with_light(map, o->vm,