diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 89e85a0..3f77f38 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -218,6 +218,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
218 | } | 218 | } |
219 | } | 219 | } |
220 | 220 | ||
221 | /// <summary> | ||
222 | /// Initialize the LSL interface. | ||
223 | /// </summary> | ||
224 | /// <remarks> | ||
225 | /// FIXME: This is an abomination. We should be able to set this up earlier but currently we have no | ||
226 | /// guarantee the interface is present on Initialize(). There needs to be another post initialize call from | ||
227 | /// ScriptInstance. | ||
228 | /// </remarks> | ||
221 | private void InitLSL() | 229 | private void InitLSL() |
222 | { | 230 | { |
223 | if (m_LSL_Api != null) | 231 | if (m_LSL_Api != null) |
@@ -1616,7 +1624,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1616 | 1624 | ||
1617 | public Object osParseJSONNew(string JSON) | 1625 | public Object osParseJSONNew(string JSON) |
1618 | { | 1626 | { |
1619 | CheckThreatLevel(ThreatLevel.None, "osParseJSON"); | 1627 | CheckThreatLevel(ThreatLevel.None, "osParseJSONNew"); |
1620 | 1628 | ||
1621 | m_host.AddScriptLPS(1); | 1629 | m_host.AddScriptLPS(1); |
1622 | 1630 | ||
@@ -3139,5 +3147,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3139 | estate.setEstateTerrainTextureHeights(corner, (float)low, (float)high); | 3147 | estate.setEstateTerrainTextureHeights(corner, (float)low, (float)high); |
3140 | } | 3148 | } |
3141 | } | 3149 | } |
3150 | |||
3151 | public void osForceAttachToAvatar(int attachmentPoint) | ||
3152 | { | ||
3153 | CheckThreatLevel(ThreatLevel.High, "osForceAttachToAvatar"); | ||
3154 | |||
3155 | m_host.AddScriptLPS(1); | ||
3156 | |||
3157 | InitLSL(); | ||
3158 | ((LSL_Api)m_LSL_Api).AttachToAvatar(attachmentPoint); | ||
3159 | } | ||
3160 | |||
3161 | public void osForceDetachFromAvatar() | ||
3162 | { | ||
3163 | CheckThreatLevel(ThreatLevel.High, "osForceDetachFromAvatar"); | ||
3164 | |||
3165 | m_host.AddScriptLPS(1); | ||
3166 | |||
3167 | InitLSL(); | ||
3168 | ((LSL_Api)m_LSL_Api).DetachFromAvatar(); | ||
3169 | } | ||
3142 | } | 3170 | } |
3143 | } | 3171 | } |