From 406652afd408b0c2f80ef654c0200d07865afdb0 Mon Sep 17 00:00:00 2001 From: 4DPlanner <3combined@gmail.com> Date: Thu, 27 Apr 2017 01:51:41 +0100 Subject: [PATCH 1/2] Adds death checks to two hallucinations --- code/modules/flufftext/Hallucination.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index cd034a11174..98fdeeb11c7 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -178,7 +178,7 @@ Gunshots/explosions/opening doors/less rare audio (done) /obj/effect/hallucination/simple/xeno/throw_impact(A) update_icon("alienh_pounce") - if(A == target) + if(A == target && target.stat!=DEAD) target.Weaken(5) target.visible_message("[target] flails around wildly.","[name] pounces on you!") @@ -287,6 +287,7 @@ Gunshots/explosions/opening doors/less rare audio (done) sleep(10) //ominous wait var/charged = FALSE //only get hit once while(get_turf(bubblegum) != landing && target) + if(target.stat==DEAD)break bubblegum.forceMove(get_step_towards(bubblegum, landing)) bubblegum.setDir(get_dir(bubblegum, landing)) target.playsound_local(get_turf(bubblegum), 'sound/effects/meteorimpact.ogg', 150, 1) From cabdc9ae9bdb4cbfe4ace770cf0cb61ad2bb922b Mon Sep 17 00:00:00 2001 From: 4DPlanner <3combined@gmail.com> Date: Thu, 27 Apr 2017 01:55:57 +0100 Subject: [PATCH 2/2] Using unnecessary breaks is ugly --- code/modules/flufftext/Hallucination.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 98fdeeb11c7..4c1328a38b0 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -286,8 +286,7 @@ Gunshots/explosions/opening doors/less rare audio (done) bubblegum = new(wall, target) sleep(10) //ominous wait var/charged = FALSE //only get hit once - while(get_turf(bubblegum) != landing && target) - if(target.stat==DEAD)break + while(get_turf(bubblegum) != landing && target && target.stat != DEAD) bubblegum.forceMove(get_step_towards(bubblegum, landing)) bubblegum.setDir(get_dir(bubblegum, landing)) target.playsound_local(get_turf(bubblegum), 'sound/effects/meteorimpact.ogg', 150, 1)