From 3bdf3df22367ded04e3a0599f85262e3b538e6ac Mon Sep 17 00:00:00 2001
From: kwolekr <kwolekr@minetest.net>
Date: Sun, 4 Jan 2015 23:14:16 -0500
Subject: [PATCH] Exclude vertical mapblock borders when setting light

---
 src/script/lua_api/l_vmanip.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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;
 }
-- 
GitLab