Merge pull request #9 from Wuzzy2/sfx2

* Wuzzy2-sfx2:
  Add thirst sound
  Eat/drink sounds are now only played near player
  Death sound fixes
  Add damage and fall damage sounds
  Add drinking sound
This commit is contained in:
GunshipPenguin 2015-05-31 15:49:17 -07:00
commit 249d0bbcb0
13 changed files with 25 additions and 6 deletions

View File

@ -182,3 +182,13 @@ Mito551 (sounds) (CC BY-SA):
Unknown author (WTFPL):
default_inventory_background.png
Independent.nu (sounds) (WTFPL):
player_damage.1.ogg
player_damage.2.ogg
player_damage.3.ogg
player_damage.4.ogg
hintriger (sounds) (WTFPL):
player_falling_damage.1.ogg
player_falling_damage.2.ogg

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -333,6 +333,7 @@ end
--Check if theres only one player left and stop hungry games.
minetest.register_on_dieplayer(function(player)
local playerName = player:get_player_name()
local pos = player:getpos()
local count = 0
for _,_ in pairs(currGame) do
@ -349,9 +350,11 @@ minetest.register_on_dieplayer(function(player)
check_win()
local privs = minetest.get_player_privs(playerName)
if privs.interact then
minetest.sound_play("hungry_games_death", {pos = pos})
end
if privs.interact or privs.fly then
if privs.interact and (hungry_games.death_mode == "spectate") then
minetest.sound_play("hungry_games_death")
privs.fast = true
privs.fly = true
privs.interact = nil

View File

@ -1,6 +1,9 @@
Unless otherwise noted, all code files fall under the BSD 2 clause license.
The media files fall under the WTFPL, with one exception:
survival_thirst_drink.ogg, it falls under CC-BY and is authored by aent.
survival_thirst_thirst.ogg falls under WTFPL and is made by ecfike.
Unless otherwise noted, all code files fall under the BSD 2 clause license
reproduced below:
--- START OF BSD LICENSE ---

View File

@ -92,7 +92,8 @@ local function override_on_use ( def )
soundname = "survival_hunger_eat";
end
minetest.sound_play({ name=soundname }, {
to_player = user:getpos();
pos = user:getpos();
max_hear_distance = 16;
gain = 1.0;
});
if (on_use) then

View File

@ -24,7 +24,8 @@ minetest.register_craftitem("survival_thirst:water_glass", {
state.count = 0;
state.thirsty = false;
minetest.sound_play({ name="survival_thirst_drink" }, {
to_player = user:getpos();
pos = user:getpos();
max_hear_distance = 16;
gain = 1.0;
});
local inv = user:get_inventory();
@ -108,7 +109,8 @@ local function override_on_use ( def )
def.on_use = function ( itemstack, user, pointed_thing )
local state = survival.get_player_state(user:get_player_name(), "thirst");
minetest.sound_play({ name="survival_thirst_drink" }, {
to_player = user:getpos();
pos = user:getpos();
max_hear_distance = 16;
gain = 1.0;
});
if (on_use) then