mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
* 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
This commit is contained in:
@@ -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 |
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user