aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-08-04 01:00:33 +0100
committerJustin Clark-Casey (justincc)2011-08-04 01:00:33 +0100
commit7f6f100c5a93791e8af29bafcfb93cfd289d5e8b (patch)
treef36b5dfbc1414fa2564429dd3f4eec6dc1479201 /OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
parentextend npc move test to check a second movement (diff)
downloadopensim-SC_OLD-7f6f100c5a93791e8af29bafcfb93cfd289d5e8b.zip
opensim-SC_OLD-7f6f100c5a93791e8af29bafcfb93cfd289d5e8b.tar.gz
opensim-SC_OLD-7f6f100c5a93791e8af29bafcfb93cfd289d5e8b.tar.bz2
opensim-SC_OLD-7f6f100c5a93791e8af29bafcfb93cfd289d5e8b.tar.xz
When the NPC reaches within the SIGNIFICANT_CLIENT_MOVEMENT distance of the target, move it directly to the target.
This makes the movement exact. Regression test changed to check avatar reaches exact target. Also has the nice side effect of making NPC animations continue to work after the first movement (which wasn't working). However, avatar still pauses in mid-stride
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs2
1 files changed, 2 insertions, 0 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
index 545819f..c9dddba 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
@@ -130,6 +130,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
130 130
131 double distanceToTarget = Util.GetDistanceTo(npc.AbsolutePosition, targetPos); 131 double distanceToTarget = Util.GetDistanceTo(npc.AbsolutePosition, targetPos);
132 Assert.That(distanceToTarget, Is.LessThan(1), "NPC not within 1 unit of target position on first move"); 132 Assert.That(distanceToTarget, Is.LessThan(1), "NPC not within 1 unit of target position on first move");
133 Assert.That(npc.AbsolutePosition, Is.EqualTo(targetPos));
133 134
134 // Try a second movement 135 // Try a second movement
135 startPos = npc.AbsolutePosition; 136 startPos = npc.AbsolutePosition;
@@ -149,6 +150,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
149 150
150 distanceToTarget = Util.GetDistanceTo(npc.AbsolutePosition, targetPos); 151 distanceToTarget = Util.GetDistanceTo(npc.AbsolutePosition, targetPos);
151 Assert.That(distanceToTarget, Is.LessThan(1), "NPC not within 1 unit of target position on second move"); 152 Assert.That(distanceToTarget, Is.LessThan(1), "NPC not within 1 unit of target position on second move");
153 Assert.That(npc.AbsolutePosition, Is.EqualTo(targetPos));
152 } 154 }
153 } 155 }
154} \ No newline at end of file 156} \ No newline at end of file