From b42cfe49a2f4e95687eb76381ed911515ef2e3b2 Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Fri, 5 Oct 2012 14:37:01 +0100 Subject: Replacing double-if block in SceneObjectPart.SendSound with Util.Clip --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 27ef4c9..a539eff 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -2684,10 +2684,7 @@ namespace OpenSim.Region.Framework.Scenes /// public void SendSound(string sound, double volume, bool triggered, byte flags, float radius, bool useMaster, bool isMaster) { - if (volume > 1) - volume = 1; - if (volume < 0) - volume = 0; + volume = Util.Clip((float)volume, 0, 1); UUID ownerID = OwnerID; UUID objectID = ParentGroup.RootPart.UUID; -- cgit v1.1