From af39af1cc407b88d6d2838acff09de77d4a4335d Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Mon, 15 Oct 2012 16:11:26 +0100 Subject: fixing a bug in SceneObjectPart.SendSound where sounds would always come from the root prim rather than the source prim --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 240cfa5..5da4207 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -2659,7 +2659,6 @@ namespace OpenSim.Region.Framework.Scenes volume = Util.Clip((float)volume, 0, 1); - UUID objectID = ParentGroup.RootPart.UUID; UUID parentID = ParentGroup.UUID; UUID soundID = UUID.Zero; @@ -2690,21 +2689,21 @@ namespace OpenSim.Region.Framework.Scenes if (isMaster) { if (triggered) - soundModule.TriggerSound(soundID, OwnerID, objectID, parentID, volume, position, regionHandle, radius); + soundModule.TriggerSound(soundID, OwnerID, UUID, parentID, volume, position, regionHandle, radius); else - soundModule.PlayAttachedSound(soundID, OwnerID, objectID, volume, position, flags, radius); + soundModule.PlayAttachedSound(soundID, OwnerID, UUID, volume, position, flags, radius); ParentGroup.PlaySoundMasterPrim = this; if (triggered) - soundModule.TriggerSound(soundID, OwnerID, objectID, parentID, volume, position, regionHandle, radius); + soundModule.TriggerSound(soundID, OwnerID, UUID, parentID, volume, position, regionHandle, radius); else - soundModule.PlayAttachedSound(soundID, OwnerID, objectID, volume, position, flags, radius); + soundModule.PlayAttachedSound(soundID, OwnerID, UUID, volume, position, flags, radius); foreach (SceneObjectPart prim in ParentGroup.PlaySoundSlavePrims) { position = prim.AbsolutePosition; // region local if (triggered) - soundModule.TriggerSound(soundID, OwnerID, objectID, parentID, volume, position, regionHandle, radius); + soundModule.TriggerSound(soundID, OwnerID, prim.UUID, parentID, volume, position, regionHandle, radius); else - soundModule.PlayAttachedSound(soundID, OwnerID, objectID, volume, position, flags, radius); + soundModule.PlayAttachedSound(soundID, OwnerID, prim.UUID, volume, position, flags, radius); } ParentGroup.PlaySoundSlavePrims.Clear(); ParentGroup.PlaySoundMasterPrim = null; @@ -2717,9 +2716,9 @@ namespace OpenSim.Region.Framework.Scenes else { if (triggered) - soundModule.TriggerSound(soundID, OwnerID, objectID, parentID, volume, position, regionHandle, radius); + soundModule.TriggerSound(soundID, OwnerID, UUID, parentID, volume, position, regionHandle, radius); else - soundModule.PlayAttachedSound(soundID, OwnerID, objectID, volume, position, flags, radius); + soundModule.PlayAttachedSound(soundID, OwnerID, UUID, volume, position, flags, radius); } } -- cgit v1.1