Fix kill_assist crash

This commit is contained in:
LoneWolfHT 2021-02-10 20:57:29 -08:00
parent 88e6fb7af9
commit 6a12dcc12a

View file

@ -33,7 +33,11 @@ function kill_assist.reward_assists(victim, killer, reward)
local max_hp = minetest.get_player_by_name(victim):get_properties().max_hp or 20
if not kill_assists[victim] then
if victim ~= killer then
kill_assist.add_assist(victim, killer, max_hp)
else
return
end
end
for name, damage in pairs(kill_assists[victim].players) do