From 0f592970b96e2c9138feaa1212a174d0cc3788d7 Mon Sep 17 00:00:00 2001 From: Albert Iordache Date: Sun, 8 Apr 2012 21:09:09 +0300 Subject: [PATCH] Fixed a death implant-related runtime error --- code/game/objects/items/weapons/implants/implant.dm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 7747ea5c531..cca25ab9d63 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -285,7 +285,13 @@ the implant may become unstable and either pre-maturely inject the subject or si process() var/mob/M = src.loc - if(M.stat == 2) + + if(isnull(M)) // If the mob got gibbed + var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null) + a.autosay("states, \"[mobname] has died-zzzzt in-in-in...\"", "[mobname]'s Death Alarm") + del(a) + processing_objects.Remove(src) + else if(M.stat == 2) var/turf/t = get_turf(M) var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null) a.autosay("states, \"[mobname] has died in [t.loc.name]!\"", "[mobname]'s Death Alarm")