aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-01-12 19:37:30 +0000
committerJustin Clark-Casey (justincc)2012-01-12 19:37:30 +0000
commitc4972e773465172d33d72f94d3f5e37cec1b8831 (patch)
tree876d187c646b2fc8290f6222719fd83dc2c6589a /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
parentAllow all NPCs to show up on sensors as all osNpc* script methods now check f... (diff)
downloadopensim-SC_OLD-c4972e773465172d33d72f94d3f5e37cec1b8831.zip
opensim-SC_OLD-c4972e773465172d33d72f94d3f5e37cec1b8831.tar.gz
opensim-SC_OLD-c4972e773465172d33d72f94d3f5e37cec1b8831.tar.bz2
opensim-SC_OLD-c4972e773465172d33d72f94d3f5e37cec1b8831.tar.xz
Add osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard, int options) variant.
This will be documented soon. Options can currently be OS_NPC_CREATE_OWNED - creates a 'creator owned' avatar that will only respond to osNpc* functions made by scripts owned by the npc creator OS_NPC_NOT_OWNED - creates an avatar which will respond to any osNpc* functions that a caller has permission to make (through the usual OSSL permission mechanisms). options is being added to provide better scope for future extensibility without having to add more functions The original non-options osNpcCreate() function will continue to exist.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs6
1 files changed, 6 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 509bbec..25e4789 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2089,6 +2089,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2089 return NpcCreate(firstname, lastname, position, notecard, false); 2089 return NpcCreate(firstname, lastname, position, notecard, false);
2090 } 2090 }
2091 2091
2092 public LSL_Key osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard, int options)
2093 {
2094 CheckThreatLevel(ThreatLevel.High, "osNpcCreate");
2095 return NpcCreate(firstname, lastname, position, notecard, (options & ScriptBaseClass.OS_NPC_NOT_OWNED) == 0);
2096 }
2097
2092 private LSL_Key NpcCreate(string firstname, string lastname, LSL_Vector position, string notecard, bool owned) 2098 private LSL_Key NpcCreate(string firstname, string lastname, LSL_Vector position, string notecard, bool owned)
2093 { 2099 {
2094 INPCModule module = World.RequestModuleInterface<INPCModule>(); 2100 INPCModule module = World.RequestModuleInterface<INPCModule>();