aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
diff options
context:
space:
mode:
authorUbitUmarov2016-09-03 07:51:53 +0100
committerUbitUmarov2016-09-03 07:51:53 +0100
commit9aec227767cf726216514d0494f11b5d8bf5b807 (patch)
tree8f308f4c1eefa19954fc30a560ac780f8a8e916a /OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
parentmerge issue (diff)
parenttests making sure evering thing is coerently wrong.. (diff)
downloadopensim-SC-9aec227767cf726216514d0494f11b5d8bf5b807.zip
opensim-SC-9aec227767cf726216514d0494f11b5d8bf5b807.tar.gz
opensim-SC-9aec227767cf726216514d0494f11b5d8bf5b807.tar.bz2
opensim-SC-9aec227767cf726216514d0494f11b5d8bf5b807.tar.xz
Merge branch 'master' into httptests
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs19
1 files changed, 12 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 8f03a0a..d5c81ce 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -594,8 +594,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
594 group.ResumeScripts(); 594 group.ResumeScripts();
595 } 595 }
596 596
597 else
597 // Do this last so that event listeners have access to all the effects of the attachment 598 // Do this last so that event listeners have access to all the effects of the attachment
598 m_scene.EventManager.TriggerOnAttach(group.LocalId, group.FromItemID, sp.UUID); 599 // this can't be done when creating scripts:
600 // scripts do internal enqueue of attach event
601 // and not all scripts are loaded at this point
602 m_scene.EventManager.TriggerOnAttach(group.LocalId, group.FromItemID, sp.UUID);
599 } 603 }
600 604
601 return true; 605 return true;
@@ -1053,7 +1057,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
1053 if (fireDetachEvent) 1057 if (fireDetachEvent)
1054 { 1058 {
1055 m_scene.EventManager.TriggerOnAttach(grp.LocalId, grp.FromItemID, UUID.Zero); 1059 m_scene.EventManager.TriggerOnAttach(grp.LocalId, grp.FromItemID, UUID.Zero);
1056
1057 // Allow detach event time to do some work before stopping the script 1060 // Allow detach event time to do some work before stopping the script
1058 Thread.Sleep(2); 1061 Thread.Sleep(2);
1059 } 1062 }
@@ -1115,13 +1118,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
1115 1118
1116 SceneObjectGroup objatt; 1119 SceneObjectGroup objatt;
1117 1120
1121 UUID rezGroupID = sp.ControllingClient.ActiveGroupId;
1122
1118 if (itemID != UUID.Zero) 1123 if (itemID != UUID.Zero)
1119 objatt = m_invAccessModule.RezObject(sp.ControllingClient, 1124 objatt = m_invAccessModule.RezObject(sp.ControllingClient,
1120 itemID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true, 1125 itemID, rezGroupID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true,
1121 false, false, sp.UUID, true); 1126 false, false, sp.UUID, true);
1122 else 1127 else
1123 objatt = m_invAccessModule.RezObject(sp.ControllingClient, 1128 objatt = m_invAccessModule.RezObject(sp.ControllingClient,
1124 null, assetID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true, 1129 null, rezGroupID, assetID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true,
1125 false, false, sp.UUID, true); 1130 false, false, sp.UUID, true);
1126 1131
1127 if (objatt == null) 1132 if (objatt == null)
@@ -1318,7 +1323,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
1318 AttachmentPt &= 0x7f; 1323 AttachmentPt &= 0x7f;
1319 1324
1320 // Calls attach with a Zero position 1325 // Calls attach with a Zero position
1321 if (AttachObject(sp, part.ParentGroup, AttachmentPt, false, true, append)) 1326 SceneObjectGroup group = part.ParentGroup;
1327 if (AttachObject(sp, group , AttachmentPt, false, true, append))
1322 { 1328 {
1323 if (DebugLevel > 0) 1329 if (DebugLevel > 0)
1324 m_log.Debug( 1330 m_log.Debug(
@@ -1377,7 +1383,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
1377 if (sp != null) 1383 if (sp != null)
1378 DetachSingleAttachmentToGround(sp, soLocalId); 1384 DetachSingleAttachmentToGround(sp, soLocalId);
1379 } 1385 }
1380
1381 #endregion 1386 #endregion
1382 } 1387 }
1383} 1388}