From b70da6ac1955ada29e1cb4dbe9aeb915735ec686 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 30 Apr 2008 16:52:12 +0000 Subject: * Patch by Melanie. Implements proper objectflags on child objects. Thanks Melanie! RE: 0001079: r4387. touch() event does not fire when touch script is in root prim and child prims are touched --- OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 10 +++++----- OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Common') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 66d2700..7a3ccea 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -863,23 +863,23 @@ namespace OpenSim.Region.ScriptEngine.Common public int llGetStatus(int status) { m_host.AddScriptLPS(1); - Console.WriteLine(m_host.UUID.ToString() + " status is " + m_host.ObjectFlags.ToString()); + Console.WriteLine(m_host.UUID.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString()); switch (status) { case BuiltIn_Commands_BaseClass.STATUS_PHYSICS: - if ((m_host.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) == (uint)LLObject.ObjectFlags.Physics) + if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == (uint)LLObject.ObjectFlags.Physics) { return 1; } return 0; case BuiltIn_Commands_BaseClass.STATUS_PHANTOM: - if ((m_host.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == (uint)LLObject.ObjectFlags.Phantom) + if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Phantom) == (uint)LLObject.ObjectFlags.Phantom) { return 1; } return 0; case BuiltIn_Commands_BaseClass.STATUS_CAST_SHADOWS: - if ((m_host.ObjectFlags & (uint)LLObject.ObjectFlags.CastShadows) == (uint)LLObject.ObjectFlags.CastShadows) + if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.CastShadows) == (uint)LLObject.ObjectFlags.CastShadows) { return 1; } @@ -2154,7 +2154,7 @@ namespace OpenSim.Region.ScriptEngine.Common bool attachment=false; // Attachments not implemented yet. TODO: reflect real attachemnt state - if(attachment && agent == m_host.OwnerID) + if(m_host.ParentGroup.RootPart.m_IsAttachment && agent == m_host.ParentGroup.RootPart.m_attachedAvatar) { // When attached, certain permissions are implicit if requested from owner int implicitPerms = BuiltIn_Commands_BaseClass.PERMISSION_TAKE_CONTROLS | diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs index e5c2173..731168d 100644 --- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs @@ -528,7 +528,7 @@ namespace OpenSim.Region.ScriptEngine.Common public void osSetStateEvents(int events) { - m_host.setScriptEvents(m_itemID, events); + m_host.SetScriptEvents(m_itemID, events); } } -- cgit v1.1