aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Warp3DMap
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-02-25 23:04:38 +0000
committerJustin Clark-Casey (justincc)2013-02-25 23:04:38 +0000
commitd0cb4fc3262df2afe2ef34396c7960f7afee6b89 (patch)
tree2037829f95d30302b82536dc10cf5985a2b5df59 /OpenSim/Region/CoreModules/World/Warp3DMap
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-d0cb4fc3262df2afe2ef34396c7960f7afee6b89.zip
opensim-SC_OLD-d0cb4fc3262df2afe2ef34396c7960f7afee6b89.tar.gz
opensim-SC_OLD-d0cb4fc3262df2afe2ef34396c7960f7afee6b89.tar.bz2
opensim-SC_OLD-d0cb4fc3262df2afe2ef34396c7960f7afee6b89.tar.xz
Move map related settings from [Startup] to a new [Map] section in OpenSim.ini
Existing map settings in [Startup] will continue to work, and if present will override anything in [Map] However, the proper place for such settings would now be [Map] This is to reduce the use of [Startup] as a bag for non-generic settings which should really go in sections, in common with other settings. This commit also extends Diva's previous work to allow a default setting to be given when looking at multiple sections for settings.
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Warp3DMap')
-rw-r--r--OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs20
1 files changed, 8 insertions, 12 deletions
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs
index 5e0dfa7..ed2b06a 100644
--- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs
+++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs
@@ -71,8 +71,8 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
71 { 71 {
72 m_config = source; 72 m_config = source;
73 73
74 IConfig startupConfig = m_config.Configs["Startup"]; 74 if (Util.GetConfigVarFromSections<string>(
75 if (startupConfig.GetString("MapImageModule", "MapImageModule") != "Warp3DImageModule") 75 m_config, "MapImageModule", new string[] { "Startup", "Map" }, "MapImageModule") != "Warp3DImageModule")
76 return; 76 return;
77 77
78 m_Enabled = true; 78 m_Enabled = true;
@@ -143,16 +143,12 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
143 bool drawPrimVolume = true; 143 bool drawPrimVolume = true;
144 bool textureTerrain = true; 144 bool textureTerrain = true;
145 145
146 try 146 string[] configSections = new string[] { "Map", "Startup" };
147 { 147
148 IConfig startupConfig = m_config.Configs["Startup"]; 148 drawPrimVolume
149 drawPrimVolume = startupConfig.GetBoolean("DrawPrimOnMapTile", drawPrimVolume); 149 = Util.GetConfigVarFromSections<bool>(m_config, "DrawPrimOnMapTile", configSections, drawPrimVolume);
150 textureTerrain = startupConfig.GetBoolean("TextureOnMapTile", textureTerrain); 150 textureTerrain
151 } 151 = Util.GetConfigVarFromSections<bool>(m_config, "TextureOnMapTile", configSections, textureTerrain);
152 catch
153 {
154 m_log.Warn("[WARP 3D IMAGE MODULE]: Failed to load StartupConfig");
155 }
156 152
157 m_colors.Clear(); 153 m_colors.Clear();
158 154