[Follow] Do not fly unless flying avatar target or already flying
This commit is contained in:
@@ -1613,12 +1613,14 @@ void LLAgent::startAutoPilotGlobal(
|
|||||||
mAutoPilotFlyOnStop = FALSE;
|
mAutoPilotFlyOnStop = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (distance > 30.0 && mAutoPilotAllowFlying)
|
bool follow = mAutoPilotBehaviorName == "Follow";
|
||||||
|
|
||||||
|
if (!follow && distance > 30.0 && mAutoPilotAllowFlying)
|
||||||
{
|
{
|
||||||
setFlying(TRUE);
|
setFlying(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( distance > 1.f &&
|
if (!follow && distance > 1.f &&
|
||||||
mAutoPilotAllowFlying &&
|
mAutoPilotAllowFlying &&
|
||||||
heightDelta > (sqrtf(mAutoPilotStopDistance) + 1.f))
|
heightDelta > (sqrtf(mAutoPilotStopDistance) + 1.f))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user