mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2025-02-26 09:33:49 +01:00
Now only allowing players and lua entities to do assist kills.
This commit is contained in:
@ -232,7 +232,7 @@ end)
|
|||||||
|
|
||||||
mcl_damage.register_on_damage(function(obj, damage, reason)
|
mcl_damage.register_on_damage(function(obj, damage, reason)
|
||||||
if obj:get_hp() - damage > 0 then
|
if obj:get_hp() - damage > 0 then
|
||||||
if reason.source then
|
if reason.source and (reason.source:is_player() or obj:get_luaentity()) then
|
||||||
-- To avoid timing issues we cancel the previous job before adding a new one.
|
-- To avoid timing issues we cancel the previous job before adding a new one.
|
||||||
if mcl_death_messages.assist[obj] then
|
if mcl_death_messages.assist[obj] then
|
||||||
mcl_death_messages.assist[obj].job:cancel()
|
mcl_death_messages.assist[obj].job:cancel()
|
||||||
|
Reference in New Issue
Block a user