diff options
author | Justin Clark-Casey (justincc) | 2014-09-11 20:59:20 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-09-11 20:59:20 +0100 |
commit | a3bd708e772a108169eead039ca4490dd3a52f8b (patch) | |
tree | ba445b88a9d77df60b956bf7ee58ab4f5c84bf96 /OpenSim | |
parent | Make proper fix for last commit wrt Mantis 7317 by replacing disallowed c cha... (diff) | |
download | opensim-SC-a3bd708e772a108169eead039ca4490dd3a52f8b.zip opensim-SC-a3bd708e772a108169eead039ca4490dd3a52f8b.tar.gz opensim-SC-a3bd708e772a108169eead039ca4490dd3a52f8b.tar.bz2 opensim-SC-a3bd708e772a108169eead039ca4490dd3a52f8b.tar.xz |
Fix regression from recent a02dae5 where stand positions are no longer correct when a sit target is specified.
Adjusts stand position using just avatar position relative to the root prim instead.
Fixes http://opensimulator.org/mantis/view.php?id=7315 and preserves previous fix for http://opensimulator.org/mantis/view.php?id=7299
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 59b521d..87063c6 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2618,7 +2618,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2618 | } | 2618 | } |
2619 | } | 2619 | } |
2620 | 2620 | ||
2621 | Vector3 sitPartWorldPosition = part.GetWorldPosition(); | ||
2622 | ControllingClient.SendClearFollowCamProperties(part.ParentUUID); | 2621 | ControllingClient.SendClearFollowCamProperties(part.ParentUUID); |
2623 | 2622 | ||
2624 | ParentID = 0; | 2623 | ParentID = 0; |
@@ -2647,13 +2646,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
2647 | 2646 | ||
2648 | // Vector3 standPositionAdjustment | 2647 | // Vector3 standPositionAdjustment |
2649 | // = part.SitTargetPosition + new Vector3(0.5f, 0f, m_sitAvatarHeight / 2f); | 2648 | // = part.SitTargetPosition + new Vector3(0.5f, 0f, m_sitAvatarHeight / 2f); |
2650 | Vector3 adjustmentForSitPosition = (part.SitTargetPosition + OffsetPosition) * part.GetWorldRotation(); | 2649 | Vector3 adjustmentForSitPosition = (OffsetPosition - SIT_TARGET_ADJUSTMENT) * part.GetWorldRotation(); |
2651 | 2650 | ||
2652 | // XXX: This is based on the physics capsule sizes. Need to find a better way to read this rather than | 2651 | // XXX: This is based on the physics capsule sizes. Need to find a better way to read this rather than |
2653 | // hardcoding here. | 2652 | // hardcoding here. |
2654 | Vector3 adjustmentForSitPose = new Vector3(0.74f, 0f, 0f) * standRotation; | 2653 | Vector3 adjustmentForSitPose = new Vector3(0.74f, 0f, 0f) * standRotation; |
2655 | 2654 | ||
2656 | Vector3 standPos = sitPartWorldPosition + adjustmentForSitPosition + adjustmentForSitPose; | 2655 | Vector3 standPos = part.ParentGroup.AbsolutePosition + adjustmentForSitPosition + adjustmentForSitPose; |
2657 | 2656 | ||
2658 | // m_log.DebugFormat( | 2657 | // m_log.DebugFormat( |
2659 | // "[SCENE PRESENCE]: Setting stand to pos {0}, (adjustmentForSitPosition {1}, adjustmentForSitPose {2}) rotation {3} for {4} in {5}", | 2658 | // "[SCENE PRESENCE]: Setting stand to pos {0}, (adjustmentForSitPosition {1}, adjustmentForSitPose {2}) rotation {3} for {4} in {5}", |