Fix crash: pass player obj to add_tmp_image

master
shivajiva101 2020-09-15 15:38:19 +01:00 committed by GitHub
parent c057c3cb3e
commit aa300bdb2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -83,7 +83,8 @@ for i, v in ipairs(eggwars.arena[1].cs) do
eggs = match.player[attacker].eggs + 1
match.player[attacker].eggs = eggs
msg = victim .. "'s egg was destroyed by " .. attacker
eggwars.add_tmp_image(victim, 'eggwars_destroyed.png', 5)
eggwars.add_tmp_image(minetest.get_player_by_name(victim),
'eggwars_destroyed.png', 5)
eggwars.chat_send_match(key, msg)
eggwars.update_hud(key, match.player[victim].id)
eggwars.match[key] = match