mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 09:16:28 +08:00
implement osNpcStopMoveTo() to cancel any current move target
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user