aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2015-01-04 23:14:16 -0500
committerkwolekr <kwolekr@minetest.net>2015-01-04 23:14:16 -0500
commit3bdf3df22367ded04e3a0599f85262e3b538e6ac (patch)
tree5731a5a8d994ef7503773efdfb04c84342f83cae /src/script/lua_api
parent091594e26e69cb41fb8aec8e47e3d147176ef655 (diff)
downloadminetest-3bdf3df22367ded04e3a0599f85262e3b538e6ac.tar.gz
minetest-3bdf3df22367ded04e3a0599f85262e3b538e6ac.tar.bz2
minetest-3bdf3df22367ded04e3a0599f85262e3b538e6ac.zip
Exclude vertical mapblock borders when setting light
Diffstat (limited to 'src/script/lua_api')
-rw-r--r--src/script/lua_api/l_vmanip.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/script/lua_api/l_vmanip.cpp b/src/script/lua_api/l_vmanip.cpp
index 29f04f052..f64b94af1 100644
--- a/src/script/lua_api/l_vmanip.cpp
+++ b/src/script/lua_api/l_vmanip.cpp
@@ -214,7 +214,10 @@ int LuaVoxelManip::l_set_lighting(lua_State *L)
Mapgen mg;
mg.vm = vm;
- mg.setLighting(p1, p2, light);
+ mg.setLighting(
+ p1 + v3s16(0, 1, 0) * MAP_BLOCKSIZE,
+ p2 - v3s16(0, 1, 0) * MAP_BLOCKSIZE,
+ light);
return 0;
}