aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs21
2 files changed, 23 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs
index f07ae31..992cd72 100644
--- a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs
@@ -210,7 +210,7 @@ namespace OpenSim.Region.CoreModules.World.Land
210 { 210 {
211 if (obj.OwnerID == landData.GroupID) 211 if (obj.OwnerID == landData.GroupID)
212 parcelCounts.Owner += partCount; 212 parcelCounts.Owner += partCount;
213 else if (obj.GroupID == landData.GroupID) 213 else if (landData.GroupID != UUID.Zero && obj.GroupID == landData.GroupID)
214 parcelCounts.Group += partCount; 214 parcelCounts.Group += partCount;
215 else 215 else
216 parcelCounts.Others += partCount; 216 parcelCounts.Others += partCount;
@@ -219,7 +219,7 @@ namespace OpenSim.Region.CoreModules.World.Land
219 { 219 {
220 if (obj.OwnerID == landData.OwnerID) 220 if (obj.OwnerID == landData.OwnerID)
221 parcelCounts.Owner += partCount; 221 parcelCounts.Owner += partCount;
222 else if (obj.GroupID == landData.GroupID) 222 else if (landData.GroupID != UUID.Zero && obj.GroupID == landData.GroupID)
223 parcelCounts.Group += partCount; 223 parcelCounts.Group += partCount;
224 else 224 else
225 parcelCounts.Others += partCount; 225 parcelCounts.Others += partCount;
diff --git a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
index 5a60f22..521effc 100644
--- a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
+++ b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
@@ -161,6 +161,27 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
161 Assert.That(pc.Simulator, Is.EqualTo(1)); 161 Assert.That(pc.Simulator, Is.EqualTo(1));
162 } 162 }
163 163
164 [Test]
165 public void TestAddOthersObject()
166 {
167 TestHelper.InMethod();
168// log4net.Config.XmlConfigurator.Configure();
169
170 IPrimCounts pc = m_lo.PrimCounts;
171
172 SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_dummyUserId, 0x01);
173 m_scene.AddNewSceneObject(sog, false);
174
175 Assert.That(pc.Owner, Is.EqualTo(0));
176 Assert.That(pc.Group, Is.EqualTo(0));
177 Assert.That(pc.Others, Is.EqualTo(3));
178 Assert.That(pc.Total, Is.EqualTo(3));
179 Assert.That(pc.Selected, Is.EqualTo(0));
180 Assert.That(pc.Users[m_userId], Is.EqualTo(0));
181 Assert.That(pc.Users[m_dummyUserId], Is.EqualTo(3));
182 Assert.That(pc.Simulator, Is.EqualTo(3));
183 }
184
164 /// <summary> 185 /// <summary>
165 /// Test the count is correct after is has been tainted. 186 /// Test the count is correct after is has been tainted.
166 /// </summary> 187 /// </summary>