From 12b73603cc4605955d9ea60ad66b4a85ea3d44ca Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 19 Jun 2016 09:17:04 -0700 Subject: [PATCH] Still related to mantis #7917, parcel prims info. Now sending the correct numbers for "Simulator primitive usage" related to the parcel owner, not the entire region. --- OpenSim/Framework/LandData.cs | 2 +- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 7 +------ .../CoreModules/World/Land/LandManagementModule.cs | 14 ++++++++------ .../Region/CoreModules/World/Land/LandObject.cs | 3 ++- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/OpenSim/Framework/LandData.cs b/OpenSim/Framework/LandData.cs index da541af291..cfefe3e8e6 100644 --- a/OpenSim/Framework/LandData.cs +++ b/OpenSim/Framework/LandData.cs @@ -620,7 +620,7 @@ namespace OpenSim.Framework } /// - /// Number of meters^2 in the Simulator + /// Number of meters^2 that the land owner has in the Simulator /// [XmlIgnore] public int SimwideArea diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index a8778b4efd..74eb11445d 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -5076,12 +5076,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (landData.SimwideArea > 0) { - int simulatorCapacity = (int)((long)landData.SimwideArea * (long)m_scene.RegionInfo.ObjectCapacity * (long)m_scene.RegionInfo.RegionSettings.ObjectBonus - / (long)m_scene.RegionInfo.RegionSizeX * m_scene.RegionInfo.RegionSizeY); - // Never report more than sim total capacity - if (simulatorCapacity > m_scene.RegionInfo.ObjectCapacity) - simulatorCapacity = m_scene.RegionInfo.ObjectCapacity; - updateMessage.SimWideMaxPrims = simulatorCapacity; + updateMessage.SimWideMaxPrims = lo.GetSimulatorMaxPrimCount(); } else { diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 84a969bc64..95b576f9bd 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -884,7 +884,7 @@ namespace OpenSim.Region.CoreModules.World.Land } } - public void FinalizeLandPrimCountUpdate() + private void FinalizeLandPrimCountUpdate() { //Get Simwide prim count for owner Dictionary> landOwnersAndParcels = new Dictionary>(); @@ -925,10 +925,10 @@ namespace OpenSim.Region.CoreModules.World.Land public void EventManagerOnParcelPrimCountUpdate() { -// m_log.DebugFormat( -// "[LAND MANAGEMENT MODULE]: Triggered EventManagerOnParcelPrimCountUpdate() for {0}", -// m_scene.RegionInfo.RegionName); - + //m_log.DebugFormat( + // "[land management module]: triggered eventmanageronparcelprimcountupdate() for {0}", + // m_scene.RegionInfo.RegionName); + ResetOverMeRecords(); EntityBase[] entities = m_scene.Entities.GetEntities(); foreach (EntityBase obj in entities) @@ -1843,7 +1843,7 @@ namespace OpenSim.Region.CoreModules.World.Land LLSDRemoteParcelResponse response = new LLSDRemoteParcelResponse(); response.parcel_id = parcelID; - m_log.DebugFormat("[LAND MANAGEMENT MODULE]: Got parcelID {0}", parcelID); + //m_log.DebugFormat("[LAND MANAGEMENT MODULE]: Got parcelID {0}", parcelID); return LLSDHelpers.SerialiseLLSDReply(response); } @@ -2306,12 +2306,14 @@ namespace OpenSim.Region.CoreModules.World.Land cdl.AddRow("Other clean time", ld.OtherCleanTime); cdl.AddRow("Max Prims", lo.GetParcelMaxPrimCount()); + cdl.AddRow("Simwide Max Prims (owner)", lo.GetSimulatorMaxPrimCount()); IPrimCounts pc = lo.PrimCounts; cdl.AddRow("Owner Prims", pc.Owner); cdl.AddRow("Group Prims", pc.Group); cdl.AddRow("Other Prims", pc.Others); cdl.AddRow("Selected Prims", pc.Selected); cdl.AddRow("Total Prims", pc.Total); + cdl.AddRow("SimWide Prims (owner)", pc.Simulator); cdl.AddRow("Music URL", ld.MusicURL); cdl.AddRow("Obscure Music", ld.ObscureMusic); diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 45ad022d4d..6b37dad0a1 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -362,7 +362,8 @@ namespace OpenSim.Region.CoreModules.World.Land int simMax = (int)( (long)LandData.SimwideArea * (long)m_scene.RegionInfo.ObjectCapacity / (long)(m_scene.RegionInfo.RegionSizeX * m_scene.RegionInfo.RegionSizeY) ); - //m_log.DebugFormat("Simwide Area: {0}, Capacity {1}, SimMax {2}", LandData.SimwideArea, m_scene.RegionInfo.ObjectCapacity, simMax); + //m_log.DebugFormat("Simwide Area: {0}, Capacity {1}, SimMax {2}, SimWidePrims {3}", + // LandData.SimwideArea, m_scene.RegionInfo.ObjectCapacity, simMax, LandData.SimwidePrims); return simMax; } }