Fix bug where region ready was being triggered twice in quick succession if a region contained no scripts.
parent
4973fddc51
commit
58b72933c8
|
@ -1488,19 +1488,22 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
IConfig startupConfig = m_config.Configs["Startup"];
|
IConfig startupConfig = m_config.Configs["Startup"];
|
||||||
if (startupConfig == null || !startupConfig.GetBoolean("StartDisabled", false))
|
if (startupConfig == null || !startupConfig.GetBoolean("StartDisabled", false))
|
||||||
{
|
{
|
||||||
// This handles a case of a region having no scripts for the RegionReady module
|
if (LoginLock)
|
||||||
if (m_sceneGraph.GetActiveScriptsCount() == 0)
|
|
||||||
{
|
{
|
||||||
// need to be able to tell these have changed in RegionReady
|
// This handles a case of a region having no scripts for the RegionReady module
|
||||||
LoginLock = false;
|
if (m_sceneGraph.GetActiveScriptsCount() == 0)
|
||||||
EventManager.TriggerLoginsEnabled(this);
|
{
|
||||||
|
// XXX: need to be able to tell these have changed in RegionReady, since it will not
|
||||||
|
// detect a scenario where the region has no scripts - it's listening to the
|
||||||
|
// script compile queue.
|
||||||
|
EventManager.TriggerLoginsEnabled(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
// For RegionReady lockouts
|
|
||||||
if (!LoginLock)
|
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName);
|
m_log.InfoFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName);
|
||||||
LoginsDisabled = false;
|
LoginsDisabled = false;
|
||||||
|
EventManager.TriggerLoginsEnabled(this);
|
||||||
EventManager.TriggerRegionReady(this);
|
EventManager.TriggerRegionReady(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue