* Implements Sound on Objects for IObject in MRM

* Method: IObject.Sound.Play(UUID sound, double volume)
* More feature-packed API to come soon. (I want a World.Sound with arbitrary positioning)
This commit is contained in:
Adam Frisby
2009-05-29 22:44:49 +00:00
parent d0084f08f2
commit 78bec42225
3 changed files with 29 additions and 1 deletions

View File

@@ -38,7 +38,7 @@ using SculptType=OpenSim.Region.OptionalModules.Scripting.Minimodule.Object.Scul
namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
{
class SOPObject : MarshalByRefObject, IObject, IObjectPhysics, IObjectShape
class SOPObject : MarshalByRefObject, IObject, IObjectPhysics, IObjectShape, IObjectSound
{
private readonly Scene m_rootScene;
private readonly uint m_localID;
@@ -637,6 +637,21 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
}
#endregion
#region Implementation of IObjectSound
public IObjectSound Sound
{
get { return this; }
}
public void Play(UUID asset, double volume)
{
GetSOP().SendSound(asset.ToString(), volume, true, 0);
}
#endregion
}
}