diff options
author | SignpostMarv | 2012-10-15 16:11:26 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-10-29 23:39:00 +0000 |
commit | af39af1cc407b88d6d2838acff09de77d4a4335d (patch) | |
tree | d80ab67fdf1ee07b1c25365f4a255d5c691c3d40 | |
parent | Factoring out a superfluous local variable & repeated assignment in SceneObje... (diff) | |
download | opensim-SC_OLD-af39af1cc407b88d6d2838acff09de77d4a4335d.zip opensim-SC_OLD-af39af1cc407b88d6d2838acff09de77d4a4335d.tar.gz opensim-SC_OLD-af39af1cc407b88d6d2838acff09de77d4a4335d.tar.bz2 opensim-SC_OLD-af39af1cc407b88d6d2838acff09de77d4a4335d.tar.xz |
fixing a bug in SceneObjectPart.SendSound where sounds would always come from the root prim rather than the source prim
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 17 |
1 files changed, 8 insertions, 9 deletions
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 | |||
2659 | 2659 | ||
2660 | volume = Util.Clip((float)volume, 0, 1); | 2660 | volume = Util.Clip((float)volume, 0, 1); |
2661 | 2661 | ||
2662 | UUID objectID = ParentGroup.RootPart.UUID; | ||
2663 | UUID parentID = ParentGroup.UUID; | 2662 | UUID parentID = ParentGroup.UUID; |
2664 | 2663 | ||
2665 | UUID soundID = UUID.Zero; | 2664 | UUID soundID = UUID.Zero; |
@@ -2690,21 +2689,21 @@ namespace OpenSim.Region.Framework.Scenes | |||
2690 | if (isMaster) | 2689 | if (isMaster) |
2691 | { | 2690 | { |
2692 | if (triggered) | 2691 | if (triggered) |
2693 | soundModule.TriggerSound(soundID, OwnerID, objectID, parentID, volume, position, regionHandle, radius); | 2692 | soundModule.TriggerSound(soundID, OwnerID, UUID, parentID, volume, position, regionHandle, radius); |
2694 | else | 2693 | else |
2695 | soundModule.PlayAttachedSound(soundID, OwnerID, objectID, volume, position, flags, radius); | 2694 | soundModule.PlayAttachedSound(soundID, OwnerID, UUID, volume, position, flags, radius); |
2696 | ParentGroup.PlaySoundMasterPrim = this; | 2695 | ParentGroup.PlaySoundMasterPrim = this; |
2697 | if (triggered) | 2696 | if (triggered) |
2698 | soundModule.TriggerSound(soundID, OwnerID, objectID, parentID, volume, position, regionHandle, radius); | 2697 | soundModule.TriggerSound(soundID, OwnerID, UUID, parentID, volume, position, regionHandle, radius); |
2699 | else | 2698 | else |
2700 | soundModule.PlayAttachedSound(soundID, OwnerID, objectID, volume, position, flags, radius); | 2699 | soundModule.PlayAttachedSound(soundID, OwnerID, UUID, volume, position, flags, radius); |
2701 | foreach (SceneObjectPart prim in ParentGroup.PlaySoundSlavePrims) | 2700 | foreach (SceneObjectPart prim in ParentGroup.PlaySoundSlavePrims) |
2702 | { | 2701 | { |
2703 | position = prim.AbsolutePosition; // region local | 2702 | position = prim.AbsolutePosition; // region local |
2704 | if (triggered) | 2703 | if (triggered) |
2705 | soundModule.TriggerSound(soundID, OwnerID, objectID, parentID, volume, position, regionHandle, radius); | 2704 | soundModule.TriggerSound(soundID, OwnerID, prim.UUID, parentID, volume, position, regionHandle, radius); |
2706 | else | 2705 | else |
2707 | soundModule.PlayAttachedSound(soundID, OwnerID, objectID, volume, position, flags, radius); | 2706 | soundModule.PlayAttachedSound(soundID, OwnerID, prim.UUID, volume, position, flags, radius); |
2708 | } | 2707 | } |
2709 | ParentGroup.PlaySoundSlavePrims.Clear(); | 2708 | ParentGroup.PlaySoundSlavePrims.Clear(); |
2710 | ParentGroup.PlaySoundMasterPrim = null; | 2709 | ParentGroup.PlaySoundMasterPrim = null; |
@@ -2717,9 +2716,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2717 | else | 2716 | else |
2718 | { | 2717 | { |
2719 | if (triggered) | 2718 | if (triggered) |
2720 | soundModule.TriggerSound(soundID, OwnerID, objectID, parentID, volume, position, regionHandle, radius); | 2719 | soundModule.TriggerSound(soundID, OwnerID, UUID, parentID, volume, position, regionHandle, radius); |
2721 | else | 2720 | else |
2722 | soundModule.PlayAttachedSound(soundID, OwnerID, objectID, volume, position, flags, radius); | 2721 | soundModule.PlayAttachedSound(soundID, OwnerID, UUID, volume, position, flags, radius); |
2723 | } | 2722 | } |
2724 | } | 2723 | } |
2725 | 2724 | ||