Fix ordering of operations: First initialize everything, then add regions

0.6.5-rc1
Homer Horwitz 2009-04-13 21:23:12 +00:00
parent 5ef6794165
commit bcf31a76bb
1 changed files with 6 additions and 0 deletions

View File

@ -159,12 +159,18 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
scene.AddRegionModule(module.Name, module); scene.AddRegionModule(module.Name, module);
} }
List<INonSharedRegionModule> list = new List<INonSharedRegionModule>();
foreach (Type type in m_nonSharedModules) foreach (Type type in m_nonSharedModules)
{ {
INonSharedRegionModule module = (INonSharedRegionModule)Activator.CreateInstance(type); INonSharedRegionModule module = (INonSharedRegionModule)Activator.CreateInstance(type);
m_log.DebugFormat("[REGIONMODULE]: Adding scene {0} to non-shared module {1}", m_log.DebugFormat("[REGIONMODULE]: Adding scene {0} to non-shared module {1}",
scene.RegionInfo.RegionName, module.Name); scene.RegionInfo.RegionName, module.Name);
module.Initialise(m_openSim.ConfigSource.Source); module.Initialise(m_openSim.ConfigSource.Source);
list.Add(module);
}
foreach (INonSharedRegionModule module in list)
{
module.AddRegion(scene); module.AddRegion(scene);
scene.AddRegionModule(module.Name, module); scene.AddRegionModule(module.Name, module);
} }