From 54dc6e8ffbcefa99c22dc1faf68e39d83365f3aa Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 17 Aug 2017 01:33:36 +0200 Subject: [PATCH] Remove some portal hackery --- mods/MAPGEN/mcl_portals/portal_end.lua | 5 ++--- mods/MAPGEN/mcl_portals/portal_nether.lua | 4 +--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/mods/MAPGEN/mcl_portals/portal_end.lua b/mods/MAPGEN/mcl_portals/portal_end.lua index 1119814c8..d9cc1b64d 100644 --- a/mods/MAPGEN/mcl_portals/portal_end.lua +++ b/mods/MAPGEN/mcl_portals/portal_end.lua @@ -274,11 +274,11 @@ minetest.register_abm({ minetest.emerge_area( vector.subtract(target3, 4), vector.add(target3, 4)) end + -- teleport the player minetest.after(3, function(obj, pos, target3) local objpos = obj:getpos() if objpos == nil then return end --maikerumine added for objects to travel - objpos.y = objpos.y + 0.1 -- Fix some glitches at -8000. FIXME: WTF? if minetest.get_node(objpos).name ~= "mcl_portals:portal_end" then return end @@ -289,13 +289,12 @@ minetest.register_abm({ if n and n.name ~= "mcl_portals:portal_end" then build_end_portal(target3, pos) minetest.after(2, check_and_build_end_portal, pos, target3) - minetest.after(4, check_and_build_end_portal, pos, target3) elseif not n then minetest.after(1, check_and_build_end_portal, pos, target3) end end - minetest.after(1, check_and_build_end_portal, pos, target3) + check_and_build_end_portal(pos, target3) -- Teleport obj:setpos(target3) diff --git a/mods/MAPGEN/mcl_portals/portal_nether.lua b/mods/MAPGEN/mcl_portals/portal_nether.lua index c8c875eb0..21526e2e0 100644 --- a/mods/MAPGEN/mcl_portals/portal_nether.lua +++ b/mods/MAPGEN/mcl_portals/portal_nether.lua @@ -294,7 +294,6 @@ minetest.register_abm({ -- teleport the player minetest.after(3, function(obj, pos, target) local objpos = obj:getpos() if objpos == nil then return end --maikerumine added for objects to travel - objpos.y = objpos.y + 0.1 -- Fix some glitches at -8000 if minetest.get_node(objpos).name ~= "mcl_portals:portal" then return end @@ -305,13 +304,12 @@ minetest.register_abm({ if n and n.name ~= "mcl_portals:portal" then build_portal(target, pos) minetest.after(2, check_and_build_portal, pos, target) - minetest.after(4, check_and_build_portal, pos, target) elseif not n then minetest.after(1, check_and_build_portal, pos, target) end end - minetest.after(1, check_and_build_portal, pos, target) + check_and_build_portal(pos, target) -- Teleport obj:setpos(target)