aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-07-10 23:50:04 +0100
committerJustin Clark-Casey (justincc)2012-07-10 23:50:04 +0100
commitcdea572d2ea0256423a4cd72f132346d88a93e92 (patch)
tree67de79604fb75f0963171d36151c24be7c0fd654 /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
parentRevert "refactor: Add SOP.IsSitTargetOccupied to improve readability" (diff)
downloadopensim-SC-cdea572d2ea0256423a4cd72f132346d88a93e92.zip
opensim-SC-cdea572d2ea0256423a4cd72f132346d88a93e92.tar.gz
opensim-SC-cdea572d2ea0256423a4cd72f132346d88a93e92.tar.bz2
opensim-SC-cdea572d2ea0256423a4cd72f132346d88a93e92.tar.xz
refactor: move management of SOP.SitTargetAvatar into SOP.AddSittingAvatar() and SOP.RemoveSittingAvatar()
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index dcec7e9..b3f11a7 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -4525,6 +4525,9 @@ namespace OpenSim.Region.Framework.Scenes
4525 /// <param name='avatarId'></param> 4525 /// <param name='avatarId'></param>
4526 protected internal bool AddSittingAvatar(UUID avatarId) 4526 protected internal bool AddSittingAvatar(UUID avatarId)
4527 { 4527 {
4528 if (IsSitTargetSet && SitTargetAvatar == UUID.Zero)
4529 SitTargetAvatar = avatarId;
4530
4528 HashSet<UUID> sittingAvatars = m_sittingAvatars; 4531 HashSet<UUID> sittingAvatars = m_sittingAvatars;
4529 4532
4530 if (sittingAvatars == null) 4533 if (sittingAvatars == null)
@@ -4547,6 +4550,9 @@ namespace OpenSim.Region.Framework.Scenes
4547 /// <param name='avatarId'></param> 4550 /// <param name='avatarId'></param>
4548 protected internal bool RemoveSittingAvatar(UUID avatarId) 4551 protected internal bool RemoveSittingAvatar(UUID avatarId)
4549 { 4552 {
4553 if (SitTargetAvatar == avatarId)
4554 SitTargetAvatar = UUID.Zero;
4555
4550 HashSet<UUID> sittingAvatars = m_sittingAvatars; 4556 HashSet<UUID> sittingAvatars = m_sittingAvatars;
4551 4557
4552 // This can occur under a race condition where another thread 4558 // This can occur under a race condition where another thread