parent
01ff3c9f9f
commit
4b0c5711b5
|
@ -129,6 +129,11 @@ namespace OpenSim.Region.CoreModules.Media.Moap
|
|||
part.ScheduleFullUpdate();
|
||||
}
|
||||
|
||||
public void ClearMediaEntry(SceneObjectPart part, int face)
|
||||
{
|
||||
SetMediaEntry(part, face, null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets or gets per face media textures.
|
||||
/// </summary>
|
||||
|
|
|
@ -53,5 +53,15 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
/// <param name="face"></param>
|
||||
/// <param name="me"></param>
|
||||
void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me);
|
||||
|
||||
/// <summary>
|
||||
/// Clear the media entry for a given prim face.
|
||||
/// </summary>
|
||||
///
|
||||
/// This is the equivalent of setting a media entry of null
|
||||
///
|
||||
/// <param name="part"></param>
|
||||
/// <param name="face">/param>
|
||||
void ClearMediaEntry(SceneObjectPart part, int face);
|
||||
}
|
||||
}
|
|
@ -8023,6 +8023,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
return ScriptBaseClass.LSL_STATUS_OK;
|
||||
}
|
||||
|
||||
public LSL_Integer llClearPrimMedia(LSL_Integer face)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
ScriptSleep(1000);
|
||||
|
||||
// LSL Spec http://wiki.secondlife.com/wiki/LlClearPrimMedia says to fail silently if face is invalid
|
||||
// Assuming silently fail means sending back LSL_STATUS_OK. Ideally, need to check this.
|
||||
// FIXME: Don't perform the media check directly
|
||||
if (face < 0 || face > m_host.GetNumberOfSides() - 1)
|
||||
return ScriptBaseClass.LSL_STATUS_OK;
|
||||
|
||||
IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>();
|
||||
if (null == module)
|
||||
throw new Exception("Media on a prim functions not available");
|
||||
|
||||
module.ClearMediaEntry(m_host, face);
|
||||
|
||||
return ScriptBaseClass.LSL_STATUS_OK;
|
||||
}
|
||||
|
||||
// <remarks>
|
||||
// <para>
|
||||
// The .NET definition of base 64 is:
|
||||
|
|
Loading…
Reference in New Issue