From c283a94c0addc47468291c5b01c74d14daf81210 Mon Sep 17 00:00:00 2001
From: andreylproductengine <andreylproductengine@lindenlab.com>
Date: Tue, 29 Apr 2014 06:36:23 +0300
Subject: [PATCH] MAINT-3969 FIXED Animation problems when teleporting while
 sitting on some objects

---
 indra/newview/llagent.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 05829163629..1cc9b6a5106 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -3822,6 +3822,12 @@ bool LLAgent::teleportCore(bool is_local)
 		return false;
 	}
 
+	// force stand up and stop a sitting animation (if any), see MAINT-3969
+	if (isAgentAvatarValid() && gAgentAvatarp->getParent() && gAgentAvatarp->isSitting())
+	{
+		gAgentAvatarp->getOffObject();
+	}
+
 #if 0
 	// This should not exist. It has been added, removed, added, and now removed again.
 	// This change needs to come from the simulator. Otherwise, the agent ends up out of
-- 
GitLab