aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorMelanie2012-04-17 01:50:49 +0100
committerMelanie2012-04-17 01:50:49 +0100
commitab1a3688e24db08071f74c9804d552d5763bbeb2 (patch)
tree030bafc8ce646fbf80bd20a1e7647618222e7fc2 /OpenSim/Region/Framework
parentMerge branch 'master' into careminster (diff)
parentMerge branch 'ubitwork' (diff)
downloadopensim-SC_OLD-ab1a3688e24db08071f74c9804d552d5763bbeb2.zip
opensim-SC_OLD-ab1a3688e24db08071f74c9804d552d5763bbeb2.tar.gz
opensim-SC_OLD-ab1a3688e24db08071f74c9804d552d5763bbeb2.tar.bz2
opensim-SC_OLD-ab1a3688e24db08071f74c9804d552d5763bbeb2.tar.xz
Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs13
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs17
2 files changed, 27 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index a34079c..3e08128 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1891,6 +1891,19 @@ namespace OpenSim.Region.Framework.Scenes
1891 EventManager.TriggerPrimsLoaded(this); 1891 EventManager.TriggerPrimsLoaded(this);
1892 } 1892 }
1893 1893
1894 public bool SuportsRayCastFiltered()
1895 {
1896 if (PhysicsScene == null)
1897 return false;
1898 return PhysicsScene.SuportsRaycastWorldFiltered();
1899 }
1900
1901 public object RayCastFiltered(Vector3 position, Vector3 direction, float length, int Count, RayFilterFlags filter)
1902 {
1903 if (PhysicsScene == null)
1904 return null;
1905 return PhysicsScene.RaycastWorld(position, direction, length, Count,filter);
1906 }
1894 1907
1895 /// <summary> 1908 /// <summary>
1896 /// Gets a new rez location based on the raycast and the size of the object that is being rezzed. 1909 /// Gets a new rez location based on the raycast and the size of the object that is being rezzed.
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