remove default values from prior commit since mono cant deal with them
parent
b697d0e895
commit
4186fa10f0
|
@ -117,7 +117,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
/// If true, NPC moves with running speed.
|
/// If true, NPC moves with running speed.
|
||||||
/// <returns>True if the operation succeeded, false if there was no such agent or the agent was not an NPC</returns>
|
/// <returns>True if the operation succeeded, false if there was no such agent or the agent was not an NPC</returns>
|
||||||
///
|
///
|
||||||
bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly, bool landAtTarget, bool running = false);
|
bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly, bool landAtTarget, bool running);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stop the NPC's current movement.
|
/// Stop the NPC's current movement.
|
||||||
|
|
|
@ -169,7 +169,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly, bool landAtTarget, bool running = false)
|
public bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly, bool landAtTarget, bool running)
|
||||||
{
|
{
|
||||||
lock (m_avatars)
|
lock (m_avatars)
|
||||||
{
|
{
|
||||||
|
|
|
@ -242,7 +242,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
|
||||||
Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos));
|
Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos));
|
||||||
|
|
||||||
Vector3 targetPos = startPos + new Vector3(0, 10, 0);
|
Vector3 targetPos = startPos + new Vector3(0, 10, 0);
|
||||||
m_npcMod.MoveToTarget(npc.UUID, m_scene, targetPos, false, false);
|
m_npcMod.MoveToTarget(npc.UUID, m_scene, targetPos, false, false, false);
|
||||||
|
|
||||||
Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos));
|
Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos));
|
||||||
//Assert.That(npc.Rotation, Is.EqualTo(new Quaternion(0, 0, 0.7071068f, 0.7071068f)));
|
//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
|
||||||
// Try a second movement
|
// Try a second movement
|
||||||
startPos = npc.AbsolutePosition;
|
startPos = npc.AbsolutePosition;
|
||||||
targetPos = startPos + new Vector3(10, 0, 0);
|
targetPos = startPos + new Vector3(10, 0, 0);
|
||||||
m_npcMod.MoveToTarget(npc.UUID, m_scene, targetPos, false, false);
|
m_npcMod.MoveToTarget(npc.UUID, m_scene, targetPos, false, false, false);
|
||||||
|
|
||||||
Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos));
|
Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos));
|
||||||
// Assert.That(npc.Rotation, Is.EqualTo(new Quaternion(0, 0, 0, 1)));
|
// Assert.That(npc.Rotation, Is.EqualTo(new Quaternion(0, 0, 0, 1)));
|
||||||
|
|
|
@ -2449,7 +2449,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Vector3 pos = new Vector3((float) position.x, (float) position.y, (float) position.z);
|
Vector3 pos = new Vector3((float) position.x, (float) position.y, (float) position.z);
|
||||||
module.MoveToTarget(npcId, World, pos, false, true);
|
module.MoveToTarget(npcId, World, pos, false, true, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue