diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
3 files changed, 14 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 514be4f..4d887a8 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -854,6 +854,10 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
854 | 854 | ||
855 | public void EventManagerOnParcelPrimCountUpdate() | 855 | public void EventManagerOnParcelPrimCountUpdate() |
856 | { | 856 | { |
857 | // m_log.DebugFormat( | ||
858 | // "[LAND MANAGEMENT MODULE]: Triggered EventManagerOnParcelPrimCountUpdate() for {0}", | ||
859 | // m_scene.RegionInfo.RegionName); | ||
860 | |||
857 | ResetAllLandPrimCounts(); | 861 | ResetAllLandPrimCounts(); |
858 | EntityBase[] entities = m_scene.Entities.GetEntities(); | 862 | EntityBase[] entities = m_scene.Entities.GetEntities(); |
859 | foreach (EntityBase obj in entities) | 863 | foreach (EntityBase obj in entities) |
diff --git a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs index c71264c..5371aaf 100644 --- a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs | |||
@@ -89,8 +89,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
89 | { | 89 | { |
90 | m_Scene = scene; | 90 | m_Scene = scene; |
91 | 91 | ||
92 | m_Scene.EventManager.OnParcelPrimCountAdd += | 92 | m_Scene.EventManager.OnObjectAddedToScene += OnParcelPrimCountAdd; |
93 | OnParcelPrimCountAdd; | ||
94 | m_Scene.EventManager.OnObjectBeingRemovedFromScene += | 93 | m_Scene.EventManager.OnObjectBeingRemovedFromScene += |
95 | OnObjectBeingRemovedFromScene; | 94 | OnObjectBeingRemovedFromScene; |
96 | m_Scene.EventManager.OnParcelPrimCountTainted += | 95 | m_Scene.EventManager.OnParcelPrimCountTainted += |
@@ -116,6 +115,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
116 | 115 | ||
117 | private void OnParcelPrimCountAdd(SceneObjectGroup obj) | 116 | private void OnParcelPrimCountAdd(SceneObjectGroup obj) |
118 | { | 117 | { |
118 | Console.WriteLine("WIBBLE"); | ||
119 | // If we're tainted already, don't bother to add. The next | 119 | // If we're tainted already, don't bother to add. The next |
120 | // access will cause a recount anyway | 120 | // access will cause a recount anyway |
121 | lock (m_TaintLock) | 121 | lock (m_TaintLock) |
@@ -172,6 +172,10 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
172 | Vector3 pos = obj.AbsolutePosition; | 172 | Vector3 pos = obj.AbsolutePosition; |
173 | ILandObject landObject = m_Scene.LandChannel.GetLandObject(pos.X, pos.Y); | 173 | ILandObject landObject = m_Scene.LandChannel.GetLandObject(pos.X, pos.Y); |
174 | LandData landData = landObject.LandData; | 174 | LandData landData = landObject.LandData; |
175 | |||
176 | // m_log.DebugFormat( | ||
177 | // "[PRIM COUNT MODULE]: Object {0} is owned by {1} over land owned by {2}", | ||
178 | // obj.Name, obj.OwnerID, landData.OwnerID); | ||
175 | 179 | ||
176 | ParcelCounts parcelCounts; | 180 | ParcelCounts parcelCounts; |
177 | if (m_ParcelCounts.TryGetValue(landData.GlobalID, out parcelCounts)) | 181 | if (m_ParcelCounts.TryGetValue(landData.GlobalID, out parcelCounts)) |
@@ -228,6 +232,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
228 | 232 | ||
229 | public int GetOwnerCount(UUID parcelID) | 233 | public int GetOwnerCount(UUID parcelID) |
230 | { | 234 | { |
235 | // m_log.DebugFormat("[PRIM COUNT MODULE]: GetOwnerCount for {0}", parcelID); | ||
236 | |||
231 | lock (m_TaintLock) | 237 | lock (m_TaintLock) |
232 | { | 238 | { |
233 | if (m_Tainted) | 239 | if (m_Tainted) |
diff --git a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs index 402965f..fd332ed 100644 --- a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs +++ b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs | |||
@@ -67,6 +67,8 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests | |||
67 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | 67 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) |
68 | { Name = objName, UUID = objUuid }; | 68 | { Name = objName, UUID = objUuid }; |
69 | 69 | ||
70 | Assert.That(pcm.GetOwnerCount(lo.LandData.GlobalID), Is.EqualTo(0)); | ||
71 | |||
70 | scene.AddNewSceneObject(new SceneObjectGroup(part), false); | 72 | scene.AddNewSceneObject(new SceneObjectGroup(part), false); |
71 | 73 | ||
72 | Assert.That(pcm.GetOwnerCount(lo.LandData.GlobalID), Is.EqualTo(1)); | 74 | Assert.That(pcm.GetOwnerCount(lo.LandData.GlobalID), Is.EqualTo(1)); |