diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandObject.cs | 26 |
2 files changed, 25 insertions, 6 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 6048518..ecf10e4 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -4589,7 +4589,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4589 | 4589 | ||
4590 | if (landData.SimwideArea > 0) | 4590 | if (landData.SimwideArea > 0) |
4591 | { | 4591 | { |
4592 | int simulatorCapacity = (int)(((float)landData.SimwideArea / 65536.0f) * (float)m_scene.RegionInfo.ObjectCapacity * (float)m_scene.RegionInfo.RegionSettings.ObjectBonus); | 4592 | int simulatorCapacity = (int)((double)(landData.SimwideArea * m_scene.RegionInfo.ObjectCapacity) * m_scene.RegionInfo.RegionSettings.ObjectBonus) / 65536; |
4593 | // Never report more than sim total capacity | ||
4594 | if (simulatorCapacity > m_scene.RegionInfo.ObjectCapacity) | ||
4595 | simulatorCapacity = m_scene.RegionInfo.ObjectCapacity; | ||
4593 | updateMessage.SimWideMaxPrims = simulatorCapacity; | 4596 | updateMessage.SimWideMaxPrims = simulatorCapacity; |
4594 | } | 4597 | } |
4595 | else | 4598 | else |
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 | ||