mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 01:35:46 +08:00
In AttachmentsModule.DetachSingleAttachmentToInvInternal(), remove attachment before changing properties for correct inventory serialization.
Serialization of attachments requires IsAttachment = false so that correct positions are serialized instead of avatar position. However, doing this when a hud is still attached allows race conditions with update threads, resulting in hud artifacts on other viewers. This change sets SOG.IsDeleted before serialization changes take place (IsDeleted itself is not a serialized property). LLClientView then screens out any deleted SOGs before sending updates to viewers.
This commit is contained in:
@@ -187,8 +187,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||
|
||||
TestScene scene = new SceneHelpers().SetupScene();
|
||||
SceneObjectPart part = SceneHelpers.AddSceneObject(scene);
|
||||
|
||||
Assert.That(part.ParentGroup.IsDeleted, Is.False);
|
||||
|
||||
scene.DeleteSceneObject(part.ParentGroup, false);
|
||||
|
||||
Assert.That(part.ParentGroup.IsDeleted, Is.True);
|
||||
|
||||
SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
|
||||
Assert.That(retrievedPart, Is.Null);
|
||||
}
|
||||
@@ -219,8 +224,12 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||
|
||||
Assert.That(retrievedPart, Is.Not.Null);
|
||||
|
||||
Assert.That(part.ParentGroup.IsDeleted, Is.False);
|
||||
|
||||
sogd.InventoryDeQueueAndDelete();
|
||||
|
||||
Assert.That(part.ParentGroup.IsDeleted, Is.True);
|
||||
|
||||
SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(part.LocalId);
|
||||
Assert.That(retrievedPart2, Is.Null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user