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 | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index fe94b79..3f261ea 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -209,6 +209,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
209 | throw new Exception("OSSL Runtime Error: " + msg); | 209 | throw new Exception("OSSL Runtime Error: " + msg); |
210 | } | 210 | } |
211 | 211 | ||
212 | /// <summary> | ||
213 | /// Initialize the LSL interface. | ||
214 | /// </summary> | ||
215 | /// <remarks> | ||
216 | /// FIXME: This is an abomination. We should be able to set this up earlier but currently we have no | ||
217 | /// guarantee the interface is present on Initialize(). There needs to be another post initialize call from | ||
218 | /// ScriptInstance. | ||
219 | /// </remarks> | ||
212 | private void InitLSL() | 220 | private void InitLSL() |
213 | { | 221 | { |
214 | if (m_LSL_Api != null) | 222 | if (m_LSL_Api != null) |
@@ -3093,5 +3101,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3093 | estate.setEstateTerrainTextureHeights(corner, (float)low, (float)high); | 3101 | estate.setEstateTerrainTextureHeights(corner, (float)low, (float)high); |
3094 | } | 3102 | } |
3095 | } | 3103 | } |
3104 | |||
3105 | public void osForceAttachToAvatar(int attachmentPoint) | ||
3106 | { | ||
3107 | CheckThreatLevel(ThreatLevel.High, "osForceAttachToAvatar"); | ||
3108 | |||
3109 | m_host.AddScriptLPS(1); | ||
3110 | |||
3111 | InitLSL(); | ||
3112 | ((LSL_Api)m_LSL_Api).AttachToAvatar(attachmentPoint); | ||
3113 | } | ||
3114 | |||
3115 | public void osForceDetachFromAvatar() | ||
3116 | { | ||
3117 | CheckThreatLevel(ThreatLevel.High, "osForceDetachFromAvatar"); | ||
3118 | |||
3119 | m_host.AddScriptLPS(1); | ||
3120 | |||
3121 | InitLSL(); | ||
3122 | ((LSL_Api)m_LSL_Api).DetachFromAvatar(); | ||
3123 | } | ||
3096 | } | 3124 | } |
3097 | } \ No newline at end of file | 3125 | } \ No newline at end of file |