aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorUbitUmarov2012-05-04 19:19:54 +0100
committerUbitUmarov2012-05-04 19:19:54 +0100
commit12c9916193bbb87aaa95407f798c241cbe5e23cb (patch)
tree7dfab403a1da233d30918df6928e7528af634951 /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentSOG copy bug fix, now new group has own empty list of sitted avatars. Also ch... (diff)
downloadopensim-SC-12c9916193bbb87aaa95407f798c241cbe5e23cb.zip
opensim-SC-12c9916193bbb87aaa95407f798c241cbe5e23cb.tar.gz
opensim-SC-12c9916193bbb87aaa95407f798c241cbe5e23cb.tar.bz2
opensim-SC-12c9916193bbb87aaa95407f798c241cbe5e23cb.tar.xz
*TO TEST/REVIEW* added current default animation in animationSet.cs to/fromArray in array element 0. This may cause compatibilities issues, but think this information is needed for proper crossings. OSG regions did survived tps in/out with this. ALso added velocity in crossings cases, for now detected by Teleport flag equal to Default (0);
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs23
1 files changed, 18 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 7136cfc..991074b 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.TrySetMovementAnimation("SIT"); 869// Animator.TryFixMovementAnimation("SIT");
870 } 870 }
871 else 871 else
872 { 872 {
@@ -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 {
@@ -943,7 +951,8 @@ namespace OpenSim.Region.Framework.Scenes
943 // Don't send an animation pack here, since on a region crossing this will sometimes cause a flying 951 // Don't send an animation pack here, since on a region crossing this will sometimes cause a flying
944 // avatar to return to the standing position in mid-air. On login it looks like this is being sent 952 // avatar to return to the standing position in mid-air. On login it looks like this is being sent
945 // elsewhere anyway 953 // elsewhere anyway
946 // Animator.SendAnimPack(); 954// Animator.SendAnimPack();
955
947 956
948 m_scene.SwapRootAgentCount(false); 957 m_scene.SwapRootAgentCount(false);
949 958
@@ -980,6 +989,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 989 // 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 990 // 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. 991 // recorded, which stops the input from being processed.
992
983 MovementFlag = 0; 993 MovementFlag = 0;
984 994
985 m_scene.EventManager.TriggerOnMakeRootAgent(this); 995 m_scene.EventManager.TriggerOnMakeRootAgent(this);
@@ -1020,6 +1030,8 @@ namespace OpenSim.Region.Framework.Scenes
1020 // as teleporting back 1030 // as teleporting back
1021 TeleportFlags = TeleportFlags.Default; 1031 TeleportFlags = TeleportFlags.Default;
1022 1032
1033 MovementFlag = 0;
1034
1023 // It looks like Animator is set to null somewhere, and MakeChild 1035 // It looks like Animator is set to null somewhere, and MakeChild
1024 // is called after that. Probably in aborted teleports. 1036 // is called after that. Probably in aborted teleports.
1025 if (Animator == null) 1037 if (Animator == null)
@@ -1027,6 +1039,7 @@ namespace OpenSim.Region.Framework.Scenes
1027 else 1039 else
1028 Animator.ResetAnimations(); 1040 Animator.ResetAnimations();
1029 1041
1042
1030// m_log.DebugFormat( 1043// m_log.DebugFormat(
1031// "[SCENE PRESENCE]: Downgrading root agent {0}, {1} to a child agent in {2}", 1044// "[SCENE PRESENCE]: Downgrading root agent {0}, {1} to a child agent in {2}",
1032// Name, UUID, m_scene.RegionInfo.RegionName); 1045// Name, UUID, m_scene.RegionInfo.RegionName);
@@ -1053,9 +1066,9 @@ namespace OpenSim.Region.Framework.Scenes
1053 { 1066 {
1054// PhysicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients; 1067// PhysicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients;
1055 PhysicsActor.OnOutOfBounds -= OutOfBoundsCall; 1068 PhysicsActor.OnOutOfBounds -= OutOfBoundsCall;
1056 m_scene.PhysicsScene.RemoveAvatar(PhysicsActor);
1057 PhysicsActor.UnSubscribeEvents();
1058 PhysicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate; 1069 PhysicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate;
1070 PhysicsActor.UnSubscribeEvents();
1071 m_scene.PhysicsScene.RemoveAvatar(PhysicsActor);
1059 PhysicsActor = null; 1072 PhysicsActor = null;
1060 } 1073 }
1061// else 1074// else