forked from VoxeLibre/VoxeLibre
Only play tele sound for players
This commit is contained in:
parent
3abf2355e6
commit
71be25f44a
|
@ -339,10 +339,10 @@ minetest.register_abm({
|
||||||
-- Look towards the End island
|
-- Look towards the End island
|
||||||
if obj:is_player() and dim ~= "end" then
|
if obj:is_player() and dim ~= "end" then
|
||||||
obj:set_look_horizontal(math.pi/2)
|
obj:set_look_horizontal(math.pi/2)
|
||||||
end
|
|
||||||
minetest.sound_play("mcl_portals_teleport", {pos=target, gain=0.5, max_hear_distance = 16})
|
minetest.sound_play("mcl_portals_teleport", {pos=target, gain=0.5, max_hear_distance = 16})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -434,7 +434,9 @@ minetest.register_abm({
|
||||||
|
|
||||||
-- Teleport
|
-- Teleport
|
||||||
obj:setpos(target)
|
obj:setpos(target)
|
||||||
|
if obj:is_player() then
|
||||||
minetest.sound_play("mcl_portals_teleport", {pos=target, gain=0.5, max_hear_distance = 16})
|
minetest.sound_play("mcl_portals_teleport", {pos=target, gain=0.5, max_hear_distance = 16})
|
||||||
|
end
|
||||||
|
|
||||||
-- Enable teleportation cooloff for 4 seconds, to prevent back-and-forth teleportation
|
-- Enable teleportation cooloff for 4 seconds, to prevent back-and-forth teleportation
|
||||||
portal_cooloff[obj] = true
|
portal_cooloff[obj] = true
|
||||||
|
|
Loading…
Reference in New Issue