Fix player model animations

This commit is contained in:
ASL97 2016-11-14 18:39:54 +08:00
parent 4b7363fc19
commit 682b086ea7
1 changed files with 6 additions and 4 deletions

View File

@ -135,10 +135,12 @@ minetest.register_globalstep(
local model = model_name and models[model_name]
local controls = player:get_player_control()
if controls.sneak then
player:set_nametag_attributes({color = {a = 30, r = 255, g = 255, b = 255}})
else
player:set_nametag_attributes({color = {a = 255, r = 255, g = 255, b = 255}})
if player_sneak[name] ~= controls.sneak then
if controls.sneak then
player:set_nametag_attributes({color = {a = 30, r = 255, g = 255, b = 255}})
else
player:set_nametag_attributes({color = {a = 255, r = 255, g = 255, b = 255}})
end
end
if model and not player_attached[name] then