From 5f0e763062d347f188e01ad5febc1bd59e32b367 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 29 Nov 2013 02:48:59 +0000 Subject: Remove unused sp.ParentPosition, which has not been used for some time --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 10 ---------- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 13 ++----------- 2 files changed, 2 insertions(+), 21 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index dcbb509..ea9d0d8 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -789,16 +789,6 @@ namespace OpenSim.Region.Framework.Scenes m_log.ErrorFormat("[SCENEOBJECTPART]: GROUP POSITION. {0}", e); } } - - // TODO if we decide to do sitting in a more SL compatible way (multiple avatars per prim), this has to be fixed, too - if (SitTargetAvatar != UUID.Zero) - { - ScenePresence avatar; - if (ParentGroup.Scene.TryGetScenePresence(SitTargetAvatar, out avatar)) - { - avatar.ParentPosition = GetWorldPosition(); - } - } } } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index a74069d..9cb9303 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -480,8 +480,6 @@ namespace OpenSim.Region.Framework.Scenes get { return (IClientCore)ControllingClient; } } - public Vector3 ParentPosition { get; set; } - /// /// Position of this avatar relative to the region the avatar is in /// @@ -540,10 +538,7 @@ namespace OpenSim.Region.Framework.Scenes // Don't update while sitting. The PhysicsActor above is null whilst sitting. if (ParentID == 0) - { m_pos = value; - ParentPosition = Vector3.Zero; - } //m_log.DebugFormat( // "[ENTITY BASE]: In {0} set AbsolutePosition of {1} to {2}", @@ -2195,7 +2190,7 @@ namespace OpenSim.Region.Framework.Scenes } } - ParentPosition = part.GetWorldPosition(); + Vector3 sitPartWorldPosition = part.GetWorldPosition(); ControllingClient.SendClearFollowCamProperties(part.ParentUUID); ParentID = 0; @@ -2230,7 +2225,7 @@ namespace OpenSim.Region.Framework.Scenes // hardcoding here. Vector3 adjustmentForSitPose = new Vector3(0.74f, 0f, 0f) * standRotation; - Vector3 standPos = ParentPosition + adjustmentForSitPosition + adjustmentForSitPose; + Vector3 standPos = sitPartWorldPosition + adjustmentForSitPosition + adjustmentForSitPose; // m_log.DebugFormat( // "[SCENE PRESENCE]: Setting stand to pos {0}, (adjustmentForSitPosition {1}, adjustmentForSitPose {2}) rotation {3} for {4} in {5}", @@ -2238,7 +2233,6 @@ namespace OpenSim.Region.Framework.Scenes Rotation = standRotation; AbsolutePosition = standPos; - ParentPosition = Vector3.Zero; } // We need to wait until we have calculated proper stand positions before sitting up the physical @@ -2663,7 +2657,6 @@ namespace OpenSim.Region.Framework.Scenes m_pos = newPos; Rotation = newRot; - ParentPosition = part.AbsolutePosition; } else { @@ -2671,8 +2664,6 @@ namespace OpenSim.Region.Framework.Scenes // being sat upon. m_pos -= part.GroupPosition; - ParentPosition = part.AbsolutePosition; - // m_log.DebugFormat( // "[SCENE PRESENCE]: Sitting {0} at position {1} ({2} + {3}) on part {4} {5} without sit target", // Name, part.AbsolutePosition, m_pos, ParentPosition, part.Name, part.LocalId); -- cgit v1.1