diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index f25f3eb06e..7eb6ef4cc6 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -740,8 +740,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
//this.UploadAssets = new AgentAssetUpload(this, m_assetCache, m_inventoryCache);
- // Establish our two timers. We could probably get this down to one
-
// Ping the client regularly to check that it's still there
m_clientPingTimer = new Timer(5000);
m_clientPingTimer.Elapsed += CheckClientConnectivity;
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 326380b557..ceadf7a51a 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -2863,7 +2863,7 @@ namespace OpenSim.Region.Environment.Scenes
}
///
- ///
+ /// Triggered when an agent crosses into this sim. Also happens on initial login.
///
///
///
@@ -2873,21 +2873,29 @@ namespace OpenSim.Region.Environment.Scenes
{
if (regionHandle == m_regInfo.RegionHandle)
{
+ ScenePresence presence;
+
lock (m_scenePresences)
{
- if (m_scenePresences.ContainsKey(agentID))
+ m_scenePresences.TryGetValue(agentID, out presence);
+ }
+
+ if (presence != null)
+ {
+ try
{
- try
- {
- m_scenePresences[agentID].MakeRootAgent(position, isFlying);
- }
- catch (Exception e)
- {
- m_log.Info("[SCENE]: Unable to do Agent Crossing.");
- m_log.Debug("[SCENE]: " + e.ToString());
- }
- //m_innerScene.SwapRootChildAgent(false);
+ presence.MakeRootAgent(position, isFlying);
}
+ catch (Exception e)
+ {
+ m_log.ErrorFormat("[SCENE]: Unable to do agent crossing, exception {0}", e);
+ }
+ }
+ else
+ {
+ m_log.ErrorFormat(
+ "[SCENE]: Could not find presence for agent {0} crossing into scene {1}",
+ agentID, RegionInfo.RegionName);
}
}
}