implement osNpcStopMoveTo() to cancel any current move target

This commit is contained in:
Justin Clark-Casey (justincc)
2011-08-10 00:26:38 +01:00
parent cba54090c7
commit 195c1dc9b8
6 changed files with 66 additions and 9 deletions

View File

@@ -2213,6 +2213,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
}
public void osNpcStopMoveTo(LSL_Key npc)
{
CheckThreatLevel(ThreatLevel.VeryLow, "osNpcStopMoveTo");
INPCModule module = World.RequestModuleInterface<INPCModule>();
if (module != null)
module.StopMoveToTarget(new UUID(npc.m_string), World);
}
public void osNpcSay(LSL_Key npc, string message)
{
CheckThreatLevel(ThreatLevel.High, "osNpcSay");

View File

@@ -173,6 +173,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
LSL_Key osNpcSaveAppearance(string avatar, string notecardName);
void osNpcLoadAppearance(string avatar, string notecardNameOrUuid);
void osNpcMoveTo(key npc, vector position);
void osNpcStopMoveTo(LSL_Key npc);
void osNpcSay(key npc, string message);
void osNpcRemove(key npc);

View File

@@ -498,6 +498,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
m_OSSL_Functions.osNpcMoveTo(npc, position);
}
public void osNpcStopMoveTo(LSL_Key npc)
{
m_OSSL_Functions.osNpcStopMoveTo(npc);
}
public void osNpcSay(key npc, string message)
{
m_OSSL_Functions.osNpcSay(npc, message);