Fix kill_assist crash
This commit is contained in:
parent
88e6fb7af9
commit
6a12dcc12a
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
kill_assist.add_assist(victim, killer, max_hp)
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue