diff --git a/code/game/sound.dm b/code/game/sound.dm index fa9a41ebb5e..a39e34ee3f9 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -1,28 +1,3 @@ - -///Default override for echo -/sound - echo = list( - 0, // Direct - 0, // DirectHF - -10000, // Room, -10000 means no low frequency sound reverb - -10000, // RoomHF, -10000 means no high frequency sound reverb - 0, // Obstruction - 0, // ObstructionLFRatio - 0, // Occlusion - 0.25, // OcclusionLFRatio - 1.5, // OcclusionRoomRatio - 1.0, // OcclusionDirectRatio - 0, // Exclusion - 1.0, // ExclusionLFRatio - 0, // OutsideVolumeHF - 0, // DopplerFactor - 0, // RolloffFactor - 0, // RoomRolloffFactor - 1.0, // AirAbsorptionFactor - 0, // Flags (1 = Auto Direct, 2 = Auto Room, 4 = Auto RoomHF) - ) - environment = SOUND_ENVIRONMENT_NONE //Default to none so sounds without overrides dont get reverb - /** * playsound is a proc used to play a 3D sound in a specific range. This uses SOUND_RANGE + extra_range to determine that. * @@ -185,9 +160,10 @@ var/area/A = get_area(src) sound_to_use.environment = A.sound_environment - if(use_reverb && sound_to_use.environment != SOUND_ENVIRONMENT_NONE) //We have reverb, reset our echo setting - sound_to_use.echo[3] = 0 //Room setting, 0 means normal reverb - sound_to_use.echo[4] = 0 //RoomHF setting, 0 means normal reverb. + if(!use_reverb || sound_to_use.environment == SOUND_ENVIRONMENT_NONE) + sound_to_use.echo ||= new /list(18) + sound_to_use.echo[3] = -10000 + sound_to_use.echo[4] = -10000 if(HAS_TRAIT(src, TRAIT_SOUND_DEBUGGED)) to_chat(src, span_admin("Max Range-[max_distance] Distance-[distance] Vol-[round(sound_to_use.volume, 0.01)] Sound-[sound_to_use.file]"))