diff --git a/init.lua b/init.lua index e6730e2..351c03f 100644 --- a/init.lua +++ b/init.lua @@ -9,7 +9,7 @@ local BONE_POSITION, BONE_ROTATION = (function() return dofile(modpath .. "/model.lua") end)() -local get_animation = player_api and player_api.get_animation or default.player_get_animation +local get_animation = minetest.global_exists("player_api") and player_api.get_animation or default.player_get_animation if not get_animation then error("player_api.get_animation or default.player_get_animation is not found") end @@ -299,3 +299,5 @@ minetest.register_globalstep(function(dtime) animate_player(player, dtime) end end) + +minetest.log("action", "[playeranim] loaded.")