From e56c51c665570f2b3c564d5a8932af6acbbc6a4a Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Wed, 27 Jun 2007 06:00:24 +0000 Subject: * Renamed new event manager "SceneEvents" to "EventManager" * Installed into Scene.cs * TODO: Remove IScriptHandler and ScriptEng calls from Update() - they should use eventManager and bind as needed. --- OpenSim/OpenSim.Region/Scenes/Scene.cs | 8 ++++++++ OpenSim/OpenSim.Region/Scenes/SceneEvents.cs | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/OpenSim/OpenSim.Region/Scenes/Scene.cs b/OpenSim/OpenSim.Region/Scenes/Scene.cs index 426dd50..fd78fd6 100644 --- a/OpenSim/OpenSim.Region/Scenes/Scene.cs +++ b/OpenSim/OpenSim.Region/Scenes/Scene.cs @@ -73,6 +73,7 @@ namespace OpenSim.Region.Scenes public ParcelManager parcelManager; public EstateManager estateManager; + public EventManager eventManager; #region Properties /// @@ -117,6 +118,8 @@ namespace OpenSim.Region.Scenes parcelManager = new ParcelManager(this, this.m_regInfo); estateManager = new EstateManager(this, this.m_regInfo); + eventManager = new EventManager(); + m_scriptHandlers = new Dictionary(); m_scripts = new Dictionary(); @@ -192,6 +195,10 @@ namespace OpenSim.Region.Scenes Entities[UUID].update(); } + // New + eventManager.TriggerOnFrame(); + + // TODO: Obsolete - Phase out foreach (ScriptHandler scriptHandler in m_scriptHandlers.Values) { scriptHandler.OnFrame(); @@ -200,6 +207,7 @@ namespace OpenSim.Region.Scenes { scripteng.OnFrame(); } + //backup world data this.storageCount++; if (storageCount > 1200) //set to how often you want to backup diff --git a/OpenSim/OpenSim.Region/Scenes/SceneEvents.cs b/OpenSim/OpenSim.Region/Scenes/SceneEvents.cs index 2b3348a..86ec9df 100644 --- a/OpenSim/OpenSim.Region/Scenes/SceneEvents.cs +++ b/OpenSim/OpenSim.Region/Scenes/SceneEvents.cs @@ -7,7 +7,7 @@ namespace OpenSim.Region.Scenes /// /// A class for triggering remote scene events. /// - class SceneEvents + class EventManager { public delegate void OnFrameDelegate(); public event OnFrameDelegate OnFrame; -- cgit v1.1