From 4b71b88114c6ac149571512c57ea005d85147f54 Mon Sep 17 00:00:00 2001
From: diva
Date: Mon, 15 Dec 2008 16:23:34 +0000
Subject: Bug fix in new child agents management. Thanks DigiDaz for helping
identify this issue. We need to update all child agents whenever the root
agent crosses regions. The update now includes child agents in common
neighbours. This is so that those get updated with the seeds of the new child
agents that are spawned from the receiving region. This also fixes some
timing issues. We need to close child agents from the originating region
before we update child agents in the receiving region.
---
OpenSim/Region/Environment/Scenes/Scene.cs | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 6ce19c6..9497043 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -2657,7 +2657,7 @@ namespace OpenSim.Region.Environment.Scenes
GetAvatarAppearance(client, out appearance);
ScenePresence avatar = m_sceneGraph.CreateAndAddChildScenePresence(client, appearance);
- avatar.KnownRegions = GetChildrenSeeds(avatar.UUID);
+ //avatar.KnownRegions = GetChildrenSeeds(avatar.UUID);
return avatar;
}
@@ -2871,9 +2871,6 @@ namespace OpenSim.Region.Environment.Scenes
///
public void NewUserConnection(AgentCircuitData agent)
{
- m_log.DebugFormat("[CONNECTION DEBUGGING] Adding NewUserConnection for {0} in {1} with CC of {2}", agent.AgentID,
- RegionInfo.RegionName, agent.circuitcode);
-
if (m_regInfo.EstateSettings.IsBanned(agent.AgentID))
{
m_log.WarnFormat(
@@ -2883,9 +2880,19 @@ namespace OpenSim.Region.Environment.Scenes
/// Diva: Horrible stuff!
capsPaths[agent.AgentID] = agent.CapsPath;
- //m_log.DebugFormat("------------>child seeds in {0}: {1}", RegionInfo.RegionName, ((agent.ChildrenCapSeeds == null) ? "null" : agent.ChildrenCapSeeds.Count.ToString()));
childrenSeeds[agent.AgentID] = ((agent.ChildrenCapSeeds == null) ? new Dictionary() : agent.ChildrenCapSeeds);
+ ScenePresence sp = m_sceneGraph.GetScenePresence(agent.AgentID);
+ if (sp != null)
+ {
+ m_log.DebugFormat("[CONNECTION DEBUGGING]: Updated agent {0} in {1}", agent.AgentID, RegionInfo.RegionName);
+ sp.AdjustKnownSeeds();
+ return;
+ }
+
+ m_log.DebugFormat("[CONNECTION DEBUGGING]: Adding NewUserConnection for {0} in {1} with CC of {2}", agent.AgentID,
+ RegionInfo.RegionName, agent.circuitcode);
+
AddCapsHandler(agent.AgentID);
if (!agent.child)
--
cgit v1.1