Reorder checks in SP.CompleteMovement() to fix test failures
parent
f467121c51
commit
4fa843ff19
|
@ -1003,9 +1003,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
private bool MakeRootAgent(Vector3 pos, bool isFlying)
|
private bool MakeRootAgent(Vector3 pos, bool isFlying)
|
||||||
{
|
{
|
||||||
// m_log.InfoFormat(
|
lock (m_completeMovementLock)
|
||||||
// "[SCENE]: Upgrading child to root agent for {0} in {1}",
|
{
|
||||||
// Name, m_scene.RegionInfo.RegionName);
|
if (!IsChildAgent)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
//m_log.DebugFormat("[SCENE]: known regions in {0}: {1}", Scene.RegionInfo.RegionName, KnownChildRegionHandles.Count);
|
||||||
|
|
||||||
|
// m_log.InfoFormat(
|
||||||
|
// "[SCENE]: Upgrading child to root agent for {0} in {1}",
|
||||||
|
// Name, m_scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
if (ParentUUID != UUID.Zero)
|
if (ParentUUID != UUID.Zero)
|
||||||
{
|
{
|
||||||
|
@ -1020,32 +1027,22 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
part.ParentGroup.AddAvatar(UUID);
|
part.ParentGroup.AddAvatar(UUID);
|
||||||
if (part.SitTargetPosition != Vector3.Zero)
|
if (part.SitTargetPosition != Vector3.Zero)
|
||||||
part.SitTargetAvatar = UUID;
|
part.SitTargetAvatar = UUID;
|
||||||
// ParentPosition = part.GetWorldPosition();
|
// ParentPosition = part.GetWorldPosition();
|
||||||
ParentID = part.LocalId;
|
ParentID = part.LocalId;
|
||||||
ParentPart = part;
|
ParentPart = part;
|
||||||
m_pos = PrevSitOffset;
|
m_pos = PrevSitOffset;
|
||||||
// pos = ParentPosition;
|
// pos = ParentPosition;
|
||||||
pos = part.GetWorldPosition();
|
pos = part.GetWorldPosition();
|
||||||
}
|
}
|
||||||
ParentUUID = UUID.Zero;
|
ParentUUID = UUID.Zero;
|
||||||
|
|
||||||
IsChildAgent = false;
|
// Animator.TrySetMovementAnimation("SIT");
|
||||||
|
|
||||||
// Animator.TrySetMovementAnimation("SIT");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IsChildAgent = false;
|
|
||||||
IsLoggingIn = false;
|
IsLoggingIn = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//m_log.DebugFormat("[SCENE]: known regions in {0}: {1}", Scene.RegionInfo.RegionName, KnownChildRegionHandles.Count);
|
|
||||||
|
|
||||||
lock (m_completeMovementLock)
|
|
||||||
{
|
|
||||||
if (!IsChildAgent)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
IsChildAgent = false;
|
IsChildAgent = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue