Move a call to RequestModuleInterface to a new scene callback function

because the current implementation would have always returned null
avinationmerge
Melanie Thielker 2015-11-12 20:34:09 +01:00
parent 649a3fc39c
commit d3911606ef
2 changed files with 11 additions and 1 deletions

View File

@ -509,6 +509,8 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
{ {
module.RegionLoaded(scene); module.RegionLoaded(scene);
} }
scene.AllModulesLoaded();
} }
public void RemoveRegionFromModules (Scene scene) public void RemoveRegionFromModules (Scene scene)

View File

@ -1243,13 +1243,21 @@ namespace OpenSim.Region.Framework.Scenes
get { return m_sceneGraph; } get { return m_sceneGraph; }
} }
protected virtual void RegisterDefaultSceneEvents() /// <summary>
/// Called by the module loader when all modules are loaded, after each module's
/// RegionLoaded hook is called. This is the earliest time where RequestModuleInterface
/// may be used.
/// </summary>
public void AllModulesLoaded()
{ {
IDialogModule dm = RequestModuleInterface<IDialogModule>(); IDialogModule dm = RequestModuleInterface<IDialogModule>();
if (dm != null) if (dm != null)
m_eventManager.OnPermissionError += dm.SendAlertToUser; m_eventManager.OnPermissionError += dm.SendAlertToUser;
}
protected virtual void RegisterDefaultSceneEvents()
{
m_eventManager.OnSignificantClientMovement += HandleOnSignificantClientMovement; m_eventManager.OnSignificantClientMovement += HandleOnSignificantClientMovement;
} }