[MIRROR] Fixes the randomly failing unit test that sometimes happens. (#3746)

* Fixes the randomly failing unit test that sometimes happens. (#57266)

* Fixes the randomly failing unit test that sometimes happens.

Co-authored-by: Thalpy <33956696+Thalpy@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-03-01 22:29:21 +00:00
committed by GitHub
co-authored by Thalpy
parent 3c67f8076b
commit 89a5f7e7e4
2 changed files with 6 additions and 0 deletions
@@ -26,6 +26,8 @@
return ..()
/obj/projectile/curse_hand/fire(setAngle)
if(QDELETED(src)) //I'm going to try returning nothing because if it's being deleted, surely we don't want anything to happen?
return
if(starting)
arm = starting.Beam(src, icon_state = "curse[handedness]", beam_type=/obj/effect/ebeam/curse_arm)
..()
@@ -44,6 +46,8 @@
leftover.icon_state = icon_state
for(var/obj/effect/temp_visual/dir_setting/curse/grasp_portal/G in starting)
qdel(G)
if(!T) //T can be in nullspace when src is set to QDEL
return
new /obj/effect/temp_visual/dir_setting/curse/grasp_portal/fading(starting, dir)
var/datum/beam/D = starting.Beam(T, icon_state = "curse[handedness]", time = 32, beam_type=/obj/effect/ebeam/curse_arm)
animate(D.visuals, alpha = 0, time = 32)
@@ -82,6 +82,8 @@
playsound(spawn_turf, 'sound/effects/curse2.ogg', 80, TRUE, -1)
var/obj/projectile/curse_hand/hel/hand = new (spawn_turf)
hand.preparePixelProjectile(owner, spawn_turf)
if(QDELETED(hand)) //safety check if above fails - above has a stack trace if it does fail
return
hand.fire()
/datum/reagent/inverse/helgrasp/on_mob_delete(mob/living/owner)