From 034a54cc627f6476b46470a98259d2cb1c4994f9 Mon Sep 17 00:00:00 2001 From: Rob Nelson Date: Tue, 25 Feb 2014 21:54:39 -0800 Subject: [PATCH] Fix some fire issues. (Implements Redmine #135) --- code/modules/mob/living/living_defense.dm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index abc51b30d93..38461045782 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -159,10 +159,16 @@ fire_stacks = min(0, fire_stacks)//So we dry ourselves back to default, nonflammable. if(!on_fire) return 1 - var/datum/gas_mixture/G = loc.return_air() // Check if we're standing in an oxygenless environment - if(G.oxygen < 1) + + var/oxy=0 + var/turf/T=loc + if(istype(T)) + var/datum/gas_mixture/G = loc.return_air() // Check if we're standing in an oxygenless environment + if(G) + oxy=G.oxygen + if(oxy < 1 || fire_stacks <= 0) ExtinguishMob() //If there's no oxygen in the tile we're on, put out the fire - return + return 1 var/turf/location = get_turf(src) location.hotspot_expose(700, 50, 1)