summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolgrab.cpp
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2012-08-03 11:57:51 -0400
committerMonty Brandenberg <monty@lindenlab.com>2012-08-03 11:57:51 -0400
commitfdb2ae8335f136283910f9538e74724b69886e15 (patch)
tree79ed0377590b5d291a301d3ae138145d4cb4608e /indra/newview/lltoolgrab.cpp
parent1d5490e752deeff316658f4850aac5fc96a91866 (diff)
parentb8bac66a0f8c392a221ad2c64611e2a55de82339 (diff)
Merge of viewer-development (3.4.1).
Diffstat (limited to 'indra/newview/lltoolgrab.cpp')
-rw-r--r--indra/newview/lltoolgrab.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp
index 319e2508e0..9907da0f0e 100644
--- a/indra/newview/lltoolgrab.cpp
+++ b/indra/newview/lltoolgrab.cpp
@@ -205,9 +205,9 @@ BOOL LLToolGrab::handleObjectHit(const LLPickInfo& info)
// Clicks on scripted or physical objects are temporary grabs, so
// not "Build mode"
- mHideBuildHighlight = script_touch || objectp->usePhysics();
+ mHideBuildHighlight = script_touch || objectp->flagUsePhysics();
- if (!objectp->usePhysics())
+ if (!objectp->flagUsePhysics())
{
if (script_touch)
{
@@ -222,18 +222,24 @@ BOOL LLToolGrab::handleObjectHit(const LLPickInfo& info)
if (gAgentCamera.cameraMouselook())
{
mMode = GRAB_LOCKED;
+ gViewerWindow->hideCursor();
+ gViewerWindow->moveCursorToCenter();
}
- else
+ else if (objectp->permMove() && !objectp->isPermanentEnforced())
{
mMode = GRAB_ACTIVE_CENTER;
+ gViewerWindow->hideCursor();
+ gViewerWindow->moveCursorToCenter();
+ }
+ else
+ {
+ mMode = GRAB_LOCKED;
}
- gViewerWindow->hideCursor();
- gViewerWindow->moveCursorToCenter();
}
}
- else if( !objectp->permMove() )
+ else if( objectp->flagCharacter() || !objectp->permMove() || objectp->isPermanentEnforced())
{
// if mouse is over a physical object without move permission, show feedback if user tries to move it.
mMode = GRAB_LOCKED;