summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolgrab.cpp
diff options
context:
space:
mode:
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;