Skip to content
Permalink
Browse files

Fix player skin changing code.

  • Loading branch information
kaeza authored and ShadowNinja committed Dec 7, 2013
1 parent 81e9a7c commit ba4c80644ec43df3fa2092a5a45678bdedf95422
Showing with 7 additions and 0 deletions.
  1. +7 −0 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

0 comments on commit ba4c806

Please sign in to comment.
You can’t perform that action at this time.