aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Tests
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-11-11 21:42:58 +0000
committerJustin Clark-Casey (justincc)2011-11-11 21:42:58 +0000
commitb1cb4f5b04f076c067842de6971ec1016b9a3912 (patch)
tree300b3e49768aa67a268cc8857d2fa71e34de59e3 /OpenSim/Region/Framework/Scenes/Tests
parentBump warp sit distance up to 10 meters, as discussed on opensim-dev mailing l... (diff)
downloadopensim-SC_OLD-b1cb4f5b04f076c067842de6971ec1016b9a3912.zip
opensim-SC_OLD-b1cb4f5b04f076c067842de6971ec1016b9a3912.tar.gz
opensim-SC_OLD-b1cb4f5b04f076c067842de6971ec1016b9a3912.tar.bz2
opensim-SC_OLD-b1cb4f5b04f076c067842de6971ec1016b9a3912.tar.xz
As per mailing list last week, remove facility that would automatically move the avatar if prim with no sit target was out of sitting range.
Now, no movement occurs. Note that you can still sit on a prim with an explicit sit target from any distance, as was the case before.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Tests')
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs33
1 files changed, 31 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs
index 2636473..a1d30f3 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
53 } 53 }
54 54
55 [Test] 55 [Test]
56 public void TestSitOutsideRange() 56 public void TestSitOutsideRangeNoTarget()
57 { 57 {
58 TestHelpers.InMethod(); 58 TestHelpers.InMethod();
59// log4net.Config.XmlConfigurator.Configure(); 59// log4net.Config.XmlConfigurator.Configure();
@@ -73,7 +73,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
73 } 73 }
74 74
75 [Test] 75 [Test]
76 public void TestSitWithinRange() 76 public void TestSitWithinRangeNoTarget()
77 { 77 {
78 TestHelpers.InMethod(); 78 TestHelpers.InMethod();
79// log4net.Config.XmlConfigurator.Configure(); 79// log4net.Config.XmlConfigurator.Configure();
@@ -124,5 +124,34 @@ namespace OpenSim.Region.Framework.Scenes.Tests
124 Assert.That(part.SitTargetAvatar, Is.EqualTo(UUID.Zero)); 124 Assert.That(part.SitTargetAvatar, Is.EqualTo(UUID.Zero));
125 Assert.That(sp.ParentID, Is.EqualTo(0)); 125 Assert.That(sp.ParentID, Is.EqualTo(0));
126 } 126 }
127
128 [Test]
129 public void TestSitAndStandWithSitTarget()
130 {
131 TestHelpers.InMethod();
132// log4net.Config.XmlConfigurator.Configure();
133
134 ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, TestHelpers.ParseTail(0x1));
135
136 // If a prim has a sit target then we can sit from any distance away
137 Vector3 startPos = new Vector3(128, 128, 30);
138 sp.AbsolutePosition = startPos;
139
140 SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene);
141 part.SitTargetPosition = new Vector3(0, 0, 1);
142
143 sp.HandleAgentRequestSit(sp.ControllingClient, sp.UUID, part.UUID, Vector3.Zero);
144
145 Assert.That(part.SitTargetAvatar, Is.EqualTo(sp.UUID));
146 Assert.That(sp.ParentID, Is.EqualTo(part.LocalId));
147 Assert.That(
148 sp.AbsolutePosition,
149 Is.EqualTo(part.AbsolutePosition + part.SitTargetPosition + ScenePresence.SIT_TARGET_ADJUSTMENT));
150
151 sp.StandUp();
152
153 Assert.That(part.SitTargetAvatar, Is.EqualTo(UUID.Zero));
154 Assert.That(sp.ParentID, Is.EqualTo(0));
155 }
127 } 156 }
128} \ No newline at end of file 157} \ No newline at end of file