From 7ed964756e1798ba7e2feb6b3459e1fb66dae914 Mon Sep 17 00:00:00 2001 From: NO11 Date: Fri, 12 Nov 2021 18:00:04 +0000 Subject: [PATCH] local luaentity --- mods/ENTITIES/drippingwater/init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/drippingwater/init.lua b/mods/ENTITIES/drippingwater/init.lua index a4855acdcf..45a211d8ff 100644 --- a/mods/ENTITIES/drippingwater/init.lua +++ b/mods/ENTITIES/drippingwater/init.lua @@ -35,8 +35,9 @@ local function register_drop(liquid, glow, sound, nodes) self.object:set_acceleration(vector.new(0, -5, 0)) end if minetest.get_node(vector.offset(ownpos, 0, -0.1, 0)).name ~= "air" then - if not self.object:get_luaentity()._dropped then - self.object:get_luaentity()._dropped = true + local ent = self.object:get_luaentity() + if not ent._dropped then + ent._dropped = true minetest.sound_play({name = "drippingwater_" .. sound .. "drip"}, {pos = ownpos, gain = 0.5, max_hear_distance = 8}, true) end if k < 3 then