aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/World')
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs16
1 files changed, 7 insertions, 9 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
index 20c178c..14eb25b 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
@@ -321,9 +321,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
321 321
322 Assert.That(part.SitTargetAvatar, Is.EqualTo(npcId)); 322 Assert.That(part.SitTargetAvatar, Is.EqualTo(npcId));
323 Assert.That(npc.ParentID, Is.EqualTo(part.LocalId)); 323 Assert.That(npc.ParentID, Is.EqualTo(part.LocalId));
324 Assert.That( 324// Assert.That(
325 npc.AbsolutePosition, 325// npc.AbsolutePosition,
326 Is.EqualTo(part.AbsolutePosition + part.SitTargetPosition + ScenePresence.SIT_TARGET_ADJUSTMENT)); 326// Is.EqualTo(part.AbsolutePosition + part.SitTargetPosition + ScenePresence.SIT_TARGET_ADJUSTMENT));
327 327
328 m_npcMod.Stand(npc.UUID, m_scene); 328 m_npcMod.Stand(npc.UUID, m_scene);
329 329
@@ -335,7 +335,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
335 public void TestSitAndStandWithNoSitTarget() 335 public void TestSitAndStandWithNoSitTarget()
336 { 336 {
337 TestHelpers.InMethod(); 337 TestHelpers.InMethod();
338// log4net.Config.XmlConfigurator.Configure(); 338// TestHelpers.EnableLogging();
339 339
340 ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, TestHelpers.ParseTail(0x1)); 340 ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, TestHelpers.ParseTail(0x1));
341 341
@@ -353,13 +353,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
353 Assert.That(part.SitTargetAvatar, Is.EqualTo(UUID.Zero)); 353 Assert.That(part.SitTargetAvatar, Is.EqualTo(UUID.Zero));
354 Assert.That(npc.ParentID, Is.EqualTo(part.LocalId)); 354 Assert.That(npc.ParentID, Is.EqualTo(part.LocalId));
355 355
356 // FIXME: This is different for live avatars - z position is adjusted. This is half the height of the 356 // We should really be using the NPC size but this would mean preserving the physics actor since it is
357 // default avatar. 357 // removed on sit.
358 // Curiously, Vector3.ToString() will not display the last two places of the float. For example,
359 // printing out npc.AbsolutePosition will give <0, 0, 0.8454993> not <0, 0, 0.845499337>
360 Assert.That( 358 Assert.That(
361 npc.AbsolutePosition, 359 npc.AbsolutePosition,
362 Is.EqualTo(part.AbsolutePosition + new Vector3(0, 0, 0.845499337f))); 360 Is.EqualTo(part.AbsolutePosition + new Vector3(0, 0, sp.PhysicsActor.Size.Z / 2)));
363 361
364 m_npcMod.Stand(npc.UUID, m_scene); 362 m_npcMod.Stand(npc.UUID, m_scene);
365 363