* test: Add basic synchronous object remove test
parent
cec112c87a
commit
2c7ac33650
|
@ -139,8 +139,10 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||||
// Try to retain the original creator/owner/lastowner if their uuid is present on this grid
|
// Try to retain the original creator/owner/lastowner if their uuid is present on this grid
|
||||||
// otherwise, use the master avatar uuid instead
|
// otherwise, use the master avatar uuid instead
|
||||||
UUID masterAvatarId = m_scene.RegionInfo.MasterAvatarAssignedUUID;
|
UUID masterAvatarId = m_scene.RegionInfo.MasterAvatarAssignedUUID;
|
||||||
|
|
||||||
if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
|
if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
|
||||||
masterAvatarId = m_scene.RegionInfo.EstateSettings.EstateOwner;
|
masterAvatarId = m_scene.RegionInfo.EstateSettings.EstateOwner;
|
||||||
|
|
||||||
foreach (SceneObjectPart part in sceneObject.Children.Values)
|
foreach (SceneObjectPart part in sceneObject.Children.Values)
|
||||||
{
|
{
|
||||||
if (!resolveUserUuid(part.CreatorID))
|
if (!resolveUserUuid(part.CreatorID))
|
||||||
|
@ -153,8 +155,8 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||||
part.LastOwnerID = masterAvatarId;
|
part.LastOwnerID = masterAvatarId;
|
||||||
|
|
||||||
// And zap any troublesome sit target information
|
// And zap any troublesome sit target information
|
||||||
part.SitTargetOrientation = new Quaternion(0,0,0,1);
|
part.SitTargetOrientation = new Quaternion(0, 0, 0, 1);
|
||||||
part.SitTargetPosition = new Vector3(0,0,0);
|
part.SitTargetPosition = new Vector3(0, 0, 0);
|
||||||
|
|
||||||
// Fix ownership/creator of inventory items
|
// Fix ownership/creator of inventory items
|
||||||
// Not doing so results in inventory items
|
// Not doing so results in inventory items
|
||||||
|
|
|
@ -1830,7 +1830,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete the given object from the scene.
|
/// Synchronously delete the given object from the scene.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="group"></param>
|
/// <param name="group"></param>
|
||||||
public void DeleteSceneObject(SceneObjectGroup group, bool silent)
|
public void DeleteSceneObject(SceneObjectGroup group, bool silent)
|
||||||
|
|
|
@ -107,12 +107,18 @@ namespace OpenSim.Region.Environment.Scenes.Tests
|
||||||
Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID));
|
Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/// <summary>
|
||||||
|
/// Test removing an object from a scene.
|
||||||
|
/// </summary>
|
||||||
public void TestRemoveSceneObject()
|
public void TestRemoveSceneObject()
|
||||||
{
|
{
|
||||||
Scene scene = SetupScene();
|
TestScene scene = SetupScene();;
|
||||||
SceneObjectPart part = AddSceneObject(scene);
|
SceneObjectPart part = AddSceneObject(scene);
|
||||||
|
scene.DeleteSceneObject(part.ParentGroup, false);
|
||||||
|
|
||||||
|
SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
|
||||||
|
|
||||||
|
Assert.That(retrievedPart, Is.Null);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue