diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 2d0dbd36f3..a8778b4efd 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -5076,11 +5076,12 @@ 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 / 65536L); + 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 = simulatorCapacity; } else { @@ -5109,6 +5110,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP updateMessage.TotalPrims = pc.Total; updateMessage.SimWideTotalPrims = pc.Simulator; + //m_log.DebugFormat("[YYY]: SimWideMaxPrims={0} OwnerPrims={1} TotalPrims={2} SimWideTotalPrims={3} MaxPrims={4}", + // updateMessage.SimWideMaxPrims, updateMessage.OwnerPrims, updateMessage.TotalPrims, updateMessage.SimWideTotalPrims, updateMessage.MaxPrims); try { IEventQueue eq = Scene.RequestModuleInterface(); diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 4afceab202..45ad022d4d 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -350,22 +350,6 @@ namespace OpenSim.Region.CoreModules.World.Land } } - private int GetParcelBasePrimCount() - { - if (overrideParcelMaxPrimCount != null) - { - return overrideParcelMaxPrimCount(this); - } - else - { - // Normal Calculations - int parcelMax = (int)((long)LandData.Area - * (long)m_scene.RegionInfo.ObjectCapacity - / 65536L); - return parcelMax; - } - } - public int GetSimulatorMaxPrimCount() { if (overrideSimulatorMaxPrimCount != null) @@ -378,7 +362,7 @@ 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}", LandData.SimwideArea, m_scene.RegionInfo.ObjectCapacity, simMax); return simMax; } } @@ -416,7 +400,7 @@ namespace OpenSim.Region.CoreModules.World.Land remote_client.SendLandProperties(seq_id, snap_selection, request_result, this, (float)m_scene.RegionInfo.RegionSettings.ObjectBonus, - GetParcelBasePrimCount(), + GetParcelMaxPrimCount(), GetSimulatorMaxPrimCount(), regionFlags); }