From 6ac9c9c97277e510cbe7eb908f3cf7883a01c1c3 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 3 Apr 2014 01:14:39 +0100 Subject: refactor: Use m_sittingAvatars to maintain the list of sitting avatars instead of two independent structures that do exactly the same thing m_sittingAvatars code also already properly handles locking to avoid races. --- OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs') diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs index 0911f00..dcdec5c 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs @@ -93,9 +93,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests Assert.That(part.SitTargetAvatar, Is.EqualTo(UUID.Zero)); Assert.That(part.GetSittingAvatarsCount(), Is.EqualTo(1)); - HashSet sittingAvatars = part.GetSittingAvatars(); + HashSet sittingAvatars = part.GetSittingAvatars(); Assert.That(sittingAvatars.Count, Is.EqualTo(1)); - Assert.That(sittingAvatars.Contains(m_sp.UUID)); + Assert.That(sittingAvatars.Contains(m_sp)); Assert.That(m_sp.ParentID, Is.EqualTo(part.LocalId)); } @@ -151,9 +151,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests Assert.That(m_sp.PhysicsActor, Is.Null); Assert.That(part.GetSittingAvatarsCount(), Is.EqualTo(1)); - HashSet sittingAvatars = part.GetSittingAvatars(); + HashSet sittingAvatars = part.GetSittingAvatars(); Assert.That(sittingAvatars.Count, Is.EqualTo(1)); - Assert.That(sittingAvatars.Contains(m_sp.UUID)); + Assert.That(sittingAvatars.Contains(m_sp)); m_sp.StandUp(); -- cgit v1.1