diff options
Diffstat (limited to 'linden/indra/newview/lltoolgrab.cpp')
-rw-r--r-- | linden/indra/newview/lltoolgrab.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/linden/indra/newview/lltoolgrab.cpp b/linden/indra/newview/lltoolgrab.cpp index ed9ca85..3437193 100644 --- a/linden/indra/newview/lltoolgrab.cpp +++ b/linden/indra/newview/lltoolgrab.cpp | |||
@@ -186,7 +186,12 @@ BOOL LLToolGrab::handleObjectHit(const LLPickInfo& info) | |||
186 | return FALSE; | 186 | return FALSE; |
187 | } | 187 | } |
188 | 188 | ||
189 | if (objectp->isAvatar()) | 189 | //if (objectp->isAvatar()) |
190 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0f | ||
191 | if ( (objectp->isAvatar()) || | ||
192 | ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && ((!objectp->isAttachment()) || (!objectp->permYouOwner())) && | ||
193 | (dist_vec_squared(gAgent.getPositionAgent(), mGrabPick.mIntersection) > 1.5f * 1.5f) ) ) | ||
194 | // [/RLVa:KB] | ||
190 | { | 195 | { |
191 | if (gGrabTransientTool) | 196 | if (gGrabTransientTool) |
192 | { | 197 | { |
@@ -421,6 +426,23 @@ BOOL LLToolGrab::handleHover(S32 x, S32 y, MASK mask) | |||
421 | return TRUE; | 426 | return TRUE; |
422 | } | 427 | } |
423 | 428 | ||
429 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.0f | ||
430 | // Don't allow dragging beyond 1.5m under @fartouch=n | ||
431 | LLViewerObject* pObj; | ||
432 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && (GRAB_INACTIVE != mMode) && (hasMouseCapture()) && | ||
433 | ((pObj = mGrabPick.getObject()) != NULL) && (!pObj->isDead()) && (!pObj->isHUDAttachment()) && | ||
434 | (dist_vec_squared(gAgent.getPositionAgent(), pObj->getPositionRegion() + mGrabPick.mObjectOffset) > 1.5f * 1.5f) ) | ||
435 | { | ||
436 | if (gGrabTransientTool) | ||
437 | { | ||
438 | // Prevent the grab tool from popping up as soon as we kill the drag operation | ||
439 | gBasicToolset->selectTool(gGrabTransientTool); | ||
440 | gGrabTransientTool = NULL; | ||
441 | } | ||
442 | setMouseCapture(FALSE); | ||
443 | } | ||
444 | // [/RLVa:KB] | ||
445 | |||
424 | // Do the right hover based on mode | 446 | // Do the right hover based on mode |
425 | switch( mMode ) | 447 | switch( mMode ) |
426 | { | 448 | { |