From c4972e773465172d33d72f94d3f5e37cec1b8831 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 12 Jan 2012 19:37:30 +0000 Subject: 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. --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation') 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 return NpcCreate(firstname, lastname, position, notecard, false); } + public LSL_Key osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard, int options) + { + CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); + return NpcCreate(firstname, lastname, position, notecard, (options & ScriptBaseClass.OS_NPC_NOT_OWNED) == 0); + } + private LSL_Key NpcCreate(string firstname, string lastname, LSL_Vector position, string notecard, bool owned) { INPCModule module = World.RequestModuleInterface(); -- cgit v1.1