Workaround for Minetest #12189

This commit is contained in:
SmallJoker 2022-04-10 12:53:25 +02:00
parent 9dab03f544
commit e0acae8ed8
1 changed files with 9 additions and 1 deletions

View File

@ -274,7 +274,15 @@ end
local function animate_player(player, dtime)
local animation = get_animation(player).animation
local data = get_animation(player)
if not data then
-- Minetest Engine workaround for 5.6.0-dev and older
-- minetest.register_globalstep may call to this function before the player is
-- initialized by minetest.register_on_joinplayer in player_api
return
end
local animation = data.animation
-- Yaw history
if animation == "lay" or animation == "sit" then