fix bug in rotate, wasn't invalidating adjacent node cache

This commit is contained in:
FaceDeer 2019-09-08 14:42:22 -06:00
parent 8f70b982fd
commit b568fffdc8
2 changed files with 3 additions and 1 deletions

@ -800,6 +800,7 @@ local rotate = function(digtron_id, axis, player_name)
for _, removed_pos in ipairs(removed) do
minetest.check_for_falling(removed_pos)
end
invalidate_layout_cache(digtron_id)
end
return true
else

@ -113,7 +113,8 @@ local get_predictive_inventory = function(digtron_id)
local existing = predictive_inventory[digtron_id]
if existing then return existing end
local predictive_inv = minetest.create_detached_inventory("digtron_predictive_"..digtron_id, detached_inventory_callbacks)
-- Using digtron_id as the player_name parameter to prevent this from being sent on the network to anyone real.
local predictive_inv = minetest.create_detached_inventory("digtron_predictive_"..digtron_id, detached_inventory_callbacks, digtron_id)
predictive_inventory[digtron_id] = predictive_inv
local source_inv = retrieve_inventory(digtron_id)