diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index 6ca8e7598e..a3b79f41a1 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -43,6 +43,8 @@ // Calculate far explosion sound range. Only allow the sound effect for heavy/devastating explosions. // 3/7/14 will calculate to 80 + 35 + var/skip_shake = 0 //Will not shake screen + var/explosion_shake_message_cooldown = 0 //Will not display shaking-related messages var/far_dist = 0 far_dist += heavy_impact_range * 5 far_dist += devastation_range * 20 @@ -62,7 +64,19 @@ else if(dist <= far_dist) var/far_volume = Clamp(far_dist, 30, 50) // Volume is based on explosion size and dist far_volume += (dist <= far_dist * 0.5 ? 50 : 0) // add 50 volume if the mob is pretty close to the explosion - M.playsound_local(epicenter, 'sound/effects/explosionfar.ogg', far_volume, 1, frequency, falloff = 5) + if(devastation_range > 0) + M.playsound_local(epicenter, 'sound/effects/explosionfar.ogg', far_volume, 1, frequency, falloff = 5) + shake_camera(M, 3, 1) + else + M.playsound_local(epicenter, 'sound/effects/explosionsmallfar.ogg', far_volume, 1, frequency, falloff = 5) + skip_shake = 1 + + if(!explosion_shake_message_cooldown && devastation_range > 0 && !skip_shake) + M << "You feel the station's structure shaking all around you." + explosion_shake_message_cooldown = 1 + spawn(50) + explosion_shake_message_cooldown = 0 + //postpone processing for a bit var/postponeCycles = max(round(devastation_range/8),1) @@ -240,5 +254,3 @@ for(var/turf/T in wipe_colours) T.color = null T.maptext = "" - - diff --git a/sound/effects/explosionfar.ogg b/sound/effects/explosionfar.ogg index a2834885dd..aecdd0aab1 100644 Binary files a/sound/effects/explosionfar.ogg and b/sound/effects/explosionfar.ogg differ diff --git a/sound/effects/explosionsmallfar.ogg b/sound/effects/explosionsmallfar.ogg new file mode 100644 index 0000000000..1fa4039758 Binary files /dev/null and b/sound/effects/explosionsmallfar.ogg differ