aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs3
-rw-r--r--OpenSim/Services/Connectors/Grid/GridServiceConnector.cs10
2 files changed, 12 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 26fa6c0..01053bf 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1000,7 +1000,8 @@ namespace OpenSim.Region.Framework.Scenes
1000 } 1000 }
1001 } 1001 }
1002 1002
1003 SendAvatarDataToAllAgents(); 1003 if (wasChild)
1004 SendAvatarDataToAllAgents();
1004 1005
1005 // send the animations of the other presences to me 1006 // send the animations of the other presences to me
1006 m_scene.ForEachRootScenePresence(delegate(ScenePresence presence) 1007 m_scene.ForEachRootScenePresence(delegate(ScenePresence presence)
diff --git a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
index 1599a56..7deaf95 100644
--- a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
@@ -48,6 +48,9 @@ namespace OpenSim.Services.Connectors
48 48
49 private string m_ServerURI = String.Empty; 49 private string m_ServerURI = String.Empty;
50 50
51 private ExpiringCache<ulong, GridRegion> m_regionCache =
52 new ExpiringCache<ulong, GridRegion>();
53
51 public GridServicesConnector() 54 public GridServicesConnector()
52 { 55 {
53 } 56 }
@@ -265,6 +268,11 @@ namespace OpenSim.Services.Connectors
265 268
266 public GridRegion GetRegionByPosition(UUID scopeID, int x, int y) 269 public GridRegion GetRegionByPosition(UUID scopeID, int x, int y)
267 { 270 {
271 ulong regionHandle = Util.UIntsToLong((uint)x, (uint)y);
272
273 if (m_regionCache.Contains(regionHandle))
274 return (GridRegion)m_regionCache[regionHandle];
275
268 Dictionary<string, object> sendData = new Dictionary<string, object>(); 276 Dictionary<string, object> sendData = new Dictionary<string, object>();
269 277
270 sendData["SCOPEID"] = scopeID.ToString(); 278 sendData["SCOPEID"] = scopeID.ToString();
@@ -306,6 +314,8 @@ namespace OpenSim.Services.Connectors
306 else 314 else
307 m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByPosition received null reply"); 315 m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByPosition received null reply");
308 316
317 m_regionCache.Add(regionHandle, rinfo, TimeSpan.FromSeconds(600));
318
309 return rinfo; 319 return rinfo;
310 } 320 }
311 321