From 1b511936f5d287ce4a3592a71ec27e01a724da47 Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Sat, 3 Apr 2021 21:05:31 -0400 Subject: [PATCH] Fix local name memory leak --- mods/ENTITIES/mcl_item_entity/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mcl_item_entity/init.lua b/mods/ENTITIES/mcl_item_entity/init.lua index b63c17c2bc..cc7672b7a5 100644 --- a/mods/ENTITIES/mcl_item_entity/init.lua +++ b/mods/ENTITIES/mcl_item_entity/init.lua @@ -6,14 +6,14 @@ local pool = {} local tick = false -local name minetest.register_on_joinplayer(function(player) + local name name = player:get_player_name() pool[name] = 0 end) -local name minetest.register_on_leaveplayer(function(player) + local name name = player:get_player_name() pool[name] = nil end)