diff options
author | Justin Clark-Casey (justincc) | 2012-04-24 00:03:57 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-04-24 00:03:57 +0100 |
commit | 40e37d8b78379db08de541c8c7a9fed1d22ec5ef (patch) | |
tree | 99881c116648c2347c9c5951cd2734b5f5c1c09f /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-40e37d8b78379db08de541c8c7a9fed1d22ec5ef.zip opensim-SC_OLD-40e37d8b78379db08de541c8c7a9fed1d22ec5ef.tar.gz opensim-SC_OLD-40e37d8b78379db08de541c8c7a9fed1d22ec5ef.tar.bz2 opensim-SC_OLD-40e37d8b78379db08de541c8c7a9fed1d22ec5ef.tar.xz |
Add osForceAttachToAvatar() and osForceDetachFromAvatar()
These behave identically to llAttachToAvatar() and llDetachFromAvatar() except that they do not enforce the PERMISSION_ATTACH check
Intended for use in completely controlled dedicated environments where these checks are more a UI hinderance than a help.
Threat level high.
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 |