diff options
author | Justin Clark-Casey (justincc) | 2010-07-12 22:00:45 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-07-26 23:34:20 +0100 |
commit | 39a38c4901f00eae15c2eed38191944f8f419f8b (patch) | |
tree | c7da1d3f05cab0d27d96217ee8d971a885949151 /OpenSim/Region/ScriptEngine/Shared | |
parent | fix issue with GetMediaEntry if the face requested wasn't set to a media texture (diff) | |
download | opensim-SC_OLD-39a38c4901f00eae15c2eed38191944f8f419f8b.zip opensim-SC_OLD-39a38c4901f00eae15c2eed38191944f8f419f8b.tar.gz opensim-SC_OLD-39a38c4901f00eae15c2eed38191944f8f419f8b.tar.bz2 opensim-SC_OLD-39a38c4901f00eae15c2eed38191944f8f419f8b.tar.xz |
implement llClearPrimMedia()
untested
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index f5089aa..8903c3b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -8023,6 +8023,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8023 | return ScriptBaseClass.LSL_STATUS_OK; | 8023 | return ScriptBaseClass.LSL_STATUS_OK; |
8024 | } | 8024 | } |
8025 | 8025 | ||
8026 | public LSL_Integer llClearPrimMedia(LSL_Integer face) | ||
8027 | { | ||
8028 | m_host.AddScriptLPS(1); | ||
8029 | ScriptSleep(1000); | ||
8030 | |||
8031 | // LSL Spec http://wiki.secondlife.com/wiki/LlClearPrimMedia says to fail silently if face is invalid | ||
8032 | // Assuming silently fail means sending back LSL_STATUS_OK. Ideally, need to check this. | ||
8033 | // FIXME: Don't perform the media check directly | ||
8034 | if (face < 0 || face > m_host.GetNumberOfSides() - 1) | ||
8035 | return ScriptBaseClass.LSL_STATUS_OK; | ||
8036 | |||
8037 | IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>(); | ||
8038 | if (null == module) | ||
8039 | throw new Exception("Media on a prim functions not available"); | ||
8040 | |||
8041 | module.ClearMediaEntry(m_host, face); | ||
8042 | |||
8043 | return ScriptBaseClass.LSL_STATUS_OK; | ||
8044 | } | ||
8045 | |||
8026 | // <remarks> | 8046 | // <remarks> |
8027 | // <para> | 8047 | // <para> |
8028 | // The .NET definition of base 64 is: | 8048 | // The .NET definition of base 64 is: |