diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index ff54efa..b345c0c 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -39,12 +39,14 @@ using OpenSim.Framework.Interfaces; | |||
39 | using OpenSim.Framework.Types; | 39 | using OpenSim.Framework.Types; |
40 | using OpenSim.Framework.Inventory; | 40 | using OpenSim.Framework.Inventory; |
41 | using OpenSim.Framework; | 41 | using OpenSim.Framework; |
42 | using OpenSim.Region.Environment.Scripting; | ||
43 | using OpenSim.Region.Terrain; | 42 | using OpenSim.Region.Terrain; |
44 | using OpenSim.Framework.Communications; | 43 | using OpenSim.Framework.Communications; |
45 | using OpenSim.Region.Caches; | 44 | using OpenSim.Region.Caches; |
46 | using OpenSim.Region.Environment; | 45 | using OpenSim.Region.Environment; |
47 | using OpenSim.Framework.Servers; | 46 | using OpenSim.Framework.Servers; |
47 | using OpenSim.Scripting; | ||
48 | using OpenSim.Region.Capabilities; | ||
49 | using Caps = OpenSim.Region.Capabilities.Caps; | ||
48 | 50 | ||
49 | namespace OpenSim.Region.Environment.Scenes | 51 | namespace OpenSim.Region.Environment.Scenes |
50 | { | 52 | { |
@@ -60,20 +62,19 @@ namespace OpenSim.Region.Environment.Scenes | |||
60 | private Random Rand = new Random(); | 62 | private Random Rand = new Random(); |
61 | private uint _primCount = 702000; | 63 | private uint _primCount = 702000; |
62 | private int storageCount; | 64 | private int storageCount; |
63 | private Dictionary<LLUUID, ScriptHandler> m_scriptHandlers; | ||
64 | private Dictionary<string, ScriptFactory> m_scripts; | ||
65 | private Mutex updateLock; | 65 | private Mutex updateLock; |
66 | 66 | ||
67 | protected AuthenticateSessionsBase authenticateHandler; | 67 | protected AuthenticateSessionsBase authenticateHandler; |
68 | protected RegionCommsListener regionCommsHost; | 68 | protected RegionCommsListener regionCommsHost; |
69 | protected CommunicationsManager commsManager; | 69 | protected CommunicationsManager commsManager; |
70 | 70 | ||
71 | protected Dictionary<LLUUID, Capabilities.Caps> capsHandlers = new Dictionary<LLUUID, Capabilities.Caps>(); | 71 | protected Dictionary<LLUUID,Caps> capsHandlers = new Dictionary<LLUUID, Caps>(); |
72 | protected BaseHttpServer httpListener; | 72 | protected BaseHttpServer httpListener; |
73 | 73 | ||
74 | public ParcelManager parcelManager; | 74 | public ParcelManager parcelManager; |
75 | public EstateManager estateManager; | 75 | public EstateManager estateManager; |
76 | public EventManager eventManager; | 76 | public EventManager eventManager; |
77 | public ScriptManager scriptManager; | ||
77 | 78 | ||
78 | #region Properties | 79 | #region Properties |
79 | /// <summary> | 80 | /// <summary> |
@@ -117,12 +118,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
117 | 118 | ||
118 | parcelManager = new ParcelManager(this, this.m_regInfo); | 119 | parcelManager = new ParcelManager(this, this.m_regInfo); |
119 | estateManager = new EstateManager(this, this.m_regInfo); | 120 | estateManager = new EstateManager(this, this.m_regInfo); |
120 | 121 | scriptManager = new ScriptManager(this); | |
121 | eventManager = new EventManager(); | 122 | eventManager = new EventManager(); |
122 | 123 | ||
123 | m_scriptHandlers = new Dictionary<LLUUID, ScriptHandler>(); | ||
124 | m_scripts = new Dictionary<string, ScriptFactory>(); | ||
125 | |||
126 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "World.cs - creating new entitities instance"); | 124 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "World.cs - creating new entitities instance"); |
127 | Entities = new Dictionary<libsecondlife.LLUUID, Entity>(); | 125 | Entities = new Dictionary<libsecondlife.LLUUID, Entity>(); |
128 | Avatars = new Dictionary<LLUUID, ScenePresence>(); | 126 | Avatars = new Dictionary<LLUUID, ScenePresence>(); |
@@ -195,19 +193,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
195 | Entities[UUID].update(); | 193 | Entities[UUID].update(); |
196 | } | 194 | } |
197 | 195 | ||
198 | // New | 196 | // General purpose event manager |
199 | eventManager.TriggerOnFrame(); | 197 | eventManager.TriggerOnFrame(); |
200 | 198 | ||
201 | // TODO: Obsolete - Phase out | ||
202 | foreach (ScriptHandler scriptHandler in m_scriptHandlers.Values) | ||
203 | { | ||
204 | scriptHandler.OnFrame(); | ||
205 | } | ||
206 | foreach (IScriptEngine scripteng in this.scriptEngines.Values) | ||
207 | { | ||
208 | scripteng.OnFrame(); | ||
209 | } | ||
210 | |||
211 | //backup world data | 199 | //backup world data |
212 | this.storageCount++; | 200 | this.storageCount++; |
213 | if (storageCount > 1200) //set to how often you want to backup | 201 | if (storageCount > 1200) //set to how often you want to backup |
@@ -256,7 +244,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
256 | //Parcel backup routines | 244 | //Parcel backup routines |
257 | ParcelData[] parcels = new ParcelData[parcelManager.parcelList.Count]; | 245 | ParcelData[] parcels = new ParcelData[parcelManager.parcelList.Count]; |
258 | int i = 0; | 246 | int i = 0; |
259 | foreach (OpenSim.Region.Environment.Parcel parcel in parcelManager.parcelList.Values) | 247 | foreach (OpenSim.Region.Parcel parcel in parcelManager.parcelList.Values) |
260 | { | 248 | { |
261 | parcels[i] = parcel.parcelData; | 249 | parcels[i] = parcel.parcelData; |
262 | i++; | 250 | i++; |
@@ -672,7 +660,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
672 | if (agent.CapsPath != "") | 660 | if (agent.CapsPath != "") |
673 | { | 661 | { |
674 | //Console.WriteLine("new user, so creating caps handler for it"); | 662 | //Console.WriteLine("new user, so creating caps handler for it"); |
675 | Capabilities.Caps cap = new Capabilities.Caps(this.assetCache, httpListener, this.m_regInfo.CommsIPListenAddr, 9000, agent.CapsPath, agent.AgentID); | 663 | Caps cap = new Caps(this.assetCache, httpListener, this.m_regInfo.CommsIPListenAddr, 9000, agent.CapsPath, agent.AgentID); |
676 | cap.RegisterHandlers(); | 664 | cap.RegisterHandlers(); |
677 | this.capsHandlers.Add(agent.AgentID, cap); | 665 | this.capsHandlers.Add(agent.AgentID, cap); |
678 | } | 666 | } |