Add sounds.

- woosh sound at warp start. Gets cancelled if you move.
- plop sound at warp success.

freesounds.org sounds, license/attribution included.
This commit is contained in:
Auke Kok 2015-04-28 21:15:56 -07:00
parent 65c800e641
commit 37dc9db8b8
4 changed files with 17 additions and 2 deletions

View File

@ -26,6 +26,9 @@ local warp = function(player, dest)
player:set_look_pitch(warps[i].pitch)
minetest.chat_send_player(player:get_player_name(), "Warped to \"" .. dest .. "\"")
minetest.log("action", player:get_player_name() .. " warped to \"" .. dest .. "\"")
minetest.sound_play("warps_plop", {
pos = {x = warps[i].x, y = warps[i].y, z = warps[i].z},
})
return
end
end
@ -46,6 +49,7 @@ do_warp_queue = function()
table.remove(warps_queue, i)
end
else
minetest.sound_stop(e.sh)
minetest.chat_send_player(e.p:get_player_name(), "You have to stand still for " .. warps_freeze .. " seconds!")
table.remove(warps_queue, i)
end
@ -62,7 +66,8 @@ local warp_queue_add = function(player, dest)
t = minetest.get_us_time() + ( warps_freeze * 1000000 ),
pos = player:getpos(),
p = player,
w = dest
w = dest,
sh = minetest.sound_play("warps_woosh", { pos = player:getpos() })
})
minetest.chat_send_player(player:get_player_name(), "Don't move for " .. warps_freeze .. " seconds!")
if queue_state == 0 then
@ -195,7 +200,7 @@ minetest.register_node("warps:warpstone", {
walkable = false,
paramtype = "light",
groups = { choppy=3 },
light_source = 5,
light_source = 8,
selection_box = {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.5, 0.25}

10
sounds/LICENSE Normal file
View File

@ -0,0 +1,10 @@
File: warps_plop.ogg
Original: 19987__acclivity__fingerplop1.flac
Url: https://www.freesound.org/people/acclivity/sounds/19987/
License: CC-BY-NC-3.0
File: warps_woosh.ogg
Original: 112837__dymewiz__whoosh-21.wav
Url: https://www.freesound.org/people/Dymewiz/sounds/112837/
License: CC-BY-3.0

BIN
sounds/warps_plop.ogg Normal file

Binary file not shown.

BIN
sounds/warps_woosh.ogg Normal file

Binary file not shown.