forked from Mineclonia/Mineclonia
Correct splash issue with mob-detection
This commit is contained in:
parent
4f259dec71
commit
bd9b15466b
|
@ -53,7 +53,6 @@ local function add_lingering_effect(pos, color, def)
|
||||||
for _, obj in pairs(minetest.get_objects_inside_radius(pos, d)) do
|
for _, obj in pairs(minetest.get_objects_inside_radius(pos, d)) do
|
||||||
|
|
||||||
local entity = obj:get_luaentity()
|
local entity = obj:get_luaentity()
|
||||||
|
|
||||||
if obj:is_player() or entity._cmi_is_mob then
|
if obj:is_player() or entity._cmi_is_mob then
|
||||||
|
|
||||||
-- if obj:is_player() then print(obj:is_player()) print(obj:get_player_name()) end
|
-- if obj:is_player() then print(obj:is_player()) print(obj:get_player_name()) end
|
||||||
|
|
|
@ -61,7 +61,8 @@ local function register_splash(name, descr, color, def)
|
||||||
})
|
})
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
for _,obj in pairs(minetest.get_objects_inside_radius(pos, 4)) do
|
for _,obj in pairs(minetest.get_objects_inside_radius(pos, 4)) do
|
||||||
|
|
||||||
|
local entity = obj.get_luaentity()
|
||||||
if obj:is_player() or entity._cmi_is_mob then
|
if obj:is_player() or entity._cmi_is_mob then
|
||||||
|
|
||||||
local pos2 = obj:get_pos()
|
local pos2 = obj:get_pos()
|
||||||
|
|
Loading…
Reference in New Issue