Use TRUE emphemeral sounds
parent
5dd6dc0993
commit
d10efa7dc4
10
init.lua
10
init.lua
|
@ -60,7 +60,7 @@ function teletool.teleport(player, pointed_thing)
|
||||||
maxsize=1.25,
|
maxsize=1.25,
|
||||||
texture = "teletool_particle_departure.png",
|
texture = "teletool_particle_departure.png",
|
||||||
})
|
})
|
||||||
minetest.sound_play( {name="teletool_teleport1", gain=1}, {pos=src, max_hear_distance=12}, false)
|
minetest.sound_play( {name="teletool_teleport1", gain=1}, {pos=src, max_hear_distance=12}, true)
|
||||||
|
|
||||||
player:setpos(dest)
|
player:setpos(dest)
|
||||||
minetest.add_particlespawner({
|
minetest.add_particlespawner({
|
||||||
|
@ -76,7 +76,7 @@ function teletool.teleport(player, pointed_thing)
|
||||||
maxsize=1.25,
|
maxsize=1.25,
|
||||||
texture = "teletool_particle_arrival.png",
|
texture = "teletool_particle_arrival.png",
|
||||||
})
|
})
|
||||||
minetest.after(0.5, function(dest) minetest.sound_play( {name="teletool_teleport2", gain=1}, {pos=dest, max_hear_distance=12}, false) end, dest)
|
minetest.after(0.5, function(dest) minetest.sound_play( {name="teletool_teleport2", gain=1}, {pos=dest, max_hear_distance=12}, true) end, dest)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
@ -104,7 +104,7 @@ minetest.register_tool("teletool:teletool_infinite", {
|
||||||
failure = true
|
failure = true
|
||||||
end
|
end
|
||||||
if failure then
|
if failure then
|
||||||
minetest.sound_play( {name="teletool_fail", gain=0.5}, {pos=user:getpos(), max_hear_distance=4}, false)
|
minetest.sound_play( {name="teletool_fail", gain=0.5}, {pos=user:getpos(), max_hear_distance=4}, true)
|
||||||
end
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
end,
|
end,
|
||||||
|
@ -148,7 +148,7 @@ if(minetest.get_modpath("technic")) then
|
||||||
failure = true
|
failure = true
|
||||||
end
|
end
|
||||||
if failure then
|
if failure then
|
||||||
minetest.sound_play( {name="teletool_fail", gain=0.5}, {pos=user:getpos(), max_hear_distance=4}, false)
|
minetest.sound_play( {name="teletool_fail", gain=0.5}, {pos=user:getpos(), max_hear_distance=4}, true)
|
||||||
end
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
end,
|
end,
|
||||||
|
@ -189,7 +189,7 @@ if(minetest.get_modpath("mana") ~= nil) then
|
||||||
failure = true
|
failure = true
|
||||||
end
|
end
|
||||||
if failure then
|
if failure then
|
||||||
minetest.sound_play( {name="teletool_fail", gain=0.5}, {pos=user:getpos(), max_hear_distance=4}, false)
|
minetest.sound_play( {name="teletool_fail", gain=0.5}, {pos=user:getpos(), max_hear_distance=4}, true)
|
||||||
end
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in New Issue