projects
/
oweals
/
minetest_game.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81e9a7c
)
Fix player skin changing code.
author
kaeza
<kaeza@users.sf.net>
Sat, 7 Dec 2013 01:06:45 +0000
(23:06 -0200)
committer
ShadowNinja
<noreply@gmail.com>
Sat, 7 Dec 2013 03:45:17 +0000
(22:45 -0500)
mods/default/player.lua
patch
|
blob
|
history
diff --git
a/mods/default/player.lua
b/mods/default/player.lua
index cad11059b5e7c3c27cf638cf623ea6851472bd88..d7426d8eb43d0b2a14c75ace98f9458a99c2676d 100644
(file)
--- 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