Mantis #7917: regression on prim limits module.

LSLKeyTest
Diva Canto 2016-06-18 22:07:01 -07:00
parent 206faf0218
commit ce7fa728ef
2 changed files with 7 additions and 20 deletions

View File

@ -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<IEventQueue>();

View File

@ -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);
}