mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user