1
0
mirror of https://codeberg.org/tenplus1/mobs_redo.git synced 2025-02-13 09:00:20 +01:00

change fall_damage check to use true/false

This commit is contained in:
tenplus1 2024-07-01 07:49:03 +01:00
parent 03fbe477c3
commit fb2a247d31

View File

@ -156,7 +156,7 @@ mobs.mob_class = {
air_damage = 0,
node_damage = true,
suffocation = 2,
fall_damage = 1,
fall_damage = true,
fall_speed = -10, -- must be lower than -2 (default: -10)
drops = {},
armor = 100,
@ -2791,7 +2791,7 @@ function mob_class:falling(pos)
else
-- fall damage onto solid ground
if self.fall_damage == 1
if self.fall_damage
and self.object:get_velocity().y == 0 then
local d = (self.old_y or 0) - self.object:get_pos().y