diff options
author | SignpostMarv | 2012-07-31 14:45:23 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-10-02 22:14:46 +0100 |
commit | 35b7c80e0ba876649c606d5d047fcb59754372ea (patch) | |
tree | 127ca02385e606d3c6dea61fe9646104c410409a /OpenSim/Region/ScriptEngine/Shared/Api/Implementation | |
parent | string format arguments in wrong order (diff) | |
download | opensim-SC_OLD-35b7c80e0ba876649c606d5d047fcb59754372ea.zip opensim-SC_OLD-35b7c80e0ba876649c606d5d047fcb59754372ea.tar.gz opensim-SC_OLD-35b7c80e0ba876649c606d5d047fcb59754372ea.tar.bz2 opensim-SC_OLD-35b7c80e0ba876649c606d5d047fcb59754372ea.tar.xz |
implementing osDropAttachment & osDropAttachmentAt
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 8b73cd9..fec8a67 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -3549,6 +3549,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3549 | if (m_UrlModule != null) | 3549 | if (m_UrlModule != null) |
3550 | m_UrlModule.HttpContentType(new UUID(id),type); | 3550 | m_UrlModule.HttpContentType(new UUID(id),type); |
3551 | } | 3551 | } |
3552 | 3552 | ||
3553 | } | 3553 | public void osDropAttachment() |
3554 | { | ||
3555 | CheckThreatLevel(ThreatLevel.Moderate, "osDropAttachment"); | ||
3556 | m_host.AddScriptLPS(1); | ||
3557 | |||
3558 | IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule; | ||
3559 | ScenePresence sp = attachmentsModule == null ? null : m_host.ParentGroup.Scene.GetScenePresence(m_host.ParentGroup.OwnerID); | ||
3560 | |||
3561 | if (attachmentsModule != null && sp != null) | ||
3562 | { | ||
3563 | attachmentsModule.DetachSingleAttachmentToGround(sp, m_host.ParentGroup.LocalId); | ||
3564 | } | ||
3565 | } | ||
3566 | |||
3567 | public void osDropAttachmentAt(LSL_Vector pos, LSL_Rotation rot) | ||
3568 | { | ||
3569 | CheckThreatLevel(ThreatLevel.Moderate, "osDropAttachment"); | ||
3570 | m_host.AddScriptLPS(1); | ||
3571 | |||
3572 | IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule; | ||
3573 | ScenePresence sp = attachmentsModule == null ? null : m_host.ParentGroup.Scene.GetScenePresence(m_host.ParentGroup.OwnerID); | ||
3574 | |||
3575 | if (attachmentsModule != null && sp != null) | ||
3576 | { | ||
3577 | Vector3 omvPos = new Vector3((float)pos.x, (float)pos.y, (float)pos.z); | ||
3578 | Quaternion omvRot = LSL_Api.Rot2Quaternion(rot); | ||
3579 | attachmentsModule.DetachSingleAttachmentToGround(sp, m_host.ParentGroup.LocalId, omvPos, omvRot); | ||
3580 | } | ||
3581 | } | ||
3582 | } | ||
3554 | } \ No newline at end of file | 3583 | } \ No newline at end of file |