Merge branch 'master' into careminster-presence-refactor

This commit is contained in:
Melanie
2010-06-14 02:49:15 +01:00
21 changed files with 709 additions and 445 deletions

View File

@@ -964,12 +964,6 @@ namespace OpenSim.Region.Framework.Scenes
// Let the grid service module know, so this can be cached
m_eventManager.TriggerOnRegionUp(otherRegion);
RegionInfo regInfo = new RegionInfo(xcell, ycell, otherRegion.InternalEndPoint, otherRegion.ExternalHostName);
regInfo.RegionID = otherRegion.RegionID;
regInfo.RegionName = otherRegion.RegionName;
regInfo.ScopeID = otherRegion.ScopeID;
regInfo.ExternalHostName = otherRegion.ExternalHostName;
GridRegion r = new GridRegion(regInfo);
try
{
ForEachScenePresence(delegate(ScenePresence agent)
@@ -984,7 +978,7 @@ namespace OpenSim.Region.Framework.Scenes
old.Add(otherRegion.RegionHandle);
agent.DropOldNeighbours(old);
if (m_teleportModule != null)
m_teleportModule.EnableChildAgent(agent, r);
m_teleportModule.EnableChildAgent(agent, otherRegion);
}
}
);
@@ -1546,6 +1540,7 @@ namespace OpenSim.Region.Framework.Scenes
{
m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName);
LoginsDisabled = false;
m_sceneGridService.InformNeighborsThatRegionisUp(RequestModuleInterface<INeighbourService>(), RegionInfo);
}
}
}
@@ -1830,6 +1825,8 @@ namespace OpenSim.Region.Framework.Scenes
{
RegisterCommsEvents();
m_sceneGridService.SetScene(this);
// These two 'commands' *must be* next to each other or sim rebooting fails.
//m_sceneGridService.RegisterRegion(m_interregionCommsOut, RegionInfo);
@@ -1840,24 +1837,6 @@ namespace OpenSim.Region.Framework.Scenes
throw new Exception(error);
}
m_sceneGridService.SetScene(this);
m_sceneGridService.InformNeighborsThatRegionisUp(RequestModuleInterface<INeighbourService>(), RegionInfo);
//Dictionary<string, string> dGridSettings = m_sceneGridService.GetGridSettings();
//if (dGridSettings.ContainsKey("allow_forceful_banlines"))
//{
// if (dGridSettings["allow_forceful_banlines"] != "TRUE")
// {
// m_log.Info("[GRID]: Grid is disabling forceful parcel banlists");
// EventManager.TriggerSetAllowForcefulBan(false);
// }
// else
// {
// m_log.Info("[GRID]: Grid is allowing forceful parcel banlists");
// EventManager.TriggerSetAllowForcefulBan(true);
// }
//}
}
/// <summary>
@@ -3934,6 +3913,8 @@ namespace OpenSim.Region.Framework.Scenes
m_log.DebugFormat(
"[SCENE]: Incoming child agent update for {0} in {1}", cAgentData.AgentID, RegionInfo.RegionName);
// XPTO: if this agent is not allowed here as root, always return false
// We have to wait until the viewer contacts this region after receiving EAC.
// That calls AddNewClient, which finally creates the ScenePresence
ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID);

View File

@@ -182,24 +182,17 @@ namespace OpenSim.Region.Framework.Scenes
{
//m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName);
for (int x = (int)region.RegionLocX - 1; x <= region.RegionLocX + 1; x++)
List<GridRegion> neighbours = m_scene.GridService.GetNeighbours(m_scene.RegionInfo.ScopeID, m_scene.RegionInfo.RegionID);
m_log.DebugFormat("[INTERGRID]: Informing {0} neighbours that this region is up", neighbours.Count);
foreach (GridRegion n in neighbours)
{
for (int y = (int)region.RegionLocY - 1; y <= region.RegionLocY + 1; y++)
{
if (!((x == region.RegionLocX) && (y == region.RegionLocY))) // skip this region
{
ulong handle = Utils.UIntsToLong((uint)x * Constants.RegionSize, (uint)y * Constants.RegionSize);
InformNeighbourThatRegionUpDelegate d = InformNeighboursThatRegionIsUpAsync;
d.BeginInvoke(neighbourService, region, handle,
InformNeighborsThatRegionisUpCompleted,
d);
}
}
InformNeighbourThatRegionUpDelegate d = InformNeighboursThatRegionIsUpAsync;
d.BeginInvoke(neighbourService, region, n.RegionHandle,
InformNeighborsThatRegionisUpCompleted,
d);
}
}
public delegate void SendChildAgentDataUpdateDelegate(AgentPosition cAgentData, ulong regionHandle);
/// <summary>

View File

@@ -3390,6 +3390,7 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos);
{
if (cAgent.Attachments != null)
{
m_appearance.ClearAttachments();
foreach (AttachmentData att in cAgent.Attachments)
{
m_appearance.SetAttachment(att.AttachPoint, att.ItemID, att.AssetID);