Skip to content

Commit

Permalink
Fix player skin changing code.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaeza authored and ShadowNinja committed Dec 7, 2013
1 parent 81e9a7c commit ba4c806
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mods/default/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ba4c806

Please sign in to comment.