1
0
mirror of https://github.com/HybridDog/nether-pack.git synced 2025-06-28 06:12:06 +02:00

fix player doesnt hear nether teleporter sound, thanks to @crabman77

This commit is contained in:
HybridDog
2015-12-28 18:38:09 +01:00
parent 40997320b0
commit 1e0bcbb709
4 changed files with 29 additions and 12 deletions

View File

@ -222,6 +222,7 @@ minetest.register_abm({
nodenames = {"nether:portal"},
interval = 1,
chance = 2,
catch_up = false,
action = function(pos, node)
if not abm_allowed then
return
@ -535,10 +536,13 @@ function nether_port(player, pos)
minetest.sound_play("nether_teleporter", {pos=pos})
if pos.y < nether.start then
player_from_nether(player)
player:moveto({x=pos.x, y=100, z=pos.z})
pos.y = 100
player:moveto(pos)
else
player:moveto({x=pos.x, y=portal_target+math.random(4), z=pos.z})
pos.y = portal_target+math.random(4)
player:moveto(pos)
player_to_nether(player, true)
end
minetest.sound_play("nether_teleporter", {pos=pos})
return true
end