From fa5aa6761015c31528bfa3d19968d788e8c384fa Mon Sep 17 00:00:00 2001 From: Verkister Date: Tue, 1 Dec 2020 22:12:22 +0200 Subject: [PATCH] Fixes unreachable landmarks breaking spacetravel Adds a sanity check to prevent overmap spacetravel locking onto unreachable landmarks (such as other shuttles and such that are docked inside other landmarks and thus not on the overmap itself) and getting killed by a runtime. --- code/modules/overmap/spacetravel.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/modules/overmap/spacetravel.dm b/code/modules/overmap/spacetravel.dm index 5d9d62b331..e11ce36c9e 100644 --- a/code/modules/overmap/spacetravel.dm +++ b/code/modules/overmap/spacetravel.dm @@ -83,6 +83,10 @@ proc/overmap_spacetravel(var/turf/space/T, var/atom/movable/A) if (!M) return + // Is the landmark still on the map. + if(!isturf(M.loc)) + return + // Don't let AI eyes yeet themselves off the map if(istype(A, /mob/observer/eye)) return