add an IsRoot property to sop
parent
c020fed1b8
commit
daa66c4811
|
@ -469,7 +469,21 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
handlerOnAttach = OnAttach;
|
||||
if (handlerOnAttach != null)
|
||||
handlerOnAttach(localID, itemID, avatarID);
|
||||
{
|
||||
foreach (Delegate d in handlerOnAttach.GetInvocationList())
|
||||
{
|
||||
try
|
||||
{
|
||||
d(localID, itemID, avatarID);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. Error was {0} {1}",
|
||||
e.Message, e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void TriggerGetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID)
|
||||
|
|
|
@ -113,6 +113,15 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <value>
|
||||
/// Is this sop a root part?
|
||||
/// </value>
|
||||
[XmlIgnore]
|
||||
public bool IsRoot
|
||||
{
|
||||
get { return ParentGroup.RootPart == this; }
|
||||
}
|
||||
|
||||
// use only one serializer to give the runtime a chance to optimize it (it won't do that if you
|
||||
// use a new instance every time)
|
||||
private static XmlSerializer serializer = new XmlSerializer(typeof (SceneObjectPart));
|
||||
|
|
Loading…
Reference in New Issue