@@ -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 << "<span class='danger'>You feel the station's structure shaking all around you.</span>"
|
||||
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 = ""
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user