Mobs: Replace name-based fence/wall check

This commit is contained in:
Wuzzy 2020-01-29 23:37:16 +01:00
parent 9326a76973
commit f7fb83891a

@ -912,9 +912,9 @@ local do_jump = function(self)
if self.walk_chance == 0 if self.walk_chance == 0
or minetest.registered_items[nod.name].walkable then or minetest.registered_items[nod.name].walkable then
if not nod.name:find("fence") if minetest.get_item_group(nod.name, "fence") == 0
and not nod.name:find("fence_gate") and minetest.get_item_group(nod.name, "fence_gate") == 0
and not nod.name:find("wall") then and minetest.get_item_group(nod.name, "wall") == 0 then
local v = self.object:get_velocity() local v = self.object:get_velocity()