diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs | 13 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 23 |
2 files changed, 8 insertions, 28 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs index da1b9e0..33041e9 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs | |||
@@ -168,11 +168,10 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
168 | 168 | ||
169 | public OpenSim.Framework.Animation[] ToArray() | 169 | public OpenSim.Framework.Animation[] ToArray() |
170 | { | 170 | { |
171 | OpenSim.Framework.Animation[] theArray = new OpenSim.Framework.Animation[m_animations.Count + 1]; | 171 | OpenSim.Framework.Animation[] theArray = new OpenSim.Framework.Animation[m_animations.Count]; |
172 | uint i = 0; | 172 | uint i = 0; |
173 | try | 173 | try |
174 | { | 174 | { |
175 | theArray[i++] = m_defaultAnimation; | ||
176 | foreach (OpenSim.Framework.Animation anim in m_animations) | 175 | foreach (OpenSim.Framework.Animation anim in m_animations) |
177 | theArray[i++] = anim; | 176 | theArray[i++] = anim; |
178 | } | 177 | } |
@@ -185,14 +184,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
185 | 184 | ||
186 | public void FromArray(OpenSim.Framework.Animation[] theArray) | 185 | public void FromArray(OpenSim.Framework.Animation[] theArray) |
187 | { | 186 | { |
188 | // foreach (OpenSim.Framework.Animation anim in theArray) | 187 | foreach (OpenSim.Framework.Animation anim in theArray) |
189 | // m_animations.Add(anim); | 188 | m_animations.Add(anim); |
190 | if (theArray.Length > 0) | ||
191 | { | ||
192 | m_defaultAnimation = theArray[0]; | ||
193 | for (int i = 1; i < theArray.Length; i++) | ||
194 | m_animations.Add(theArray[i]); | ||
195 | } | ||
196 | } | 189 | } |
197 | } | 190 | } |
198 | } | 191 | } |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 991074b..7136cfc 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -866,7 +866,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
866 | 866 | ||
867 | IsChildAgent = false; | 867 | IsChildAgent = false; |
868 | 868 | ||
869 | // Animator.TryFixMovementAnimation("SIT"); | 869 | Animator.TrySetMovementAnimation("SIT"); |
870 | } | 870 | } |
871 | else | 871 | else |
872 | { | 872 | { |
@@ -929,15 +929,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
929 | } | 929 | } |
930 | AbsolutePosition = pos; | 930 | AbsolutePosition = pos; |
931 | 931 | ||
932 | if (m_teleportFlags == TeleportFlags.Default) | 932 | AddToPhysicalScene(isFlying); |
933 | { | ||
934 | Vector3 vel = Velocity; | ||
935 | AddToPhysicalScene(isFlying); | ||
936 | if (PhysicsActor != null) | ||
937 | PhysicsActor.SetMomentum(vel); | ||
938 | } | ||
939 | else | ||
940 | AddToPhysicalScene(isFlying); | ||
941 | 933 | ||
942 | if (ForceFly) | 934 | if (ForceFly) |
943 | { | 935 | { |
@@ -951,8 +943,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
951 | // Don't send an animation pack here, since on a region crossing this will sometimes cause a flying | 943 | // Don't send an animation pack here, since on a region crossing this will sometimes cause a flying |
952 | // avatar to return to the standing position in mid-air. On login it looks like this is being sent | 944 | // avatar to return to the standing position in mid-air. On login it looks like this is being sent |
953 | // elsewhere anyway | 945 | // elsewhere anyway |
954 | // Animator.SendAnimPack(); | 946 | // Animator.SendAnimPack(); |
955 | |||
956 | 947 | ||
957 | m_scene.SwapRootAgentCount(false); | 948 | m_scene.SwapRootAgentCount(false); |
958 | 949 | ||
@@ -989,7 +980,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
989 | // If we don't reset the movement flag here, an avatar that crosses to a neighbouring sim and returns will | 980 | // If we don't reset the movement flag here, an avatar that crosses to a neighbouring sim and returns will |
990 | // stall on the border crossing since the existing child agent will still have the last movement | 981 | // stall on the border crossing since the existing child agent will still have the last movement |
991 | // recorded, which stops the input from being processed. | 982 | // recorded, which stops the input from being processed. |
992 | |||
993 | MovementFlag = 0; | 983 | MovementFlag = 0; |
994 | 984 | ||
995 | m_scene.EventManager.TriggerOnMakeRootAgent(this); | 985 | m_scene.EventManager.TriggerOnMakeRootAgent(this); |
@@ -1030,8 +1020,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1030 | // as teleporting back | 1020 | // as teleporting back |
1031 | TeleportFlags = TeleportFlags.Default; | 1021 | TeleportFlags = TeleportFlags.Default; |
1032 | 1022 | ||
1033 | MovementFlag = 0; | ||
1034 | |||
1035 | // It looks like Animator is set to null somewhere, and MakeChild | 1023 | // It looks like Animator is set to null somewhere, and MakeChild |
1036 | // is called after that. Probably in aborted teleports. | 1024 | // is called after that. Probably in aborted teleports. |
1037 | if (Animator == null) | 1025 | if (Animator == null) |
@@ -1039,7 +1027,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1039 | else | 1027 | else |
1040 | Animator.ResetAnimations(); | 1028 | Animator.ResetAnimations(); |
1041 | 1029 | ||
1042 | |||
1043 | // m_log.DebugFormat( | 1030 | // m_log.DebugFormat( |
1044 | // "[SCENE PRESENCE]: Downgrading root agent {0}, {1} to a child agent in {2}", | 1031 | // "[SCENE PRESENCE]: Downgrading root agent {0}, {1} to a child agent in {2}", |
1045 | // Name, UUID, m_scene.RegionInfo.RegionName); | 1032 | // Name, UUID, m_scene.RegionInfo.RegionName); |
@@ -1066,9 +1053,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1066 | { | 1053 | { |
1067 | // PhysicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients; | 1054 | // PhysicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients; |
1068 | PhysicsActor.OnOutOfBounds -= OutOfBoundsCall; | 1055 | PhysicsActor.OnOutOfBounds -= OutOfBoundsCall; |
1069 | PhysicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate; | ||
1070 | PhysicsActor.UnSubscribeEvents(); | ||
1071 | m_scene.PhysicsScene.RemoveAvatar(PhysicsActor); | 1056 | m_scene.PhysicsScene.RemoveAvatar(PhysicsActor); |
1057 | PhysicsActor.UnSubscribeEvents(); | ||
1058 | PhysicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate; | ||
1072 | PhysicsActor = null; | 1059 | PhysicsActor = null; |
1073 | } | 1060 | } |
1074 | // else | 1061 | // else |