From acaf6937c54071f93a09de7332b4a95bf2a2c88e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 11 Nov 2011 23:32:43 +0000 Subject: add sit and stand on ground test --- .../Scenes/Tests/ScenePresenceSitTests.cs | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs index a1d30f3..e3ffb53 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs @@ -153,5 +153,28 @@ namespace OpenSim.Region.Framework.Scenes.Tests Assert.That(part.SitTargetAvatar, Is.EqualTo(UUID.Zero)); Assert.That(sp.ParentID, Is.EqualTo(0)); } + + [Test] + public void TestSitAndStandOnGround() + { + TestHelpers.InMethod(); +// log4net.Config.XmlConfigurator.Configure(); + + ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, TestHelpers.ParseTail(0x1)); + + // If a prim has a sit target then we can sit from any distance away +// Vector3 startPos = new Vector3(128, 128, 30); +// sp.AbsolutePosition = startPos; + + sp.HandleAgentSitOnGround(); + + Assert.That(sp.SitGround, Is.True); + Assert.That(sp.PhysicsActor, Is.Null); + + sp.StandUp(); + + Assert.That(sp.SitGround, Is.False); + Assert.That(sp.PhysicsActor, Is.Not.Null); + } } } \ No newline at end of file -- cgit v1.1