From fbfb21a09292d5dfb47f741adffce9f3cf0112c7 Mon Sep 17 00:00:00 2001 From: EgorDinamit <53223414+EgorDinamit@users.noreply.github.com> Date: Fri, 9 Feb 2024 21:47:56 +0300 Subject: [PATCH] Explosion runtime fix (#533) --- code/game/objects/explosion_recursive.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/game/objects/explosion_recursive.dm b/code/game/objects/explosion_recursive.dm index a6161202e93..51e50339d6d 100644 --- a/code/game/objects/explosion_recursive.dm +++ b/code/game/objects/explosion_recursive.dm @@ -3,7 +3,7 @@ var/list/explosion_turfs = list() var/explosion_in_progress = 0 -proc/explosion_rec(turf/epicenter, power, shaped) +/proc/explosion_rec(turf/epicenter, power, shaped) var/loopbreak = 0 while(explosion_in_progress) if(loopbreak >= 15) return @@ -22,6 +22,9 @@ proc/explosion_rec(turf/epicenter, power, shaped) //This steap handles the gathering of turfs which will be ex_act() -ed in the next step. It also ensures each turf gets the maximum possible amount of power dealt to it. for(var/direction in GLOB.cardinal) var/turf/T = get_step(epicenter, direction) + if(!istype(T)) + return + var/adj_power = power - epicenter.get_explosion_resistance() if(shaped) if (shaped == direction)