mirror of
https://github.com/ElCeejo/creatura.git
synced 2025-03-15 04:11:24 +00:00
suffocation
This commit is contained in:
parent
ec873b2462
commit
fca02054e8
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue