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

httptests
UbitUmarov 2018-04-10 07:27:10 +01:00
parent 5d0a1656bf
commit 63418349e5
2 changed files with 5 additions and 2 deletions

View File

@ -5971,7 +5971,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#endregion PrimFlags #endregion PrimFlags
if (part.Sound != UUID.Zero) if (part.Sound != UUID.Zero || part.SoundFlags != 0)
{ {
update.Sound = part.Sound; update.Sound = part.Sound;
update.OwnerID = part.OwnerID; update.OwnerID = part.OwnerID;

View File

@ -131,6 +131,8 @@ namespace OpenSim.Region.CoreModules.World.Sound
if (!m_scene.TryGetSceneObjectPart(objectID, out part)) if (!m_scene.TryGetSceneObjectPart(objectID, out part))
return; return;
part.SoundFlags = 0;
SceneObjectGroup grp = part.ParentGroup; SceneObjectGroup grp = part.ParentGroup;
if (radius == 0) if (radius == 0)
@ -199,6 +201,8 @@ namespace OpenSim.Region.CoreModules.World.Sound
} }
} }
part.SoundFlags = 0;
if (radius == 0) if (radius == 0)
radius = MaxDistance; radius = MaxDistance;
@ -225,7 +229,6 @@ namespace OpenSim.Region.CoreModules.World.Sound
private static void StopSound(SceneObjectPart m_host) private static void StopSound(SceneObjectPart m_host)
{ {
// m_host.AdjustSoundGain(0);
m_host.Sound = UUID.Zero; m_host.Sound = UUID.Zero;
m_host.SoundFlags = (byte)SoundFlags.STOP; m_host.SoundFlags = (byte)SoundFlags.STOP;
m_host.SoundRadius = 0; m_host.SoundRadius = 0;