diff options
Diffstat (limited to 'linden/indra/newview/lltoolgrab.cpp')
-rw-r--r-- | linden/indra/newview/lltoolgrab.cpp | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/linden/indra/newview/lltoolgrab.cpp b/linden/indra/newview/lltoolgrab.cpp index 260d533..9b6d6f7 100644 --- a/linden/indra/newview/lltoolgrab.cpp +++ b/linden/indra/newview/lltoolgrab.cpp | |||
@@ -66,6 +66,10 @@ | |||
66 | 66 | ||
67 | #include "hippoLimits.h" | 67 | #include "hippoLimits.h" |
68 | 68 | ||
69 | // [RLVa:KB] | ||
70 | #include "rlvhandler.h" | ||
71 | // [/RLVa:KB] | ||
72 | |||
69 | const S32 SLOP_DIST_SQ = 4; | 73 | const S32 SLOP_DIST_SQ = 4; |
70 | 74 | ||
71 | // Override modifier key behavior with these buttons | 75 | // Override modifier key behavior with these buttons |
@@ -160,7 +164,11 @@ void LLToolGrab::pickCallback(const LLPickInfo& pick_info) | |||
160 | } | 164 | } |
161 | 165 | ||
162 | // if not over object, do nothing | 166 | // if not over object, do nothing |
163 | if (!objectp) | 167 | // if (!objectp) |
168 | // [RLVa:KB] - Checked: 2010-01-02 (RLVa-1.1.0l) | Added: RLVa-1.1.0l | ||
169 | // Block initiating a drag operation on an object that can't be touched | ||
170 | if ( (!objectp) || ((rlv_handler_t::isEnabled()) && (!gRlvHandler.canTouch(objectp, pick_info.mObjectOffset))) ) | ||
171 | // [/RLVa:KB] | ||
164 | { | 172 | { |
165 | LLToolGrab::getInstance()->setMouseCapture(TRUE); | 173 | LLToolGrab::getInstance()->setMouseCapture(TRUE); |
166 | LLToolGrab::getInstance()->mMode = GRAB_NOOBJECT; | 174 | LLToolGrab::getInstance()->mMode = GRAB_NOOBJECT; |
@@ -188,12 +196,7 @@ BOOL LLToolGrab::handleObjectHit(const LLPickInfo& info) | |||
188 | return FALSE; | 196 | return FALSE; |
189 | } | 197 | } |
190 | 198 | ||
191 | //if (objectp->isAvatar()) | 199 | if (objectp->isAvatar()) |
192 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0f | ||
193 | if ( (objectp->isAvatar()) || | ||
194 | ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && ((!objectp->isAttachment()) || (!objectp->permYouOwner())) && | ||
195 | (dist_vec_squared(gAgent.getPositionAgent(), mGrabPick.mIntersection) > 1.5f * 1.5f) ) ) | ||
196 | // [/RLVa:KB] | ||
197 | { | 200 | { |
198 | if (gGrabTransientTool) | 201 | if (gGrabTransientTool) |
199 | { | 202 | { |
@@ -428,12 +431,10 @@ BOOL LLToolGrab::handleHover(S32 x, S32 y, MASK mask) | |||
428 | return TRUE; | 431 | return TRUE; |
429 | } | 432 | } |
430 | 433 | ||
431 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.0f | 434 | // [RLVa:KB] - Checked: 2010-01-02 (RLVa-1.1.0l) | Modified: RLVa-1.1.0l |
432 | // Don't allow dragging beyond 1.5m under @fartouch=n | 435 | // Block dragging an object beyond touch range when @fartouch=n restricted |
433 | LLViewerObject* pObj; | 436 | if ( (rlv_handler_t::isEnabled()) && (GRAB_INACTIVE != mMode) && (GRAB_NOOBJECT != mMode) && (hasMouseCapture()) && |
434 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && (GRAB_INACTIVE != mMode) && (hasMouseCapture()) && | 437 | (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && (!gRlvHandler.canTouch(mGrabPick.getObject(), mGrabPick.mObjectOffset)) ) |
435 | ((pObj = mGrabPick.getObject()) != NULL) && (!pObj->isDead()) && (!pObj->isHUDAttachment()) && | ||
436 | (dist_vec_squared(gAgent.getPositionAgent(), pObj->getPositionRegion() + mGrabPick.mObjectOffset) > 1.5f * 1.5f) ) | ||
437 | { | 438 | { |
438 | if (gGrabTransientTool) | 439 | if (gGrabTransientTool) |
439 | { | 440 | { |
@@ -442,6 +443,7 @@ BOOL LLToolGrab::handleHover(S32 x, S32 y, MASK mask) | |||
442 | gGrabTransientTool = NULL; | 443 | gGrabTransientTool = NULL; |
443 | } | 444 | } |
444 | setMouseCapture(FALSE); | 445 | setMouseCapture(FALSE); |
446 | return TRUE; | ||
445 | } | 447 | } |
446 | // [/RLVa:KB] | 448 | // [/RLVa:KB] |
447 | 449 | ||