Fixes explosions

At least worked fine on local in all tests and types of explosions i tested out (admin and weldertank) in wilderness and on station.
I suppose it had been a byond change after all that hadn't been quite as lenient with fucked up unindented archaic shapes of code.
Probably gonna shove it upstreams as well if it happens to do the trick on live as well.
This commit is contained in:
Verkister
2022-05-28 18:39:39 +03:00
committed by GitHub
parent 6a01e67020
commit 52656780e5

View File

@@ -78,16 +78,21 @@
for(var/turf/T in trange(max_range, epicenter))
var/dist = sqrt((T.x - x0)**2 + (T.y - y0)**2)
if(dist < devastation_range) dist = 1
else if(dist < heavy_impact_range) dist = 2
else if(dist < light_impact_range) dist = 3
else continue
if(dist < devastation_range)
dist = 1
else if(dist < heavy_impact_range)
dist = 2
else if(dist < light_impact_range)
dist = 3
else
continue
if(!T)
T = locate(x0,y0,z0)
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 && AM.simulated) AM.ex_act(dist)
if(AM && AM.simulated)
AM.ex_act(dist)
T.ex_act(dist)