From 0c9a37cb423aebae46cf3de3233a83d04648c5dd Mon Sep 17 00:00:00 2001 From: Jude Melton-Houghton Date: Fri, 11 Feb 2022 11:46:28 -0500 Subject: [PATCH] Add explanatory comment --- mesecons/util.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mesecons/util.lua b/mesecons/util.lua index 55a0d63..ceabfdf 100644 --- a/mesecons/util.lua +++ b/mesecons/util.lua @@ -395,7 +395,10 @@ end -- -- The swap will necessitate a light update unless update_light equals false. function mesecon.vm_swap_node(pos, name, update_light) + -- If one node needs a light update, all VMs should use light updates to + -- prevent newly calculated light from being overwritten by other VMs. vm_update_light = vm_update_light or update_light ~= false + local tbl = vm_get_or_create_entry(pos) local index = tbl.va:indexp(pos) tbl.data[index] = minetest.get_content_id(name)