aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-02-03 16:40:21 +0000
committerJustin Clark-Casey (justincc)2010-02-03 16:40:21 +0000
commitdaa66c4811be49a0eee843f2bc77a3465da674de (patch)
treeac7cda5740de33035299c01fede9cfd6a00cfdc3 /OpenSim/Region/Framework
parentminor: comment out a log line in ScenePresence (diff)
downloadopensim-SC-daa66c4811be49a0eee843f2bc77a3465da674de.zip
opensim-SC-daa66c4811be49a0eee843f2bc77a3465da674de.tar.gz
opensim-SC-daa66c4811be49a0eee843f2bc77a3465da674de.tar.bz2
opensim-SC-daa66c4811be49a0eee843f2bc77a3465da674de.tar.xz
add an IsRoot property to sop
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs16
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs9
2 files changed, 24 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index a4a1abc..c50082d 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -469,7 +469,21 @@ namespace OpenSim.Region.Framework.Scenes
469 { 469 {
470 handlerOnAttach = OnAttach; 470 handlerOnAttach = OnAttach;
471 if (handlerOnAttach != null) 471 if (handlerOnAttach != null)
472 handlerOnAttach(localID, itemID, avatarID); 472 {
473 foreach (Delegate d in handlerOnAttach.GetInvocationList())
474 {
475 try
476 {
477 d(localID, itemID, avatarID);
478 }
479 catch (Exception e)
480 {
481 m_log.ErrorFormat(
482 "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. Error was {0} {1}",
483 e.Message, e.StackTrace);
484 }
485 }
486 }
473 } 487 }
474 488
475 public void TriggerGetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID) 489 public void TriggerGetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID)
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index d7f9bbb..d012d3e 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -113,6 +113,15 @@ namespace OpenSim.Region.Framework.Scenes
113 113
114 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 114 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
115 115
116 /// <value>
117 /// Is this sop a root part?
118 /// </value>
119 [XmlIgnore]
120 public bool IsRoot
121 {
122 get { return ParentGroup.RootPart == this; }
123 }
124
116 // use only one serializer to give the runtime a chance to optimize it (it won't do that if you 125 // use only one serializer to give the runtime a chance to optimize it (it won't do that if you
117 // use a new instance every time) 126 // use a new instance every time)
118 private static XmlSerializer serializer = new XmlSerializer(typeof (SceneObjectPart)); 127 private static XmlSerializer serializer = new XmlSerializer(typeof (SceneObjectPart));