Replace some sound PlayEntity with PlayPvs (#34317)
This commit is contained in:
@@ -356,6 +356,11 @@ public sealed partial class ExplosionSystem : SharedExplosionSystem
|
||||
// + if the bomb is big enough, people outside of it too
|
||||
// this is capped to 30 because otherwise really huge bombs
|
||||
// will attempt to play regular audio for people who can't hear it anyway because the epicenter is so far away
|
||||
//
|
||||
// TODO EXPLOSION redo this.
|
||||
// Use the Filter.Pvs range-multiplier option instead of AddInRange.
|
||||
// Also the default PVS range is 25*2 = 50. So capping it at 30 makes no sense here.
|
||||
// So actually maybe don't use Filter.Pvs at all and only use AddInRange?
|
||||
var audioRange = Math.Min(iterationIntensity.Count * 2, MaxExplosionAudioRange);
|
||||
var filter = Filter.Pvs(pos).AddInRange(pos, audioRange);
|
||||
var sound = iterationIntensity.Count < queued.Proto.SmallSoundIterationThreshold
|
||||
|
||||
Reference in New Issue
Block a user