diff options
author | Melanie | 2012-05-04 20:05:51 +0200 |
---|---|---|
committer | Melanie | 2012-05-04 20:05:51 +0200 |
commit | 1183310a05ed3232c5b73374e72a6695517d63e5 (patch) | |
tree | c241874062377be73efcf43a098dc5f05a26c0ee /OpenSim/Region/Framework/Scenes/ScenePresence.cs | |
parent | Revert "*TO TEST/REVIEW* added current default animation in animationSet.cs t... (diff) | |
download | opensim-SC-1183310a05ed3232c5b73374e72a6695517d63e5.zip opensim-SC-1183310a05ed3232c5b73374e72a6695517d63e5.tar.gz opensim-SC-1183310a05ed3232c5b73374e72a6695517d63e5.tar.bz2 opensim-SC-1183310a05ed3232c5b73374e72a6695517d63e5.tar.xz |
Retain velocity on walking crossing - adapted from Ubit's reverted patch
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 7136cfc..43b8746 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -929,7 +929,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
929 | } | 929 | } |
930 | AbsolutePosition = pos; | 930 | AbsolutePosition = pos; |
931 | 931 | ||
932 | AddToPhysicalScene(isFlying); | 932 | if (m_teleportFlags == TeleportFlags.Default) |
933 | { | ||
934 | Vector3 vel = Velocity; | ||
935 | AddToPhysicalScene(isFlying); | ||
936 | if (PhysicsActor != null) | ||
937 | PhysicsActor.SetMomentum(vel); | ||
938 | } | ||
939 | else | ||
940 | AddToPhysicalScene(isFlying); | ||
933 | 941 | ||
934 | if (ForceFly) | 942 | if (ForceFly) |
935 | { | 943 | { |
@@ -980,6 +988,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
980 | // If we don't reset the movement flag here, an avatar that crosses to a neighbouring sim and returns will | 988 | // If we don't reset the movement flag here, an avatar that crosses to a neighbouring sim and returns will |
981 | // stall on the border crossing since the existing child agent will still have the last movement | 989 | // stall on the border crossing since the existing child agent will still have the last movement |
982 | // recorded, which stops the input from being processed. | 990 | // recorded, which stops the input from being processed. |
991 | |||
983 | MovementFlag = 0; | 992 | MovementFlag = 0; |
984 | 993 | ||
985 | m_scene.EventManager.TriggerOnMakeRootAgent(this); | 994 | m_scene.EventManager.TriggerOnMakeRootAgent(this); |
@@ -1020,6 +1029,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1020 | // as teleporting back | 1029 | // as teleporting back |
1021 | TeleportFlags = TeleportFlags.Default; | 1030 | TeleportFlags = TeleportFlags.Default; |
1022 | 1031 | ||
1032 | MovementFlag = 0; | ||
1033 | |||
1023 | // It looks like Animator is set to null somewhere, and MakeChild | 1034 | // It looks like Animator is set to null somewhere, and MakeChild |
1024 | // is called after that. Probably in aborted teleports. | 1035 | // is called after that. Probably in aborted teleports. |
1025 | if (Animator == null) | 1036 | if (Animator == null) |
@@ -1027,6 +1038,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1027 | else | 1038 | else |
1028 | Animator.ResetAnimations(); | 1039 | Animator.ResetAnimations(); |
1029 | 1040 | ||
1041 | |||
1030 | // m_log.DebugFormat( | 1042 | // m_log.DebugFormat( |
1031 | // "[SCENE PRESENCE]: Downgrading root agent {0}, {1} to a child agent in {2}", | 1043 | // "[SCENE PRESENCE]: Downgrading root agent {0}, {1} to a child agent in {2}", |
1032 | // Name, UUID, m_scene.RegionInfo.RegionName); | 1044 | // Name, UUID, m_scene.RegionInfo.RegionName); |