mirror of
https://github.com/ElCeejo/creatura.git
synced 2025-04-30 13:51:41 -04:00
api: default_vitals: Fix typo that led to early bailout
If `stand_node` was present, the first guard in `default_vitals`
bailed out.
This was seemingly unexpected and might be a relict from the
refactoring in 59602c9
. There, a `not` got seemingly lost (from
line ~1260 in mob_meta.lua) and was not brought over properly to
api.lua.
We fix the guard to bail out only if at least one of `stand_pos`
or `stand_node` are missing. Noww, default_vitals actually does
its work again.
Fixes ElCeejo/animalia#99
Fixes ElCeejo/animalia#100
Fixes ElCeejo/animalia#78
This commit is contained in:
parent
24f997039f
commit
683d615742
1 changed files with 1 additions and 1 deletions
2
api.lua
2
api.lua
|
@ -396,7 +396,7 @@ end
|
||||||
function creatura.default_vitals(self)
|
function creatura.default_vitals(self)
|
||||||
local pos = self.stand_pos
|
local pos = self.stand_pos
|
||||||
local node = self.stand_node
|
local node = self.stand_node
|
||||||
if not pos or node then return end
|
if not pos or not node then return end
|
||||||
|
|
||||||
local max_fall = self.max_fall or 3
|
local max_fall = self.max_fall or 3
|
||||||
local in_liquid = self.in_liquid
|
local in_liquid = self.in_liquid
|
||||||
|
|
Loading…
Add table
Reference in a new issue