mirror of
https://github.com/minetest-mods/playeranim.git
synced 2025-01-08 17:00:26 +01:00
Workaround for Minetest #12189
This commit is contained in:
parent
9dab03f544
commit
e0acae8ed8
10
init.lua
10
init.lua
@ -274,7 +274,15 @@ end
|
|||||||
|
|
||||||
|
|
||||||
local function animate_player(player, dtime)
|
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
|
-- Yaw history
|
||||||
if animation == "lay" or animation == "sit" then
|
if animation == "lay" or animation == "sit" then
|
||||||
|
Loading…
Reference in New Issue
Block a user