From 2a360d970c9b27b3bfa28c9f2b2136f74ca258ae Mon Sep 17 00:00:00 2001 From: debagos Date: Sun, 14 Jan 2024 00:10:34 +0100 Subject: [PATCH] Fixed 'accessing undeclared global' warning if 'emote' mod is not installed --- init.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 1bbbc47..c08fac5 100644 --- a/init.lua +++ b/init.lua @@ -447,8 +447,7 @@ end function airutils.sit(player) --set_animation(frame_range, frame_speed, frame_blend, frame_loop) player:set_animation({x = 81, y = 160},30, 0, true) - - if emote then emote.start(player:get_player_name(), "sit") end + if minetest.get_modpath("emote") then emote.start(player:get_player_name(), "sit") end end local function get_norm_angle(angle)