Factoring out a superfluous local variable & repeated assignment in SceneObjectPart.SendSound as linksets are only meant to have a single owner
parent
e75596524a
commit
57940087d1
|
@ -2659,7 +2659,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
volume = Util.Clip((float)volume, 0, 1);
|
volume = Util.Clip((float)volume, 0, 1);
|
||||||
|
|
||||||
UUID ownerID = OwnerID;
|
|
||||||
UUID objectID = ParentGroup.RootPart.UUID;
|
UUID objectID = ParentGroup.RootPart.UUID;
|
||||||
UUID parentID = ParentGroup.UUID;
|
UUID parentID = ParentGroup.UUID;
|
||||||
|
|
||||||
|
@ -2691,22 +2690,21 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (isMaster)
|
if (isMaster)
|
||||||
{
|
{
|
||||||
if (triggered)
|
if (triggered)
|
||||||
soundModule.TriggerSound(soundID, ownerID, objectID, parentID, volume, position, regionHandle, radius);
|
soundModule.TriggerSound(soundID, OwnerID, objectID, parentID, volume, position, regionHandle, radius);
|
||||||
else
|
else
|
||||||
soundModule.PlayAttachedSound(soundID, ownerID, objectID, volume, position, flags, radius);
|
soundModule.PlayAttachedSound(soundID, OwnerID, objectID, volume, position, flags, radius);
|
||||||
ParentGroup.PlaySoundMasterPrim = this;
|
ParentGroup.PlaySoundMasterPrim = this;
|
||||||
if (triggered)
|
if (triggered)
|
||||||
soundModule.TriggerSound(soundID, ownerID, objectID, parentID, volume, position, regionHandle, radius);
|
soundModule.TriggerSound(soundID, OwnerID, objectID, parentID, volume, position, regionHandle, radius);
|
||||||
else
|
else
|
||||||
soundModule.PlayAttachedSound(soundID, ownerID, objectID, volume, position, flags, radius);
|
soundModule.PlayAttachedSound(soundID, OwnerID, objectID, volume, position, flags, radius);
|
||||||
foreach (SceneObjectPart prim in ParentGroup.PlaySoundSlavePrims)
|
foreach (SceneObjectPart prim in ParentGroup.PlaySoundSlavePrims)
|
||||||
{
|
{
|
||||||
ownerID = prim.OwnerID;
|
|
||||||
position = prim.AbsolutePosition; // region local
|
position = prim.AbsolutePosition; // region local
|
||||||
if (triggered)
|
if (triggered)
|
||||||
soundModule.TriggerSound(soundID, ownerID, objectID, parentID, volume, position, regionHandle, radius);
|
soundModule.TriggerSound(soundID, OwnerID, objectID, parentID, volume, position, regionHandle, radius);
|
||||||
else
|
else
|
||||||
soundModule.PlayAttachedSound(soundID, ownerID, objectID, volume, position, flags, radius);
|
soundModule.PlayAttachedSound(soundID, OwnerID, objectID, volume, position, flags, radius);
|
||||||
}
|
}
|
||||||
ParentGroup.PlaySoundSlavePrims.Clear();
|
ParentGroup.PlaySoundSlavePrims.Clear();
|
||||||
ParentGroup.PlaySoundMasterPrim = null;
|
ParentGroup.PlaySoundMasterPrim = null;
|
||||||
|
@ -2719,9 +2717,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (triggered)
|
if (triggered)
|
||||||
soundModule.TriggerSound(soundID, ownerID, objectID, parentID, volume, position, regionHandle, radius);
|
soundModule.TriggerSound(soundID, OwnerID, objectID, parentID, volume, position, regionHandle, radius);
|
||||||
else
|
else
|
||||||
soundModule.PlayAttachedSound(soundID, ownerID, objectID, volume, position, flags, radius);
|
soundModule.PlayAttachedSound(soundID, OwnerID, objectID, volume, position, flags, radius);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue