From f37ec933ae342a044558a89cbfc829ed8e95e6fa Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 30 Jul 2010 20:54:02 +0100 Subject: store terrain module trying to load plugins if plugin path does not exist --- OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/CoreModules/World/Terrain') diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs index 1e7ea7b..2c5e444 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs @@ -68,7 +68,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain #endregion private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - + private readonly Commander m_commander = new Commander("terrain"); private readonly Dictionary m_floodeffects = @@ -381,8 +381,13 @@ namespace OpenSim.Region.CoreModules.World.Terrain private void LoadPlugins() { m_plugineffects = new Dictionary(); + string plugineffectsPath = "Terrain"; + // Load the files in the Terrain/ dir - string[] files = Directory.GetFiles("Terrain"); + if (!Directory.Exists(plugineffectsPath)) + return; + + string[] files = Directory.GetFiles(plugineffectsPath); foreach (string file in files) { m_log.Info("Loading effects in " + file); -- cgit v1.1