1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-25 02:00:37 +01:00

[death_messages] Don't repeat death messages/sounds

- For #375
This commit is contained in:
LeMagnesium 2016-01-08 18:33:10 +01:00
parent 7b75162640
commit 3da9754fbc

View File

@ -182,6 +182,8 @@ minetest.register_on_punchplayer(function(player, hitter, time,
death_message = string.format(messages.monsters_whacking[math.random(1, #messages.monsters_whacking)], player_name, entity_name, player_name, entity_name)
end
broadcast_death(death_message)
minetest.sound_play(sounds[math.random(1,#sounds)],{to_player=player:get_player_name(),gain=soundset.get_gain(player:get_player_name(),"other")})
sound_play_all(player:get_player_name())
whacked[player_name] = true
end
end)
@ -230,9 +232,10 @@ if RANDOM_MESSAGES == true then
-- Actually tell something
death_message = string.format(death_message, player_name, player_name)
broadcast_death(death_message)
minetest.sound_play(sounds[math.random(1,#sounds)],{to_player=player_name,gain=soundset.get_gain(player_name, "other")})
sound_play_all(player_name)
whacked[player_name] = true
end
minetest.sound_play(sounds[math.random(1,#sounds)],{to_player=player:get_player_name(),gain=soundset.get_gain(player:get_player_name(),"other")})
sound_play_all(player:get_player_name())
end)
else