mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user