mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-21 23:48:15 +03:00
Replace some sound PlayEntity with PlayPvs (#34317)
(cherry picked from commit 7ae7821213b7b3a528649da1772bc9af80c8584e)
This commit is contained in:
@@ -367,6 +367,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