From ba4c80644ec43df3fa2092a5a45678bdedf95422 Mon Sep 17 00:00:00 2001 From: kaeza Date: Fri, 6 Dec 2013 23:06:45 -0200 Subject: [PATCH] Fix player skin changing code. --- mods/default/player.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mods/default/player.lua b/mods/default/player.lua index cad11059..d7426d8e 100644 --- a/mods/default/player.lua +++ b/mods/default/player.lua @@ -143,6 +143,13 @@ minetest.register_on_joinplayer(function(player) default.player_set_model(player, "character.x") end) +minetest.register_on_leaveplayer(function(player) + local name = player:get_player_name() + player_model[name] = nil + player_anim[name] = nil + player_textures[name] = nil +end) + -- Localize for better performance. local player_set_animation = default.player_set_animation -- 2.25.1