aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs14
1 files changed, 13 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 194d782..8d3792c 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -2911,7 +2911,9 @@ namespace OpenSim.Region.Environment.Scenes
2911// m_log.DebugFormat( 2911// m_log.DebugFormat(
2912// "[SCENE]: Incoming child agent update for {0} in {1}", cAgentData.AgentID, RegionInfo.RegionName); 2912// "[SCENE]: Incoming child agent update for {0} in {1}", cAgentData.AgentID, RegionInfo.RegionName);
2913 2913
2914 ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID); 2914 // We have to wait until the viewer contacts this region after receiving EAC.
2915 // That calls AddNewClient, which finally creates the ScenePresence
2916 ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID);
2915 if (childAgentUpdate != null) 2917 if (childAgentUpdate != null)
2916 { 2918 {
2917 childAgentUpdate.ChildAgentDataUpdate(cAgentData); 2919 childAgentUpdate.ChildAgentDataUpdate(cAgentData);
@@ -2947,6 +2949,16 @@ namespace OpenSim.Region.Environment.Scenes
2947 return false; 2949 return false;
2948 } 2950 }
2949 2951
2952 protected virtual ScenePresence WaitGetScenePresence(UUID agentID)
2953 {
2954 int ntimes = 10;
2955 ScenePresence childAgentUpdate = null;
2956 while ((childAgentUpdate = GetScenePresence(agentID)) == null && (ntimes-- > 0))
2957 Thread.Sleep(1000);
2958 return childAgentUpdate;
2959
2960 }
2961
2950 public virtual bool IncomingReleaseAgent(UUID id) 2962 public virtual bool IncomingReleaseAgent(UUID id)
2951 { 2963 {
2952 return m_sceneGridService.ReleaseAgent(id); 2964 return m_sceneGridService.ReleaseAgent(id);