Replacing double-if block in SceneObjectPart.SendSound with Util.Clip

integration
SignpostMarv 2012-10-05 14:37:01 +01:00 committed by Justin Clark-Casey (justincc)
parent 6440892788
commit b42cfe49a2
1 changed files with 1 additions and 4 deletions

View File

@ -2684,10 +2684,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="flags"></param> /// <param name="flags"></param>
public void SendSound(string sound, double volume, bool triggered, byte flags, float radius, bool useMaster, bool isMaster) public void SendSound(string sound, double volume, bool triggered, byte flags, float radius, bool useMaster, bool isMaster)
{ {
if (volume > 1) volume = Util.Clip((float)volume, 0, 1);
volume = 1;
if (volume < 0)
volume = 0;
UUID ownerID = OwnerID; UUID ownerID = OwnerID;
UUID objectID = ParentGroup.RootPart.UUID; UUID objectID = ParentGroup.RootPart.UUID;