diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 4e0e183..fc04761 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -3401,6 +3401,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
3401 | return count; | 3401 | return count; |
3402 | } | 3402 | } |
3403 | 3403 | ||
3404 | /// <summary> | ||
3405 | /// Gets the number of sitting avatars. | ||
3406 | /// </summary> | ||
3407 | /// <remarks>This applies to all sitting avatars whether there is a sit target set or not.</remarks> | ||
3408 | /// <returns></returns> | ||
3409 | public int GetSittingAvatarsCount() | ||
3410 | { | ||
3411 | int count = 0; | ||
3412 | |||
3413 | Array.ForEach<SceneObjectPart>(m_parts.GetArray(), p => count += p.GetSittingAvatarsCount()); | ||
3414 | |||
3415 | return count; | ||
3416 | } | ||
3417 | |||
3404 | public override string ToString() | 3418 | public override string ToString() |
3405 | { | 3419 | { |
3406 | return String.Format("{0} {1} ({2})", Name, UUID, AbsolutePosition); | 3420 | return String.Format("{0} {1} ({2})", Name, UUID, AbsolutePosition); |