Skip to content

Commit

Permalink
Merge pull request #37 from asl97/patch-2
Browse files Browse the repository at this point in the history
Fix player model animations
  • Loading branch information
kaadmy committed Nov 14, 2016
2 parents 4b7363f + 682b086 commit 44b2c92
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions mods/default/model.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 44b2c92

Please sign in to comment.