Applying diva's revert patch. Reverts closing child agents and makes
TP more reliable again.0.6.1-post-fixes
parent
dae84498ed
commit
e8a43b136b
|
@ -2887,11 +2887,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
capsPaths[agent.AgentID] = agent.CapsPath;
|
capsPaths[agent.AgentID] = agent.CapsPath;
|
||||||
|
|
||||||
AddCapsHandler(agent.AgentID);
|
|
||||||
|
|
||||||
if (!agent.child)
|
if (!agent.child)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
AddCapsHandler(agent.AgentID);
|
||||||
|
|
||||||
// Honor parcel landing type and position.
|
// Honor parcel landing type and position.
|
||||||
ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);
|
ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);
|
||||||
if (land != null)
|
if (land != null)
|
||||||
|
@ -3108,18 +3108,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// Tell a single agent to disconnect from the region.
|
// Tell a single agent to disconnect from the region.
|
||||||
// This sends DisableSimulator over UDP, but that doesn't seem to be working
|
|
||||||
// well with the latest LL viewer, so we're sending it also via the EQ
|
|
||||||
presence.ControllingClient.SendShutdownConnectionNotice();
|
presence.ControllingClient.SendShutdownConnectionNotice();
|
||||||
IEventQueue eq = RequestModuleInterface<IEventQueue>();
|
|
||||||
if (eq != null)
|
|
||||||
{
|
|
||||||
OSD Item = EventQueueHelper.DisableSimulator(m_regInfo.RegionHandle);
|
|
||||||
eq.Enqueue(Item, agentID);
|
|
||||||
m_log.Debug("[Scene]: Enqueuing DisableSimulator for " + agentID + " in region " + m_regInfo.RegionName);
|
|
||||||
Thread.Sleep(2000);
|
|
||||||
}
|
|
||||||
RemoveCapsHandler(agentID);
|
|
||||||
|
|
||||||
presence.ControllingClient.Close(true);
|
presence.ControllingClient.Close(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -675,7 +675,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
// the avatar.Close below will clear the child region list. We need this below for (possibly)
|
// the avatar.Close below will clear the child region list. We need this below for (possibly)
|
||||||
// closing the child agents, so save it here (we need a copy as it is Clear()-ed).
|
// closing the child agents, so save it here (we need a copy as it is Clear()-ed).
|
||||||
//List<ulong> childRegions = new List<ulong>(avatar.GetKnownRegionList());
|
List<ulong> childRegions = new List<ulong>(avatar.GetKnownRegionList());
|
||||||
// Compared to ScenePresence.CrossToNewRegion(), there's no obvious code to handle a teleport
|
// Compared to ScenePresence.CrossToNewRegion(), there's no obvious code to handle a teleport
|
||||||
// failure at this point (unlike a border crossing failure). So perhaps this can never fail
|
// failure at this point (unlike a border crossing failure). So perhaps this can never fail
|
||||||
// once we reach here...
|
// once we reach here...
|
||||||
|
@ -727,28 +727,17 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
KiPrimitive(avatar.LocalId);
|
KiPrimitive(avatar.LocalId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
avatar.Close();
|
||||||
|
|
||||||
uint newRegionX = (uint)(reg.RegionHandle >> 40);
|
uint newRegionX = (uint)(reg.RegionHandle >> 40);
|
||||||
uint newRegionY = (((uint)(reg.RegionHandle)) >> 8);
|
uint newRegionY = (((uint)(reg.RegionHandle)) >> 8);
|
||||||
uint oldRegionX = (uint)(m_regionInfo.RegionHandle >> 40);
|
uint oldRegionX = (uint)(m_regionInfo.RegionHandle >> 40);
|
||||||
uint oldRegionY = (((uint)(m_regionInfo.RegionHandle)) >> 8);
|
uint oldRegionY = (((uint)(m_regionInfo.RegionHandle)) >> 8);
|
||||||
|
|
||||||
// Let's close some children agents
|
if (Util.fast_distance2d((int)(newRegionX - oldRegionX), (int)(newRegionY - oldRegionY)) > 3)
|
||||||
avatar.CloseChildAgents(newRegionX, newRegionY);
|
|
||||||
|
|
||||||
avatar.Close();
|
|
||||||
|
|
||||||
// Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone
|
|
||||||
|
|
||||||
// This is a little too fast of a distance computation... it's not consistent with the rule
|
|
||||||
// of having child agents in exactly the adjacent regions. Some topologies result in orphan
|
|
||||||
// children
|
|
||||||
//if (Util.fast_distance2d((int)(newRegionX - oldRegionX), (int)(newRegionY - oldRegionY)) > 3)
|
|
||||||
//if (((int)Math.Abs((int)(newRegionX - oldRegionX)) > 1) || ((int)Math.Abs((int)(newRegionY - oldRegionY)) > 1))
|
|
||||||
if (Util.IsOutsideView(oldRegionX, newRegionX, oldRegionY, newRegionY))
|
|
||||||
{
|
{
|
||||||
//SendCloseChildAgentConnections(avatar.UUID,avatar.GetKnownRegionList());
|
//SendCloseChildAgentConnections(avatar.UUID,avatar.GetKnownRegionList());
|
||||||
//SendCloseChildAgentConnections(avatar.UUID, childRegions);
|
SendCloseChildAgentConnections(avatar.UUID, childRegions);
|
||||||
CloseConnection(avatar.UUID);
|
CloseConnection(avatar.UUID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2385,9 +2385,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
CrossAttachmentsIntoNewRegion(neighbourHandle, true);
|
CrossAttachmentsIntoNewRegion(neighbourHandle, true);
|
||||||
|
|
||||||
// Next, let's close the child agent connections that are too far away.
|
|
||||||
CloseChildAgents(neighbourx, neighboury);
|
|
||||||
|
|
||||||
// m_scene.SendKillObject(m_localId);
|
// m_scene.SendKillObject(m_localId);
|
||||||
|
|
||||||
m_scene.NotifyMyCoarseLocationChange();
|
m_scene.NotifyMyCoarseLocationChange();
|
||||||
|
|
Loading…
Reference in New Issue