From f033cd401c13ca6e39df23ef3c1187b9bd5d64b3 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sat, 18 Jul 2020 20:39:49 +0100 Subject: [PATCH] add nil check to general_attack --- api.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.lua b/api.lua index fa8148e..f1aeaac 100644 --- a/api.lua +++ b/api.lua @@ -1831,7 +1831,7 @@ function mob_class:general_attack() return end - local s = self.object:get_pos() + local s = self.object:get_pos() ; if not s then return end local objs = minetest.get_objects_inside_radius(s, self.view_range) -- remove entities we aren't interested in