diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llagent.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index 09d65d1..c61f7a6 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp | |||
@@ -1613,8 +1613,6 @@ BOOL LLAgent::calcCameraMinDistance(F32 &obj_min_distance) | |||
1613 | abs_target_offset.abs(); | 1613 | abs_target_offset.abs(); |
1614 | 1614 | ||
1615 | LLVector3 target_offset_dir = target_offset_origin; | 1615 | LLVector3 target_offset_dir = target_offset_origin; |
1616 | F32 object_radius = mFocusObject->getVObjRadius(); | ||
1617 | |||
1618 | BOOL target_outside_object_extents = FALSE; | 1616 | BOOL target_outside_object_extents = FALSE; |
1619 | 1617 | ||
1620 | for (U32 i = VX; i <= VZ; i++) | 1618 | for (U32 i = VX; i <= VZ; i++) |
@@ -1708,18 +1706,6 @@ BOOL LLAgent::calcCameraMinDistance(F32 &obj_min_distance) | |||
1708 | 1706 | ||
1709 | LLVector3 camera_offset_object(getCameraPositionAgent() - mFocusObject->getPositionAgent()); | 1707 | LLVector3 camera_offset_object(getCameraPositionAgent() - mFocusObject->getPositionAgent()); |
1710 | 1708 | ||
1711 | // length projected orthogonal to target offset | ||
1712 | F32 camera_offset_dist = (camera_offset_object - target_offset_dir * (camera_offset_object * target_offset_dir)).magVec(); | ||
1713 | |||
1714 | // calculate whether the target point would be "visible" if it were outside the bounding box | ||
1715 | // on the opposite of the splitting plane defined by object_split_axis; | ||
1716 | BOOL exterior_target_visible = FALSE; | ||
1717 | if (camera_offset_dist > object_radius) | ||
1718 | { | ||
1719 | // target is visible from camera, so turn off fov zoom | ||
1720 | exterior_target_visible = TRUE; | ||
1721 | } | ||
1722 | |||
1723 | F32 camera_offset_clip = camera_offset_object * object_split_axis; | 1709 | F32 camera_offset_clip = camera_offset_object * object_split_axis; |
1724 | F32 target_offset_clip = target_offset_dir * object_split_axis; | 1710 | F32 target_offset_clip = target_offset_dir * object_split_axis; |
1725 | 1711 | ||
@@ -2538,12 +2524,10 @@ void LLAgent::autoPilot(F32 *delta_yaw) | |||
2538 | *delta_yaw = yaw; | 2524 | *delta_yaw = yaw; |
2539 | 2525 | ||
2540 | // Compute when to start slowing down and when to stop | 2526 | // Compute when to start slowing down and when to stop |
2541 | F32 stop_distance = mAutoPilotStopDistance; | ||
2542 | F32 slow_distance; | 2527 | F32 slow_distance; |
2543 | if (getFlying()) | 2528 | if (getFlying()) |
2544 | { | 2529 | { |
2545 | slow_distance = llmax(6.f, mAutoPilotStopDistance + 5.f); | 2530 | slow_distance = llmax(6.f, mAutoPilotStopDistance + 5.f); |
2546 | stop_distance = llmax(2.f, mAutoPilotStopDistance); | ||
2547 | } | 2531 | } |
2548 | else | 2532 | else |
2549 | { | 2533 | { |
@@ -3719,7 +3703,6 @@ F32 LLAgent::calcCameraFOVZoomFactor() | |||
3719 | else if (mFocusObject.notNull() && !mFocusObject->isAvatar()) | 3703 | else if (mFocusObject.notNull() && !mFocusObject->isAvatar()) |
3720 | { | 3704 | { |
3721 | // don't FOV zoom on mostly transparent objects | 3705 | // don't FOV zoom on mostly transparent objects |
3722 | LLVector3 focus_offset = mFocusObjectOffset; | ||
3723 | F32 obj_min_dist = 0.f; | 3706 | F32 obj_min_dist = 0.f; |
3724 | if (!gSavedSettings.getBOOL("DisableMinZoomDist")) | 3707 | if (!gSavedSettings.getBOOL("DisableMinZoomDist")) |
3725 | calcCameraMinDistance(obj_min_dist); | 3708 | calcCameraMinDistance(obj_min_dist); |