diff options
author | Diva Canto | 2016-06-18 22:07:01 -0700 |
---|---|---|
committer | Diva Canto | 2016-06-18 22:07:01 -0700 |
commit | ce7fa728efa53bddf86b8e7ffcffd85bbd7a9b7f (patch) | |
tree | 85d167afabde87c726eef94c629b1d183f53de3a /OpenSim | |
parent | Guard against occurring null ref. (diff) | |
download | opensim-SC-ce7fa728efa53bddf86b8e7ffcffd85bbd7a9b7f.zip opensim-SC-ce7fa728efa53bddf86b8e7ffcffd85bbd7a9b7f.tar.gz opensim-SC-ce7fa728efa53bddf86b8e7ffcffd85bbd7a9b7f.tar.bz2 opensim-SC-ce7fa728efa53bddf86b8e7ffcffd85bbd7a9b7f.tar.xz |
Mantis #7917: regression on prim limits module.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandObject.cs | 20 |
2 files changed, 7 insertions, 20 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 2d0dbd3..a8778b4 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 | |||
5076 | 5076 | ||
5077 | if (landData.SimwideArea > 0) | 5077 | if (landData.SimwideArea > 0) |
5078 | { | 5078 | { |
5079 | int simulatorCapacity = (int)((long)landData.SimwideArea * (long)m_scene.RegionInfo.ObjectCapacity * (long)m_scene.RegionInfo.RegionSettings.ObjectBonus / 65536L); | 5079 | int simulatorCapacity = (int)((long)landData.SimwideArea * (long)m_scene.RegionInfo.ObjectCapacity * (long)m_scene.RegionInfo.RegionSettings.ObjectBonus |
5080 | / (long)m_scene.RegionInfo.RegionSizeX * m_scene.RegionInfo.RegionSizeY); | ||
5080 | // Never report more than sim total capacity | 5081 | // Never report more than sim total capacity |
5081 | if (simulatorCapacity > m_scene.RegionInfo.ObjectCapacity) | 5082 | if (simulatorCapacity > m_scene.RegionInfo.ObjectCapacity) |
5082 | simulatorCapacity = m_scene.RegionInfo.ObjectCapacity; | 5083 | simulatorCapacity = m_scene.RegionInfo.ObjectCapacity; |
5083 | updateMessage.SimWideMaxPrims = simulatorCapacity; | 5084 | updateMessage.SimWideMaxPrims = simulatorCapacity; |
5084 | } | 5085 | } |
5085 | else | 5086 | else |
5086 | { | 5087 | { |
@@ -5109,6 +5110,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5109 | updateMessage.TotalPrims = pc.Total; | 5110 | updateMessage.TotalPrims = pc.Total; |
5110 | updateMessage.SimWideTotalPrims = pc.Simulator; | 5111 | updateMessage.SimWideTotalPrims = pc.Simulator; |
5111 | 5112 | ||
5113 | //m_log.DebugFormat("[YYY]: SimWideMaxPrims={0} OwnerPrims={1} TotalPrims={2} SimWideTotalPrims={3} MaxPrims={4}", | ||
5114 | // updateMessage.SimWideMaxPrims, updateMessage.OwnerPrims, updateMessage.TotalPrims, updateMessage.SimWideTotalPrims, updateMessage.MaxPrims); | ||
5112 | try | 5115 | try |
5113 | { | 5116 | { |
5114 | IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>(); | 5117 | IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>(); |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 4afceab..45ad022 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 | |||
350 | } | 350 | } |
351 | } | 351 | } |
352 | 352 | ||
353 | private int GetParcelBasePrimCount() | ||
354 | { | ||
355 | if (overrideParcelMaxPrimCount != null) | ||
356 | { | ||
357 | return overrideParcelMaxPrimCount(this); | ||
358 | } | ||
359 | else | ||
360 | { | ||
361 | // Normal Calculations | ||
362 | int parcelMax = (int)((long)LandData.Area | ||
363 | * (long)m_scene.RegionInfo.ObjectCapacity | ||
364 | / 65536L); | ||
365 | return parcelMax; | ||
366 | } | ||
367 | } | ||
368 | |||
369 | public int GetSimulatorMaxPrimCount() | 353 | public int GetSimulatorMaxPrimCount() |
370 | { | 354 | { |
371 | if (overrideSimulatorMaxPrimCount != null) | 355 | if (overrideSimulatorMaxPrimCount != null) |
@@ -378,7 +362,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
378 | int simMax = (int)( (long)LandData.SimwideArea | 362 | int simMax = (int)( (long)LandData.SimwideArea |
379 | * (long)m_scene.RegionInfo.ObjectCapacity | 363 | * (long)m_scene.RegionInfo.ObjectCapacity |
380 | / (long)(m_scene.RegionInfo.RegionSizeX * m_scene.RegionInfo.RegionSizeY) ); | 364 | / (long)(m_scene.RegionInfo.RegionSizeX * m_scene.RegionInfo.RegionSizeY) ); |
381 | // m_log.DebugFormat("Simwide Area: {0}, Capacity {1}, SimMax {2}", LandData.SimwideArea, m_scene.RegionInfo.ObjectCapacity, simMax); | 365 | //m_log.DebugFormat("Simwide Area: {0}, Capacity {1}, SimMax {2}", LandData.SimwideArea, m_scene.RegionInfo.ObjectCapacity, simMax); |
382 | return simMax; | 366 | return simMax; |
383 | } | 367 | } |
384 | } | 368 | } |
@@ -416,7 +400,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
416 | remote_client.SendLandProperties(seq_id, | 400 | remote_client.SendLandProperties(seq_id, |
417 | snap_selection, request_result, this, | 401 | snap_selection, request_result, this, |
418 | (float)m_scene.RegionInfo.RegionSettings.ObjectBonus, | 402 | (float)m_scene.RegionInfo.RegionSettings.ObjectBonus, |
419 | GetParcelBasePrimCount(), | 403 | GetParcelMaxPrimCount(), |
420 | GetSimulatorMaxPrimCount(), regionFlags); | 404 | GetSimulatorMaxPrimCount(), regionFlags); |
421 | } | 405 | } |
422 | 406 | ||