add falling sanity check

This commit is contained in:
TenPlus1 2020-04-07 08:36:57 +01:00
parent 610cef16f4
commit 4634288124
1 changed files with 4 additions and 1 deletions

View File

@ -6,7 +6,7 @@ local use_cmi = minetest.global_exists("cmi")
mobs = {
mod = "redo",
version = "20200406",
version = "20200407",
intllib = S,
invis = minetest.global_exists("invisibility") and invisibility or {}
}
@ -2535,6 +2535,9 @@ function mob_class:falling(pos)
-- floating in water (or falling)
local v = self.object:get_velocity()
-- sanity check
if not v then return end
if v.y > 0 then
-- apply gravity when moving up