diff options
author | Adam Frisby | 2007-06-27 06:00:24 +0000 |
---|---|---|
committer | Adam Frisby | 2007-06-27 06:00:24 +0000 |
commit | e56c51c665570f2b3c564d5a8932af6acbbc6a4a (patch) | |
tree | fc9d8b9a87db5fcaa1c922444c20900348c11053 /OpenSim/OpenSim.Region/Scenes | |
parent | * Commiting new "SceneEvents" class - a single class which contains bindable ... (diff) | |
download | opensim-SC_OLD-e56c51c665570f2b3c564d5a8932af6acbbc6a4a.zip opensim-SC_OLD-e56c51c665570f2b3c564d5a8932af6acbbc6a4a.tar.gz opensim-SC_OLD-e56c51c665570f2b3c564d5a8932af6acbbc6a4a.tar.bz2 opensim-SC_OLD-e56c51c665570f2b3c564d5a8932af6acbbc6a4a.tar.xz |
* 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.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/OpenSim.Region/Scenes/Scene.cs | 8 | ||||
-rw-r--r-- | OpenSim/OpenSim.Region/Scenes/SceneEvents.cs | 2 |
2 files changed, 9 insertions, 1 deletions
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 | |||
73 | 73 | ||
74 | public ParcelManager parcelManager; | 74 | public ParcelManager parcelManager; |
75 | public EstateManager estateManager; | 75 | public EstateManager estateManager; |
76 | public EventManager eventManager; | ||
76 | 77 | ||
77 | #region Properties | 78 | #region Properties |
78 | /// <summary> | 79 | /// <summary> |
@@ -117,6 +118,8 @@ namespace OpenSim.Region.Scenes | |||
117 | parcelManager = new ParcelManager(this, this.m_regInfo); | 118 | parcelManager = new ParcelManager(this, this.m_regInfo); |
118 | estateManager = new EstateManager(this, this.m_regInfo); | 119 | estateManager = new EstateManager(this, this.m_regInfo); |
119 | 120 | ||
121 | eventManager = new EventManager(); | ||
122 | |||
120 | m_scriptHandlers = new Dictionary<LLUUID, ScriptHandler>(); | 123 | m_scriptHandlers = new Dictionary<LLUUID, ScriptHandler>(); |
121 | m_scripts = new Dictionary<string, ScriptFactory>(); | 124 | m_scripts = new Dictionary<string, ScriptFactory>(); |
122 | 125 | ||
@@ -192,6 +195,10 @@ namespace OpenSim.Region.Scenes | |||
192 | Entities[UUID].update(); | 195 | Entities[UUID].update(); |
193 | } | 196 | } |
194 | 197 | ||
198 | // New | ||
199 | eventManager.TriggerOnFrame(); | ||
200 | |||
201 | // TODO: Obsolete - Phase out | ||
195 | foreach (ScriptHandler scriptHandler in m_scriptHandlers.Values) | 202 | foreach (ScriptHandler scriptHandler in m_scriptHandlers.Values) |
196 | { | 203 | { |
197 | scriptHandler.OnFrame(); | 204 | scriptHandler.OnFrame(); |
@@ -200,6 +207,7 @@ namespace OpenSim.Region.Scenes | |||
200 | { | 207 | { |
201 | scripteng.OnFrame(); | 208 | scripteng.OnFrame(); |
202 | } | 209 | } |
210 | |||
203 | //backup world data | 211 | //backup world data |
204 | this.storageCount++; | 212 | this.storageCount++; |
205 | if (storageCount > 1200) //set to how often you want to backup | 213 | 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 | |||
7 | /// <summary> | 7 | /// <summary> |
8 | /// A class for triggering remote scene events. | 8 | /// A class for triggering remote scene events. |
9 | /// </summary> | 9 | /// </summary> |
10 | class SceneEvents | 10 | class EventManager |
11 | { | 11 | { |
12 | public delegate void OnFrameDelegate(); | 12 | public delegate void OnFrameDelegate(); |
13 | public event OnFrameDelegate OnFrame; | 13 | public event OnFrameDelegate OnFrame; |