From 02d2808a419ce37df877756883b96147d06aa4d8 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Mon, 3 Jun 2013 13:21:42 -0400
Subject: [PATCH] SH-3635 WIP - unstick outfit change if stuck beyond a certain
 time range

---
 indra/newview/llvoavatarself.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index b2fcfb62506..232bf3e4783 100755
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -239,6 +239,9 @@ void LLVOAvatarSelf::initInstance()
 
 bool LLVOAvatarSelf::checkStuckAppearance()
 {
+	const F32 CONDITIONAL_UNSTICK_INTERVAL = 300.0;
+	const F32 UNCONDITIONAL_UNSTICK_INTERVAL = 600.0;
+	
 	if (gAgentWearables.isCOFChangeInProgress())
 	{
 		LL_DEBUGS("Avatar") << "checking for stuck appearance" << llendl;
@@ -248,6 +251,12 @@ bool LLVOAvatarSelf::checkStuckAppearance()
 		LL_DEBUGS("Avatar") << "active holding patterns " << active_hp << " seconds" << llendl;
 		S32 active_copies = LLAppearanceMgr::instance().getActiveCopyOperations();
 		LL_DEBUGS("Avatar") << "active copy operations " << active_copies << llendl;
+
+		if ((change_time > CONDITIONAL_UNSTICK_INTERVAL && active_copies == 0) ||
+			(change_time > UNCONDITIONAL_UNSTICK_INTERVAL))
+		{
+			gAgentWearables.notifyLoadingFinished();
+		}
 	}
 
 	// Return false to continue running check periodically.
-- 
GitLab