1
0
Fork 0

Now only allowing players and lua entities to do assist kills.

This commit is contained in:
CyberMango 2023-01-06 01:07:11 +02:00
parent 96cd2657db
commit a1d98c080f
1 changed files with 1 additions and 1 deletions

View File

@ -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()