aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2016-08-29 11:53:07 +0100
committerUbitUmarov2016-08-29 11:53:07 +0100
commita4bf78fa191b62e71ccd7cd0c2330879a56b5eaf (patch)
treeeb063b994a10730b225e0813222b7ebbb34a9772 /OpenSim
parent disable AttachmentModule tests again :( (diff)
downloadopensim-SC-a4bf78fa191b62e71ccd7cd0c2330879a56b5eaf.zip
opensim-SC-a4bf78fa191b62e71ccd7cd0c2330879a56b5eaf.tar.gz
opensim-SC-a4bf78fa191b62e71ccd7cd0c2330879a56b5eaf.tar.bz2
opensim-SC-a4bf78fa191b62e71ccd7cd0c2330879a56b5eaf.tar.xz
mantis 8006: AttachmentModule triggered OnAttach by SOG xengine expects by SOP
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs16
1 files changed, 12 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 9a6fce9..1563f26 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -599,7 +599,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
599 // this can't be done when creating scripts: 599 // this can't be done when creating scripts:
600 // scripts do internal enqueue of attach event 600 // scripts do internal enqueue of attach event
601 // and not all scripts are loaded at this point 601 // and not all scripts are loaded at this point
602 m_scene.EventManager.TriggerOnAttach(group.LocalId, group.FromItemID, sp.UUID); 602// m_scene.EventManager.TriggerOnAttach(group.LocalId, group.FromItemID, sp.UUID);
603 TriggerGroupOnAttach(group, sp.UUID);
603 } 604 }
604 605
605 return true; 606 return true;
@@ -759,7 +760,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
759 sp.ControllingClient.SendRemoveInventoryItem(inventoryID); 760 sp.ControllingClient.SendRemoveInventoryItem(inventoryID);
760 } 761 }
761 762
762 m_scene.EventManager.TriggerOnAttach(so.LocalId, so.UUID, UUID.Zero); 763 //m_scene.EventManager.TriggerOnAttach(so.LocalId, so.UUID, UUID.Zero);
764 TriggerGroupOnAttach(so, UUID.Zero);
763 765
764 // Attach (NULL) stops scripts. We don't want that. Resume them. 766 // Attach (NULL) stops scripts. We don't want that. Resume them.
765 so.ResumeScripts(); 767 so.ResumeScripts();
@@ -1056,8 +1058,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
1056 { 1058 {
1057 if (fireDetachEvent) 1059 if (fireDetachEvent)
1058 { 1060 {
1059 m_scene.EventManager.TriggerOnAttach(grp.LocalId, grp.FromItemID, UUID.Zero); 1061// m_scene.EventManager.TriggerOnAttach(grp.LocalId, grp.FromItemID, UUID.Zero);
1060 1062 TriggerGroupOnAttach(grp, UUID.Zero);
1061 // Allow detach event time to do some work before stopping the script 1063 // Allow detach event time to do some work before stopping the script
1062 Thread.Sleep(2); 1064 Thread.Sleep(2);
1063 } 1065 }
@@ -1383,6 +1385,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
1383 DetachSingleAttachmentToGround(sp, soLocalId); 1385 DetachSingleAttachmentToGround(sp, soLocalId);
1384 } 1386 }
1385 1387
1388 private void TriggerGroupOnAttach(SceneObjectGroup grp, UUID avatarID)
1389 {
1390 UUID item = grp.FromItemID; // this maybe wrong but xengine ignores it
1391 foreach(SceneObjectPart part in grp.Parts)
1392 m_scene.EventManager.TriggerOnAttach(part.LocalId, item, avatarID);
1393 }
1386 #endregion 1394 #endregion
1387 } 1395 }
1388} 1396}