This commit is contained in:
ElCeejo 2022-09-28 22:56:19 -07:00 committed by GitHub
parent 86cd98a966
commit 4439348160
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1159,7 +1159,7 @@ function mob:_vitals()
local max_fall = self.max_fall or 3
local in_liquid = self.in_liquid
local on_ground = self.touching_ground
local damage
local damage = 0
if max_fall > 0
and not in_liquid then
local fall_start = self._fall_start or (not on_ground and pos.y)
@ -1204,7 +1204,7 @@ function mob:_vitals()
damage = (damage or 0) + stand_def.damage_per_second * resist
end
end
if damage then
if damage > 0 then
self:hurt(damage)
self:indicate_damage()
if random(4) < 2 then