From 797ca8d0e787b20fdd0794f2017268f6e5b175e6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 11 Dec 2010 17:06:17 -0800 Subject: Fixes the nudge movements! --- .../Scenes/Animation/ScenePresenceAnimator.cs | 11 +-------- OpenSim/Region/Framework/Scenes/Prioritizer.cs | 28 ++++++++++++++-------- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 27 --------------------- 3 files changed, 19 insertions(+), 47 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index a90e0f3..b8cdfc4 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs @@ -316,16 +316,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation public void UpdateMovementAnimations() { m_movementAnimation = GetMovementAnimation(); - - if (m_movementAnimation == "PREJUMP" && !m_scenePresence.Scene.m_usePreJump) - { - // This was the previous behavior before PREJUMP - TrySetMovementAnimation("JUMP"); - } - else - { - TrySetMovementAnimation(m_movementAnimation); - } + TrySetMovementAnimation(m_movementAnimation); } public UUID[] GetAnimationArray() diff --git a/OpenSim/Region/Framework/Scenes/Prioritizer.cs b/OpenSim/Region/Framework/Scenes/Prioritizer.cs index 19f8180..f9599f5 100644 --- a/OpenSim/Region/Framework/Scenes/Prioritizer.cs +++ b/OpenSim/Region/Framework/Scenes/Prioritizer.cs @@ -218,20 +218,28 @@ namespace OpenSim.Region.Framework.Scenes private double GetPriorityByBestAvatarResponsiveness(IClientAPI client, ISceneEntity entity) { - ScenePresence presence = m_scene.GetScenePresence(client.AgentId); - if (presence != null) - { - // If this is an update for our own avatar give it the highest priority - if (presence == entity) - return 0.0; + // If this is an update for our own avatar give it the highest priority + if (client.AgentId == entity.UUID) + return 0.0; + if (entity == null) + return double.NaN; - // Use group position for child prims - Vector3 entityPos = entity.AbsolutePosition; - if (entity is SceneObjectPart) - entityPos = m_scene.GetGroupByPrim(entity.LocalId).AbsolutePosition; + // Use group position for child prims + Vector3 entityPos = entity.AbsolutePosition; + if (entity is SceneObjectPart) + { + SceneObjectGroup group = (entity as SceneObjectPart).ParentGroup; + if (group != null) + entityPos = group.AbsolutePosition; else entityPos = entity.AbsolutePosition; + } + else + entityPos = entity.AbsolutePosition; + ScenePresence presence = m_scene.GetScenePresence(client.AgentId); + if (presence != null) + { if (!presence.IsChildAgent) { if (entity is ScenePresence) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index a1c80e5..f64d539 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2225,33 +2225,6 @@ namespace OpenSim.Region.Framework.Scenes { // WHAT??? m_log.Debug("[SCENEPRESENCE]: AddNewMovement() called on child agent, making root agent!"); - - // we have to reset the user's child agent connections. - // Likely, here they've lost the eventqueue for other regions so border - // crossings will fail at this point unless we reset them. - - List regions = new List(KnownChildRegionHandles); - regions.Remove(m_scene.RegionInfo.RegionHandle); - - MakeRootAgent(new Vector3(127f, 127f, 127f), true); - - // Async command - if (m_scene.SceneGridService != null) - { - m_scene.SceneGridService.SendCloseChildAgentConnections(UUID, regions); - - // Give the above command some time to try and close the connections. - // this is really an emergency.. so sleep, or we'll get all discombobulated. - System.Threading.Thread.Sleep(500); - } - - if (m_scene.SceneGridService != null) - { - IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface(); - if (m_agentTransfer != null) - m_agentTransfer.EnableChildAgents(this); - } - return; } -- cgit v1.1