Merge pull request #1808 from RobRichards1997/17/11/2013-Turret_Runtime_Fix

Fixes Turret/Atom Moveable Explosion Runtime [BUGFIX]
This commit is contained in:
Aranclanos
2013-11-24 22:55:24 -08:00

View File

@@ -99,20 +99,29 @@ 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)
//------- 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(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)
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)
//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