From 54cc22976868dcdc0dd0143a0134fba7392af525 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 14 Dec 2013 00:10:32 +0000 Subject: Fix TestSitAndStandWithNoSitTarget NPC and SP tests. These stopped working because current code calculates sit heights based on avatar physics rather than appearance data. Also changed BasicPhysics to not divide Z param of all set sizes by 2 - there's no obvious good reason for this and basicphysics is only used in tests --- OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC/Tests') diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs index e1ef4d0..d552229 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs @@ -337,7 +337,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests public void TestSitAndStandWithNoSitTarget() { TestHelpers.InMethod(); -// log4net.Config.XmlConfigurator.Configure(); +// TestHelpers.EnableLogging(); ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, TestHelpers.ParseTail(0x1)); @@ -355,13 +355,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests Assert.That(part.SitTargetAvatar, Is.EqualTo(UUID.Zero)); Assert.That(npc.ParentID, Is.EqualTo(part.LocalId)); - // FIXME: This is different for live avatars - z position is adjusted. This is half the height of the - // default avatar. - // Curiously, Vector3.ToString() will not display the last two places of the float. For example, - // printing out npc.AbsolutePosition will give <0, 0, 0.8454993> not <0, 0, 0.845499337> Assert.That( npc.AbsolutePosition, - Is.EqualTo(part.AbsolutePosition + new Vector3(0, 0, 0.845499337f))); + Is.EqualTo(part.AbsolutePosition + new Vector3(0, 0, sp.PhysicsActor.Size.Z / 2))); m_npcMod.Stand(npc.UUID, m_scene); -- cgit v1.1