aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs32
1 files changed, 20 insertions, 12 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 326380b..ceadf7a 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -2863,7 +2863,7 @@ namespace OpenSim.Region.Environment.Scenes
2863 } 2863 }
2864 2864
2865 /// <summary> 2865 /// <summary>
2866 /// 2866 /// Triggered when an agent crosses into this sim. Also happens on initial login.
2867 /// </summary> 2867 /// </summary>
2868 /// <param name="regionHandle"></param> 2868 /// <param name="regionHandle"></param>
2869 /// <param name="agentID"></param> 2869 /// <param name="agentID"></param>
@@ -2873,22 +2873,30 @@ namespace OpenSim.Region.Environment.Scenes
2873 { 2873 {
2874 if (regionHandle == m_regInfo.RegionHandle) 2874 if (regionHandle == m_regInfo.RegionHandle)
2875 { 2875 {
2876 ScenePresence presence;
2877
2876 lock (m_scenePresences) 2878 lock (m_scenePresences)
2877 { 2879 {
2878 if (m_scenePresences.ContainsKey(agentID)) 2880 m_scenePresences.TryGetValue(agentID, out presence);
2881 }
2882
2883 if (presence != null)
2884 {
2885 try
2879 { 2886 {
2880 try 2887 presence.MakeRootAgent(position, isFlying);
2881 { 2888 }
2882 m_scenePresences[agentID].MakeRootAgent(position, isFlying); 2889 catch (Exception e)
2883 } 2890 {
2884 catch (Exception e) 2891 m_log.ErrorFormat("[SCENE]: Unable to do agent crossing, exception {0}", e);
2885 {
2886 m_log.Info("[SCENE]: Unable to do Agent Crossing.");
2887 m_log.Debug("[SCENE]: " + e.ToString());
2888 }
2889 //m_innerScene.SwapRootChildAgent(false);
2890 } 2892 }
2891 } 2893 }
2894 else
2895 {
2896 m_log.ErrorFormat(
2897 "[SCENE]: Could not find presence for agent {0} crossing into scene {1}",
2898 agentID, RegionInfo.RegionName);
2899 }
2892 } 2900 }
2893 } 2901 }
2894 2902