aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs30
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs2
2 files changed, 28 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
index d161bb8..67b00ac 100644
--- a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
+++ b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
@@ -167,17 +167,18 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
167 /// Test that parcel counts update correctly when an object is moved between parcels, where that movement 167 /// Test that parcel counts update correctly when an object is moved between parcels, where that movement
168 /// is not done directly by the user/ 168 /// is not done directly by the user/
169 /// </summary> 169 /// </summary>
170 //[Test] 170 [Test]
171 public void TestMoveOwnerObject() 171 public void TestMoveOwnerObject()
172 { 172 {
173 TestHelper.InMethod(); 173 TestHelper.InMethod();
174 log4net.Config.XmlConfigurator.Configure(); 174// log4net.Config.XmlConfigurator.Configure();
175 175
176 SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, "a", 0x01); 176 SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, "a", 0x01);
177 m_scene.AddNewSceneObject(sog, false); 177 m_scene.AddNewSceneObject(sog, false);
178 SceneObjectGroup sog2 = SceneSetupHelpers.CreateSceneObject(2, m_userId, "b", 0x10); 178 SceneObjectGroup sog2 = SceneSetupHelpers.CreateSceneObject(2, m_userId, "b", 0x10);
179 m_scene.AddNewSceneObject(sog2, false); 179 m_scene.AddNewSceneObject(sog2, false);
180 180
181 // Move the first scene object to the eastern strip parcel
181 sog.AbsolutePosition = new Vector3(254, 2, 2); 182 sog.AbsolutePosition = new Vector3(254, 2, 2);
182 183
183 IPrimCounts pclo1 = m_lo.PrimCounts; 184 IPrimCounts pclo1 = m_lo.PrimCounts;
@@ -189,7 +190,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
189 Assert.That(pclo1.Selected, Is.EqualTo(0)); 190 Assert.That(pclo1.Selected, Is.EqualTo(0));
190 Assert.That(pclo1.Users[m_userId], Is.EqualTo(2)); 191 Assert.That(pclo1.Users[m_userId], Is.EqualTo(2));
191 Assert.That(pclo1.Users[m_otherUserId], Is.EqualTo(0)); 192 Assert.That(pclo1.Users[m_otherUserId], Is.EqualTo(0));
192 Assert.That(pclo1.Simulator, Is.EqualTo(2)); 193 Assert.That(pclo1.Simulator, Is.EqualTo(5));
193 194
194 IPrimCounts pclo2 = m_lo2.PrimCounts; 195 IPrimCounts pclo2 = m_lo2.PrimCounts;
195 196
@@ -200,7 +201,28 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
200 Assert.That(pclo2.Selected, Is.EqualTo(0)); 201 Assert.That(pclo2.Selected, Is.EqualTo(0));
201 Assert.That(pclo2.Users[m_userId], Is.EqualTo(3)); 202 Assert.That(pclo2.Users[m_userId], Is.EqualTo(3));
202 Assert.That(pclo2.Users[m_otherUserId], Is.EqualTo(0)); 203 Assert.That(pclo2.Users[m_otherUserId], Is.EqualTo(0));
203 Assert.That(pclo2.Simulator, Is.EqualTo(3)); 204 Assert.That(pclo2.Simulator, Is.EqualTo(5));
205
206 // Now move it back again
207 sog.AbsolutePosition = new Vector3(2, 2, 2);
208
209 Assert.That(pclo1.Owner, Is.EqualTo(5));
210 Assert.That(pclo1.Group, Is.EqualTo(0));
211 Assert.That(pclo1.Others, Is.EqualTo(0));
212 Assert.That(pclo1.Total, Is.EqualTo(5));
213 Assert.That(pclo1.Selected, Is.EqualTo(0));
214 Assert.That(pclo1.Users[m_userId], Is.EqualTo(5));
215 Assert.That(pclo1.Users[m_otherUserId], Is.EqualTo(0));
216 Assert.That(pclo1.Simulator, Is.EqualTo(5));
217
218 Assert.That(pclo2.Owner, Is.EqualTo(0));
219 Assert.That(pclo2.Group, Is.EqualTo(0));
220 Assert.That(pclo2.Others, Is.EqualTo(0));
221 Assert.That(pclo2.Total, Is.EqualTo(0));
222 Assert.That(pclo2.Selected, Is.EqualTo(0));
223 Assert.That(pclo2.Users[m_userId], Is.EqualTo(0));
224 Assert.That(pclo2.Users[m_otherUserId], Is.EqualTo(0));
225 Assert.That(pclo2.Simulator, Is.EqualTo(5));
204 } 226 }
205 227
206 /// <summary> 228 /// <summary>
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index a7107f0..ca7d9d9 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -325,6 +325,8 @@ namespace OpenSim.Region.Framework.Scenes
325 //m_rootPart.GroupPosition.Z); 325 //m_rootPart.GroupPosition.Z);
326 //m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); 326 //m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor);
327 //} 327 //}
328
329 m_scene.EventManager.TriggerParcelPrimCountTainted();
328 } 330 }
329 } 331 }
330 332