mirror of
https://github.com/minetest-mods/teleport-request.git
synced 2025-01-08 14:07:28 +01:00
Other players hear teleporter
Put it back to allowing nearby players to hear the teleport sound effect.
This commit is contained in:
parent
0c12e27341
commit
5c13b8b9ec
4
init.lua
4
init.lua
@ -128,7 +128,7 @@ local function tpc_send(player,coordinates)
|
|||||||
if minetest.check_player_privs(pname, {tp_admin=true}) then
|
if minetest.check_player_privs(pname, {tp_admin=true}) then
|
||||||
minetest.chat_send_player(player, 'Teleporting to '..posx..','..posy..','..posz)
|
minetest.chat_send_player(player, 'Teleporting to '..posx..','..posy..','..posz)
|
||||||
pname:setpos(find_free_position_near(target_coords))
|
pname:setpos(find_free_position_near(target_coords))
|
||||||
minetest.sound_play("whoosh", {pos = target_coords, gain = 0.5, to_player=player, max_hear_distance = 10})
|
minetest.sound_play("whoosh", {pos = target_coords, gain = 0.5, max_hear_distance = 10})
|
||||||
parti2(target_coords)
|
parti2(target_coords)
|
||||||
else
|
else
|
||||||
local protected = minetest.is_protected(target_coords,pname)
|
local protected = minetest.is_protected(target_coords,pname)
|
||||||
@ -141,7 +141,7 @@ local function tpc_send(player,coordinates)
|
|||||||
end
|
end
|
||||||
minetest.chat_send_player(player, 'Teleporting to '..posx..','..posy..','..posz)
|
minetest.chat_send_player(player, 'Teleporting to '..posx..','..posy..','..posz)
|
||||||
pname:setpos(find_free_position_near(target_coords))
|
pname:setpos(find_free_position_near(target_coords))
|
||||||
minetest.sound_play("whoosh", {pos = target_coords, gain = 0.5, to_player=player, max_hear_distance = 10})
|
minetest.sound_play("whoosh", {pos = target_coords, gain = 0.5, max_hear_distance = 10})
|
||||||
parti2(target_coords)
|
parti2(target_coords)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user