From a940110dee35b8f298f5b7acfd9746e74ba2caee Mon Sep 17 00:00:00 2001 From: Linzolle Date: Thu, 28 Nov 2019 20:51:50 -0600 Subject: [PATCH] spawn instead of sleep --- .../chemistry/reagents/medicine_reagents.dm | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index 294292c359..dc752dd373 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -903,23 +903,24 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M) M.do_jitter_animation(10) addtimer(CALLBACK(M, /mob/living/carbon.proc/do_jitter_animation, 10), 40) //jitter immediately, then again after 4 and 8 seconds addtimer(CALLBACK(M, /mob/living/carbon.proc/do_jitter_animation, 10), 80) - sleep(100) //so the ghost has time to re-enter + spawn(100) //so the ghost has time to re-enter + if(iscarbon(M)) + var/mob/living/carbon/C = M + if(!(C.dna && C.dna.species && (NOBLOOD in C.dna.species.species_traits))) + C.blood_volume = max(C.blood_volume, BLOOD_VOLUME_NORMAL) //so you don't instantly re-die from a lack of blood + for(var/organ in C.internal_organs) + var/obj/item/organ/O = organ + if(O.damage > O.maxHealth/2) + O.setOrganDamage(O.maxHealth/2) //so you don't instantly die from organ damage when being revived - if(iscarbon(M)) - var/mob/living/carbon/C = M - if(!(C.dna && C.dna.species && (NOBLOOD in C.dna.species.species_traits))) - C.blood_volume = max(C.blood_volume, BLOOD_VOLUME_NORMAL) //so you don't instantly re-die from a lack of blood - for(var/organ in C.internal_organs) - var/obj/item/organ/O = organ - O.setOrganDamage(0) //so you don't near-instantly re-die because your heart has decayed to the point of complete failure - - M.adjustOxyLoss(-20, 0) - M.adjustToxLoss(-20, 0) - M.updatehealth() - if(M.revive(full_heal = FALSE, admin_revive = FALSE)) - M.emote("gasp") - log_combat(M, M, "revived", src) + M.adjustOxyLoss(-20, 0) + M.adjustToxLoss(-20, 0) + M.updatehealth() + if(M.revive(full_heal = FALSE, admin_revive = FALSE)) + M.grab_ghost() + M.emote("gasp") + log_combat(M, M, "revived", src) ..()