diff options
author | Jacek Antonelli | 2008-10-03 18:05:46 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-10-03 18:06:00 -0500 |
commit | 04f9d0b7cef929ad9acdea37bf5f826850993c52 (patch) | |
tree | 4f89e6ad443f04b66d562af0bbae7e95cb44dc24 /linden/indra/newview/llviewermenu.cpp | |
parent | Second Life viewer sources 1.21.3-RC (diff) | |
download | meta-impy-04f9d0b7cef929ad9acdea37bf5f826850993c52.zip meta-impy-04f9d0b7cef929ad9acdea37bf5f826850993c52.tar.gz meta-impy-04f9d0b7cef929ad9acdea37bf5f826850993c52.tar.bz2 meta-impy-04f9d0b7cef929ad9acdea37bf5f826850993c52.tar.xz |
Second Life viewer sources 1.21.4-RC
Diffstat (limited to 'linden/indra/newview/llviewermenu.cpp')
-rw-r--r-- | linden/indra/newview/llviewermenu.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index c7207ba..c2a8055 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp | |||
@@ -4903,13 +4903,20 @@ class LLToolsLookAtSelection : public view_listener_t | |||
4903 | LLVector3 obj_to_cam = LLViewerCamera::getInstance()->getOrigin() - selection_bbox.getCenterAgent(); | 4903 | LLVector3 obj_to_cam = LLViewerCamera::getInstance()->getOrigin() - selection_bbox.getCenterAgent(); |
4904 | obj_to_cam.normVec(); | 4904 | obj_to_cam.normVec(); |
4905 | 4905 | ||
4906 | LLUUID object_id; | ||
4907 | if (LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()) | ||
4908 | { | ||
4909 | object_id = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()->mID; | ||
4910 | } | ||
4906 | if (zoom) | 4911 | if (zoom) |
4907 | { | 4912 | { |
4908 | gAgent.setCameraPosAndFocusGlobal(LLSelectMgr::getInstance()->getSelectionCenterGlobal() + LLVector3d(obj_to_cam * distance), LLSelectMgr::getInstance()->getSelectionCenterGlobal(), LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()->mID ); | 4913 | gAgent.setCameraPosAndFocusGlobal(LLSelectMgr::getInstance()->getSelectionCenterGlobal() + LLVector3d(obj_to_cam * distance), |
4914 | LLSelectMgr::getInstance()->getSelectionCenterGlobal(), | ||
4915 | object_id ); | ||
4909 | } | 4916 | } |
4910 | else | 4917 | else |
4911 | { | 4918 | { |
4912 | gAgent.setFocusGlobal( LLSelectMgr::getInstance()->getSelectionCenterGlobal(), LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()->mID ); | 4919 | gAgent.setFocusGlobal( LLSelectMgr::getInstance()->getSelectionCenterGlobal(), object_id ); |
4913 | } | 4920 | } |
4914 | } | 4921 | } |
4915 | return true; | 4922 | return true; |