mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 12:25:42 +08:00
When an object is duplicated, add the dupe to the uuid/local id indexes as well as the basic entities list.
Added a prim counts test to reinforce this - shift-copy was no incrementing prim count. This will sometime become a basic scene test. New code needs to be refactored so we just call SceneGraph.AddSceneObject(). This will happen in the near future. With this, basic owner prim counts on a single parcel appear to be working fine (with the same previous existing taint calls as used by the land management module). More work to do.
This commit is contained in:
@@ -104,6 +104,29 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
|
||||
Assert.That(pc.Simulator, Is.EqualTo(5));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test count after a parcel owner owned copied object is added.
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestCopiedOwnerObject()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
IPrimCounts pc = m_lo.PrimCounts;
|
||||
|
||||
SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, 0x01);
|
||||
m_scene.AddNewSceneObject(sog, false);
|
||||
m_scene.SceneGraph.DuplicateObject(sog.LocalId, Vector3.Zero, 0, m_userId, UUID.Zero, Quaternion.Identity);
|
||||
|
||||
Assert.That(pc.Owner, Is.EqualTo(6));
|
||||
Assert.That(pc.Group, Is.EqualTo(0));
|
||||
Assert.That(pc.Others, Is.EqualTo(0));
|
||||
Assert.That(pc.Users[m_userId], Is.EqualTo(6));
|
||||
Assert.That(pc.Users[m_dummyUserId], Is.EqualTo(0));
|
||||
Assert.That(pc.Simulator, Is.EqualTo(6));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test count after a parcel owner owned object is removed.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user