diff options
author | dahlia | 2015-02-05 13:17:31 -0800 |
---|---|---|
committer | dahlia | 2015-02-05 13:17:31 -0800 |
commit | bde7b2a7b5d164994a0174f923f04efa6f00c4f4 (patch) | |
tree | 720ae06031a7b1b35427041a18967559cfed6139 /OpenSim | |
parent | For built-in groups, if a delegate throws an exception (e.g. due to network f... (diff) | |
download | opensim-SC-bde7b2a7b5d164994a0174f923f04efa6f00c4f4.zip opensim-SC-bde7b2a7b5d164994a0174f923f04efa6f00c4f4.tar.gz opensim-SC-bde7b2a7b5d164994a0174f923f04efa6f00c4f4.tar.bz2 opensim-SC-bde7b2a7b5d164994a0174f923f04efa6f00c4f4.tar.xz |
Allow MaterialsModule to be enabled by default if [Materials] is absent from OpenSim.ini
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs | 15 |
1 files changed, 6 insertions, 9 deletions
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 | |||
66 | private Scene m_scene = null; | 66 | private Scene m_scene = null; |
67 | private bool m_enabled = false; | 67 | private bool m_enabled = false; |
68 | 68 | ||
69 | public Dictionary<UUID, OSDMap> m_regionMaterials = new Dictionary<UUID, OSDMap>(); | ||
70 | |||
71 | public void Initialise(IConfigSource source) | 69 | public void Initialise(IConfigSource source) |
72 | { | 70 | { |
73 | IConfig config = source.Configs["Materials"]; | 71 | m_enabled = true; // default is enabled |
74 | if (config == null) | ||
75 | return; | ||
76 | 72 | ||
77 | m_enabled = config.GetBoolean("enable_materials", true); | 73 | IConfig config = source.Configs["Materials"]; |
78 | if (!m_enabled) | 74 | if (config != null) |
79 | return; | 75 | m_enabled = config.GetBoolean("enable_materials", m_enabled); |
80 | 76 | ||
81 | m_log.DebugFormat("[Materials]: Initialized"); | 77 | if (m_enabled) |
78 | m_log.DebugFormat("[Materials]: Initialized"); | ||
82 | } | 79 | } |
83 | 80 | ||
84 | public void Close() | 81 | public void Close() |