diff options
Diffstat (limited to 'linden/indra/newview/lltoolgun.cpp')
-rw-r--r-- | linden/indra/newview/lltoolgun.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/linden/indra/newview/lltoolgun.cpp b/linden/indra/newview/lltoolgun.cpp index d21fd49..f7af018 100644 --- a/linden/indra/newview/lltoolgun.cpp +++ b/linden/indra/newview/lltoolgun.cpp | |||
@@ -49,7 +49,8 @@ | |||
49 | #include "lltoolgrab.h" | 49 | #include "lltoolgrab.h" |
50 | 50 | ||
51 | LLToolGun::LLToolGun( LLToolComposite* composite ) | 51 | LLToolGun::LLToolGun( LLToolComposite* composite ) |
52 | : LLTool( std::string("gun"), composite ) | 52 | : LLTool( std::string("gun"), composite ), |
53 | mIsSelected(FALSE) | ||
53 | { | 54 | { |
54 | } | 55 | } |
55 | 56 | ||
@@ -58,6 +59,7 @@ void LLToolGun::handleSelect() | |||
58 | gViewerWindow->hideCursor(); | 59 | gViewerWindow->hideCursor(); |
59 | gViewerWindow->moveCursorToCenter(); | 60 | gViewerWindow->moveCursorToCenter(); |
60 | gViewerWindow->mWindow->setMouseClipping(TRUE); | 61 | gViewerWindow->mWindow->setMouseClipping(TRUE); |
62 | mIsSelected = TRUE; | ||
61 | } | 63 | } |
62 | 64 | ||
63 | void LLToolGun::handleDeselect() | 65 | void LLToolGun::handleDeselect() |
@@ -65,6 +67,7 @@ void LLToolGun::handleDeselect() | |||
65 | gViewerWindow->moveCursorToCenter(); | 67 | gViewerWindow->moveCursorToCenter(); |
66 | gViewerWindow->showCursor(); | 68 | gViewerWindow->showCursor(); |
67 | gViewerWindow->mWindow->setMouseClipping(FALSE); | 69 | gViewerWindow->mWindow->setMouseClipping(FALSE); |
70 | mIsSelected = FALSE; | ||
68 | } | 71 | } |
69 | 72 | ||
70 | BOOL LLToolGun::handleMouseDown(S32 x, S32 y, MASK mask) | 73 | BOOL LLToolGun::handleMouseDown(S32 x, S32 y, MASK mask) |
@@ -77,7 +80,7 @@ BOOL LLToolGun::handleMouseDown(S32 x, S32 y, MASK mask) | |||
77 | 80 | ||
78 | BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask) | 81 | BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask) |
79 | { | 82 | { |
80 | if( gAgent.cameraMouselook() ) | 83 | if( gAgent.cameraMouselook() && mIsSelected ) |
81 | { | 84 | { |
82 | const F32 NOMINAL_MOUSE_SENSITIVITY = 0.0025f; | 85 | const F32 NOMINAL_MOUSE_SENSITIVITY = 0.0025f; |
83 | 86 | ||