From 530a6a40edeff13d2e26c3c7d912efe4520014b3 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 17 Dec 2018 10:57:09 +0000 Subject: [PATCH] mantis 8427: add new reject flags, change default, see mantis --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 7 ++++--- .../ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | 2 ++ bin/ScriptSyntax.xml | 10 +++++++++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index bb8fb79fd0..11dbae168b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -15305,6 +15305,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api bool checkAgents = !((rejectTypes & ScriptBaseClass.RC_REJECT_AGENTS) == ScriptBaseClass.RC_REJECT_AGENTS); bool checkNonPhysical = !((rejectTypes & ScriptBaseClass.RC_REJECT_NONPHYSICAL) == ScriptBaseClass.RC_REJECT_NONPHYSICAL); bool checkPhysical = !((rejectTypes & ScriptBaseClass.RC_REJECT_PHYSICAL) == ScriptBaseClass.RC_REJECT_PHYSICAL); + bool rejectHost = ((rejectTypes & ScriptBaseClass.RC_REJECT_HOST) != 0); + bool rejectHostGroup = ((rejectTypes & ScriptBaseClass.RC_REJECT_HOSTGROUP) != 0); if (World.SupportsRayCastFiltered()) { @@ -15432,7 +15434,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api continue; // physics ray can return colisions with host prim - if (m_host.LocalId == result.ConsumerID) + if (rejectHost && m_host.LocalId == result.ConsumerID) continue; UUID itemID = UUID.Zero; @@ -15442,8 +15444,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // It's a prim! if (part != null) { - // dont detect members of same object ??? - if (part.ParentGroup == thisgrp) + if (rejectHostGroup && part.ParentGroup == thisgrp) continue; if ((dataFlags & ScriptBaseClass.RC_GET_ROOT_KEY) == ScriptBaseClass.RC_GET_ROOT_KEY) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index 15a57cd524..49f46b7b4c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs @@ -842,6 +842,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public static readonly LSLInteger RC_REJECT_PHYSICAL = 2; public static readonly LSLInteger RC_REJECT_NONPHYSICAL = 4; public static readonly LSLInteger RC_REJECT_LAND = 8; + public static readonly LSLInteger RC_REJECT_HOST = 0x20000000; + public static readonly LSLInteger RC_REJECT_HOSTGROUP = 0x40000000; public static readonly LSLInteger RC_GET_NORMAL = 1; public static readonly LSLInteger RC_GET_ROOT_KEY = 2; diff --git a/bin/ScriptSyntax.xml b/bin/ScriptSyntax.xml index fb6969e420..60daa89c79 100644 --- a/bin/ScriptSyntax.xml +++ b/bin/ScriptSyntax.xml @@ -1,4 +1,4 @@ -fe7d5416-2379-feca-3b16-6b9854799c50 +41ccf83c-178f-6070-7960-1448d28dcdab llsd-lsl-syntax-version2 controls @@ -2567,6 +2567,14 @@ fe7d5416-2379-feca-3b16-6b9854799c50 typeinteger value1 + RC_REJECT_HOST + typeinteger + value0x20000000 + + RC_REJECT_HOSTGROUP + typeinteger + value0x40000000 + RC_REJECT_LAND typeinteger value8