Fix bug where region ready would be triggered a second time if a script was rezzed on a previously script-free region.
There is no need to listen for OnRezScript in RegionReadyModule since OnEmptyScriptCompileQueue will only fire if scripts were compiled.0.7.3-extended
parent
92a01a7e70
commit
7f2e6a55c4
|
@ -104,14 +104,14 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
|
|||
m_lastOarLoadedOk = true;
|
||||
|
||||
m_scene.EventManager.OnOarFileLoaded += OnOarFileLoaded;
|
||||
m_scene.EventManager.OnRezScript += OnRezScript;
|
||||
|
||||
m_log.DebugFormat("[RegionReady]: Enabled for region {0}", scene.RegionInfo.RegionName);
|
||||
|
||||
if (m_disable_logins)
|
||||
{
|
||||
m_scene.LoginLock = true;
|
||||
m_scene.EventManager.OnLoginsEnabled += OnLoginsEnabled;
|
||||
scene.LoginLock = true;
|
||||
m_scene.EventManager.OnEmptyScriptCompileQueue += OnEmptyScriptCompileQueue;
|
||||
|
||||
m_log.InfoFormat("[RegionReady]: Region {0} - LOGINS DISABLED DURING INITIALIZATION.", m_scene.Name);
|
||||
|
||||
|
@ -122,16 +122,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
|
|||
}
|
||||
}
|
||||
|
||||
void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource)
|
||||
{
|
||||
if (!m_ScriptRez)
|
||||
{
|
||||
m_ScriptRez = true;
|
||||
m_scene.EventManager.OnEmptyScriptCompileQueue += OnEmptyScriptCompileQueue;
|
||||
m_scene.EventManager.OnRezScript -= OnRezScript;
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (!m_enabled)
|
||||
|
@ -140,7 +130,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
|
|||
m_scene.EventManager.OnOarFileLoaded -= OnOarFileLoaded;
|
||||
|
||||
if (m_disable_logins)
|
||||
{
|
||||
m_scene.EventManager.OnLoginsEnabled -= OnLoginsEnabled;
|
||||
m_scene.EventManager.OnEmptyScriptCompileQueue -= OnEmptyScriptCompileQueue;
|
||||
}
|
||||
|
||||
if (m_uri != string.Empty)
|
||||
{
|
||||
|
@ -255,25 +248,24 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
|
|||
{
|
||||
// Let's bypass this for now until some better feedback can be established
|
||||
//
|
||||
return;
|
||||
|
||||
if (msg == "load")
|
||||
{
|
||||
m_scene.EventManager.OnEmptyScriptCompileQueue += OnEmptyScriptCompileQueue;
|
||||
m_scene.EventManager.OnOarFileLoaded += OnOarFileLoaded;
|
||||
m_scene.EventManager.OnLoginsEnabled += OnLoginsEnabled;
|
||||
m_scene.EventManager.OnRezScript += OnRezScript;
|
||||
m_oarFileLoading = true;
|
||||
m_firstEmptyCompileQueue = true;
|
||||
|
||||
m_scene.LoginsDisabled = true;
|
||||
m_scene.LoginLock = true;
|
||||
if ( m_uri != string.Empty )
|
||||
{
|
||||
RRAlert("loading oar");
|
||||
RRAlert("disabled");
|
||||
}
|
||||
}
|
||||
// if (msg == "load")
|
||||
// {
|
||||
// m_scene.EventManager.OnEmptyScriptCompileQueue += OnEmptyScriptCompileQueue;
|
||||
// m_scene.EventManager.OnOarFileLoaded += OnOarFileLoaded;
|
||||
// m_scene.EventManager.OnLoginsEnabled += OnLoginsEnabled;
|
||||
// m_scene.EventManager.OnRezScript += OnRezScript;
|
||||
// m_oarFileLoading = true;
|
||||
// m_firstEmptyCompileQueue = true;
|
||||
//
|
||||
// m_scene.LoginsDisabled = true;
|
||||
// m_scene.LoginLock = true;
|
||||
// if ( m_uri != string.Empty )
|
||||
// {
|
||||
// RRAlert("loading oar");
|
||||
// RRAlert("disabled");
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
public void RRAlert(string status)
|
||||
|
|
Loading…
Reference in New Issue