Add sound event for the egg

master
Shivajiva 2020-09-21 19:58:57 +01:00
parent a38d6693b3
commit 12b4b0bb92
1 changed files with 4 additions and 0 deletions

View File

@ -84,6 +84,10 @@ for i, v in ipairs(eggwars.arena[1].cs) do
match.player[attacker].eggs = eggs
msg = victim .. "'s egg was destroyed by " .. attacker
eggwars.add_tmp_image(victim, 'eggwars_destroyed.png', 5)
minetest.sound_play("eggwars_crack", {
to_player = victim,
gain = 1.0,
})
eggwars.chat_send_match(key, msg)
eggwars.update_hud(key, match.player[victim].id)
eggwars.match[key] = match