From dde9896a1a0e03905f3de30bad3471f84e0f05a8 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sat, 11 Apr 2020 17:46:07 +0100 Subject: [PATCH] add sanity check to do_jump --- api.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api.lua b/api.lua index 088d513..e38c04b 100644 --- a/api.lua +++ b/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