From bde7b2a7b5d164994a0174f923f04efa6f00c4f4 Mon Sep 17 00:00:00 2001 From: dahlia Date: Thu, 5 Feb 2015 13:17:31 -0800 Subject: Allow MaterialsModule to be enabled by default if [Materials] is absent from OpenSim.ini --- .../Region/OptionalModules/Materials/MaterialsModule.cs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Materials') diff --git a/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs b/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs index ea582fa..739eb2c 100644 --- a/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs +++ b/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs @@ -66,19 +66,16 @@ namespace OpenSim.Region.OptionalModules.Materials private Scene m_scene = null; private bool m_enabled = false; - public Dictionary m_regionMaterials = new Dictionary(); - public void Initialise(IConfigSource source) { - IConfig config = source.Configs["Materials"]; - if (config == null) - return; + m_enabled = true; // default is enabled - m_enabled = config.GetBoolean("enable_materials", true); - if (!m_enabled) - return; + IConfig config = source.Configs["Materials"]; + if (config != null) + m_enabled = config.GetBoolean("enable_materials", m_enabled); - m_log.DebugFormat("[Materials]: Initialized"); + if (m_enabled) + m_log.DebugFormat("[Materials]: Initialized"); } public void Close() -- cgit v1.1