From ea3b035e5b45ba81a50d5432d6af2438634f5db5 Mon Sep 17 00:00:00 2001 From: Robson Richards Date: Sun, 17 Nov 2013 12:03:05 +0000 Subject: [PATCH 1/2] Fixes the issue in explosion.dm --- code/game/objects/explosion.dm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index a095f7bff6a..e9bf379f2ac 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -73,6 +73,8 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa else if(dist < light_impact_range) dist = 3 else dist = 0 +/* + if(flame_dist && prob(40) && !istype(T, /turf/space)) new /obj/effect/hotspot(T) //Mostly for ambience! hotspot_exists = 1 @@ -88,6 +90,31 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa if(dist) AM.ex_act(dist) +*/ + + //------- TURF FIRES -------\\ + if(T) + if(flame_dist && prob(40) && !istype(T, /turf/space)) + new/obj/effect/hotspot(T) //Mostly for ambience! + hotspot_exists = 1 + if(dist) + T.ex_act(dist) + + //------- THINGS IN TURFS FIRES -------\\ + + for(var/atom_movable in T.contents) //bypass type checking since only atom/movable can be contained by turfs anyway + var/atom/movable/AM = atom_movable + + if(AM) //Something is in side T (We have already checked T exists above) - RR + if(flame_dist) //if it has flame distance, run this - RR + if(isliving(AM) && !hotspot_exists && !istype(T, /turf/space)) + new /obj/effect/hotspot(AM.loc) + //Just in case we missed a mob while they were in flame_range, but a hotspot didn't spawn on them, otherwise it looks weird when you just burst into flame out of nowhere + if(dist) //if no flame_dist, run this - RR + AM.ex_act(dist) + + + var/took = (world.timeofday-start)/10 //You need to press the DebugGame verb to see these now....they were getting annoying and we've collected a fair bit of data. Just -test- changes to explosion code using this please so we can compare if(Debug2) world.log << "## DEBUG: Explosion([x0],[y0],[z0])(d[devastation_range],h[heavy_impact_range],l[light_impact_range]): Took [took] seconds." From 5685c9ed6e16e694486e1e35ccc9a8b7f3cf2c9b Mon Sep 17 00:00:00 2001 From: Robson Richards Date: Sun, 17 Nov 2013 12:14:21 +0000 Subject: [PATCH 2/2] Removes old method instead of commenting it out --- code/game/objects/explosion.dm | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index e9bf379f2ac..e29e530d018 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -73,24 +73,6 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa else if(dist < light_impact_range) dist = 3 else dist = 0 -/* - - if(flame_dist && prob(40) && !istype(T, /turf/space)) - new /obj/effect/hotspot(T) //Mostly for ambience! - hotspot_exists = 1 - if(dist) - T.ex_act(dist) - if(T) - for(var/atom_movable in T.contents) //bypass type checking since only atom/movable can be contained by turfs anyway - var/atom/movable/AM = atom_movable - if(flame_dist) - if(isliving(AM) && !hotspot_exists && !istype(T, /turf/space)) - new /obj/effect/hotspot(AM.loc) - //Just in case we missed a mob while they were in flame_range, but a hotspot didn't spawn on them, otherwise it looks weird when you just burst into flame out of nowhere - if(dist) - AM.ex_act(dist) - -*/ //------- TURF FIRES -------\\ if(T) @@ -105,7 +87,7 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa for(var/atom_movable in T.contents) //bypass type checking since only atom/movable can be contained by turfs anyway var/atom/movable/AM = atom_movable - if(AM) //Something is in side T (We have already checked T exists above) - RR + if(AM) //Something is inside T (We have already checked T exists above) - RR if(flame_dist) //if it has flame distance, run this - RR if(isliving(AM) && !hotspot_exists && !istype(T, /turf/space)) new /obj/effect/hotspot(AM.loc)