mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-02-15 18:00:21 +01:00
change fall_damage check to use true/false
This commit is contained in:
parent
03fbe477c3
commit
fb2a247d31
4
api.lua
4
api.lua
@ -156,7 +156,7 @@ mobs.mob_class = {
|
|||||||
air_damage = 0,
|
air_damage = 0,
|
||||||
node_damage = true,
|
node_damage = true,
|
||||||
suffocation = 2,
|
suffocation = 2,
|
||||||
fall_damage = 1,
|
fall_damage = true,
|
||||||
fall_speed = -10, -- must be lower than -2 (default: -10)
|
fall_speed = -10, -- must be lower than -2 (default: -10)
|
||||||
drops = {},
|
drops = {},
|
||||||
armor = 100,
|
armor = 100,
|
||||||
@ -2791,7 +2791,7 @@ function mob_class:falling(pos)
|
|||||||
else
|
else
|
||||||
|
|
||||||
-- fall damage onto solid ground
|
-- fall damage onto solid ground
|
||||||
if self.fall_damage == 1
|
if self.fall_damage
|
||||||
and self.object:get_velocity().y == 0 then
|
and self.object:get_velocity().y == 0 then
|
||||||
|
|
||||||
local d = (self.old_y or 0) - self.object:get_pos().y
|
local d = (self.old_y or 0) - self.object:get_pos().y
|
||||||
|
Loading…
Reference in New Issue
Block a user