aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
authorMW2007-06-28 13:13:17 +0000
committerMW2007-06-28 13:13:17 +0000
commit3456d951d89fbc83f742d40ca8ca2a1a79d414eb (patch)
treecc5a53b8edd4ac4cc99e6178fb70c98672f3c168 /OpenSim/Region/Environment/Scenes/Scene.cs
parentshould now work. (diff)
downloadopensim-SC_OLD-3456d951d89fbc83f742d40ca8ca2a1a79d414eb.zip
opensim-SC_OLD-3456d951d89fbc83f742d40ca8ca2a1a79d414eb.tar.gz
opensim-SC_OLD-3456d951d89fbc83f742d40ca8ca2a1a79d414eb.tar.bz2
opensim-SC_OLD-3456d951d89fbc83f742d40ca8ca2a1a79d414eb.tar.xz
Imported the scripting changes, so now should be up to date with sugilite.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs30
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;
39using OpenSim.Framework.Types; 39using OpenSim.Framework.Types;
40using OpenSim.Framework.Inventory; 40using OpenSim.Framework.Inventory;
41using OpenSim.Framework; 41using OpenSim.Framework;
42using OpenSim.Region.Environment.Scripting;
43using OpenSim.Region.Terrain; 42using OpenSim.Region.Terrain;
44using OpenSim.Framework.Communications; 43using OpenSim.Framework.Communications;
45using OpenSim.Region.Caches; 44using OpenSim.Region.Caches;
46using OpenSim.Region.Environment; 45using OpenSim.Region.Environment;
47using OpenSim.Framework.Servers; 46using OpenSim.Framework.Servers;
47using OpenSim.Scripting;
48using OpenSim.Region.Capabilities;
49using Caps = OpenSim.Region.Capabilities.Caps;
48 50
49namespace OpenSim.Region.Environment.Scenes 51namespace 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 }