Suono danno (non morte)

master
Zughy 2020-06-12 00:46:02 +02:00
parent 9ab35eb56c
commit 0c5281822a
3 changed files with 9 additions and 2 deletions

View File

@ -15,6 +15,7 @@ Railgun shooting sound by [kafokafo](https://freesound.org/people/kafokafo/sound
Rocket launcher shooting sound by [Audionautics](https://freesound.org/people/Audionautics/sounds/171655/)
Shotgun shooting sound by [coolguy](https://freesound.org/people/coolguy244e/sounds/266977/)
Shotgun reloading sound by [jeseid77](https://freesound.org/people/jeseid77/sounds/86246/)
Hit sound by [cabled_mess](https://freesound.org/people/cabled_mess/sounds/350926/)
Frag sound by [jmayoff](https://freesound.org/people/jmayoff/sounds/255156/)
Voice acting clips by [EFlexMusic](https://freesound.org/people/EFlexMusic/)

View File

@ -168,8 +168,14 @@ function quake.shoot(p_name, targets, damage, has_knockback)
-- applico il danno
target:set_hp(remaining_HP)
-- eventuale morte
if target:get_hp() <= 0 then
-- se è ancora vivo, riproduco suono danno
if target:get_hp() > 0 then
minetest.sound_play("quake_hit", {
to_player = p_name,
max_hear_distance = 1,
})
-- sennò kaputt
else
kill(arena, p_name, target)
killed_players = killed_players +1
end

BIN
sounds/quake_hit.ogg Normal file

Binary file not shown.