Commits

Kent Quirk committed dd29954

This change originally to fix EXT-1655 has caused a failure to render sitting avatars (EXT-6835).

We can probably find a "right" fix, but for now backing it out.

Backed out changeset bd384ded4268

  • Participants
  • Parent commits 781a730

Comments (0)

Files changed (2)

indra/newview/llagent.cpp

 		{
 			resetAxes(mAutoPilotTargetFacing);
 		}
+		//NB: auto pilot can terminate for a reason other than reaching the destination
+		if (mAutoPilotFinishedCallback)
+		{
+			mAutoPilotFinishedCallback(!user_cancel && dist_vec(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < mAutoPilotStopDistance, mAutoPilotCallbackData);
+		}
+		mLeaderID = LLUUID::null;
+
 		// If the user cancelled, don't change the fly state
 		if (!user_cancel)
 		{
 			setFlying(mAutoPilotFlyOnStop);
 		}
-		//NB: auto pilot can terminate for a reason other than reaching the destination
-		if (mAutoPilotFinishedCallback)
-		{
-			mAutoPilotFinishedCallback(!user_cancel && dist_vec(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < mAutoPilotStopDistance, mAutoPilotCallbackData);
-		}
-		mLeaderID = LLUUID::null;
-
 		setControlFlags(AGENT_CONTROL_STOP);
 
 		if (user_cancel && !mAutoPilotBehaviorName.empty())

indra/newview/llvoavatar.cpp

 //-----------------------------------------------------------------------------
 void LLVOAvatar::sitOnObject(LLViewerObject *sit_object)
 {
-	sitDown(TRUE);
-
 	if (isSelf())
 	{
 		// Might be first sit
 	mDrawable->mXform.setRotation(mDrawable->getWorldRotation() * inv_obj_rot);
 
 	gPipeline.markMoved(mDrawable, TRUE);
+	sitDown(TRUE);
 	mRoot.getXform()->setParent(&sit_object->mDrawable->mXform); // LLVOAvatar::sitOnObject
 	mRoot.setPosition(getPosition());
 	mRoot.updateWorldMatrixChildren();