aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs15
1 files changed, 5 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 93920b0..3e1cb02 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -456,7 +456,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
456 if (so == null) 456 if (so == null)
457 return; 457 return;
458 458
459 if (so.RootPart.AttachedAvatar != remoteClient.AgentId) 459 if (so.AttachedAvatar != remoteClient.AgentId)
460 return; 460 return;
461 461
462 UUID inventoryID = so.GetFromItemID(); 462 UUID inventoryID = so.GetFromItemID();
@@ -498,7 +498,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
498 498
499 rootPart.FromItemID = UUID.Zero; 499 rootPart.FromItemID = UUID.Zero;
500 so.AbsolutePosition = sp.AbsolutePosition; 500 so.AbsolutePosition = sp.AbsolutePosition;
501 so.ForEachPart(part => part.AttachedAvatar = UUID.Zero); 501 so.AttachedAvatar = UUID.Zero;
502 rootPart.SetParentLocalId(0); 502 rootPart.SetParentLocalId(0);
503 so.ClearPartAttachmentData(); 503 so.ClearPartAttachmentData();
504 rootPart.ApplyPhysics(rootPart.GetEffectiveObjectFlags(), rootPart.VolumeDetectActive, m_scene.m_physicalPrim); 504 rootPart.ApplyPhysics(rootPart.GetEffectiveObjectFlags(), rootPart.VolumeDetectActive, m_scene.m_physicalPrim);
@@ -534,11 +534,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
534 sp.RemoveAttachment(group); 534 sp.RemoveAttachment(group);
535 535
536 // Prepare sog for storage 536 // Prepare sog for storage
537 group.AttachedAvatar = UUID.Zero;
538
537 group.ForEachPart( 539 group.ForEachPart(
538 delegate(SceneObjectPart part) 540 delegate(SceneObjectPart part)
539 { 541 {
540 part.AttachedAvatar = UUID.Zero;
541
542 // If there are any scripts, 542 // If there are any scripts,
543 // then always trigger a new object and state persistence in UpdateKnownItem() 543 // then always trigger a new object and state persistence in UpdateKnownItem()
544 if (part.Inventory.ContainsScripts()) 544 if (part.Inventory.ContainsScripts())
@@ -656,12 +656,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
656 m_scene.DeleteFromStorage(so.UUID); 656 m_scene.DeleteFromStorage(so.UUID);
657 m_scene.EventManager.TriggerParcelPrimCountTainted(); 657 m_scene.EventManager.TriggerParcelPrimCountTainted();
658 658
659 so.RootPart.AttachedAvatar = avatar.UUID; 659 so.AttachedAvatar = avatar.UUID;
660
661 //Anakin Lohner bug #3839
662 SceneObjectPart[] parts = so.Parts;
663 for (int i = 0; i < parts.Length; i++)
664 parts[i].AttachedAvatar = avatar.UUID;
665 660
666 if (so.RootPart.PhysActor != null) 661 if (so.RootPart.PhysActor != null)
667 { 662 {