From e15839a2cba21f7c650cb978d2b28deb1e147773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Fri, 10 Jan 2020 02:42:48 -0500 Subject: [PATCH] Move autoPilot Agent Avatar Valid check to beginning --- indra/newview/llagent.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 0f8b7ff7a..31815f908 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1754,7 +1754,7 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) //----------------------------------------------------------------------------- void LLAgent::autoPilot(F32 *delta_yaw) { - if (mAutoPilot) + if (mAutoPilot && isAgentAvatarValid()) { bool follow = !mLeaderID.isNull(); //mAutoPilotBehaviorName == "Follow"; if (follow) @@ -1779,8 +1779,6 @@ void LLAgent::autoPilot(F32 *delta_yaw) // Should we fly if the height difference is great enough here? Altitude is often invalid... } } - - if (!isAgentAvatarValid()) return; if (!follow && gAgentAvatarp->mInAir && mAutoPilotAllowFlying) {