early code to allow scripts to force npcs not to fly when moving to target

this is to allow walking on prims.  it will be up to the script writer to be sure that there is a continuous path.
currently implemented in osNpcMoveToTarget(), but none of this is final.
This commit is contained in:
Justin Clark-Casey (justincc)
2011-08-10 01:47:37 +01:00
parent 4cb8d6379d
commit 5d6c9644fa
15 changed files with 45 additions and 18 deletions

View File

@@ -2209,7 +2209,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (module != null)
{
Vector3 pos = new Vector3((float) position.x, (float) position.y, (float) position.z);
module.MoveToTarget(new UUID(npc.m_string), World, pos);
module.MoveToTarget(new UUID(npc.m_string), World, pos, false);
}
}
public void osNpcMoveToTarget(LSL_Key npc, LSL_Vector position, int noFly)
{
CheckThreatLevel(ThreatLevel.High, "osNpcMoveToTarget");
INPCModule module = World.RequestModuleInterface<INPCModule>();
if (module != null)
{
Vector3 pos = new Vector3((float) position.x, (float) position.y, (float) position.z);
module.MoveToTarget(new UUID(npc.m_string), World, pos, noFly != 0);
}
}