diff options
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Prioritizer.cs | 10 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 28 |
2 files changed, 7 insertions, 31 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Prioritizer.cs b/OpenSim/Region/Framework/Scenes/Prioritizer.cs index c75f8ba..cde8d3f 100644 --- a/OpenSim/Region/Framework/Scenes/Prioritizer.cs +++ b/OpenSim/Region/Framework/Scenes/Prioritizer.cs | |||
@@ -219,13 +219,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
219 | 219 | ||
220 | private double GetPriorityByBestAvatarResponsiveness(IClientAPI client, ISceneEntity entity) | 220 | private double GetPriorityByBestAvatarResponsiveness(IClientAPI client, ISceneEntity entity) |
221 | { | 221 | { |
222 | // If this is an update for our own avatar give it the highest priority | ||
223 | if (client.AgentId == entity.UUID) | ||
224 | return 0.0; | ||
225 | if (entity == null) | ||
226 | return double.NaN; | ||
227 | |||
222 | ScenePresence presence = m_scene.GetScenePresence(client.AgentId); | 228 | ScenePresence presence = m_scene.GetScenePresence(client.AgentId); |
223 | if (presence != null) | 229 | if (presence != null) |
224 | { | 230 | { |
225 | // If this is an update for our own avatar give it the highest priority | ||
226 | if (presence == entity) | ||
227 | return 0.0; | ||
228 | |||
229 | // Use group position for child prims | 231 | // Use group position for child prims |
230 | Vector3 entityPos; | 232 | Vector3 entityPos; |
231 | if (entity is SceneObjectPart) | 233 | if (entity is SceneObjectPart) |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 7ce94d4..961fe29 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2553,34 +2553,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2553 | if (m_isChildAgent) | 2553 | if (m_isChildAgent) |
2554 | { | 2554 | { |
2555 | // WHAT??? | 2555 | // WHAT??? |
2556 | m_log.Debug("[SCENEPRESENCE]: AddNewMovement() called on child agent, making root agent!"); | 2556 | m_log.Debug("[SCENEPRESENCE]: AddNewMovement() called on child agent"); |
2557 | 2557 | ||
2558 | // we have to reset the user's child agent connections. | ||
2559 | // Likely, here they've lost the eventqueue for other regions so border | ||
2560 | // crossings will fail at this point unless we reset them. | ||
2561 | |||
2562 | List<ulong> regions = new List<ulong>(KnownChildRegionHandles); | ||
2563 | regions.Remove(m_scene.RegionInfo.RegionHandle); | ||
2564 | |||
2565 | MakeRootAgent(new Vector3(127f, 127f, 127f), true); | ||
2566 | |||
2567 | // Async command | ||
2568 | if (m_scene.SceneGridService != null) | ||
2569 | { | ||
2570 | m_scene.SceneGridService.SendCloseChildAgentConnections(UUID, regions); | ||
2571 | |||
2572 | // Give the above command some time to try and close the connections. | ||
2573 | // this is really an emergency.. so sleep, or we'll get all discombobulated. | ||
2574 | System.Threading.Thread.Sleep(500); | ||
2575 | } | ||
2576 | |||
2577 | if (m_scene.SceneGridService != null) | ||
2578 | { | ||
2579 | IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); | ||
2580 | if (m_agentTransfer != null) | ||
2581 | m_agentTransfer.EnableChildAgents(this); | ||
2582 | } | ||
2583 | |||
2584 | return; | 2558 | return; |
2585 | } | 2559 | } |
2586 | 2560 | ||