diff options
author | Justin Clark-Casey (justincc) | 2011-08-10 23:56:19 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-08-10 23:56:19 +0100 |
commit | 7f499ff3f386d57bcd81ebb3f58f110011100604 (patch) | |
tree | bab34762e4a9cb9e739df591360cec3405bb4e57 /OpenSim/Region/OptionalModules/World/NPC/Tests | |
parent | fly and no fly constants for osNpcMoveToTarget() (diff) | |
download | opensim-SC-7f499ff3f386d57bcd81ebb3f58f110011100604.zip opensim-SC-7f499ff3f386d57bcd81ebb3f58f110011100604.tar.gz opensim-SC-7f499ff3f386d57bcd81ebb3f58f110011100604.tar.bz2 opensim-SC-7f499ff3f386d57bcd81ebb3f58f110011100604.tar.xz |
Add a OS_NPC_LAND_AT_TARGET option to osMoveToTarget()
Default for this function is now not to automatically land.
This allows better control by scripts when an avatar is going to be landing on a prim rather than the ground.
Stopping the avatar involves faking a collision, to avoid the pid controller making it overshoot.
A better approach would be to gradually slow the avatar as we near the target
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/NPC/Tests')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs index 81497d5..d220fab 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs | |||
@@ -113,7 +113,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests | |||
113 | Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos)); | 113 | Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos)); |
114 | 114 | ||
115 | Vector3 targetPos = startPos + new Vector3(0, 0, 10); | 115 | Vector3 targetPos = startPos + new Vector3(0, 0, 10); |
116 | npcModule.MoveToTarget(npc.UUID, scene, targetPos, false); | 116 | npcModule.MoveToTarget(npc.UUID, scene, targetPos, false, false); |
117 | 117 | ||
118 | Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos)); | 118 | Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos)); |
119 | 119 | ||
@@ -135,7 +135,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests | |||
135 | // Try a second movement | 135 | // Try a second movement |
136 | startPos = npc.AbsolutePosition; | 136 | startPos = npc.AbsolutePosition; |
137 | targetPos = startPos + new Vector3(10, 0, 0); | 137 | targetPos = startPos + new Vector3(10, 0, 0); |
138 | npcModule.MoveToTarget(npc.UUID, scene, targetPos, false); | 138 | npcModule.MoveToTarget(npc.UUID, scene, targetPos, false, false); |
139 | 139 | ||
140 | scene.Update(); | 140 | scene.Update(); |
141 | 141 | ||