Merge branch 'master' of ssh://3dhosting.de/var/git/careminster into ubitwork

avinationmerge
UbitUmarov 2012-02-24 22:25:13 +00:00
commit efbfa832bb
2 changed files with 12 additions and 1 deletions

View File

@ -1000,7 +1000,8 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
SendAvatarDataToAllAgents(); if (wasChild)
SendAvatarDataToAllAgents();
// send the animations of the other presences to me // send the animations of the other presences to me
m_scene.ForEachRootScenePresence(delegate(ScenePresence presence) m_scene.ForEachRootScenePresence(delegate(ScenePresence presence)

View File

@ -48,6 +48,9 @@ namespace OpenSim.Services.Connectors
private string m_ServerURI = String.Empty; private string m_ServerURI = String.Empty;
private ExpiringCache<ulong, GridRegion> m_regionCache =
new ExpiringCache<ulong, GridRegion>();
public GridServicesConnector() public GridServicesConnector()
{ {
} }
@ -265,6 +268,11 @@ namespace OpenSim.Services.Connectors
public GridRegion GetRegionByPosition(UUID scopeID, int x, int y) public GridRegion GetRegionByPosition(UUID scopeID, int x, int y)
{ {
ulong regionHandle = Util.UIntsToLong((uint)x, (uint)y);
if (m_regionCache.Contains(regionHandle))
return (GridRegion)m_regionCache[regionHandle];
Dictionary<string, object> sendData = new Dictionary<string, object>(); Dictionary<string, object> sendData = new Dictionary<string, object>();
sendData["SCOPEID"] = scopeID.ToString(); sendData["SCOPEID"] = scopeID.ToString();
@ -306,6 +314,8 @@ namespace OpenSim.Services.Connectors
else else
m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByPosition received null reply"); m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByPosition received null reply");
m_regionCache.Add(regionHandle, rinfo, TimeSpan.FromSeconds(600));
return rinfo; return rinfo;
} }