diff options
author | Justin Clark-Casey (justincc) | 2011-08-10 00:26:38 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-08-10 00:26:38 +0100 |
commit | 195c1dc9b8b8511980d9a607a242b24a5a91da17 (patch) | |
tree | f1e844250bf92895e39a41f8b6fac7797a09317f /OpenSim/Region/ScriptEngine/Shared | |
parent | When an NPC appearance is loaded, rez the attachments too (diff) | |
download | opensim-SC_OLD-195c1dc9b8b8511980d9a607a242b24a5a91da17.zip opensim-SC_OLD-195c1dc9b8b8511980d9a607a242b24a5a91da17.tar.gz opensim-SC_OLD-195c1dc9b8b8511980d9a607a242b24a5a91da17.tar.bz2 opensim-SC_OLD-195c1dc9b8b8511980d9a607a242b24a5a91da17.tar.xz |
implement osNpcStopMoveTo() to cancel any current move target
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
3 files changed, 15 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index a05c623..9c32029 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -2213,6 +2213,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2213 | } | 2213 | } |
2214 | } | 2214 | } |
2215 | 2215 | ||
2216 | public void osNpcStopMoveTo(LSL_Key npc) | ||
2217 | { | ||
2218 | CheckThreatLevel(ThreatLevel.VeryLow, "osNpcStopMoveTo"); | ||
2219 | |||
2220 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | ||
2221 | if (module != null) | ||
2222 | module.StopMoveToTarget(new UUID(npc.m_string), World); | ||
2223 | } | ||
2224 | |||
2216 | public void osNpcSay(LSL_Key npc, string message) | 2225 | public void osNpcSay(LSL_Key npc, string message) |
2217 | { | 2226 | { |
2218 | CheckThreatLevel(ThreatLevel.High, "osNpcSay"); | 2227 | CheckThreatLevel(ThreatLevel.High, "osNpcSay"); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 92473ae..ab0097a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -173,6 +173,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
173 | LSL_Key osNpcSaveAppearance(string avatar, string notecardName); | 173 | LSL_Key osNpcSaveAppearance(string avatar, string notecardName); |
174 | void osNpcLoadAppearance(string avatar, string notecardNameOrUuid); | 174 | void osNpcLoadAppearance(string avatar, string notecardNameOrUuid); |
175 | void osNpcMoveTo(key npc, vector position); | 175 | void osNpcMoveTo(key npc, vector position); |
176 | void osNpcStopMoveTo(LSL_Key npc); | ||
176 | void osNpcSay(key npc, string message); | 177 | void osNpcSay(key npc, string message); |
177 | void osNpcRemove(key npc); | 178 | void osNpcRemove(key npc); |
178 | 179 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 4b21c88..a7843dd 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -498,6 +498,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
498 | m_OSSL_Functions.osNpcMoveTo(npc, position); | 498 | m_OSSL_Functions.osNpcMoveTo(npc, position); |
499 | } | 499 | } |
500 | 500 | ||
501 | public void osNpcStopMoveTo(LSL_Key npc) | ||
502 | { | ||
503 | m_OSSL_Functions.osNpcStopMoveTo(npc); | ||
504 | } | ||
505 | |||
501 | public void osNpcSay(key npc, string message) | 506 | public void osNpcSay(key npc, string message) |
502 | { | 507 | { |
503 | m_OSSL_Functions.osNpcSay(npc, message); | 508 | m_OSSL_Functions.osNpcSay(npc, message); |