diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index fd7f7d8..7a634c4 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) | 756 | if (Animator != null && ParentID == 0) // skip it if sitting |
757 | { | 757 | { |
758 | Animator.UpdateMovementAnimations(); | 758 | Animator.UpdateMovementAnimations(); |
759 | } | 759 | } |
@@ -1077,10 +1077,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1077 | public void TeleportWithMomentum(Vector3 pos) | 1077 | public void TeleportWithMomentum(Vector3 pos) |
1078 | { | 1078 | { |
1079 | bool isFlying = Flying; | 1079 | bool isFlying = Flying; |
1080 | Vector3 vel = Velocity; | ||
1080 | RemoveFromPhysicalScene(); | 1081 | RemoveFromPhysicalScene(); |
1081 | CheckLandingPoint(ref pos); | 1082 | CheckLandingPoint(ref pos); |
1082 | AbsolutePosition = pos; | 1083 | AbsolutePosition = pos; |
1083 | AddToPhysicalScene(isFlying); | 1084 | AddToPhysicalScene(isFlying); |
1085 | if (PhysicsActor != null) | ||
1086 | PhysicsActor.SetMomentum(vel); | ||
1084 | 1087 | ||
1085 | SendTerseUpdateToAllClients(); | 1088 | SendTerseUpdateToAllClients(); |
1086 | } | 1089 | } |
@@ -1385,8 +1388,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
1385 | { | 1388 | { |
1386 | if (m_followCamAuto) | 1389 | if (m_followCamAuto) |
1387 | { | 1390 | { |
1388 | Vector3 posAdjusted = m_pos + HEAD_ADJUSTMENT; | 1391 | // Vector3 posAdjusted = m_pos + HEAD_ADJUSTMENT; |
1389 | m_scene.PhysicsScene.RaycastWorld(m_pos, Vector3.Normalize(CameraPosition - posAdjusted), Vector3.Distance(CameraPosition, posAdjusted) + 0.3f, RayCastCameraCallback); | 1392 | // m_scene.PhysicsScene.RaycastWorld(m_pos, Vector3.Normalize(CameraPosition - posAdjusted), Vector3.Distance(CameraPosition, posAdjusted) + 0.3f, RayCastCameraCallback); |
1393 | Vector3 posAdjusted = AbsolutePosition + HEAD_ADJUSTMENT; | ||
1394 | Vector3 distTocam = CameraPosition - posAdjusted; | ||
1395 | float distTocamlen = distTocam.Length(); | ||
1396 | if (distTocamlen > 0) | ||
1397 | { | ||
1398 | distTocam *= 1.0f / distTocamlen; | ||
1399 | m_scene.PhysicsScene.RaycastWorld(posAdjusted, distTocam, distTocamlen + 0.3f, RayCastCameraCallback); | ||
1400 | } | ||
1390 | } | 1401 | } |
1391 | } | 1402 | } |
1392 | 1403 | ||