diff options
author | Justin Clark-Casey (justincc) | 2014-01-16 23:44:17 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-01-16 23:44:17 +0000 |
commit | 4fa843ff19441c9daa4e7dae0a4d705f912fca54 (patch) | |
tree | b940e50f4b1645fc3a27928ab6920018c0bcb4fe /OpenSim/Region/Framework/Scenes/ScenePresence.cs | |
parent | Merge branch 'justincc-master' (diff) | |
download | opensim-SC_OLD-4fa843ff19441c9daa4e7dae0a4d705f912fca54.zip opensim-SC_OLD-4fa843ff19441c9daa4e7dae0a4d705f912fca54.tar.gz opensim-SC_OLD-4fa843ff19441c9daa4e7dae0a4d705f912fca54.tar.bz2 opensim-SC_OLD-4fa843ff19441c9daa4e7dae0a4d705f912fca54.tar.xz |
Reorder checks in SP.CompleteMovement() to fix test failures
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 69 |
1 files changed, 33 insertions, 36 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 18d84a2..85a20e9 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1003,48 +1003,45 @@ namespace OpenSim.Region.Framework.Scenes | |||
1003 | /// </remarks> | 1003 | /// </remarks> |
1004 | private bool MakeRootAgent(Vector3 pos, bool isFlying) | 1004 | private bool MakeRootAgent(Vector3 pos, bool isFlying) |
1005 | { | 1005 | { |
1006 | // m_log.InfoFormat( | 1006 | lock (m_completeMovementLock) |
1007 | // "[SCENE]: Upgrading child to root agent for {0} in {1}", | ||
1008 | // Name, m_scene.RegionInfo.RegionName); | ||
1009 | |||
1010 | if (ParentUUID != UUID.Zero) | ||
1011 | { | 1007 | { |
1012 | m_log.DebugFormat("[SCENE PRESENCE]: Sitting avatar back on prim {0}", ParentUUID); | 1008 | if (!IsChildAgent) |
1013 | SceneObjectPart part = m_scene.GetSceneObjectPart(ParentUUID); | 1009 | return false; |
1014 | if (part == null) | 1010 | |
1011 | //m_log.DebugFormat("[SCENE]: known regions in {0}: {1}", Scene.RegionInfo.RegionName, KnownChildRegionHandles.Count); | ||
1012 | |||
1013 | // m_log.InfoFormat( | ||
1014 | // "[SCENE]: Upgrading child to root agent for {0} in {1}", | ||
1015 | // Name, m_scene.RegionInfo.RegionName); | ||
1016 | |||
1017 | if (ParentUUID != UUID.Zero) | ||
1015 | { | 1018 | { |
1016 | m_log.ErrorFormat("[SCENE PRESENCE]: Can't find prim {0} to sit on", ParentUUID); | 1019 | m_log.DebugFormat("[SCENE PRESENCE]: Sitting avatar back on prim {0}", ParentUUID); |
1020 | SceneObjectPart part = m_scene.GetSceneObjectPart(ParentUUID); | ||
1021 | if (part == null) | ||
1022 | { | ||
1023 | m_log.ErrorFormat("[SCENE PRESENCE]: Can't find prim {0} to sit on", ParentUUID); | ||
1024 | } | ||
1025 | else | ||
1026 | { | ||
1027 | part.ParentGroup.AddAvatar(UUID); | ||
1028 | if (part.SitTargetPosition != Vector3.Zero) | ||
1029 | part.SitTargetAvatar = UUID; | ||
1030 | // ParentPosition = part.GetWorldPosition(); | ||
1031 | ParentID = part.LocalId; | ||
1032 | ParentPart = part; | ||
1033 | m_pos = PrevSitOffset; | ||
1034 | // pos = ParentPosition; | ||
1035 | pos = part.GetWorldPosition(); | ||
1036 | } | ||
1037 | ParentUUID = UUID.Zero; | ||
1038 | |||
1039 | // Animator.TrySetMovementAnimation("SIT"); | ||
1017 | } | 1040 | } |
1018 | else | 1041 | else |
1019 | { | 1042 | { |
1020 | part.ParentGroup.AddAvatar(UUID); | 1043 | IsLoggingIn = false; |
1021 | if (part.SitTargetPosition != Vector3.Zero) | ||
1022 | part.SitTargetAvatar = UUID; | ||
1023 | // ParentPosition = part.GetWorldPosition(); | ||
1024 | ParentID = part.LocalId; | ||
1025 | ParentPart = part; | ||
1026 | m_pos = PrevSitOffset; | ||
1027 | // pos = ParentPosition; | ||
1028 | pos = part.GetWorldPosition(); | ||
1029 | } | 1044 | } |
1030 | ParentUUID = UUID.Zero; | ||
1031 | |||
1032 | IsChildAgent = false; | ||
1033 | |||
1034 | // Animator.TrySetMovementAnimation("SIT"); | ||
1035 | } | ||
1036 | else | ||
1037 | { | ||
1038 | IsChildAgent = false; | ||
1039 | IsLoggingIn = false; | ||
1040 | } | ||
1041 | |||
1042 | //m_log.DebugFormat("[SCENE]: known regions in {0}: {1}", Scene.RegionInfo.RegionName, KnownChildRegionHandles.Count); | ||
1043 | |||
1044 | lock (m_completeMovementLock) | ||
1045 | { | ||
1046 | if (!IsChildAgent) | ||
1047 | return false; | ||
1048 | 1045 | ||
1049 | IsChildAgent = false; | 1046 | IsChildAgent = false; |
1050 | } | 1047 | } |