Compare commits

...

2 Commits

Author SHA1 Message Date
cbed55ea99 Merge branch 'nalc-1.5.0' 2022-07-17 18:30:16 +02:00
a4c2cd3187 Fix portal detection and coords with Minetest 5.5.x 2022-07-17 18:25:34 +02:00

View File

@ -264,6 +264,8 @@ end
local function is_hellportal(pos) local function is_hellportal(pos)
local x, y, z = pos.x, pos.y, pos.z local x, y, z = pos.x, pos.y, pos.z
if y < 0 then y = y+1 end
for _,i in pairs({-1, 3}) do for _,i in pairs({-1, 3}) do
if minetest.get_node({x=x, y=y+i, z=z}).name ~= "hell:white" then if minetest.get_node({x=x, y=y+i, z=z}).name ~= "hell:white" then
return return
@ -364,7 +366,7 @@ local function hell_port(player, pos)
else else
y = my or portal_target+math.random(4) y = my or portal_target+math.random(4)
end end
destination_pos.y = y - 0.3 destination_pos.y = y + 0.7
player_to_hell(player, destination_pos) player_to_hell(player, destination_pos)
end end