aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorSignpostMarv2012-10-15 15:09:45 +0100
committerJustin Clark-Casey (justincc)2012-10-29 23:38:59 +0000
commit57940087d125cf817d1d2492145dc224439434ad (patch)
tree304b9fcc1febda5fd50c6bfee50a870bb2234e81 /OpenSim/Region/Framework/Scenes
parentFormatting SoundModuleNonShared.LoopSound, consistent indentation (diff)
downloadopensim-SC_OLD-57940087d125cf817d1d2492145dc224439434ad.zip
opensim-SC_OLD-57940087d125cf817d1d2492145dc224439434ad.tar.gz
opensim-SC_OLD-57940087d125cf817d1d2492145dc224439434ad.tar.bz2
opensim-SC_OLD-57940087d125cf817d1d2492145dc224439434ad.tar.xz
Factoring out a superfluous local variable & repeated assignment in SceneObjectPart.SendSound as linksets are only meant to have a single owner
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs18
1 files changed, 8 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 681c725..240cfa5 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 ownerID = OwnerID;
2663 UUID objectID = ParentGroup.RootPart.UUID; 2662 UUID objectID = ParentGroup.RootPart.UUID;
2664 UUID parentID = ParentGroup.UUID; 2663 UUID parentID = ParentGroup.UUID;
2665 2664
@@ -2691,22 +2690,21 @@ namespace OpenSim.Region.Framework.Scenes
2691 if (isMaster) 2690 if (isMaster)
2692 { 2691 {
2693 if (triggered) 2692 if (triggered)
2694 soundModule.TriggerSound(soundID, ownerID, objectID, parentID, volume, position, regionHandle, radius); 2693 soundModule.TriggerSound(soundID, OwnerID, objectID, parentID, volume, position, regionHandle, radius);
2695 else 2694 else
2696 soundModule.PlayAttachedSound(soundID, ownerID, objectID, volume, position, flags, radius); 2695 soundModule.PlayAttachedSound(soundID, OwnerID, objectID, volume, position, flags, radius);
2697 ParentGroup.PlaySoundMasterPrim = this; 2696 ParentGroup.PlaySoundMasterPrim = this;
2698 if (triggered) 2697 if (triggered)
2699 soundModule.TriggerSound(soundID, ownerID, objectID, parentID, volume, position, regionHandle, radius); 2698 soundModule.TriggerSound(soundID, OwnerID, objectID, parentID, volume, position, regionHandle, radius);
2700 else 2699 else
2701 soundModule.PlayAttachedSound(soundID, ownerID, objectID, volume, position, flags, radius); 2700 soundModule.PlayAttachedSound(soundID, OwnerID, objectID, volume, position, flags, radius);
2702 foreach (SceneObjectPart prim in ParentGroup.PlaySoundSlavePrims) 2701 foreach (SceneObjectPart prim in ParentGroup.PlaySoundSlavePrims)
2703 { 2702 {
2704 ownerID = prim.OwnerID;
2705 position = prim.AbsolutePosition; // region local 2703 position = prim.AbsolutePosition; // region local
2706 if (triggered) 2704 if (triggered)
2707 soundModule.TriggerSound(soundID, ownerID, objectID, parentID, volume, position, regionHandle, radius); 2705 soundModule.TriggerSound(soundID, OwnerID, objectID, parentID, volume, position, regionHandle, radius);
2708 else 2706 else
2709 soundModule.PlayAttachedSound(soundID, ownerID, objectID, volume, position, flags, radius); 2707 soundModule.PlayAttachedSound(soundID, OwnerID, objectID, volume, position, flags, radius);
2710 } 2708 }
2711 ParentGroup.PlaySoundSlavePrims.Clear(); 2709 ParentGroup.PlaySoundSlavePrims.Clear();
2712 ParentGroup.PlaySoundMasterPrim = null; 2710 ParentGroup.PlaySoundMasterPrim = null;
@@ -2719,9 +2717,9 @@ namespace OpenSim.Region.Framework.Scenes
2719 else 2717 else
2720 { 2718 {
2721 if (triggered) 2719 if (triggered)
2722 soundModule.TriggerSound(soundID, ownerID, objectID, parentID, volume, position, regionHandle, radius); 2720 soundModule.TriggerSound(soundID, OwnerID, objectID, parentID, volume, position, regionHandle, radius);
2723 else 2721 else
2724 soundModule.PlayAttachedSound(soundID, ownerID, objectID, volume, position, flags, radius); 2722 soundModule.PlayAttachedSound(soundID, OwnerID, objectID, volume, position, flags, radius);
2725 } 2723 }
2726 } 2724 }
2727 2725