Add portal teleportation sound
This commit is contained in:
parent
657851125f
commit
bcee6a0c6a
4 changed files with 18 additions and 6 deletions
|
@ -278,9 +278,7 @@ minetest.register_abm({
|
|||
return
|
||||
end
|
||||
|
||||
obj:setpos(target3)
|
||||
minetest.sound_play("tng_transporter1", {pos=target3,gain=0.5,max_hear_distance = 8,}) -- maikerumine added sound when travel
|
||||
|
||||
-- Build destination
|
||||
local function check_and_build_end_portal(pos, target3)
|
||||
local n = minetest.get_node_or_nil(target3)
|
||||
if n and n.name ~= "mcl_portals:portal_end" then
|
||||
|
@ -294,6 +292,10 @@ minetest.register_abm({
|
|||
|
||||
minetest.after(1, check_and_build_end_portal, pos, target3)
|
||||
|
||||
-- Teleport
|
||||
obj:setpos(target3)
|
||||
minetest.sound_play("mcl_portals_teleport", {pos=target3, gain=0.5, max_hear_distance = 16})
|
||||
|
||||
end, obj, pos, target3)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue