add proper way for viewers to request mute of collision sounds by setting flag 0x80 on agent update Flags (const U8 AU_FLAGS_MUTECOLLISIONS = 0x80;). Their current method of comparing sound UUIDS is just BROKEN, even at SL.

This commit is contained in:
UbitUmarov
2022-05-10 14:14:33 +01:00
parent f1f6c2094e
commit 61085cc25e
5 changed files with 70 additions and 11 deletions

View File

@@ -2916,19 +2916,19 @@ namespace OpenSim.Region.Framework.Scenes
if (soundID.IsZero())
return;
int now = Util.EnvironmentTickCount();
if (Util.EnvironmentTickCountSubtract(now, LastColSoundSentTime) < 200)
return;
ISoundModule soundModule = ParentGroup.Scene.RequestModuleInterface<ISoundModule>();
if (soundModule == null)
return;
if (volume > 1)
volume = 1;
if (volume < 0)
else if (volume < 0)
volume = 0;
int now = Util.EnvironmentTickCount();
if(Util.EnvironmentTickCountSubtract(now, LastColSoundSentTime) < 200)
return;
LastColSoundSentTime = now;
UUID ownerID = OwnerID;
@@ -2936,7 +2936,7 @@ namespace OpenSim.Region.Framework.Scenes
UUID parentID = ParentGroup.UUID;
ulong regionHandle = ParentGroup.Scene.RegionInfo.RegionHandle;
soundModule.TriggerSound(soundID, ownerID, objectID, parentID, volume, position, regionHandle);
soundModule.TriggerCollisionSound(soundID, ownerID, objectID, parentID, volume, position, regionHandle);
}
public void PhysicsOutOfBounds(Vector3 pos)