extend move test to check avatar is moving in the right direction after setting a move target

bulletsim
Justin Clark-Casey (justincc) 2011-08-03 23:13:52 +01:00
parent 21d8a6b0e8
commit 31cea17f8e
1 changed files with 13 additions and 0 deletions

View File

@ -112,6 +112,19 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
scene.Update();
Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos));
Vector3 targetPos = new Vector3(128, 128, 40);
npcModule.Autopilot(npc.UUID, scene, targetPos);
Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos));
scene.Update();
// We should really check the exact figure.
Assert.That(npc.AbsolutePosition.X, Is.EqualTo(startPos.X));
Assert.That(npc.AbsolutePosition.Y, Is.EqualTo(startPos.Y));
Assert.That(npc.AbsolutePosition.Z, Is.GreaterThan(startPos.Z));
Assert.That(npc.AbsolutePosition.Z, Is.LessThan(targetPos.Z));
// Not yet complete
}
}