From 3c0d607f454492bbec622e4dc36696ca969dd247 Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Fri, 4 Mar 2011 17:17:53 -0800 Subject: [PATCH] Changed order of checks for local regions when processing AgentUpdate messages. Should improve throttles and reprioritization when an avatar is moving. --- .../Simulation/RemoteSimulationConnector.cs | 22 +++++-------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs index 0c92bd1c57..67f4d6030c 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs @@ -192,15 +192,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation return false; // Try local first - if (m_localBackend.UpdateAgent(destination, cAgentData)) - return true; - - // else do the remote thing - if (!m_localBackend.IsLocalRegion(destination.RegionHandle)) - return m_remoteConnector.UpdateAgent(destination, cAgentData); - - return false; + if (m_localBackend.IsLocalRegion(destination.RegionHandle)) + return m_localBackend.UpdateAgent(destination, cAgentData); + return m_remoteConnector.UpdateAgent(destination, cAgentData); } public bool UpdateAgent(GridRegion destination, AgentPosition cAgentData) @@ -209,15 +204,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation return false; // Try local first - if (m_localBackend.UpdateAgent(destination, cAgentData)) - return true; - - // else do the remote thing - if (!m_localBackend.IsLocalRegion(destination.RegionHandle)) - return m_remoteConnector.UpdateAgent(destination, cAgentData); - - return false; + if (m_localBackend.IsLocalRegion(destination.RegionHandle)) + return m_localBackend.UpdateAgent(destination, cAgentData); + return m_remoteConnector.UpdateAgent(destination, cAgentData); } public bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent)