From c63661871f7eb2fbaccd58909aaef4447641363c Mon Sep 17 00:00:00 2001 From: deathride58 Date: Fri, 5 Jan 2018 01:52:13 +0000 Subject: [PATCH] Fixes explosion runtimes (#34091) * fixes explosion runtimes * cyka --- code/datums/explosion.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/datums/explosion.dm b/code/datums/explosion.dm index 15e20a9762..4df616169b 100644 --- a/code/datums/explosion.dm +++ b/code/datums/explosion.dm @@ -118,7 +118,9 @@ GLOBAL_LIST_EMPTY(explosions) var/turf/M_turf = get_turf(M) if(M_turf && M_turf.z == z0) var/dist = get_dist(M_turf, epicenter) - var/baseshakeamount = sqrt((orig_max_distance - dist)*0.1) + var/baseshakeamount + if(orig_max_distance - dist > 0) + baseshakeamount = sqrt((orig_max_distance - dist)*0.1) // If inside the blast radius + world.view - 2 if(dist <= round(max_range + world.view - 2, 1)) M.playsound_local(epicenter, null, 100, 1, frequency, falloff = 5, S = explosion_sound)