summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorAlexander Weber <web.alexander@web.de>2018-02-14 02:19:15 +0100
committersofar <sofar+github@foo-projects.org>2018-02-19 11:18:18 -0800
commit49620617524b626207fbf025474be6db4404e470 (patch)
treed4940de3e267b30cedbcb51bae47b1e42765b139 /init.lua
parent4704e17dd2a833ebdd8e8f7081e11b05b6cdae4a (diff)
moved the chat- and UI context to ram
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index 32a2205..2a27eb8 100644
--- a/init.lua
+++ b/init.lua
@@ -44,6 +44,12 @@ if minetest.global_exists("armor") then
end
-- Update skin on join
+skins.ui_context = {}
minetest.register_on_joinplayer(function(player)
skins.update_player_skin(player)
+ skins.ui_context[player:get_player_name()] = {}
+end)
+
+minetest.register_on_leaveplayer(function(player)
+ skins.ui_context[player:get_player_name()] = nil
end)