From ccff89cdd1810cd3706aeb25fadc43954301ef28 Mon Sep 17 00:00:00 2001 From: Incoming Date: Wed, 6 May 2015 16:55:00 -0400 Subject: [PATCH] Fixes #3622 Also fixes an annoying unreported bug where jaunt always dumped you one tile away from where you actually reappeared --- code/datums/spells/ethereal_jaunt.dm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/datums/spells/ethereal_jaunt.dm b/code/datums/spells/ethereal_jaunt.dm index da2b438ebbb..fbbb7239740 100644 --- a/code/datums/spells/ethereal_jaunt.dm +++ b/code/datums/spells/ethereal_jaunt.dm @@ -19,7 +19,7 @@ for(var/mob/living/target in targets) target.notransform = 1 //protects the mob from being transformed (replaced) midjaunt and getting stuck in bluespace spawn(0) - var/mobloc = get_turf(target.loc) + var/turf/mobloc = get_turf(target.loc) var/obj/effect/dummy/spell_jaunt/holder = new /obj/effect/dummy/spell_jaunt( mobloc ) var/atom/movable/overlay/animation = new /atom/movable/overlay( mobloc ) animation.name = "water" @@ -36,6 +36,9 @@ target.notransform=0 //mob is safely inside holder now, no need for protection. jaunt_steam(mobloc) sleep(jaunt_duration) + if(target.loc != holder) //mob warped out of the warp + qdel(holder) + return mobloc = get_turf(target.loc) animation.loc = mobloc jaunt_steam(mobloc) @@ -44,7 +47,7 @@ sleep(20) jaunt_reappear(animation, target) sleep(5) - if(!target.Move(mobloc)) + if(mobloc.density) for(var/direction in list(1,2,4,8,5,6,9,10)) var/turf/T = get_step(mobloc, direction) if(T)