Pass entire scene object in OnLoginsEnabled event rather than just the region name.
This saves listeners from having to re-retrieve the scene from their own lists, which won't work anyway if multiple regions with the same name have been allowed0.7.3-extended
parent
272c3c1069
commit
c8f60acc30
|
@ -146,7 +146,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
|
|||
lock (m_scenes)
|
||||
m_scenes[scene.RegionInfo.RegionID] = scene;
|
||||
|
||||
scene.EventManager.OnPrimsLoaded += new EventManager.PrimsLoaded(EventManager_OnPrimsLoaded);
|
||||
scene.EventManager.OnLoginsEnabled += OnLoginsEnabled;
|
||||
}
|
||||
|
||||
///<summary>
|
||||
|
@ -163,12 +163,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
|
|||
|
||||
#endregion ISharedRegionModule
|
||||
|
||||
void EventManager_OnPrimsLoaded(Scene s)
|
||||
void OnLoginsEnabled(IScene scene)
|
||||
{
|
||||
UploadMapTile(s);
|
||||
UploadMapTile(scene);
|
||||
}
|
||||
|
||||
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
|
|
|
@ -489,14 +489,13 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
public delegate void RegionHeartbeatEnd(Scene scene);
|
||||
public event RegionHeartbeatEnd OnRegionHeartbeatEnd;
|
||||
|
||||
public delegate void LoginsEnabled(string regionName);
|
||||
|
||||
/// <summary>
|
||||
/// This should only fire in all circumstances if the RegionReady module is active.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// TODO: Fire this even when the RegionReady module is not active.
|
||||
/// </remarks>
|
||||
public delegate void LoginsEnabled(IScene scene);
|
||||
public event LoginsEnabled OnLoginsEnabled;
|
||||
|
||||
public delegate void PrimsLoaded(Scene s);
|
||||
|
@ -2428,7 +2427,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
public void TriggerLoginsEnabled (string regionName)
|
||||
public void TriggerLoginsEnabled(Scene scene)
|
||||
{
|
||||
LoginsEnabled handler = OnLoginsEnabled;
|
||||
|
||||
|
@ -2438,7 +2437,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
try
|
||||
{
|
||||
d(regionName);
|
||||
d(scene);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
|
@ -1451,7 +1451,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
// need to be able to tell these have changed in RegionReady
|
||||
LoginLock = false;
|
||||
EventManager.TriggerLoginsEnabled(RegionInfo.RegionName);
|
||||
EventManager.TriggerLoginsEnabled(this);
|
||||
}
|
||||
|
||||
// For RegionReady lockouts
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
|
|||
private bool m_disable_logins;
|
||||
private string m_uri = string.Empty;
|
||||
|
||||
Scene m_scene = null;
|
||||
Scene m_scene;
|
||||
|
||||
#region INonSharedRegionModule interface
|
||||
|
||||
|
@ -198,7 +198,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
|
|||
m_scene.RegionInfo.RegionName, c.Message, m_channelNotify);
|
||||
|
||||
m_scene.EventManager.TriggerOnChatBroadcast(this, c);
|
||||
m_scene.EventManager.TriggerLoginsEnabled(m_scene.RegionInfo.RegionName);
|
||||
m_scene.EventManager.TriggerLoginsEnabled(m_scene);
|
||||
m_scene.SceneGridService.InformNeighborsThatRegionisUp(m_scene.RequestModuleInterface<INeighbourService>(), m_scene.RegionInfo);
|
||||
}
|
||||
}
|
||||
|
@ -206,20 +206,28 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
|
|||
void OnOarFileLoaded(Guid requestId, string message)
|
||||
{
|
||||
m_oarFileLoading = true;
|
||||
|
||||
if (message==String.Empty)
|
||||
{
|
||||
m_lastOarLoadedOk = true;
|
||||
} else {
|
||||
m_log.InfoFormat("[RegionReady]: Oar file load errors: {0}", message);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.WarnFormat("[RegionReady]: Oar file load errors: {0}", message);
|
||||
m_lastOarLoadedOk = false;
|
||||
}
|
||||
}
|
||||
|
||||
// This will be triggerd by Scene if we have no scripts
|
||||
// m_ScriptsRezzing will be false if there were none
|
||||
// else it will be true and we should wait on the
|
||||
// empty compile queue
|
||||
void OnLoginsEnabled(string regionName)
|
||||
/// <summary>
|
||||
/// This will be triggered by Scene directly if it contains no scripts on startup.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// m_ScriptsRezzing will be false if there were none
|
||||
/// else it will be true and we should wait on the
|
||||
/// empty compile queue
|
||||
/// </remarks>
|
||||
/// <param name='scene'></param>
|
||||
void OnLoginsEnabled(IScene scene)
|
||||
{
|
||||
if (m_scene.StartDisabled == false)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue