#198 Fix a crash, step 17

This commit is contained in:
kay27 2022-02-14 06:34:46 +04:00
parent 04094f97fa
commit b3059aecba
1 changed files with 2 additions and 2 deletions

View File

@ -34,9 +34,9 @@ local function player_collision(player)
local width = .75 local width = .75
for _,object in pairs(minetest.get_objects_inside_radius(pos, width)) do 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)) 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 pos2 = object:get_pos()
local vec = {x = pos.x - pos2.x, z = pos.z - pos2.z} local vec = {x = pos.x - pos2.x, z = pos.z - pos2.z}