diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index c4b75bd..855a341 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -753,7 +753,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
753 | if (m_movementAnimationUpdateCounter >= 2) | 753 | if (m_movementAnimationUpdateCounter >= 2) |
754 | { | 754 | { |
755 | m_movementAnimationUpdateCounter = 0; | 755 | m_movementAnimationUpdateCounter = 0; |
756 | if (Animator != null && ParentID == 0) // don't do it sitting | 756 | if (Animator != null && ParentID == 0) // skip it if sitting |
757 | { | 757 | { |
758 | Animator.UpdateMovementAnimations(); | 758 | Animator.UpdateMovementAnimations(); |
759 | } | 759 | } |
@@ -1386,8 +1386,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
1386 | { | 1386 | { |
1387 | if (m_followCamAuto) | 1387 | if (m_followCamAuto) |
1388 | { | 1388 | { |
1389 | Vector3 posAdjusted = m_pos + HEAD_ADJUSTMENT; | 1389 | // Vector3 posAdjusted = m_pos + HEAD_ADJUSTMENT; |
1390 | m_scene.PhysicsScene.RaycastWorld(m_pos, Vector3.Normalize(CameraPosition - posAdjusted), Vector3.Distance(CameraPosition, posAdjusted) + 0.3f, RayCastCameraCallback); | 1390 | // m_scene.PhysicsScene.RaycastWorld(m_pos, Vector3.Normalize(CameraPosition - posAdjusted), Vector3.Distance(CameraPosition, posAdjusted) + 0.3f, RayCastCameraCallback); |
1391 | Vector3 posAdjusted = AbsolutePosition + HEAD_ADJUSTMENT; | ||
1392 | Vector3 distTocam = CameraPosition - posAdjusted; | ||
1393 | float distTocamlen = distTocam.Length(); | ||
1394 | if (distTocamlen > 0) | ||
1395 | { | ||
1396 | distTocam *= 1.0f / distTocamlen; | ||
1397 | m_scene.PhysicsScene.RaycastWorld(posAdjusted, distTocam, distTocamlen + 0.3f, RayCastCameraCallback); | ||
1398 | } | ||
1391 | } | 1399 | } |
1392 | } | 1400 | } |
1393 | 1401 | ||