mantis 8427: add new reject flags, change default, see mantis

This commit is contained in:
UbitUmarov
2018-12-17 10:57:09 +00:00
parent f94b6c3ead
commit 530a6a40ed
3 changed files with 15 additions and 4 deletions

View File

@@ -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)

View File

@@ -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;