From 8d564d6ed1445c7b5015fc153c1a179eb03a8b95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Tue, 10 Mar 2020 16:49:45 -0400 Subject: [PATCH] Follow Pilot algorithm tweak: Fly if already flying or target is above --- indra/newview/llagent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index d8b23ae59..28e5b8a5b 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1785,7 +1785,7 @@ void LLAgent::autoPilot(F32 *delta_yaw) if (const auto& av = object->asAvatar()) // Fly/sit if avatar target is flying { const auto& our_pos_global = getPositionGlobal(); - setFlying(av->mInAir); + setFlying(av->mInAir && (getFlying() || mAutoPilotTargetGlobal[VZ] > our_pos_global[VZ])); // If they're in air, fly if they're higher or we were already (follow) flying if (av->isSitting() && (!rlv_handler_t::isEnabled() || !gRlvHandler.hasBehaviour(RLV_BHVR_SIT))) { if (auto seat = av->getParent())