From 78bec422259671ad72ad46ca98ab8029b78aefe5 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Fri, 29 May 2009 22:44:49 +0000 Subject: * 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) --- .../OptionalModules/Scripting/Minimodule/SOPObject.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs') 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 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; @@ -638,5 +638,20 @@ 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 } } -- cgit v1.1