From 8a73dc0f8a3a8606439b6f7217d2d14c22bfd43e Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Fri, 30 Oct 2009 03:01:15 -0700 Subject: * Fix for a potential race condition in ScenePresence.AbsolutePosition * Unified the way region handles are stored and used in ScenePresence * Fixed camera position for child agents * CheckForSignificantMovement now checks avatar and camera position (both are important for scene prioritization) * Removing debug code from the previous commit --- OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Tests') diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs index 19c0fea..f495022 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs @@ -219,7 +219,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests Assert.That(presence.IsChildAgent, Is.True, "Did not change to child agent after MakeChildAgent"); // Accepts 0 but rejects Constants.RegionSize - Vector3 pos = new Vector3(0,Constants.RegionSize-1,0); + Vector3 pos = new Vector3(0,unchecked(Constants.RegionSize-1),0); presence.MakeRootAgent(pos,true); Assert.That(presence.IsChildAgent, Is.False, "Did not go back to root agent"); Assert.That(presence.AbsolutePosition, Is.EqualTo(pos), "Position is not the same one entered"); @@ -246,7 +246,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests scene2.AddNewClient(testclient); ScenePresence presence = scene.GetScenePresence(agent1); - presence.MakeRootAgent(new Vector3(0,Constants.RegionSize-1,0), true); + presence.MakeRootAgent(new Vector3(0,unchecked(Constants.RegionSize-1),0), true); ScenePresence presence2 = scene2.GetScenePresence(agent1); -- cgit v1.1