Play evil laugh sound when player got crushed
This commit is contained in:
parent
55fe5bd42f
commit
bf0f8a5b4e
@ -165,6 +165,11 @@ All levels by Wuzzy.
|
||||
- `lzr_fallout_damage.ogg`:
|
||||
- by newagesoup <https://freesound.org/people/newagesoup/sounds/348242/>
|
||||
- License: CC0
|
||||
- `lzr_fallout_skull_laugh.ogg`:
|
||||
- by klankbeeld <https://freesound.org/people/klankbeeld/sounds/126113/>
|
||||
- original file name: laugh.WAV
|
||||
- sound was shortened a bit
|
||||
- License CC BY 4.0
|
||||
|
||||
- All other sounds come from Minetest Game (see license of Minetest Game 5.4.1 for details)
|
||||
|
||||
|
@ -147,12 +147,19 @@ minetest.register_globalstep(function(dtime)
|
||||
gain = 1
|
||||
elseif player_damage >= 2 then
|
||||
gain = 0.7
|
||||
elseif player_damage >= 1 then
|
||||
else
|
||||
gain = 0.4
|
||||
end
|
||||
minetest.sound_play({name="lzr_fallout_damage", gain=gain}, {to_player=player:get_player_name()}, true)
|
||||
if player_damage > PLAYER_MAX_DAMAGE then
|
||||
if reset_type == "skull_crush" or reset_type == "crush" then
|
||||
-- The skulls laugh at you when you got stuck ;-)
|
||||
minetest.sound_play({name="lzr_fallout_skull_laugh", gain=0.9}, {to_player=player:get_player_name()}, true)
|
||||
else
|
||||
minetest.sound_play({name="lzr_fallout_damage", gain=gain}, {to_player=player:get_player_name()}, true)
|
||||
end
|
||||
reset_player(player, reset_type)
|
||||
else
|
||||
minetest.sound_play({name="lzr_fallout_damage", gain=gain}, {to_player=player:get_player_name()}, true)
|
||||
end
|
||||
end
|
||||
|
||||
|
BIN
mods/lzr_fallout/sounds/lzr_fallout_skull_laugh.ogg
Normal file
BIN
mods/lzr_fallout/sounds/lzr_fallout_skull_laugh.ogg
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user