aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar
diff options
context:
space:
mode:
authorUbitUmarov2016-08-29 12:18:01 +0100
committerUbitUmarov2016-08-29 12:18:01 +0100
commitd96c05a1219a60183f5076f6c6f0bdd320611fd5 (patch)
tree4e0fbec610b11574bde78b2eb6556c9721f6b7c4 /OpenSim/Region/CoreModules/Avatar
parentmantis 8006: AttachmentModule triggered OnAttach by SOG xengine expects by SOP (diff)
downloadopensim-SC-d96c05a1219a60183f5076f6c6f0bdd320611fd5.zip
opensim-SC-d96c05a1219a60183f5076f6c6f0bdd320611fd5.tar.gz
opensim-SC-d96c05a1219a60183f5076f6c6f0bdd320611fd5.tar.bz2
opensim-SC-d96c05a1219a60183f5076f6c6f0bdd320611fd5.tar.xz
change my previus fix, change xengine to expect SOG and not attachments module, this way not breaking other script engines or modules out there for no valid reason
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs16
1 files changed, 3 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 1563f26..d227974 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -599,8 +599,7 @@ 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);
604 } 603 }
605 604
606 return true; 605 return true;
@@ -760,8 +759,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
760 sp.ControllingClient.SendRemoveInventoryItem(inventoryID); 759 sp.ControllingClient.SendRemoveInventoryItem(inventoryID);
761 } 760 }
762 761
763 //m_scene.EventManager.TriggerOnAttach(so.LocalId, so.UUID, UUID.Zero); 762 m_scene.EventManager.TriggerOnAttach(so.LocalId, so.UUID, UUID.Zero);
764 TriggerGroupOnAttach(so, UUID.Zero);
765 763
766 // Attach (NULL) stops scripts. We don't want that. Resume them. 764 // Attach (NULL) stops scripts. We don't want that. Resume them.
767 so.ResumeScripts(); 765 so.ResumeScripts();
@@ -1058,8 +1056,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
1058 { 1056 {
1059 if (fireDetachEvent) 1057 if (fireDetachEvent)
1060 { 1058 {
1061// m_scene.EventManager.TriggerOnAttach(grp.LocalId, grp.FromItemID, UUID.Zero); 1059 m_scene.EventManager.TriggerOnAttach(grp.LocalId, grp.FromItemID, UUID.Zero);
1062 TriggerGroupOnAttach(grp, UUID.Zero);
1063 // 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
1064 Thread.Sleep(2); 1061 Thread.Sleep(2);
1065 } 1062 }
@@ -1384,13 +1381,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
1384 if (sp != null) 1381 if (sp != null)
1385 DetachSingleAttachmentToGround(sp, soLocalId); 1382 DetachSingleAttachmentToGround(sp, soLocalId);
1386 } 1383 }
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 }
1394 #endregion 1384 #endregion
1395 } 1385 }
1396} 1386}