From bbef690c12475f8a985160f7432b8c3a5d6b8166 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 12 Oct 2022 06:24:34 +0200 Subject: [PATCH] [MIRROR] Fixes runtime when ghosts press the deathgasp emote hotkey [MDB IGNORE] (#16796) * Fixes runtime when ghosts press the deathgasp emote hotkey (#70334) The following runtime has occurred 1 time(s). runtime error: undefined variable /mob/dead/observer/var/death_message proc name: run emote (/datum/emote/living/deathgasp/run_emote) source file: emote.dm,119 usr: Jimmy Little (/mob/dead/observer) src: /datum/emote/living/deathgasp (/datum/emote/living/deathgasp) #69007 removed the living sanity check. * Fixes runtime when ghosts press the deathgasp emote hotkey Co-authored-by: ShizCalev --- code/modules/mob/living/emote.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index ed29eea88bc..ef352536f49 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -117,6 +117,8 @@ stat_allowed = HARD_CRIT /datum/emote/living/deathgasp/run_emote(mob/living/user, params, type_override, intentional) + if(!is_type_in_typecache(user, mob_type_allowed_typecache)) + return if(user.death_message) message_simple = user.death_message . = ..()