diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Land/LandObject.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandObject.cs | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 69a3455..4cbc8b8 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -341,10 +341,16 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
341 | else | 341 | else |
342 | { | 342 | { |
343 | // Normal Calculations | 343 | // Normal Calculations |
344 | int parcelMax = (int)( (long)LandData.Area | 344 | int parcelMax = (int)( |
345 | * (long)m_scene.RegionInfo.ObjectCapacity | 345 | (double)LandData.Area |
346 | * (long)m_scene.RegionInfo.RegionSettings.ObjectBonus | 346 | * (double)m_scene.RegionInfo.ObjectCapacity |
347 | / (long)(m_scene.RegionInfo.RegionSizeX * m_scene.RegionInfo.RegionSizeY) ); | 347 | * (double)m_scene.RegionInfo.RegionSettings.ObjectBonus |
348 | / (double)(m_scene.RegionInfo.RegionSizeX * m_scene.RegionInfo.RegionSizeY) | ||
349 | + 0.5 ); | ||
350 | |||
351 | if(parcelMax > m_scene.RegionInfo.ObjectCapacity) | ||
352 | parcelMax = m_scene.RegionInfo.ObjectCapacity; | ||
353 | |||
348 | //m_log.DebugFormat("Area: {0}, Capacity {1}, Bonus {2}, Parcel {3}", LandData.Area, m_scene.RegionInfo.ObjectCapacity, m_scene.RegionInfo.RegionSettings.ObjectBonus, parcelMax); | 354 | //m_log.DebugFormat("Area: {0}, Capacity {1}, Bonus {2}, Parcel {3}", LandData.Area, m_scene.RegionInfo.ObjectCapacity, m_scene.RegionInfo.RegionSettings.ObjectBonus, parcelMax); |
349 | return parcelMax; | 355 | return parcelMax; |
350 | } | 356 | } |
@@ -359,9 +365,14 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
359 | else | 365 | else |
360 | { | 366 | { |
361 | //Normal Calculations | 367 | //Normal Calculations |
362 | int simMax = (int)( (long)LandData.SimwideArea | 368 | int simMax = (int)( (double)LandData.SimwideArea |
363 | * (long)m_scene.RegionInfo.ObjectCapacity | 369 | * (double)m_scene.RegionInfo.ObjectCapacity |
364 | / (long)(m_scene.RegionInfo.RegionSizeX * m_scene.RegionInfo.RegionSizeY) ); | 370 | * (double)m_scene.RegionInfo.RegionSettings.ObjectBonus |
371 | / (long)(m_scene.RegionInfo.RegionSizeX * m_scene.RegionInfo.RegionSizeY) | ||
372 | +0.5 ); | ||
373 | |||
374 | if(simMax > m_scene.RegionInfo.ObjectCapacity) | ||
375 | simMax = m_scene.RegionInfo.ObjectCapacity; | ||
365 | //m_log.DebugFormat("Simwide Area: {0}, Capacity {1}, SimMax {2}, SimWidePrims {3}", | 376 | //m_log.DebugFormat("Simwide Area: {0}, Capacity {1}, SimMax {2}, SimWidePrims {3}", |
366 | // LandData.SimwideArea, m_scene.RegionInfo.ObjectCapacity, simMax, LandData.SimwidePrims); | 377 | // LandData.SimwideArea, m_scene.RegionInfo.ObjectCapacity, simMax, LandData.SimwidePrims); |
367 | return simMax; | 378 | return simMax; |