aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index bf791a9..6f34168 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1219,7 +1219,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1219 public virtual void llDie() 1219 public virtual void llDie()
1220 { 1220 {
1221 m_host.AddScriptLPS(1); 1221 m_host.AddScriptLPS(1);
1222 if (!m_host.IsAttachment) throw new SelfDeleteException(); 1222 if (!m_host.ParentGroup.IsAttachment) throw new SelfDeleteException();
1223 } 1223 }
1224 1224
1225 public LSL_Float llGround(LSL_Vector offset) 1225 public LSL_Float llGround(LSL_Vector offset)
@@ -3250,8 +3250,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3250 SceneObjectGroup grp = m_host.ParentGroup; 3250 SceneObjectGroup grp = m_host.ParentGroup;
3251 3251
3252 ScenePresence presence = World.GetScenePresence(m_host.OwnerID); 3252 ScenePresence presence = World.GetScenePresence(m_host.OwnerID);
3253 3253 if (presence.Scene.AttachmentsModule != null)
3254 grp.AttachToAgent(m_host.OwnerID, (uint)attachment, Vector3.Zero, false); 3254 {
3255 presence.Scene.AttachmentsModule.AttachObject(presence.ControllingClient, grp, (uint)attachment, false);
3256 }
3255 } 3257 }
3256 } 3258 }
3257 3259
@@ -8034,7 +8036,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8034 // the UUID with the avatar UUID and report it's bounding box 8036 // the UUID with the avatar UUID and report it's bounding box
8035 SceneObjectPart part = World.GetSceneObjectPart(objID); 8037 SceneObjectPart part = World.GetSceneObjectPart(objID);
8036 if (part != null && part.ParentGroup.IsAttachment) 8038 if (part != null && part.ParentGroup.IsAttachment)
8037 objID = part.ParentGroup.RootPart.AttachedAvatar; 8039 objID = part.ParentGroup.AttachedAvatar;
8038 8040
8039 // Find out if this is an avatar ID. If so, return it's box 8041 // Find out if this is an avatar ID. If so, return it's box
8040 ScenePresence presence = World.GetScenePresence(objID); 8042 ScenePresence presence = World.GetScenePresence(objID);
@@ -10064,7 +10066,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10064 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_itemID, 0); 10066 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_itemID, 0);
10065 if (detectedParams == null) 10067 if (detectedParams == null)
10066 { 10068 {
10067 if (m_host.IsAttachment == true) 10069 if (m_host.ParentGroup.IsAttachment == true)
10068 { 10070 {
10069 detectedParams = new DetectParams(); 10071 detectedParams = new DetectParams();
10070 detectedParams.Key = m_host.OwnerID; 10072 detectedParams.Key = m_host.OwnerID;