From b3059aecbaa165e1335d8d39c61debf07b26e74c Mon Sep 17 00:00:00 2001 From: kay27 Date: Mon, 14 Feb 2022 06:34:46 +0400 Subject: [PATCH] #198 Fix a crash, step 17 --- mods/PLAYER/mcl_playerplus/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index 93db2734e..c7fd5b2b7 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -34,9 +34,9 @@ local function player_collision(player) local width = .75 for _,object in pairs(minetest.get_objects_inside_radius(pos, width)) do - + local luaentity = object:get_luaentity() if object and ((mcl_util and mcl_util.is_player(object)) - or (object:get_luaentity()._cmi_is_mob == true and object ~= player)) then + or (luaentity and luaentity._cmi_is_mob == true and object ~= player)) then local pos2 = object:get_pos() local vec = {x = pos.x - pos2.x, z = pos.z - pos2.z}