From 682b086ea7391c69ec3ce57b9d111f4d1bb0fb0f Mon Sep 17 00:00:00 2001 From: ASL97 Date: Mon, 14 Nov 2016 18:39:54 +0800 Subject: [PATCH] Fix player model animations --- mods/default/model.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mods/default/model.lua b/mods/default/model.lua index 7fa6e8d..5445e58 100644 --- a/mods/default/model.lua +++ b/mods/default/model.lua @@ -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