Remove unused sp.ParentPosition, which has not been used for some time

master-beforevarregion
Justin Clark-Casey (justincc) 2013-11-29 02:48:59 +00:00
parent 84bfde3bdf
commit 5f0e763062
2 changed files with 2 additions and 21 deletions

View File

@ -789,16 +789,6 @@ namespace OpenSim.Region.Framework.Scenes
m_log.ErrorFormat("[SCENEOBJECTPART]: GROUP POSITION. {0}", e); 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();
}
}
} }
} }

View File

@ -480,8 +480,6 @@ namespace OpenSim.Region.Framework.Scenes
get { return (IClientCore)ControllingClient; } get { return (IClientCore)ControllingClient; }
} }
public Vector3 ParentPosition { get; set; }
/// <summary> /// <summary>
/// Position of this avatar relative to the region the avatar is in /// Position of this avatar relative to the region the avatar is in
/// </summary> /// </summary>
@ -540,10 +538,7 @@ namespace OpenSim.Region.Framework.Scenes
// Don't update while sitting. The PhysicsActor above is null whilst sitting. // Don't update while sitting. The PhysicsActor above is null whilst sitting.
if (ParentID == 0) if (ParentID == 0)
{
m_pos = value; m_pos = value;
ParentPosition = Vector3.Zero;
}
//m_log.DebugFormat( //m_log.DebugFormat(
// "[ENTITY BASE]: In {0} set AbsolutePosition of {1} to {2}", // "[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); ControllingClient.SendClearFollowCamProperties(part.ParentUUID);
ParentID = 0; ParentID = 0;
@ -2230,7 +2225,7 @@ namespace OpenSim.Region.Framework.Scenes
// hardcoding here. // hardcoding here.
Vector3 adjustmentForSitPose = new Vector3(0.74f, 0f, 0f) * standRotation; Vector3 adjustmentForSitPose = new Vector3(0.74f, 0f, 0f) * standRotation;
Vector3 standPos = ParentPosition + adjustmentForSitPosition + adjustmentForSitPose; Vector3 standPos = sitPartWorldPosition + adjustmentForSitPosition + adjustmentForSitPose;
// m_log.DebugFormat( // m_log.DebugFormat(
// "[SCENE PRESENCE]: Setting stand to pos {0}, (adjustmentForSitPosition {1}, adjustmentForSitPose {2}) rotation {3} for {4} in {5}", // "[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; Rotation = standRotation;
AbsolutePosition = standPos; AbsolutePosition = standPos;
ParentPosition = Vector3.Zero;
} }
// We need to wait until we have calculated proper stand positions before sitting up the physical // 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; m_pos = newPos;
Rotation = newRot; Rotation = newRot;
ParentPosition = part.AbsolutePosition;
} }
else else
{ {
@ -2671,8 +2664,6 @@ namespace OpenSim.Region.Framework.Scenes
// being sat upon. // being sat upon.
m_pos -= part.GroupPosition; m_pos -= part.GroupPosition;
ParentPosition = part.AbsolutePosition;
// m_log.DebugFormat( // m_log.DebugFormat(
// "[SCENE PRESENCE]: Sitting {0} at position {1} ({2} + {3}) on part {4} {5} without sit target", // "[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); // Name, part.AbsolutePosition, m_pos, ParentPosition, part.Name, part.LocalId);