[mobs_redo] Update to Git patch 8872920:
https://github.com/AntumMT/mod-mobs_redo/tree/8872920master
parent
ad8309638a
commit
2188397bd8
|
@ -519,7 +519,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
|||
[patch.minetest_game]: https://github.com/AntumMT/mtgame-minetest/tree/c2f3b95
|
||||
[patch.mob-engine]: https://github.com/AntumMT/mp-mob-engine/tree/0b3706f
|
||||
[patch.mobs_animal]: https://github.com/AntumMT/mod-mobs_animal/tree/1d5f1ca
|
||||
[patch.mobs_redo]: https://github.com/AntumMT/mod-mobs_redo/tree/94d14e5
|
||||
[patch.mobs_redo]: https://github.com/AntumMT/mod-mobs_redo/tree/8872920
|
||||
[patch.moreblocks]: https://github.com/AntumMT/mod-moreblocks/tree/82aa7cd
|
||||
[patch.moreores]: https://github.com/AntumMT/mod-moreores/tree/f574a02
|
||||
[patch.mydoors]: https://github.com/AntumMT/mp-mydoors/tree/e36c9d1
|
||||
|
|
|
@ -687,7 +687,7 @@ local do_jump = function(self)
|
|||
|
||||
--print ("standing on:", nod.name, pos.y)
|
||||
|
||||
if minetest.registered_nodes[nod.name].walkable == false then
|
||||
if nod == nil or minetest.registered_nodes[nod.name].walkable == false then
|
||||
return false
|
||||
end
|
||||
|
||||
|
@ -702,29 +702,31 @@ local do_jump = function(self)
|
|||
z = pos.z + dir_z
|
||||
})
|
||||
|
||||
-- thin blocks that do not need to be jumped
|
||||
if nod.name == node_snow then
|
||||
return false
|
||||
end
|
||||
|
||||
--print ("in front:", nod.name, pos.y + 0.5)
|
||||
|
||||
if (minetest.registered_items[nod.name].walkable
|
||||
and not nod.name:find("fence")
|
||||
and not nod.name:find("gate"))
|
||||
or self.walk_chance == 0 then
|
||||
|
||||
local v = self.object:getvelocity()
|
||||
|
||||
v.y = self.jump_height
|
||||
|
||||
set_animation(self, "jump") -- only when defined
|
||||
|
||||
self.object:setvelocity(v)
|
||||
|
||||
mob_sound(self, self.sounds.jump)
|
||||
|
||||
return true
|
||||
if nod ~= nil then
|
||||
-- thin blocks that do not need to be jumped
|
||||
if nod.name == node_snow then
|
||||
return false
|
||||
end
|
||||
|
||||
--print ("in front:", nod.name, pos.y + 0.5)
|
||||
|
||||
if (minetest.registered_items[nod.name].walkable
|
||||
and not nod.name:find("fence")
|
||||
and not nod.name:find("gate"))
|
||||
or self.walk_chance == 0 then
|
||||
|
||||
local v = self.object:getvelocity()
|
||||
|
||||
v.y = self.jump_height
|
||||
|
||||
set_animation(self, "jump") -- only when defined
|
||||
|
||||
self.object:setvelocity(v)
|
||||
|
||||
mob_sound(self, self.sounds.jump)
|
||||
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
|
|
Loading…
Reference in New Issue