aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs1
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Object/IObjectSound.cs12
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs17
3 files changed, 29 insertions, 1 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs
index ef1e896..dd9cc29 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs
@@ -170,6 +170,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
170 170
171 IObjectPhysics Physics { get; } 171 IObjectPhysics Physics { get; }
172 172
173 IObjectSound Sound { get; }
173 174
174 /// <summary> 175 /// <summary>
175 /// Causes the object to speak to its surroundings, 176 /// Causes the object to speak to its surroundings,
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Object/IObjectSound.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Object/IObjectSound.cs
new file mode 100644
index 0000000..7204f02
--- /dev/null
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Object/IObjectSound.cs
@@ -0,0 +1,12 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenMetaverse;
5
6namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
7{
8 interface IObjectSound
9 {
10 void Play(UUID soundAsset, double volume);
11 }
12}
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
index f29522f..c1c255b 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
@@ -38,7 +38,7 @@ using SculptType=OpenSim.Region.OptionalModules.Scripting.Minimodule.Object.Scul
38 38
39namespace OpenSim.Region.OptionalModules.Scripting.Minimodule 39namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
40{ 40{
41 class SOPObject : MarshalByRefObject, IObject, IObjectPhysics, IObjectShape 41 class SOPObject : MarshalByRefObject, IObject, IObjectPhysics, IObjectShape, IObjectSound
42 { 42 {
43 private readonly Scene m_rootScene; 43 private readonly Scene m_rootScene;
44 private readonly uint m_localID; 44 private readonly uint m_localID;
@@ -638,5 +638,20 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
638 638
639 639
640 #endregion 640 #endregion
641
642
643 #region Implementation of IObjectSound
644
645 public IObjectSound Sound
646 {
647 get { return this; }
648 }
649
650 public void Play(UUID asset, double volume)
651 {
652 GetSOP().SendSound(asset.ToString(), volume, true, 0);
653 }
654
655 #endregion
641 } 656 }
642} 657}