refactor: cleanup SP.HandleAgentSit so that everything is done within one if (part != null), rather than having unnecessary multiple checks
parent
c22446ede0
commit
b454326273
|
@ -2204,16 +2204,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// "[SCENE PRESENCE]: Sitting {0} at position {1} ({2} + {3}) on part {4} {5} without sit target",
|
||||
// Name, part.AbsolutePosition, m_pos, ParentPosition, part.Name, part.LocalId);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ParentPart = m_scene.GetSceneObjectPart(m_requestedSitTargetID);
|
||||
if (ParentPart == null)
|
||||
return;
|
||||
|
||||
ParentID = m_requestedSitTargetID;
|
||||
|
||||
Velocity = Vector3.Zero;
|
||||
|
@ -2222,6 +2214,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
Animator.TrySetMovementAnimation(sitAnimation);
|
||||
SendAvatarDataToAllAgents();
|
||||
}
|
||||
}
|
||||
|
||||
public void HandleAgentSitOnGround()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue