aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-08-10 01:47:37 +0100
committerJustin Clark-Casey (justincc)2011-08-10 01:47:37 +0100
commit5d6c9644faf6aeac38410af9cff97adfef88d7aa (patch)
tree4913309153fd8b55f7cd5cd27bd449f9eecd41f5 /OpenSim/Region/ScriptEngine
parentStop trying to deregister caps or close child agents when an NPC is removed (diff)
downloadopensim-SC_OLD-5d6c9644faf6aeac38410af9cff97adfef88d7aa.zip
opensim-SC_OLD-5d6c9644faf6aeac38410af9cff97adfef88d7aa.tar.gz
opensim-SC_OLD-5d6c9644faf6aeac38410af9cff97adfef88d7aa.tar.bz2
opensim-SC_OLD-5d6c9644faf6aeac38410af9cff97adfef88d7aa.tar.xz
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.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs14
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs5
3 files changed, 19 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 9c32029..63c882d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2209,7 +2209,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2209 if (module != null) 2209 if (module != null)
2210 { 2210 {
2211 Vector3 pos = new Vector3((float) position.x, (float) position.y, (float) position.z); 2211 Vector3 pos = new Vector3((float) position.x, (float) position.y, (float) position.z);
2212 module.MoveToTarget(new UUID(npc.m_string), World, pos); 2212 module.MoveToTarget(new UUID(npc.m_string), World, pos, false);
2213 }
2214 }
2215
2216 public void osNpcMoveToTarget(LSL_Key npc, LSL_Vector position, int noFly)
2217 {
2218 CheckThreatLevel(ThreatLevel.High, "osNpcMoveToTarget");
2219
2220 INPCModule module = World.RequestModuleInterface<INPCModule>();
2221 if (module != null)
2222 {
2223 Vector3 pos = new Vector3((float) position.x, (float) position.y, (float) position.z);
2224 module.MoveToTarget(new UUID(npc.m_string), World, pos, noFly != 0);
2213 } 2225 }
2214 } 2226 }
2215 2227
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index ab0097a..56be9d9 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 osNpcMoveToTarget(key npc, vector position, int noFly);
176 void osNpcStopMoveTo(LSL_Key npc); 177 void osNpcStopMoveTo(LSL_Key npc);
177 void osNpcSay(key npc, string message); 178 void osNpcSay(key npc, string message);
178 void osNpcRemove(key npc); 179 void osNpcRemove(key npc);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index a7843dd..c745e5c 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 osNpcMoveToTarget(key npc, vector position, int noFly)
502 {
503 m_OSSL_Functions.osNpcMoveToTarget(npc, position, noFly);
504 }
505
501 public void osNpcStopMoveTo(LSL_Key npc) 506 public void osNpcStopMoveTo(LSL_Key npc)
502 { 507 {
503 m_OSSL_Functions.osNpcStopMoveTo(npc); 508 m_OSSL_Functions.osNpcStopMoveTo(npc);