From dd770c384c2e63cf8a1e2f522741afb8adfab4c2 Mon Sep 17 00:00:00 2001
From: lbsa71
Date: Mon, 22 Oct 2007 17:55:49 +0000
Subject: * 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
---
OpenSim/Region/Environment/Scenes/Scene.cs | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
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
double[,] map = storageManager.DataStore.LoadTerrain();
if (map == null)
{
- if (string.IsNullOrEmpty(m_regInfo.estateSettings.terrainFile))
+ if (string.IsNullOrEmpty(m_regInfo.EstateSettings.terrainFile))
{
MainLog.Instance.Verbose("TERRAIN", "No default terrain. Generating a new terrain.");
Terrain.HillsGenerator();
@@ -480,8 +480,8 @@ namespace OpenSim.Region.Environment.Scenes
{
try
{
- Terrain.LoadFromFileF32(m_regInfo.estateSettings.terrainFile);
- Terrain *= m_regInfo.estateSettings.terrainMultiplier;
+ Terrain.LoadFromFileF32(m_regInfo.EstateSettings.terrainFile);
+ Terrain *= m_regInfo.EstateSettings.terrainMultiplier;
}
catch
{
@@ -511,9 +511,9 @@ namespace OpenSim.Region.Environment.Scenes
{
//create a texture asset of the terrain
byte[] data = Terrain.ExportJpegImage("defaultstripe.png");
- m_regInfo.estateSettings.terrainImageID = LLUUID.Random();
+ m_regInfo.EstateSettings.terrainImageID = LLUUID.Random();
AssetBase asset = new AssetBase();
- asset.FullID = m_regInfo.estateSettings.terrainImageID;
+ asset.FullID = m_regInfo.EstateSettings.terrainImageID;
asset.Data = data;
asset.Name = "terrainImage";
asset.Type = 0;
@@ -1001,12 +1001,20 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- ///
- public void ForEachScenePresence(Action whatToDo)
+ ///
+ public void ForEachScenePresence(Action action)
{
foreach (ScenePresence presence in m_scenePresences.Values)
{
- whatToDo(presence);
+ action(presence);
+ }
+ }
+
+ public void ForEachObject(Action action)
+ {
+ foreach (SceneObjectGroup presence in m_sceneObjects.Values)
+ {
+ action(presence);
}
}
--
cgit v1.1