add sanity check to do_jump
This commit is contained in:
parent
92c899e6a4
commit
dde9896a1a
5
api.lua
5
api.lua
@ -6,7 +6,7 @@ local use_cmi = minetest.global_exists("cmi")
|
||||
|
||||
mobs = {
|
||||
mod = "redo",
|
||||
version = "20200407",
|
||||
version = "20200411",
|
||||
intllib = S,
|
||||
invis = minetest.global_exists("invisibility") and invisibility or {}
|
||||
}
|
||||
@ -1007,6 +1007,9 @@ function mob_class:do_jump()
|
||||
local pos = self.object:get_pos()
|
||||
local yaw = self.object:get_yaw()
|
||||
|
||||
-- sanity check
|
||||
if not yaw then return false end
|
||||
|
||||
-- what is mob standing on?
|
||||
pos.y = pos.y + self.collisionbox[2] - 0.2
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user