From bd262fe3eda78e97c00bfc285a7c4a7214268de8 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 30 Jul 2012 03:05:57 +0200 Subject: [PATCH 1/2] Correct StandUp position and rotation --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 89df0ce03a..cdabd45d66 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1952,7 +1952,9 @@ namespace OpenSim.Region.Framework.Scenes // m_pos += ParentPosition + new Vector3(0.0f, 0.0f, 2.0f * m_sitAvatarHeight); // ParentPosition = Vector3.Zero; - m_pos += part.GetWorldPosition() + new Vector3(0.0f, 0.0f, 2.0f * m_sitAvatarHeight); + m_pos = part.AbsolutePosition + (m_pos * part.GetWorldRotation()) + new Vector3(0.0f, 0.0f, 2.0f * m_sitAvatarHeight); + if (part.SitTargetAvatar == UUID) + m_bodyRot = part.GetWorldRotation() * part.SitTargetOrientation; ParentID = 0; ParentPart = null; From e40e1dc9e6739aa927ae0e752bd9d6d9de714ca5 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 31 Jul 2012 23:38:01 +0200 Subject: [PATCH 2/2] Reverse a senseless change in the prioritizer. Why I would want avatars to render according to their camera position is beyond me. --- OpenSim/Region/Framework/Scenes/Prioritizer.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Prioritizer.cs b/OpenSim/Region/Framework/Scenes/Prioritizer.cs index 0a34a4cfd2..ddae0735fc 100644 --- a/OpenSim/Region/Framework/Scenes/Prioritizer.cs +++ b/OpenSim/Region/Framework/Scenes/Prioritizer.cs @@ -212,9 +212,15 @@ namespace OpenSim.Region.Framework.Scenes } // Use the camera position for local agents and avatar position for remote agents - Vector3 presencePos = (presence.IsChildAgent) ? - presence.AbsolutePosition : - presence.CameraPosition; + // Why would I want that? They could be camming but I still see them at the + // avatar position, so why should I update them as if they were at their + // camera positions? Makes no sense! + // TODO: Fix this mess + //Vector3 presencePos = (presence.IsChildAgent) ? + // presence.AbsolutePosition : + // presence.CameraPosition; + + Vector3 presencePos = presence.AbsolutePosition; // Compute the distance... double distance = Vector3.Distance(presencePos, entityPos);