mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
This commit is contained in:
@@ -140,6 +140,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
icon.EndInvoke(iar);
|
||||
}
|
||||
|
||||
ExpiringCache<string, bool> _failedSims = new ExpiringCache<string, bool>();
|
||||
public void SendChildAgentDataUpdate(AgentPosition cAgentData, ScenePresence presence)
|
||||
{
|
||||
// This assumes that we know what our neighbors are.
|
||||
@@ -156,16 +157,22 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// that the region position is cached or performance will degrade
|
||||
Utils.LongToUInts(regionHandle, out x, out y);
|
||||
GridRegion dest = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y);
|
||||
if (! simulatorList.Contains(dest.ServerURI))
|
||||
bool v = true;
|
||||
if (! simulatorList.Contains(dest.ServerURI) && !_failedSims.TryGetValue(dest.ServerURI, out v))
|
||||
{
|
||||
// we havent seen this simulator before, add it to the list
|
||||
// and send it an update
|
||||
simulatorList.Add(dest.ServerURI);
|
||||
// Let move this to sync. Mono definitely does not like async networking.
|
||||
if (!m_scene.SimulationService.UpdateAgent(dest, cAgentData))
|
||||
// Also if it fails, get it out of the loop for a bit
|
||||
_failedSims.Add(dest.ServerURI, true, 120);
|
||||
|
||||
SendChildAgentDataUpdateDelegate d = SendChildAgentDataUpdateAsync;
|
||||
d.BeginInvoke(cAgentData, m_regionInfo.ScopeID, dest,
|
||||
SendChildAgentDataUpdateCompleted,
|
||||
d);
|
||||
// Leaving this here as a reminder that we tried, and it sucks.
|
||||
//SendChildAgentDataUpdateDelegate d = SendChildAgentDataUpdateAsync;
|
||||
//d.BeginInvoke(cAgentData, m_regionInfo.ScopeID, dest,
|
||||
// SendChildAgentDataUpdateCompleted,
|
||||
// d);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user