mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 17:32:42 +08:00
* 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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user