diff options
author | Kevin Cozens | 2015-09-21 10:58:35 -0400 |
---|---|---|
committer | Kevin Cozens | 2015-09-21 11:00:34 -0400 |
commit | b412db72be9c7a3833550119ba4d1c04b995d188 (patch) | |
tree | 506ca226d36275d9e802249d1bf1f7cbeee6eee4 /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |
parent | coment out lludp debug things that only fill up the help screen (diff) | |
download | opensim-SC-b412db72be9c7a3833550119ba4d1c04b995d188.zip opensim-SC-b412db72be9c7a3833550119ba4d1c04b995d188.tar.gz opensim-SC-b412db72be9c7a3833550119ba4d1c04b995d188.tar.bz2 opensim-SC-b412db72be9c7a3833550119ba4d1c04b995d188.tar.xz |
Fix a regression to GetSittingAvatars(). Return List<ScenePresence> once more.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index ea96d9e..d1a6692 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1419,7 +1419,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1419 | /// <value> | 1419 | /// <value> |
1420 | /// null if there are no sitting avatars. This is to save us create a hashset for every prim in a scene. | 1420 | /// null if there are no sitting avatars. This is to save us create a hashset for every prim in a scene. |
1421 | /// </value> | 1421 | /// </value> |
1422 | private HashSet<UUID> m_sittingAvatars; | 1422 | private HashSet<ScenePresence> m_sittingAvatars; |
1423 | 1423 | ||
1424 | public virtual UUID RegionID | 1424 | public virtual UUID RegionID |
1425 | { | 1425 | { |
@@ -2212,7 +2212,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2212 | Array.Copy(Shape.ExtraParams, extraP, extraP.Length); | 2212 | Array.Copy(Shape.ExtraParams, extraP, extraP.Length); |
2213 | dupe.Shape.ExtraParams = extraP; | 2213 | dupe.Shape.ExtraParams = extraP; |
2214 | 2214 | ||
2215 | dupe.m_sittingAvatars = new HashSet<UUID>(); | 2215 | dupe.m_sittingAvatars = new HashSet<ScenePresence>(); |
2216 | 2216 | ||
2217 | // safeguard actual copy is done in sog.copy | 2217 | // safeguard actual copy is done in sog.copy |
2218 | dupe.KeyframeMotion = null; | 2218 | dupe.KeyframeMotion = null; |
@@ -5543,19 +5543,19 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
5543 | /// true if the avatar was not already recorded, false otherwise. | 5543 | /// true if the avatar was not already recorded, false otherwise. |
5544 | /// </returns> | 5544 | /// </returns> |
5545 | /// <param name='avatarId'></param> | 5545 | /// <param name='avatarId'></param> |
5546 | protected internal bool AddSittingAvatar(UUID id) | 5546 | protected internal bool AddSittingAvatar(ScenePresence sp) |
5547 | { | 5547 | { |
5548 | lock (ParentGroup.m_sittingAvatars) | 5548 | lock (ParentGroup.m_sittingAvatars) |
5549 | { | 5549 | { |
5550 | if (IsSitTargetSet && SitTargetAvatar == UUID.Zero) | 5550 | if (IsSitTargetSet && SitTargetAvatar == UUID.Zero) |
5551 | SitTargetAvatar = id; | 5551 | SitTargetAvatar = sp.UUID; |
5552 | 5552 | ||
5553 | if (m_sittingAvatars == null) | 5553 | if (m_sittingAvatars == null) |
5554 | m_sittingAvatars = new HashSet<UUID>(); | 5554 | m_sittingAvatars = new HashSet<ScenePresence>(); |
5555 | 5555 | ||
5556 | if (m_sittingAvatars.Add(id)) | 5556 | if (m_sittingAvatars.Add(sp)) |
5557 | { | 5557 | { |
5558 | ParentGroup.m_sittingAvatars.Add(id); | 5558 | ParentGroup.m_sittingAvatars.Add(sp); |
5559 | 5559 | ||
5560 | return true; | 5560 | return true; |
5561 | } | 5561 | } |
@@ -5572,22 +5572,22 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
5572 | /// true if the avatar was present and removed, false if it was not present. | 5572 | /// true if the avatar was present and removed, false if it was not present. |
5573 | /// </returns> | 5573 | /// </returns> |
5574 | /// <param name='avatarId'></param> | 5574 | /// <param name='avatarId'></param> |
5575 | protected internal bool RemoveSittingAvatar(UUID id) | 5575 | protected internal bool RemoveSittingAvatar(ScenePresence sp) |
5576 | { | 5576 | { |
5577 | lock (ParentGroup.m_sittingAvatars) | 5577 | lock (ParentGroup.m_sittingAvatars) |
5578 | { | 5578 | { |
5579 | if (SitTargetAvatar == id) | 5579 | if (SitTargetAvatar == sp.UUID) |
5580 | SitTargetAvatar = UUID.Zero; | 5580 | SitTargetAvatar = UUID.Zero; |
5581 | 5581 | ||
5582 | if (m_sittingAvatars == null) | 5582 | if (m_sittingAvatars == null) |
5583 | return false; | 5583 | return false; |
5584 | 5584 | ||
5585 | if (m_sittingAvatars.Remove(id)) | 5585 | if (m_sittingAvatars.Remove(sp)) |
5586 | { | 5586 | { |
5587 | if (m_sittingAvatars.Count == 0) | 5587 | if (m_sittingAvatars.Count == 0) |
5588 | m_sittingAvatars = null; | 5588 | m_sittingAvatars = null; |
5589 | 5589 | ||
5590 | ParentGroup.m_sittingAvatars.Remove(id); | 5590 | ParentGroup.m_sittingAvatars.Remove(sp); |
5591 | 5591 | ||
5592 | return true; | 5592 | return true; |
5593 | } | 5593 | } |
@@ -5601,14 +5601,14 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
5601 | /// </summary> | 5601 | /// </summary> |
5602 | /// <remarks>This applies to all sitting avatars whether there is a sit target set or not.</remarks> | 5602 | /// <remarks>This applies to all sitting avatars whether there is a sit target set or not.</remarks> |
5603 | /// <returns>A hashset of the sitting avatars. Returns null if there are no sitting avatars.</returns> | 5603 | /// <returns>A hashset of the sitting avatars. Returns null if there are no sitting avatars.</returns> |
5604 | public HashSet<UUID> GetSittingAvatars() | 5604 | public HashSet<ScenePresence> GetSittingAvatars() |
5605 | { | 5605 | { |
5606 | lock (ParentGroup.m_sittingAvatars) | 5606 | lock (ParentGroup.m_sittingAvatars) |
5607 | { | 5607 | { |
5608 | if (m_sittingAvatars == null) | 5608 | if (m_sittingAvatars == null) |
5609 | return null; | 5609 | return null; |
5610 | else | 5610 | else |
5611 | return new HashSet<UUID>(m_sittingAvatars); | 5611 | return new HashSet<ScenePresence>(m_sittingAvatars); |
5612 | } | 5612 | } |
5613 | } | 5613 | } |
5614 | 5614 | ||