diff --git a/mobkit/init.lua b/mobkit/init.lua index 2c6d5be..b97d3f9 100644 --- a/mobkit/init.lua +++ b/mobkit/init.lua @@ -1265,17 +1265,19 @@ function mobkit.stepfunc(self,dtime) -- not intended to be modified local surface = nil local snodepos = mobkit.get_node_pos(spos) local surfnode = mobkit.nodeatpos(spos) - local stand_pos = spos --added by petz - stand_pos.y = spos.y + 0.5 --added by petz - local stand_node_pos = mobkit.get_node_pos(stand_pos) --added by petz - local stand_node = mobkit.nodeatpos(stand_node_pos) --added by petz - if stand_node and stand_node.walkable and stand_node.drawtype == "normal" then -- if standing inside solid block then jump to escape --added by petz - self.object:set_pos({ --added by petz - x = stand_pos.x, --added by petz - y = stand_pos.y + self.jump_height, --added by petz - z = stand_pos.z --added by petz - }) --added by petz - end --added by petz + if mobkit.is_alive(self) then + local stand_pos = spos --added by petz + stand_pos.y = spos.y + 0.5 --added by petz + local stand_node_pos = mobkit.get_node_pos(stand_pos) --added by petz + local stand_node = mobkit.nodeatpos(stand_node_pos) --added by petz + if stand_node and stand_node.walkable and stand_node.drawtype == "normal" then -- if standing inside solid block then jump to escape --added by petz + self.object:set_pos({ --added by petz + x = stand_pos.x, --added by petz + y = stand_pos.y + self.jump_height, --added by petz + z = stand_pos.z --added by petz + }) --added by petz + end --added by petz + end while surfnode and surfnode.drawtype == 'liquid' do surface = snodepos.y+0.5 if surface > spos.y+self.height then break end diff --git a/petz/mod.conf b/petz/mod.conf index 6a1836a..b58cc04 100644 --- a/petz/mod.conf +++ b/petz/mod.conf @@ -2,4 +2,4 @@ name = petz description = Cute mobs for Minetest depends = default, mobkit, stairs, dye, farming, vessels, wool optional_depends = bonemeal, 3d_armor -version = 3.3.11 +version = 3.3.12 diff --git a/petz/models/petz_dolphin.b3d b/petz/models/petz_dolphin.b3d index 44a00c1..1de1bf2 100644 Binary files a/petz/models/petz_dolphin.b3d and b/petz/models/petz_dolphin.b3d differ diff --git a/petz/models/petz_dolphin.blend b/petz/models/petz_dolphin.blend index fc0e638..aec39b4 100644 Binary files a/petz/models/petz_dolphin.blend and b/petz/models/petz_dolphin.blend differ diff --git a/petz/models/petz_dolphin.blend1 b/petz/models/petz_dolphin.blend1 index 6bd61e0..1b7a963 100644 Binary files a/petz/models/petz_dolphin.blend1 and b/petz/models/petz_dolphin.blend1 differ diff --git a/petz/petz/dolphin_mobkit.lua b/petz/petz/dolphin_mobkit.lua index 066b9b8..3006429 100644 --- a/petz/petz/dolphin_mobkit.lua +++ b/petz/petz/dolphin_mobkit.lua @@ -37,7 +37,7 @@ minetest.register_entity("petz:"..pet_name,{ -- api props springiness= 0, buoyancy = 0.5, -- portion of hitbox submerged - max_speed = 1, + max_speed = 2.0, jump_height = 2.0, view_range = 10, lung_capacity = 32767, -- seconds @@ -47,6 +47,7 @@ minetest.register_entity("petz:"..pet_name,{ swin={range={x=1, y=13}, speed=20, loop=true}, stand={ {range={x=13, y=25}, speed=5, loop=true}, + {range={x=28, y=43}, speed=5, loop=true}, }, },