Merge pull request #8689 from Verkister/patch-93

Fixes ancient oversight in recursive explosions
This commit is contained in:
Spookerton
2022-08-26 09:20:57 +01:00
committed by GitHub
+3 -7
View File
@@ -94,12 +94,8 @@
if(power <= 0)
return
if(src in explosion_turfs)
return
explosion_turfs |= src
if(explosion_turfs[src] >= power)
return //The turf already sustained and spread a power greated than what we are dealing with. No point spreading again.
if(explosion_turfs[src] >= power)
return //The turf already sustained and spread a power greated than what we are dealing with. No point spreading again.
explosion_turfs[src] = power
var/spread_power = power - src.explosion_resistance //This is the amount of power that will be spread to the tile in the direction of the blast
@@ -112,7 +108,7 @@
T = get_step(src, turn(direction,90))
T.explosion_spread(spread_power, turn(direction,90), explosion_turfs)
T = get_step(src, turn(direction,-90))
T.explosion_spread(spread_power, turn(direction,90), explosion_turfs)
T.explosion_spread(spread_power, turn(direction,-90), explosion_turfs)
/turf/unsimulated/explosion_spread(power)
return //So it doesn't get to the parent proc, which simulates explosions