aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorlbsa712007-10-22 17:55:49 +0000
committerlbsa712007-10-22 17:55:49 +0000
commitdd770c384c2e63cf8a1e2f522741afb8adfab4c2 (patch)
tree97bc7dacf15388d8b32639219ea51872961de2cd /OpenSim/Region/Environment/Scenes
parentafter a small misunderstanding with the match group numbers (diff)
downloadopensim-SC_OLD-dd770c384c2e63cf8a1e2f522741afb8adfab4c2.zip
opensim-SC_OLD-dd770c384c2e63cf8a1e2f522741afb8adfab4c2.tar.gz
opensim-SC_OLD-dd770c384c2e63cf8a1e2f522741afb8adfab4c2.tar.bz2
opensim-SC_OLD-dd770c384c2e63cf8a1e2f522741afb8adfab4c2.tar.xz
* Made EstateSetting static since there's only one instance, and we only need to create it once
* Now cacheing RegionInfos indefinitively; we should add a tiomeout to this cache
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs24
1 files changed, 16 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 553e55f..e2430f8 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -469,7 +469,7 @@ namespace OpenSim.Region.Environment.Scenes
469 double[,] map = storageManager.DataStore.LoadTerrain(); 469 double[,] map = storageManager.DataStore.LoadTerrain();
470 if (map == null) 470 if (map == null)
471 { 471 {
472 if (string.IsNullOrEmpty(m_regInfo.estateSettings.terrainFile)) 472 if (string.IsNullOrEmpty(m_regInfo.EstateSettings.terrainFile))
473 { 473 {
474 MainLog.Instance.Verbose("TERRAIN", "No default terrain. Generating a new terrain."); 474 MainLog.Instance.Verbose("TERRAIN", "No default terrain. Generating a new terrain.");
475 Terrain.HillsGenerator(); 475 Terrain.HillsGenerator();
@@ -480,8 +480,8 @@ namespace OpenSim.Region.Environment.Scenes
480 { 480 {
481 try 481 try
482 { 482 {
483 Terrain.LoadFromFileF32(m_regInfo.estateSettings.terrainFile); 483 Terrain.LoadFromFileF32(m_regInfo.EstateSettings.terrainFile);
484 Terrain *= m_regInfo.estateSettings.terrainMultiplier; 484 Terrain *= m_regInfo.EstateSettings.terrainMultiplier;
485 } 485 }
486 catch 486 catch
487 { 487 {
@@ -511,9 +511,9 @@ namespace OpenSim.Region.Environment.Scenes
511 { 511 {
512 //create a texture asset of the terrain 512 //create a texture asset of the terrain
513 byte[] data = Terrain.ExportJpegImage("defaultstripe.png"); 513 byte[] data = Terrain.ExportJpegImage("defaultstripe.png");
514 m_regInfo.estateSettings.terrainImageID = LLUUID.Random(); 514 m_regInfo.EstateSettings.terrainImageID = LLUUID.Random();
515 AssetBase asset = new AssetBase(); 515 AssetBase asset = new AssetBase();
516 asset.FullID = m_regInfo.estateSettings.terrainImageID; 516 asset.FullID = m_regInfo.EstateSettings.terrainImageID;
517 asset.Data = data; 517 asset.Data = data;
518 asset.Name = "terrainImage"; 518 asset.Name = "terrainImage";
519 asset.Type = 0; 519 asset.Type = 0;
@@ -1001,12 +1001,20 @@ namespace OpenSim.Region.Environment.Scenes
1001 /// <summary> 1001 /// <summary>
1002 /// 1002 ///
1003 /// </summary> 1003 /// </summary>
1004 /// <param name="whatToDo"></param> 1004 /// <param name="action"></param>
1005 public void ForEachScenePresence(Action<ScenePresence> whatToDo) 1005 public void ForEachScenePresence(Action<ScenePresence> action)
1006 { 1006 {
1007 foreach (ScenePresence presence in m_scenePresences.Values) 1007 foreach (ScenePresence presence in m_scenePresences.Values)
1008 { 1008 {
1009 whatToDo(presence); 1009 action(presence);
1010 }
1011 }
1012
1013 public void ForEachObject(Action<SceneObjectGroup> action)
1014 {
1015 foreach (SceneObjectGroup presence in m_sceneObjects.Values)
1016 {
1017 action(presence);
1010 } 1018 }
1011 } 1019 }
1012 1020