From 06d5989f4d44de2dfedbb3858f706940a56361ed Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 6 Jul 2011 09:59:05 +0200 Subject: Fix parcel prim count and max reporting. Viewer already multiplies. --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 6048518..ecf10e4 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -4589,7 +4589,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (landData.SimwideArea > 0) { - int simulatorCapacity = (int)(((float)landData.SimwideArea / 65536.0f) * (float)m_scene.RegionInfo.ObjectCapacity * (float)m_scene.RegionInfo.RegionSettings.ObjectBonus); + int simulatorCapacity = (int)((double)(landData.SimwideArea * m_scene.RegionInfo.ObjectCapacity) * m_scene.RegionInfo.RegionSettings.ObjectBonus) / 65536; + // Never report more than sim total capacity + if (simulatorCapacity > m_scene.RegionInfo.ObjectCapacity) + simulatorCapacity = m_scene.RegionInfo.ObjectCapacity; updateMessage.SimWideMaxPrims = simulatorCapacity; } else -- cgit v1.1