If the land has no group ownership (it is UUID.Zero) then don't put prims in the group count when they are also not group owned.
Also adds simple test for others owned count when an object is added0.7.1-dev
parent
3a113f9902
commit
5b0936d4b5
|
@ -210,7 +210,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
{
|
{
|
||||||
if (obj.OwnerID == landData.GroupID)
|
if (obj.OwnerID == landData.GroupID)
|
||||||
parcelCounts.Owner += partCount;
|
parcelCounts.Owner += partCount;
|
||||||
else if (obj.GroupID == landData.GroupID)
|
else if (landData.GroupID != UUID.Zero && obj.GroupID == landData.GroupID)
|
||||||
parcelCounts.Group += partCount;
|
parcelCounts.Group += partCount;
|
||||||
else
|
else
|
||||||
parcelCounts.Others += partCount;
|
parcelCounts.Others += partCount;
|
||||||
|
@ -219,7 +219,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
{
|
{
|
||||||
if (obj.OwnerID == landData.OwnerID)
|
if (obj.OwnerID == landData.OwnerID)
|
||||||
parcelCounts.Owner += partCount;
|
parcelCounts.Owner += partCount;
|
||||||
else if (obj.GroupID == landData.GroupID)
|
else if (landData.GroupID != UUID.Zero && obj.GroupID == landData.GroupID)
|
||||||
parcelCounts.Group += partCount;
|
parcelCounts.Group += partCount;
|
||||||
else
|
else
|
||||||
parcelCounts.Others += partCount;
|
parcelCounts.Others += partCount;
|
||||||
|
|
|
@ -161,6 +161,27 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
|
||||||
Assert.That(pc.Simulator, Is.EqualTo(1));
|
Assert.That(pc.Simulator, Is.EqualTo(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestAddOthersObject()
|
||||||
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
// log4net.Config.XmlConfigurator.Configure();
|
||||||
|
|
||||||
|
IPrimCounts pc = m_lo.PrimCounts;
|
||||||
|
|
||||||
|
SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_dummyUserId, 0x01);
|
||||||
|
m_scene.AddNewSceneObject(sog, false);
|
||||||
|
|
||||||
|
Assert.That(pc.Owner, Is.EqualTo(0));
|
||||||
|
Assert.That(pc.Group, Is.EqualTo(0));
|
||||||
|
Assert.That(pc.Others, Is.EqualTo(3));
|
||||||
|
Assert.That(pc.Total, Is.EqualTo(3));
|
||||||
|
Assert.That(pc.Selected, Is.EqualTo(0));
|
||||||
|
Assert.That(pc.Users[m_userId], Is.EqualTo(0));
|
||||||
|
Assert.That(pc.Users[m_dummyUserId], Is.EqualTo(3));
|
||||||
|
Assert.That(pc.Simulator, Is.EqualTo(3));
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Test the count is correct after is has been tainted.
|
/// Test the count is correct after is has been tainted.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue