diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index f68a5b3..cc7d0fb 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1674,16 +1674,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1674 | { | 1674 | { |
1675 | return Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f); | 1675 | return Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f); |
1676 | } | 1676 | } |
1677 | |||
1678 | /// <summary> | ||
1679 | /// Added as a way for the storage provider to reset the scene, | ||
1680 | /// most likely a better way to do this sort of thing but for now... | ||
1681 | /// </summary> | ||
1682 | /// <param name="scene"></param> | ||
1683 | public void SetScene(Scene scene) | ||
1684 | { | ||
1685 | m_scene = scene; | ||
1686 | } | ||
1687 | 1677 | ||
1688 | /// <summary> | 1678 | /// <summary> |
1689 | /// Set a part to act as the root part for this scene object | 1679 | /// Set a part to act as the root part for this scene object |
@@ -4324,6 +4314,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
4324 | return count; | 4314 | return count; |
4325 | } | 4315 | } |
4326 | 4316 | ||
4317 | /// <summary> | ||
4318 | /// Gets the number of sitting avatars. | ||
4319 | /// </summary> | ||
4320 | /// <remarks>This applies to all sitting avatars whether there is a sit target set or not.</remarks> | ||
4321 | /// <returns></returns> | ||
4322 | public int GetSittingAvatarsCount() | ||
4323 | { | ||
4324 | int count = 0; | ||
4325 | |||
4326 | Array.ForEach<SceneObjectPart>(m_parts.GetArray(), p => count += p.GetSittingAvatarsCount()); | ||
4327 | |||
4328 | return count; | ||
4329 | } | ||
4330 | |||
4327 | public override string ToString() | 4331 | public override string ToString() |
4328 | { | 4332 | { |
4329 | return String.Format("{0} {1} ({2})", Name, UUID, AbsolutePosition); | 4333 | return String.Format("{0} {1} ({2})", Name, UUID, AbsolutePosition); |