1
0
Fork 0

Fix crash with player near unknown object

formspec-v4
epCode 2021-04-10 10:20:38 -07:00
parent 7a8079bb64
commit 08b7340ff5
1 changed files with 2 additions and 2 deletions

View File

@ -32,8 +32,8 @@ local player_collision = function(player)
for _,object in pairs(minetest.get_objects_inside_radius(pos, width)) do for _,object in pairs(minetest.get_objects_inside_radius(pos, width)) do
if object:is_player() if object and (object:is_player()
or (object:get_luaentity()._cmi_is_mob == true and object ~= player) then or (object:get_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}