diff options
author | Melanie | 2012-05-07 12:07:47 +0100 |
---|---|---|
committer | Melanie | 2012-05-07 12:07:47 +0100 |
commit | df7abbb367ecac2fb09e1af10d3ec2a792ea2ed2 (patch) | |
tree | 3e36b8757455c88c3c1f20c14b635e662350aab9 /OpenSim/Region/OptionalModules/World | |
parent | Merge branch 'avination' into careminster (diff) | |
parent | add a null check for Primitive.Sculpt in PrimitiveBaseShape constructor for O... (diff) | |
download | opensim-SC-df7abbb367ecac2fb09e1af10d3ec2a792ea2ed2.zip opensim-SC-df7abbb367ecac2fb09e1af10d3ec2a792ea2ed2.tar.gz opensim-SC-df7abbb367ecac2fb09e1af10d3ec2a792ea2ed2.tar.bz2 opensim-SC-df7abbb367ecac2fb09e1af10d3ec2a792ea2ed2.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Region/OptionalModules/World')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index 9c77b59..a32ab2a 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -170,7 +170,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
170 | return npcAvatar.AgentId; | 170 | return npcAvatar.AgentId; |
171 | } | 171 | } |
172 | 172 | ||
173 | public bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly, bool landAtTarget) | 173 | public bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly, bool landAtTarget, bool running) |
174 | { | 174 | { |
175 | lock (m_avatars) | 175 | lock (m_avatars) |
176 | { | 176 | { |
@@ -184,6 +184,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
184 | sp.Name, pos, scene.RegionInfo.RegionName, noFly, landAtTarget); | 184 | sp.Name, pos, scene.RegionInfo.RegionName, noFly, landAtTarget); |
185 | 185 | ||
186 | sp.MoveToTarget(pos, noFly, landAtTarget); | 186 | sp.MoveToTarget(pos, noFly, landAtTarget); |
187 | sp.SetAlwaysRun = running; | ||
187 | 188 | ||
188 | return true; | 189 | return true; |
189 | } | 190 | } |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs index a39257e..65dad2d 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs | |||
@@ -242,7 +242,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests | |||
242 | Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos)); | 242 | Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos)); |
243 | 243 | ||
244 | Vector3 targetPos = startPos + new Vector3(0, 10, 0); | 244 | Vector3 targetPos = startPos + new Vector3(0, 10, 0); |
245 | m_npcMod.MoveToTarget(npc.UUID, m_scene, targetPos, false, false); | 245 | m_npcMod.MoveToTarget(npc.UUID, m_scene, targetPos, false, false, false); |
246 | 246 | ||
247 | Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos)); | 247 | Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos)); |
248 | //Assert.That(npc.Rotation, Is.EqualTo(new Quaternion(0, 0, 0.7071068f, 0.7071068f))); | 248 | //Assert.That(npc.Rotation, Is.EqualTo(new Quaternion(0, 0, 0.7071068f, 0.7071068f))); |
@@ -267,7 +267,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests | |||
267 | // Try a second movement | 267 | // Try a second movement |
268 | startPos = npc.AbsolutePosition; | 268 | startPos = npc.AbsolutePosition; |
269 | targetPos = startPos + new Vector3(10, 0, 0); | 269 | targetPos = startPos + new Vector3(10, 0, 0); |
270 | m_npcMod.MoveToTarget(npc.UUID, m_scene, targetPos, false, false); | 270 | m_npcMod.MoveToTarget(npc.UUID, m_scene, targetPos, false, false, false); |
271 | 271 | ||
272 | Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos)); | 272 | Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos)); |
273 | // Assert.That(npc.Rotation, Is.EqualTo(new Quaternion(0, 0, 0, 1))); | 273 | // Assert.That(npc.Rotation, Is.EqualTo(new Quaternion(0, 0, 0, 1))); |