From 498fe1afe76e565b28631d8da954ac9105e9a1a9 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 28 Jan 2012 21:23:54 +0100 Subject: Fix calculating land prim count type width issue --- OpenSim/Region/CoreModules/World/Land/LandObject.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/CoreModules/World/Land') diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 2d54ed1..07b28c7 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -190,10 +190,10 @@ namespace OpenSim.Region.CoreModules.World.Land else { // Normal Calculations - int parcelMax = (int)((double)(LandData.Area - * m_scene.RegionInfo.ObjectCapacity) - * m_scene.RegionInfo.RegionSettings.ObjectBonus) - / 65536; + int parcelMax = (int)((long)LandData.Area + * (long)m_scene.RegionInfo.ObjectCapacity + * (long)m_scene.RegionInfo.RegionSettings.ObjectBonus + / 65536L); m_log.DebugFormat("Area: {0}, Capacity {1}, Bonus {2}, Parcel {3}", LandData.Area, m_scene.RegionInfo.ObjectCapacity, m_scene.RegionInfo.RegionSettings.ObjectBonus, parcelMax); return parcelMax; } @@ -208,9 +208,9 @@ namespace OpenSim.Region.CoreModules.World.Land else { // Normal Calculations - int parcelMax = LandData.Area - * m_scene.RegionInfo.ObjectCapacity - / 65536; + int parcelMax = (int)((long)LandData.Area + * (long)m_scene.RegionInfo.ObjectCapacity + / 65536L); return parcelMax; } } @@ -226,7 +226,7 @@ namespace OpenSim.Region.CoreModules.World.Land //Normal Calculations int simMax = (int)((long)LandData.SimwideArea * (long)m_scene.RegionInfo.ObjectCapacity / 65536L); - 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; } } -- cgit v1.1