From 87cdc9042effb8dbd4ba7f02be5458ee93b8be8a Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Tue, 31 Aug 2021 07:06:14 +0200 Subject: [PATCH] fixes wormhole jaunter portals floating in space. (#61089) --- code/game/objects/effects/portals.dm | 3 +++ code/game/objects/items/teleportation.dm | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/code/game/objects/effects/portals.dm b/code/game/objects/effects/portals.dm index dd6105a50b6..cbf387fcf87 100644 --- a/code/game/objects/effects/portals.dm +++ b/code/game/objects/effects/portals.dm @@ -47,6 +47,9 @@ return FALSE return ..() +/obj/effect/portal/newtonian_move() // Prevents portals spawned by jaunter/handtele from floating into space when relocated to an adjacent tile. + return TRUE + /obj/effect/portal/attackby(obj/item/W, mob/user, params) if(user && Adjacent(user)) teleport(user) diff --git a/code/game/objects/items/teleportation.dm b/code/game/objects/items/teleportation.dm index df57c6edd8f..7c6e351bb9b 100644 --- a/code/game/objects/items/teleportation.dm +++ b/code/game/objects/items/teleportation.dm @@ -253,9 +253,7 @@ RegisterSignal(portal1, COMSIG_PARENT_QDELETING, .proc/on_portal_destroy) RegisterSignal(portal2, COMSIG_PARENT_QDELETING, .proc/on_portal_destroy) - var/turf/check_turf = get_turf(get_step(user, user.dir)) - if(check_turf.CanPass(user, get_dir(check_turf, user))) - portal1.forceMove(check_turf) + try_move_adjacent(portal1, user.dir) active_portal_pairs[portal1] = portal2 investigate_log("was used by [key_name(user)] at [AREACOORD(user)] to create a portal pair with destinations [AREACOORD(portal1)] and [AREACOORD(portal2)].", INVESTIGATE_PORTAL)