From 720135207405be15b94a006de155353259a64944 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 22 Sep 2016 22:08:21 +0100 Subject: bug fix: add a missing return; add some error messages --- .../Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index abb7d70..57bff6e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -2664,13 +2664,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api private LSL_Key NpcCreate( string firstname, string lastname, LSL_Vector position, string notecard, bool owned, bool senseAsAgent, bool hostGroupID) { - if (!World.Permissions.CanRezObject(1, m_host.OwnerID, new Vector3((float)position.x, (float)position.y, (float)position.z))) + { + OSSLError("no permission to rez NPC at requested location"); return new LSL_Key(UUID.Zero.ToString()); + } INPCModule module = World.RequestModuleInterface(); if(module == null) - new LSL_Key(UUID.Zero.ToString()); + { + OSSLError("NPC module not enabled"); + return new LSL_Key(UUID.Zero.ToString()); + } string groupTitle = String.Empty; UUID groupID = UUID.Zero; -- cgit v1.1