summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2016-01-06 20:28:44 +0200
committerandreykproductengine <akleshchev@productengine.com>2016-01-06 20:28:44 +0200
commitc9c6966364ba59171313ec179b8b19f920ea6888 (patch)
treea09ed6ed94651ca405d6e32b7dad36cf5f2b38e8 /indra/newview/llagent.cpp
parent28c705fd1cc704ebff91339f87671337bd8987b9 (diff)
MAINT-4488 [PUBLIC] llTakeControls(*,FALSE,TRUE) prevents left clicks from mouselook.
Diffstat (limited to 'indra/newview/llagent.cpp')
-rwxr-xr-xindra/newview/llagent.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index a2211d7356..675b1973d8 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -3205,7 +3205,7 @@ void LLAgent::initOriginGlobal(const LLVector3d &origin_global)
}
BOOL LLAgent::leftButtonGrabbed() const
-{
+{
const BOOL camera_mouse_look = gAgentCamera.cameraMouselook();
return (!camera_mouse_look && mControlsTakenCount[CONTROL_LBUTTON_DOWN_INDEX] > 0)
|| (camera_mouse_look && mControlsTakenCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0)
@@ -3213,6 +3213,13 @@ BOOL LLAgent::leftButtonGrabbed() const
|| (camera_mouse_look && mControlsTakenPassedOnCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0);
}
+BOOL LLAgent::leftButtonBlocked() const
+{
+ const BOOL camera_mouse_look = gAgentCamera.cameraMouselook();
+ return (!camera_mouse_look && mControlsTakenCount[CONTROL_LBUTTON_DOWN_INDEX] > 0)
+ || (camera_mouse_look && mControlsTakenCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0);
+}
+
BOOL LLAgent::rotateGrabbed() const
{
return (mControlsTakenCount[CONTROL_YAW_POS_INDEX] > 0)
@@ -3670,7 +3677,14 @@ BOOL LLAgent::anyControlGrabbed() const
BOOL LLAgent::isControlGrabbed(S32 control_index) const
{
- return mControlsTakenCount[control_index] > 0;
+ if (gAgent.mControlsTakenCount[control_index] > 0)
+ return TRUE;
+ return gAgent.mControlsTakenPassedOnCount[control_index] > 0;
+}
+
+BOOL LLAgent::isControlBlocked(S32 control_index) const
+{
+ return mControlsTakenCount[control_index] > 0;
}
void LLAgent::forceReleaseControls()