diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2010-09-16 12:02:24 -0700 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2010-09-16 12:02:24 -0700 |
commit | 60db8577a90be3ea3d4a06ab06232802be953286 (patch) | |
tree | 0fcedbdf478b3f518a0d5dc69b7d234406355d75 /indra/newview/lltoolpie.cpp | |
parent | ae623c8068145f968f09ccf9bbdd90e993ca4283 (diff) | |
parent | 1dbcc3fff79b55038178e493df0cc0c3a4d66221 (diff) |
Merge
Diffstat (limited to 'indra/newview/lltoolpie.cpp')
-rw-r--r-- | indra/newview/lltoolpie.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index f8bf647670..d992d808c7 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -620,6 +620,25 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask) return TRUE; } } + else if (gSavedSettings.getBOOL("DoubleClickTeleport")) + { + LLViewerObject* objp = mPick.getObject(); + LLViewerObject* parentp = objp ? objp->getRootEdit() : NULL; + + bool is_in_world = mPick.mObjectID.notNull() && objp && !objp->isHUDAttachment(); + bool is_land = mPick.mPickType == LLPickInfo::PICK_LAND; + bool pos_non_zero = !mPick.mPosGlobal.isExactlyZero(); + bool has_touch_handler = (objp && objp->flagHandleTouch()) || (parentp && parentp->flagHandleTouch()); + bool has_click_action = final_click_action(objp); + + if (pos_non_zero && (is_land || (is_in_world && !has_touch_handler && !has_click_action))) + { + LLVector3d pos = mPick.mPosGlobal; + pos.mdV[VZ] += gAgentAvatarp->getPelvisToFoot(); + gAgent.teleportViaLocationLookAt(pos); + return TRUE; + } + } return FALSE; } |