Fix player skin changing code.

This commit is contained in:
kaeza 2013-12-06 23:06:45 -02:00 committed by ShadowNinja
parent 81e9a7cb36
commit ba4c80644e
1 changed files with 7 additions and 0 deletions

View File

@ -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