diff options
author | andreykproductengine <akleshchev@productengine.com> | 2016-01-06 20:28:44 +0200 |
---|---|---|
committer | andreykproductengine <akleshchev@productengine.com> | 2016-01-06 20:28:44 +0200 |
commit | c9c6966364ba59171313ec179b8b19f920ea6888 (patch) | |
tree | a09ed6ed94651ca405d6e32b7dad36cf5f2b38e8 /indra/newview/lltool.cpp | |
parent | 28c705fd1cc704ebff91339f87671337bd8987b9 (diff) |
MAINT-4488 [PUBLIC] llTakeControls(*,FALSE,TRUE) prevents left clicks from mouselook.
Diffstat (limited to 'indra/newview/lltool.cpp')
-rwxr-xr-x | indra/newview/lltool.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/indra/newview/lltool.cpp b/indra/newview/lltool.cpp index 4aad650b68..5e703933ca 100755 --- a/indra/newview/lltool.cpp +++ b/indra/newview/lltool.cpp @@ -38,6 +38,7 @@ #include "lltoolfocus.h" #include "llfocusmgr.h" #include "llagent.h" +#include "llagentcamera.h" #include "llviewerjoystick.h" extern BOOL gDebugClicks; @@ -84,7 +85,14 @@ BOOL LLTool::handleMouseDown(S32 x, S32 y, MASK mask) } // by default, didn't handle it // LL_INFOS() << "LLTool::handleMouseDown" << LL_ENDL; - gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_DOWN); + if (gAgentCamera.cameraMouselook()) + { + gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_DOWN); + } + else + { + gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_DOWN); + } return TRUE; } @@ -95,8 +103,15 @@ BOOL LLTool::handleMouseUp(S32 x, S32 y, MASK mask) LL_INFOS() << "LLTool left mouse up" << LL_ENDL; } // by default, didn't handle it - // LL_INFOS() << "LLTool::handleMouseUp" << LL_ENDL; - gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_UP); + // LL_INFOS() << "LLTool::handleMouseUp" << LL_ENDL; + if (gAgentCamera.cameraMouselook()) + { + gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_UP); + } + else + { + gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_UP); + } return TRUE; } |