suffocation

This commit is contained in:
ElCeejo 2022-09-24 01:39:52 -07:00 committed by GitHub
parent ec873b2462
commit fca02054e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1269,7 +1269,8 @@ function mob:_vitals()
or self.max_breath > 0 then
local head_pos = vec_raise(pos, self.height)
local head_node = minetest.get_node(head_pos)
if minetest.get_item_group(head_node.name, "liquid") > 0 then
if minetest.get_item_group(head_node.name, "liquid") > 0
or creatura.get_node_def(head_node.name).walkable then
if self._breath <= 0 then
damage = (damage or 0) + 1
else