aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs16
1 files changed, 12 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 55d760e..62e7941 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -49,6 +49,7 @@ 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;
52 53
53namespace OpenSim.Region.Environment.Scenes 54namespace OpenSim.Region.Environment.Scenes
54{ 55{
@@ -63,6 +64,8 @@ namespace OpenSim.Region.Environment.Scenes
63 /// publicized so it can be accessed from SceneObjectGroup. 64 /// publicized so it can be accessed from SceneObjectGroup.
64 protected float timeStep = 0.1f; 65 protected float timeStep = 0.1f;
65 66
67 private Regions.Region m_region;
68
66 private Random Rand = new Random(); 69 private Random Rand = new Random();
67 private uint _primCount = 702000; 70 private uint _primCount = 702000;
68 private readonly Mutex _primAllocateMutex = new Mutex(false); 71 private readonly Mutex _primAllocateMutex = new Mutex(false);
@@ -159,6 +162,8 @@ namespace OpenSim.Region.Environment.Scenes
159 { 162 {
160 updateLock = new Mutex(false); 163 updateLock = new Mutex(false);
161 164
165 m_region = new Regions.Region(this);
166
162 m_moduleLoader = moduleLoader; 167 m_moduleLoader = moduleLoader;
163 authenticateHandler = authen; 168 authenticateHandler = authen;
164 commsManager = commsMan; 169 commsManager = commsMan;
@@ -302,7 +307,7 @@ namespace OpenSim.Region.Environment.Scenes
302 307
303 float[] terData = Terrain.GetHeights1D(); 308 float[] terData = Terrain.GetHeights1D();
304 309
305 ForEachScenePresence(delegate(ScenePresence presence) 310 Broadcast( delegate( IClientAPI client )
306 { 311 {
307 for (int x = 0; x < 16; x++) 312 for (int x = 0; x < 16; x++)
308 { 313 {
@@ -310,8 +315,7 @@ namespace OpenSim.Region.Environment.Scenes
310 { 315 {
311 if (Terrain.Tainted(x * 16, y * 16)) 316 if (Terrain.Tainted(x * 16, y * 16))
312 { 317 {
313 SendLayerData(x, y, presence.ControllingClient, 318 client.SendLayerData(x, y, terData);
314 terData);
315 } 319 }
316 } 320 }
317 } 321 }
@@ -366,6 +370,10 @@ namespace OpenSim.Region.Environment.Scenes
366 updateLock.ReleaseMutex(); 370 updateLock.ReleaseMutex();
367 } 371 }
368 372
373 internal void Broadcast(Action<IClientAPI> whatToDo)
374 {
375 m_region.Broadcast( whatToDo );
376 }
369 /// <summary> 377 /// <summary>
370 /// 378 ///
371 /// </summary> 379 /// </summary>
@@ -396,7 +404,7 @@ namespace OpenSim.Region.Environment.Scenes
396 404
397 storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD()); 405 storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD());
398 406
399 ForEachScenePresence(delegate(ScenePresence presence) { SendLayerData(presence.ControllingClient); }); 407 Broadcast(delegate(IClientAPI client ) { SendLayerData( client ); });
400 408
401 foreach (LLUUID UUID in Entities.Keys) 409 foreach (LLUUID UUID in Entities.Keys)
402 { 410 {