Skip to content

Commit ba4c806

Browse files
kaezaShadowNinja
authored andcommittedDec 7, 2013
Fix player skin changing code.
1 parent 81e9a7c commit ba4c806

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎mods/default/player.lua

+7
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,13 @@ minetest.register_on_joinplayer(function(player)
143143
default.player_set_model(player, "character.x")
144144
end)
145145

146+
minetest.register_on_leaveplayer(function(player)
147+
local name = player:get_player_name()
148+
player_model[name] = nil
149+
player_anim[name] = nil
150+
player_textures[name] = nil
151+
end)
152+
146153
-- Localize for better performance.
147154
local player_set_animation = default.player_set_animation
148155

0 commit comments

Comments
 (0)
Please sign in to comment.