aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorlbsa712007-09-23 23:55:29 +0000
committerlbsa712007-09-23 23:55:29 +0000
commitb3eeb5a8dcdb91d47037234540c5045cdfb9977a (patch)
tree47e5965e061861cb1ee57bee4b319b432e8f63d8 /OpenSim/Region/Environment/Scenes
parentfix to do hollow prims correctly. Reported from (diff)
downloadopensim-SC_OLD-b3eeb5a8dcdb91d47037234540c5045cdfb9977a.zip
opensim-SC_OLD-b3eeb5a8dcdb91d47037234540c5045cdfb9977a.tar.gz
opensim-SC_OLD-b3eeb5a8dcdb91d47037234540c5045cdfb9977a.tar.bz2
opensim-SC_OLD-b3eeb5a8dcdb91d47037234540c5045cdfb9977a.tar.xz
* Purged 'Regions' code pending Agent layer grok.
* Changed so prims aren't loaded until AFTER parcels. * The region startup flow is still an ungodly rats nest.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs19
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs12
2 files changed, 7 insertions, 24 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index adf501e..22f69a5 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -49,7 +49,6 @@ using OpenSim.Region.Environment.Types;
49using OpenSim.Region.Physics.Manager; 49using OpenSim.Region.Physics.Manager;
50using OpenSim.Region.Terrain; 50using OpenSim.Region.Terrain;
51using Timer = System.Timers.Timer; 51using Timer = System.Timers.Timer;
52using OpenSim.Region.Environment.Regions;
53 52
54namespace OpenSim.Region.Environment.Scenes 53namespace OpenSim.Region.Environment.Scenes
55{ 54{
@@ -64,8 +63,6 @@ namespace OpenSim.Region.Environment.Scenes
64 /// publicized so it can be accessed from SceneObjectGroup. 63 /// publicized so it can be accessed from SceneObjectGroup.
65 protected float timeStep = 0.1f; 64 protected float timeStep = 0.1f;
66 65
67 private Regions.Region m_region;
68
69 private Random Rand = new Random(); 66 private Random Rand = new Random();
70 private uint _primCount = 702000; 67 private uint _primCount = 702000;
71 private readonly Mutex _primAllocateMutex = new Mutex(false); 68 private readonly Mutex _primAllocateMutex = new Mutex(false);
@@ -162,8 +159,6 @@ namespace OpenSim.Region.Environment.Scenes
162 { 159 {
163 updateLock = new Mutex(false); 160 updateLock = new Mutex(false);
164 161
165 m_region = new Regions.Region(this);
166
167 m_moduleLoader = moduleLoader; 162 m_moduleLoader = moduleLoader;
168 authenticateHandler = authen; 163 authenticateHandler = authen;
169 commsManager = commsMan; 164 commsManager = commsMan;
@@ -373,7 +368,10 @@ namespace OpenSim.Region.Environment.Scenes
373 /// <returns></returns> 368 /// <returns></returns>
374 internal void Broadcast(Action<IClientAPI> whatToDo) 369 internal void Broadcast(Action<IClientAPI> whatToDo)
375 { 370 {
376 m_region.Broadcast(whatToDo); 371 ForEachScenePresence( delegate( ScenePresence presence )
372 {
373 whatToDo(presence.ControllingClient);
374 });
377 } 375 }
378 /// <summary> 376 /// <summary>
379 /// 377 ///
@@ -458,7 +456,7 @@ namespace OpenSim.Region.Environment.Scenes
458 /// <summary> 456 /// <summary>
459 /// Loads the World's objects 457 /// Loads the World's objects
460 /// </summary> 458 /// </summary>
461 public void LoadPrimsFromStorage() 459 public virtual void LoadPrimsFromStorage()
462 { 460 {
463 MainLog.Instance.Verbose("Loading objects from datastore"); 461 MainLog.Instance.Verbose("Loading objects from datastore");
464 List<SceneObjectGroup> PrimsFromDB = storageManager.DataStore.LoadObjects(m_regInfo.SimUUID); 462 List<SceneObjectGroup> PrimsFromDB = storageManager.DataStore.LoadObjects(m_regInfo.SimUUID);
@@ -790,11 +788,6 @@ namespace OpenSim.Region.Environment.Scenes
790 m_scenePresences.Remove(agentID); 788 m_scenePresences.Remove(agentID);
791 } 789 }
792 790
793 lock (m_region)
794 {
795 m_region.Remove(agentID);
796 }
797
798 lock (Entities) 791 lock (Entities)
799 { 792 {
800 Entities.Remove(agentID); 793 Entities.Remove(agentID);
@@ -1135,7 +1128,7 @@ namespace OpenSim.Region.Environment.Scenes
1135 } 1128 }
1136 1129
1137 public void SendUrlToUser(LLUUID avatarID, string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, 1130 public void SendUrlToUser(LLUUID avatarID, string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned,
1138 string message, string url) 1131 string message, string url)
1139 { 1132 {
1140 if (m_scenePresences.ContainsKey(avatarID)) 1133 if (m_scenePresences.ContainsKey(avatarID))
1141 { 1134 {
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index fa37b9f..f594789 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -35,7 +35,6 @@ using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types; 35using OpenSim.Framework.Types;
36using OpenSim.Framework.Utilities; 36using OpenSim.Framework.Utilities;
37using OpenSim.Region.Physics.Manager; 37using OpenSim.Region.Physics.Manager;
38using OpenSim.Region.Environment.Regions;
39 38
40namespace OpenSim.Region.Environment.Scenes 39namespace OpenSim.Region.Environment.Scenes
41{ 40{
@@ -214,13 +213,6 @@ namespace OpenSim.Region.Environment.Scenes
214 set { m_isChildAgent = value; } 213 set { m_isChildAgent = value; }
215 } 214 }
216 215
217 private RegionSubscription m_regionSubscription;
218
219 public RegionSubscription RegionSubscription
220 {
221 get { return m_regionSubscription; }
222 }
223
224 #endregion 216 #endregion
225 217
226 #region Constructor(s) 218 #region Constructor(s)
@@ -234,8 +226,6 @@ namespace OpenSim.Region.Environment.Scenes
234 /// <param name="regionDat"></param> 226 /// <param name="regionDat"></param>
235 public ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo) 227 public ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo)
236 { 228 {
237 m_regionSubscription = new RegionSubscription( client );
238
239 m_scene = world; 229 m_scene = world;
240 m_uuid = client.AgentId; 230 m_uuid = client.AgentId;
241 231
@@ -881,7 +871,7 @@ namespace OpenSim.Region.Environment.Scenes
881 } 871 }
882 } 872 }
883 873
884 public static void CreateDefaultTextureEntry() 874 static ScenePresence()
885 { 875 {
886 LLObject.TextureEntry textu = new LLObject.TextureEntry(new LLUUID("C228D1CF-4B5D-4BA8-84F4-899A0796AA97")); 876 LLObject.TextureEntry textu = new LLObject.TextureEntry(new LLUUID("C228D1CF-4B5D-4BA8-84F4-899A0796AA97"));
887 textu.CreateFace(0).TextureID = new LLUUID("00000000-0000-1111-9999-000000000012"); 877 textu.CreateFace(0).TextureID = new LLUUID("00000000-0000-1111-9999-000000000012");