From e55304d60e65e52c76b3aa0fa1595f64eb000bbd Mon Sep 17 00:00:00 2001 From: TheTermos <55103816+TheTermos@users.noreply.github.com> Date: Sat, 7 Dec 2019 18:11:05 +0100 Subject: [PATCH 1/3] Add files via upload --- init.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 5024741..e631769 100644 --- a/init.lua +++ b/init.lua @@ -892,10 +892,6 @@ function mobkit.actfunc(self, staticdata, dtime_s) end end - if self.timeout and self.timeout>0 and dtime_s > self.timeout and next(self.memory)==nil then - self.object:remove() - end - if not self.memory then -- this is the initial activation self.memory = {} @@ -903,6 +899,10 @@ function mobkit.actfunc(self, staticdata, dtime_s) if #self.textures > 1 then self.texture_no = random(#self.textures) end end + if self.timeout and self.timeout>0 and dtime_s > self.timeout and next(self.memory)==nil then + self.object:remove() + end + -- apply texture if self.texture_no then local props = {} From b70e7d59a9368822c1267f406de680ad7d4a3c3d Mon Sep 17 00:00:00 2001 From: TheTermos <55103816+TheTermos@users.noreply.github.com> Date: Sat, 7 Dec 2019 18:38:44 +0100 Subject: [PATCH 2/3] Add files via upload --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index e631769..def0dcd 100644 --- a/init.lua +++ b/init.lua @@ -824,7 +824,7 @@ function mobkit.physics(self) if surface > spos.y+self.height then break end snodepos.y = snodepos.y+1 surfnode = mobkit.nodeatpos(snodepos) - surfnodename = surfnode.name + if surfnode then surfnodename = surfnode.name end end self.isinliquid = surfnodename if surface then -- standing in liquid From ecf21d6fba8070a47c5a45b2d004f22d41ef9a4e Mon Sep 17 00:00:00 2001 From: TheTermos <55103816+TheTermos@users.noreply.github.com> Date: Mon, 9 Dec 2019 17:46:23 +0100 Subject: [PATCH 3/3] Add files via upload --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index def0dcd..c636a40 100644 --- a/init.lua +++ b/init.lua @@ -820,11 +820,11 @@ function mobkit.physics(self) local snodepos = mobkit.get_node_pos(spos) local surfnode = mobkit.nodeatpos(spos) while surfnode and surfnode.drawtype == 'liquid' do + surfnodename = surfnode.name surface = snodepos.y+0.5 if surface > spos.y+self.height then break end snodepos.y = snodepos.y+1 surfnode = mobkit.nodeatpos(snodepos) - if surfnode then surfnodename = surfnode.name end end self.isinliquid = surfnodename if surface then -- standing in liquid