diff options
author | Justin Clark-Casey (justincc) | 2011-03-26 02:19:28 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-03-26 02:19:28 +0000 |
commit | 541cd3e8c84d3ccc13525206b1724ee931416a3c (patch) | |
tree | 51137fafbf9ea82b00fd230d219d49f76d5d43f6 /OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs | |
parent | When an object is duplicated, add the dupe to the uuid/local id indexes as we... (diff) | |
download | opensim-SC_OLD-541cd3e8c84d3ccc13525206b1724ee931416a3c.zip opensim-SC_OLD-541cd3e8c84d3ccc13525206b1724ee931416a3c.tar.gz opensim-SC_OLD-541cd3e8c84d3ccc13525206b1724ee931416a3c.tar.bz2 opensim-SC_OLD-541cd3e8c84d3ccc13525206b1724ee931416a3c.tar.xz |
move total parcel prim calculations into IPrimCounts instead of doing this in LLClientView
need to move selected prim counts from LandData/LMM still
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs index 72115a8..2de5c16 100644 --- a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs | |||
@@ -324,6 +324,37 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
324 | 324 | ||
325 | return count; | 325 | return count; |
326 | } | 326 | } |
327 | |||
328 | /// <summary> | ||
329 | /// Get the total count of owner, group and others prims on the parcel. | ||
330 | /// FIXME: Need to do selected prims once this is reimplemented. | ||
331 | /// </summary> | ||
332 | /// <param name="parcelID"></param> | ||
333 | /// <returns></returns> | ||
334 | public int GetTotalCount(UUID parcelID) | ||
335 | { | ||
336 | int count = 0; | ||
337 | |||
338 | lock (m_TaintLock) | ||
339 | { | ||
340 | if (m_Tainted) | ||
341 | Recount(); | ||
342 | |||
343 | ParcelCounts counts; | ||
344 | if (m_ParcelCounts.TryGetValue(parcelID, out counts)) | ||
345 | { | ||
346 | count = counts.Owner; | ||
347 | count += counts.Group; | ||
348 | count += counts.Others; | ||
349 | } | ||
350 | } | ||
351 | |||
352 | m_log.DebugFormat( | ||
353 | "[PRIM COUNT MODULE]: GetTotalCount for parcel {0} in {1} returning {2}", | ||
354 | parcelID, m_Scene.RegionInfo.RegionName, count); | ||
355 | |||
356 | return count; | ||
357 | } | ||
327 | 358 | ||
328 | /// <summary> | 359 | /// <summary> |
329 | /// Get the number of prims that are in the entire simulator for the owner of this parcel. | 360 | /// Get the number of prims that are in the entire simulator for the owner of this parcel. |
@@ -457,6 +488,14 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
457 | return m_Parent.GetOthersCount(m_ParcelID); | 488 | return m_Parent.GetOthersCount(m_ParcelID); |
458 | } | 489 | } |
459 | } | 490 | } |
491 | |||
492 | public int Total | ||
493 | { | ||
494 | get | ||
495 | { | ||
496 | return m_Parent.GetTotalCount(m_ParcelID); | ||
497 | } | ||
498 | } | ||
460 | 499 | ||
461 | public int Simulator | 500 | public int Simulator |
462 | { | 501 | { |