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
remove-scene-viewer
Justin Clark-Casey (justincc) 2011-09-02 22:28:27 +01:00
parent af7c6c5f39
commit 26b471f25a
2 changed files with 14 additions and 5 deletions

View File

@ -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();

View File

@ -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;
}
/// <summary>