From 26fd1e3a0c77a5b88429513b47cdd6d16d5867f5 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 22 Apr 2012 03:08:47 +0100 Subject: [PATCH] fix a bug i added fixing another.... --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 121179219e..108b0448ef 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -753,9 +753,10 @@ namespace OpenSim.Region.Framework.Scenes if (m_movementAnimationUpdateCounter >= 2) { m_movementAnimationUpdateCounter = 0; - if (Animator != null && ParentID == 0) // skip it if sitting + if (Animator != null) { - Animator.UpdateMovementAnimations(); + if(ParentID == 0) // skip it if sitting + Animator.UpdateMovementAnimations(); } else { @@ -1400,6 +1401,7 @@ namespace OpenSim.Region.Framework.Scenes { // Vector3 posAdjusted = m_pos + HEAD_ADJUSTMENT; // m_scene.PhysicsScene.RaycastWorld(m_pos, Vector3.Normalize(CameraPosition - posAdjusted), Vector3.Distance(CameraPosition, posAdjusted) + 0.3f, RayCastCameraCallback); + Vector3 posAdjusted = AbsolutePosition + HEAD_ADJUSTMENT; Vector3 distTocam = CameraPosition - posAdjusted; float distTocamlen = distTocam.Length(); @@ -1408,6 +1410,7 @@ namespace OpenSim.Region.Framework.Scenes distTocam *= 1.0f / distTocamlen; m_scene.PhysicsScene.RaycastWorld(posAdjusted, distTocam, distTocamlen + 0.3f, RayCastCameraCallback); } + } }