From 8045e45e85a9c113a1aee684ef81913b7afeee9e Mon Sep 17 00:00:00 2001
From: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Date: Mon, 11 Jan 2021 19:16:12 -0800
Subject: [PATCH] Makes jaunting work properly again (#56028)
Fixes an if check that was checking the area flags of a turf. Prevents a runtime in phased_check, and makes the area noteleport flag work properly. These were introduced by #55973
---
code/game/objects/effects/phased_mob.dm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/code/game/objects/effects/phased_mob.dm b/code/game/objects/effects/phased_mob.dm
index 05b9f6d2141..e04aebbb365 100644
--- a/code/game/objects/effects/phased_mob.dm
+++ b/code/game/objects/effects/phased_mob.dm
@@ -10,7 +10,10 @@
/obj/effect/dummy/phased_mob/Destroy()
// Eject contents if deleted somehow
- var/area/destination_area = get_turf(src)
+ var/atom/dest = drop_location()
+ if(!dest) //You're in nullspace you clown
+ return ..()
+ var/area/destination_area = get_area(dest)
var/failed_areacheck = FALSE
if(destination_area.area_flags & NOTELEPORT)
failed_areacheck = TRUE
@@ -47,15 +50,16 @@
if (movedelay > world.time || !direction)
return
var/turf/newloc = get_step(src,direction)
- var/area/destination_area = newloc.loc
if(!newloc)
return
+ var/area/destination_area = newloc.loc
movedelay = world.time + movespeed
if(newloc.flags_1 & NOJAUNT_1)
to_chat(user, "Some strange aura is blocking the way.")
return
if(destination_area.area_flags & NOTELEPORT)
to_chat(user, "Some dull, universal force is blocking the way. It's overwhelmingly oppressive force feels dangerous.")
+ return
return newloc
/// React to signals by deleting the effect. Used for bloodcrawl.