From 63418349e5d8723b977d447a0fbf9d85c1490338 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 10 Apr 2018 07:27:10 +0100 Subject: mantis 8275: fix llStopSound for llPlaySound. Code was doing as SL wiki but not as not real regions with FireStorm. Singularity will only stop loop sounds. None stops Trigger --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 2 +- OpenSim/Region/CoreModules/World/Sound/SoundModule.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index cd687aa..437f772 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -5971,7 +5971,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP #endregion PrimFlags - if (part.Sound != UUID.Zero) + if (part.Sound != UUID.Zero || part.SoundFlags != 0) { update.Sound = part.Sound; update.OwnerID = part.OwnerID; diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs index 2b7db18..662e3fe 100644 --- a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs +++ b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs @@ -131,6 +131,8 @@ namespace OpenSim.Region.CoreModules.World.Sound if (!m_scene.TryGetSceneObjectPart(objectID, out part)) return; + part.SoundFlags = 0; + SceneObjectGroup grp = part.ParentGroup; if (radius == 0) @@ -199,6 +201,8 @@ namespace OpenSim.Region.CoreModules.World.Sound } } + part.SoundFlags = 0; + if (radius == 0) radius = MaxDistance; @@ -225,7 +229,6 @@ namespace OpenSim.Region.CoreModules.World.Sound private static void StopSound(SceneObjectPart m_host) { -// m_host.AdjustSoundGain(0); m_host.Sound = UUID.Zero; m_host.SoundFlags = (byte)SoundFlags.STOP; m_host.SoundRadius = 0; -- cgit v1.1