diff options
author | Justin Clark-Casey (justincc) | 2011-08-03 23:13:52 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-08-03 23:13:52 +0100 |
commit | 31cea17f8e7995277008370738be1d510dfede7a (patch) | |
tree | 2a86f0647085b6498b74bba023c1493347b38054 /OpenSim/Region/OptionalModules/World/NPC/Tests | |
parent | extend move test to check one beat of the simulator without actually asking t... (diff) | |
download | opensim-SC-31cea17f8e7995277008370738be1d510dfede7a.zip opensim-SC-31cea17f8e7995277008370738be1d510dfede7a.tar.gz opensim-SC-31cea17f8e7995277008370738be1d510dfede7a.tar.bz2 opensim-SC-31cea17f8e7995277008370738be1d510dfede7a.tar.xz |
extend move test to check avatar is moving in the right direction after setting a move target
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/NPC/Tests')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs index 4e2b5f1..512405a 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs | |||
@@ -112,6 +112,19 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests | |||
112 | scene.Update(); | 112 | scene.Update(); |
113 | Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos)); | 113 | Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos)); |
114 | 114 | ||
115 | Vector3 targetPos = new Vector3(128, 128, 40); | ||
116 | npcModule.Autopilot(npc.UUID, scene, targetPos); | ||
117 | |||
118 | Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos)); | ||
119 | |||
120 | scene.Update(); | ||
121 | |||
122 | // We should really check the exact figure. | ||
123 | Assert.That(npc.AbsolutePosition.X, Is.EqualTo(startPos.X)); | ||
124 | Assert.That(npc.AbsolutePosition.Y, Is.EqualTo(startPos.Y)); | ||
125 | Assert.That(npc.AbsolutePosition.Z, Is.GreaterThan(startPos.Z)); | ||
126 | Assert.That(npc.AbsolutePosition.Z, Is.LessThan(targetPos.Z)); | ||
127 | |||
115 | // Not yet complete | 128 | // Not yet complete |
116 | } | 129 | } |
117 | } | 130 | } |