aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorMelanie2011-07-06 09:59:05 +0200
committerMelanie2011-07-06 09:59:05 +0200
commit06d5989f4d44de2dfedbb3858f706940a56361ed (patch)
treed0c882270a49fe20e9d5c05e9e287269309425fb /OpenSim/Region/CoreModules
parentRevert "If a user has the rights to edit a parcel's properties, then also all... (diff)
downloadopensim-SC-06d5989f4d44de2dfedbb3858f706940a56361ed.zip
opensim-SC-06d5989f4d44de2dfedbb3858f706940a56361ed.tar.gz
opensim-SC-06d5989f4d44de2dfedbb3858f706940a56361ed.tar.bz2
opensim-SC-06d5989f4d44de2dfedbb3858f706940a56361ed.tar.xz
Fix parcel prim count and max reporting. Viewer already multiplies.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs26
1 files changed, 21 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index 2a6d362..950dff7 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -190,10 +190,26 @@ namespace OpenSim.Region.CoreModules.World.Land
190 else 190 else
191 { 191 {
192 // Normal Calculations 192 // Normal Calculations
193 int parcelMax = (int)(((float)LandData.Area / 65536.0f) 193 int parcelMax = (int)((double)(LandData.Area
194 * (float)m_scene.RegionInfo.ObjectCapacity 194 * m_scene.RegionInfo.ObjectCapacity)
195 * (float)m_scene.RegionInfo.RegionSettings.ObjectBonus); 195 * m_scene.RegionInfo.RegionSettings.ObjectBonus)
196 // TODO: The calculation of ObjectBonus should be refactored. It does still not work in the same manner as SL! 196 / 65536;
197 return parcelMax;
198 }
199 }
200
201 private int GetParcelBasePrimCount()
202 {
203 if (overrideParcelMaxPrimCount != null)
204 {
205 return overrideParcelMaxPrimCount(this);
206 }
207 else
208 {
209 // Normal Calculations
210 int parcelMax = LandData.Area
211 * m_scene.RegionInfo.ObjectCapacity
212 / 65536;
197 return parcelMax; 213 return parcelMax;
198 } 214 }
199 } 215 }
@@ -245,7 +261,7 @@ namespace OpenSim.Region.CoreModules.World.Land
245 remote_client.SendLandProperties(seq_id, 261 remote_client.SendLandProperties(seq_id,
246 snap_selection, request_result, this, 262 snap_selection, request_result, this,
247 (float)m_scene.RegionInfo.RegionSettings.ObjectBonus, 263 (float)m_scene.RegionInfo.RegionSettings.ObjectBonus,
248 GetParcelMaxPrimCount(), 264 GetParcelBasePrimCount(),
249 GetSimulatorMaxPrimCount(), regionFlags); 265 GetSimulatorMaxPrimCount(), regionFlags);
250 } 266 }
251 267