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 allowed
This commit is contained in:
Justin Clark-Casey (justincc)
2012-07-18 21:29:12 +01:00
parent 742ad5eb93
commit 6460e587c4
4 changed files with 22 additions and 24 deletions

View File

@@ -496,14 +496,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);
@@ -2477,7 +2476,7 @@ namespace OpenSim.Region.Framework.Scenes
}
}
public void TriggerLoginsEnabled (string regionName)
public void TriggerLoginsEnabled(Scene scene)
{
LoginsEnabled handler = OnLoginsEnabled;
@@ -2487,7 +2486,7 @@ namespace OpenSim.Region.Framework.Scenes
{
try
{
d(regionName);
d(scene);
}
catch (Exception e)
{

View File

@@ -1493,7 +1493,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