* 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.
Sugilite
Adam Frisby 2007-06-27 06:00:24 +00:00
parent f1c03604c9
commit e56c51c665
2 changed files with 9 additions and 1 deletions

View File

@ -73,6 +73,7 @@ namespace OpenSim.Region.Scenes
public ParcelManager parcelManager; public ParcelManager parcelManager;
public EstateManager estateManager; public EstateManager estateManager;
public EventManager eventManager;
#region Properties #region Properties
/// <summary> /// <summary>
@ -117,6 +118,8 @@ namespace OpenSim.Region.Scenes
parcelManager = new ParcelManager(this, this.m_regInfo); parcelManager = new ParcelManager(this, this.m_regInfo);
estateManager = new EstateManager(this, this.m_regInfo); estateManager = new EstateManager(this, this.m_regInfo);
eventManager = new EventManager();
m_scriptHandlers = new Dictionary<LLUUID, ScriptHandler>(); m_scriptHandlers = new Dictionary<LLUUID, ScriptHandler>();
m_scripts = new Dictionary<string, ScriptFactory>(); m_scripts = new Dictionary<string, ScriptFactory>();
@ -192,6 +195,10 @@ namespace OpenSim.Region.Scenes
Entities[UUID].update(); Entities[UUID].update();
} }
// New
eventManager.TriggerOnFrame();
// TODO: Obsolete - Phase out
foreach (ScriptHandler scriptHandler in m_scriptHandlers.Values) foreach (ScriptHandler scriptHandler in m_scriptHandlers.Values)
{ {
scriptHandler.OnFrame(); scriptHandler.OnFrame();
@ -200,6 +207,7 @@ namespace OpenSim.Region.Scenes
{ {
scripteng.OnFrame(); scripteng.OnFrame();
} }
//backup world data //backup world data
this.storageCount++; this.storageCount++;
if (storageCount > 1200) //set to how often you want to backup if (storageCount > 1200) //set to how often you want to backup

View File

@ -7,7 +7,7 @@ namespace OpenSim.Region.Scenes
/// <summary> /// <summary>
/// A class for triggering remote scene events. /// A class for triggering remote scene events.
/// </summary> /// </summary>
class SceneEvents class EventManager
{ {
public delegate void OnFrameDelegate(); public delegate void OnFrameDelegate();
public event OnFrameDelegate OnFrame; public event OnFrameDelegate OnFrame;