aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-02-01 20:15:36 +0000
committerJustin Clark-Casey (justincc)2010-02-01 20:15:36 +0000
commit4c1740f7d8e4e577167a84438cce83a7cc32f56d (patch)
tree59539c8d489bdaffc14c2fa7acc5718bf0b189f2 /OpenSim/Region/Framework
parentDon't try to start attachment scripts or send updates if the attachment itsel... (diff)
downloadopensim-SC_OLD-4c1740f7d8e4e577167a84438cce83a7cc32f56d.zip
opensim-SC_OLD-4c1740f7d8e4e577167a84438cce83a7cc32f56d.tar.gz
opensim-SC_OLD-4c1740f7d8e4e577167a84438cce83a7cc32f56d.tar.bz2
opensim-SC_OLD-4c1740f7d8e4e577167a84438cce83a7cc32f56d.tar.xz
Actually make EventManager.OnAttach() fire when an object is attached. Previously, only detach was firing!
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs3
2 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 004ea1f..464ead8 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -313,9 +313,10 @@ namespace OpenSim.Region.Framework.Scenes
313 public event EmptyScriptCompileQueue OnEmptyScriptCompileQueue; 313 public event EmptyScriptCompileQueue OnEmptyScriptCompileQueue;
314 314
315 /// <summary> 315 /// <summary>
316 /// Called whenever an object is attached, or detached 316 /// Called whenever an object is attached, or detached from an in-world presence.
317 /// from an in-world presence.
318 /// </summary> 317 /// </summary>
318 /// If the object is being attached, then the avatarID will be present. If the object is being detached then
319 /// the avatarID is UUID.Zero (I know, this doesn't make much sense but now it's historical).
319 public delegate void Attach(uint localID, UUID itemID, UUID avatarID); 320 public delegate void Attach(uint localID, UUID itemID, UUID avatarID);
320 public event Attach OnAttach; 321 public event Attach OnAttach;
321 322
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index fc2798d..1ac061a 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -528,6 +528,9 @@ namespace OpenSim.Region.Framework.Scenes
528 // Fire after attach, so we don't get messy perms dialogs 528 // Fire after attach, so we don't get messy perms dialogs
529 // 3 == AttachedRez 529 // 3 == AttachedRez
530 objatt.CreateScriptInstances(0, true, m_parentScene.DefaultScriptEngine, 3); 530 objatt.CreateScriptInstances(0, true, m_parentScene.DefaultScriptEngine, 3);
531
532 // Do this last so that event listeners have access to all the effects of the attachment
533 m_parentScene.EventManager.TriggerOnAttach(objatt.LocalId, itemID, remoteClient.AgentId);
531 } 534 }
532 } 535 }
533 536