diff options
author | alondria | 2008-03-22 23:02:41 +0000 |
---|---|---|
committer | alondria | 2008-03-22 23:02:41 +0000 |
commit | 5ebef6410eeef54e1bd3d00331996daba78aa534 (patch) | |
tree | a43204b7a152b00170a9c5a7754908eee74ed58e /OpenSim/Region/Environment | |
parent | * Miscellaneous comment before I found out that mantis 807 probably isn't an ... (diff) | |
download | opensim-SC-5ebef6410eeef54e1bd3d00331996daba78aa534.zip opensim-SC-5ebef6410eeef54e1bd3d00331996daba78aa534.tar.gz opensim-SC-5ebef6410eeef54e1bd3d00331996daba78aa534.tar.bz2 opensim-SC-5ebef6410eeef54e1bd3d00331996daba78aa534.tar.xz |
Implements llLoopSound(), llStopSound(), and llAdjustSoundVolume().
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index ea20725..51a633e 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -1739,7 +1739,21 @@ namespace OpenSim.Region.Environment.Scenes | |||
1739 | } | 1739 | } |
1740 | } | 1740 | } |
1741 | 1741 | ||
1742 | public void SendSound(string sound, double volume, bool triggered) | 1742 | public void AdjustSoundGain(double volume) |
1743 | { | ||
1744 | if (volume > 1) | ||
1745 | volume = 1; | ||
1746 | if (volume < 0) | ||
1747 | volume = 0; | ||
1748 | |||
1749 | List<ScenePresence> avatarts = m_parentGroup.Scene.GetAvatars(); | ||
1750 | foreach (ScenePresence p in avatarts) | ||
1751 | { | ||
1752 | p.ControllingClient.SendAttachedSoundGainChange(UUID, (float)volume); | ||
1753 | } | ||
1754 | } | ||
1755 | |||
1756 | public void SendSound(string sound, double volume, bool triggered, byte flags) | ||
1743 | { | 1757 | { |
1744 | if (volume > 1) | 1758 | if (volume > 1) |
1745 | volume = 1; | 1759 | volume = 1; |
@@ -1753,7 +1767,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1753 | LLVector3 position = AbsolutePosition; // region local | 1767 | LLVector3 position = AbsolutePosition; // region local |
1754 | ulong regionHandle = m_parentGroup.Scene.RegionInfo.RegionHandle; | 1768 | ulong regionHandle = m_parentGroup.Scene.RegionInfo.RegionHandle; |
1755 | 1769 | ||
1756 | byte flags = 0; | 1770 | //byte flags = 0; |
1757 | 1771 | ||
1758 | if (!LLUUID.TryParse(sound, out soundID)) | 1772 | if (!LLUUID.TryParse(sound, out soundID)) |
1759 | { | 1773 | { |