Fix crash when player leaves the server
This commit is contained in:
parent
0aa2d90f7d
commit
a1f99570b4
2
init.lua
2
init.lua
@ -59,7 +59,7 @@ minetest.register_globalstep(function(dtime)
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
minetest.register_on_leaveplayer(function(pl)
|
minetest.register_on_leaveplayer(function(pl)
|
||||||
for h,v in pairs(placed_lights[pl]) do
|
for h,v in pairs(placed_lights[pl] or {}) do
|
||||||
minetest.remove_node(v)
|
minetest.remove_node(v)
|
||||||
end
|
end
|
||||||
placed_lights[pl] = nil
|
placed_lights[pl] = nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user