1
0
Fork 0

Fix crash when mob collides with nil entity

This commit is contained in:
jordan4ibanez 2021-04-23 14:33:40 -04:00
parent 5d59583583
commit 8eb9ba12ce
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ mobs.collision = function(self)
end end
for _,object in ipairs(minetest_get_objects_inside_radius(pos, radius*1.25)) do for _,object in ipairs(minetest_get_objects_inside_radius(pos, radius*1.25)) do
if object and object ~= self.object and (object:is_player() or object:get_luaentity()._cmi_is_mob == true) then--and if object and object ~= self.object and (object:is_player() or (object:get_luaentity() and object:get_luaentity()._cmi_is_mob == true)) then--and
--don't collide with rider, rider don't collide with thing --don't collide with rider, rider don't collide with thing
--(not object:get_attach() or (object:get_attach() and object:get_attach() ~= self.object)) and --(not object:get_attach() or (object:get_attach() and object:get_attach() ~= self.object)) and
--(not self.object:get_attach() or (self.object:get_attach() and self.object:get_attach() ~= object)) then --(not self.object:get_attach() or (self.object:get_attach() and self.object:get_attach() ~= object)) then