From 26b471f25a27d7e888d31854a3437f85191538a7 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 2 Sep 2011 22:28:27 +0100 Subject: [PATCH] Go back to resetting the State parameter for all parts of a SOG when SOG.ClearPartAttachmentData() is called. Even though we don't use these on rez they are still present after an unlink, after which selecting them causes various viewers to crash Hopefully really does address http://opensimulator.org/mantis/view.php?id=5664 --- .../InventoryAccess/InventoryAccessModule.cs | 13 ++++++++----- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 6 ++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index e6b58b3693..4b39341191 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -794,14 +794,17 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess m_log.Debug("[InventoryAccessModule]: Object has UUID.Zero! Position 3"); } - // If it's rezzed in world, select it. Much easier to - // find small items. - // if (!attachment) { + // If it's rezzed in world, select it. Much easier to + // find small items. + // group.RootPart.CreateSelected = true; - foreach (SceneObjectPart child in group.Parts) - child.CreateSelected = true; + + foreach (SceneObjectPart part in group.Parts) + { + part.CreateSelected = true; + } } group.ResetIDs(); diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index fca42c8ce0..2819545026 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -183,6 +183,12 @@ namespace OpenSim.Region.Framework.Scenes public void ClearPartAttachmentData() { AttachmentPoint = 0; + + // Even though we don't use child part state parameters for attachments any more, we still need to set + // these to zero since having them non-zero in rezzed scene objects will crash some clients. Even if + // we store them correctly, scene objects that we receive from elsewhere might not. + foreach (SceneObjectPart part in Parts) + part.Shape.State = 0; } ///