Misc audio and related changes for replays (#12578)

This commit is contained in:
Leon Friedrich
2022-11-22 13:49:48 +13:00
committed by GitHub
parent d6be5d2df3
commit 6917b0fe17
30 changed files with 64 additions and 50 deletions

View File

@@ -105,16 +105,10 @@ public sealed class DoorSystem : SharedDoorSystem
if (predicted && predictingPlayer == null)
return;
var filter = Filter.Pvs(uid);
if (predicted)
{
// This interaction is predicted, but only by the instigating user, who will have played their own sounds.
filter.RemoveWhereAttachedEntity(e => e == predictingPlayer);
}
// send the sound to players.
Audio.Play(soundSpecifier, filter, uid, audioParams);
Audio.PlayPredicted(soundSpecifier, uid, predictingPlayer, audioParams);
else
Audio.PlayPvs(soundSpecifier, uid, audioParams);
}
#region DoAfters