From 2fa072b579d6c8d1e37c9c72dc223814bfa41e9d Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 22 Nov 2008 22:56:00 +0000 Subject: Next step in the presence module - some core plumbing included at no extra cost --- OpenSim/Region/Environment/Scenes/EventManager.cs | 13 +++++++++++++ OpenSim/Region/Environment/Scenes/Scene.cs | 2 ++ 2 files changed, 15 insertions(+) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/EventManager.cs b/OpenSim/Region/Environment/Scenes/EventManager.cs index bcefe37..cdaff51 100644 --- a/OpenSim/Region/Environment/Scenes/EventManager.cs +++ b/OpenSim/Region/Environment/Scenes/EventManager.cs @@ -98,6 +98,10 @@ namespace OpenSim.Region.Environment.Scenes public delegate void OnPermissionErrorDelegate(UUID user, string reason); + public delegate void OnSetRootAgentSceneDelegate(UUID agentID); + + public event OnSetRootAgentSceneDelegate OnSetRootAgentScene; + public event ObjectGrabDelegate OnObjectGrab; public event ObjectDeGrabDelegate OnObjectDeGrab; public event ScriptResetDelegate OnScriptReset; @@ -389,6 +393,8 @@ namespace OpenSim.Region.Environment.Scenes private GetScriptRunning handlerGetScriptRunning = null; private SunLindenHour handlerSunGetLindenHour = null; + private OnSetRootAgentSceneDelegate handlerSetRootAgentScene = null; + public void TriggerGetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID) { @@ -912,5 +918,12 @@ namespace OpenSim.Region.Environment.Scenes if (handlerCollidingEnd != null) handlerCollidingEnd(localId, colliders); } + + public void TriggerSetRootAgentScene(UUID agentID) + { + handlerSetRootAgentScene = OnSetRootAgentScene; + if (handlerSetRootAgentScene != null) + handlerSetRootAgentScene(agentID); + } } } diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 2fcca43..0c5eb62 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -4214,6 +4214,8 @@ namespace OpenSim.Region.Environment.Scenes return; inv.SetRootAgentScene(agentID, this); + + EventManager.TriggerSetRootAgentScene(agentID); } public bool NeedSceneCacheClear(UUID agentID) -- cgit v1.1