From abe866f2d0fdf410c780cfaec671a10cabfa343f Mon Sep 17 00:00:00 2001 From: tkdrg Date: Sun, 14 Dec 2014 11:07:39 -0300 Subject: [PATCH] Fixes two runtimes Related to issue #6351 Fixes facehuggers checking oreboxes for stat. Fixes monkeys dropping HUDs runtime. --- code/modules/clothing/glasses/hud.dm | 2 +- code/modules/mob/living/carbon/alien/special/facehugger.dm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index e703f49756e..1935d89d50f 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -11,7 +11,7 @@ H.add_hud_to(user) /obj/item/clothing/glasses/hud/dropped(mob/living/carbon/human/user) - if(user.glasses == src) + if(istype(user) && user.glasses == src) var/datum/atom_hud/H = huds[hud_type] H.remove_hud_from(user) diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index f854529c8e1..4860105322b 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -228,7 +228,7 @@ var/const/MAX_ACTIVE_TIME = 400 return /proc/CanHug(var/mob/M) - if(!M) + if(!istype(M)) return 0 if(M.stat == DEAD) return 0