diff options
| author | Don Kjer <don@lindenlab.com> | 2011-05-17 21:01:36 +0000 |
|---|---|---|
| committer | Don Kjer <don@lindenlab.com> | 2011-05-17 21:01:36 +0000 |
| commit | 0a86e39d90e06f0a690b1ff5caf2dee5fe347f8f (patch) | |
| tree | c0e4f0df907c3f876dafdab3caa83e9356434fa9 /indra/newview/llagentcamera.cpp | |
| parent | ae8ed3fc2d4a7dda92ad8fdb34bc559478eb9177 (diff) | |
| parent | 79459bc9ba8cefa67091e65dd676f50c9ddc612d (diff) | |
Merge with viewer-development (mesh)
Diffstat (limited to 'indra/newview/llagentcamera.cpp')
| -rw-r--r-- | indra/newview/llagentcamera.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 6c5c3bcdab..c6b5a0113f 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -390,10 +390,12 @@ LLVector3 LLAgentCamera::calcFocusOffset(LLViewerObject *object, LLVector3 origi { return original_focus_point - obj_pos; } - LLQuaternion inv_obj_rot = ~obj_rot; // get inverse of rotation - LLVector3 object_extents = object->getScale(); + LLVector3 object_extents; + const LLVector4a* oe4 = object->mDrawable->getSpatialExtents(); + object_extents.set( oe4[1][0], oe4[1][1], oe4[1][2] ); + // make sure they object extents are non-zero object_extents.clamp(0.001f, F32_MAX); @@ -551,7 +553,9 @@ BOOL LLAgentCamera::calcCameraMinDistance(F32 &obj_min_distance) { BOOL soft_limit = FALSE; // is the bounding box to be treated literally (volumes) or as an approximation (avatars) - if (!mFocusObject || mFocusObject->isDead()) + if (!mFocusObject || mFocusObject->isDead() || + mFocusObject->isMesh() || + gSavedSettings.getBOOL("DisableCameraConstraints")) { obj_min_distance = 0.f; return TRUE; |
