[Follow] Do not fly unless flying avatar target or already flying

This commit is contained in:
Liru Færs
2020-01-08 16:54:30 -05:00
parent d06448cdfd
commit c1ffb1b332

View File

@@ -1613,12 +1613,14 @@ void LLAgent::startAutoPilotGlobal(
mAutoPilotFlyOnStop = FALSE;
}
if (distance > 30.0 && mAutoPilotAllowFlying)
bool follow = mAutoPilotBehaviorName == "Follow";
if (!follow && distance > 30.0 && mAutoPilotAllowFlying)
{
setFlying(TRUE);
}
if ( distance > 1.f &&
if (!follow && distance > 1.f &&
mAutoPilotAllowFlying &&
heightDelta > (sqrtf(mAutoPilotStopDistance) + 1.f))
{