summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2016-10-25 20:09:42 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2016-10-25 20:09:42 +0300
commitd4373437f2bb80579b0a2c984d30d041e0c6d156 (patch)
tree206bf0c87dc042bbbe7b6b6b83610041e49b5740 /indra/newview/llagent.cpp
parent29dd0298af63c47a4c40eccb90011fd5ed48295b (diff)
parent6b1f96187d7a93a4bbaecf1a84162a141eed5971 (diff)
Merged in lindenlab/viewer-bear
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r--indra/newview/llagent.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 6a1215c3af..d8b0787852 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -3191,7 +3191,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)
@@ -3199,6 +3199,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)
@@ -3656,7 +3663,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()