Merge pull request #4645 from Citadel-Station-13/upstream-merge-34023
[MIRROR] Less is more - Nerfs explosion camera shake
This commit is contained in:
@@ -118,16 +118,19 @@ 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)
|
||||
// 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)
|
||||
shake_camera(M, 25, min(orig_max_distance - dist, 100))
|
||||
if(baseshakeamount > 0)
|
||||
shake_camera(M, 25, CLAMP(baseshakeamount, 0, 10))
|
||||
// You hear a far explosion if you're outside the blast radius. Small bombs shouldn't be heard all over the station.
|
||||
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, null, far_volume, 1, frequency, falloff = 5, S = far_explosion_sound)
|
||||
shake_camera(M, 10, min(orig_max_distance - dist, 50))
|
||||
if(baseshakeamount > 0)
|
||||
shake_camera(M, 10, CLAMP(baseshakeamount*0.25, 0, 2.5))
|
||||
EX_PREPROCESS_CHECK_TICK
|
||||
|
||||
//postpone processing for a bit
|
||||
|
||||
Reference in New Issue
Block a user