Skip to content

Commit 65d70a8

Browse files
authored
Fix: ignore *pass-on* counters when detecting left-button grabs (#3990)
LLAgent::leftButtonGrabbed() must report TRUE only when an attachment has **actually grabbed** the left mouse button (accept = TRUE, pass_on = FALSE), like every other ...Grabbed() function below it
1 parent 281c7cf commit 65d70a8

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

indra/newview/llagent.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3469,11 +3469,14 @@ void LLAgent::initOriginGlobal(const LLVector3d &origin_global)
34693469

34703470
bool LLAgent::leftButtonGrabbed() const
34713471
{
3472-
const bool camera_mouse_look = gAgentCamera.cameraMouselook();
3473-
return (!camera_mouse_look && mControlsTakenCount[CONTROL_LBUTTON_DOWN_INDEX] > 0)
3474-
|| (camera_mouse_look && mControlsTakenCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0)
3475-
|| (!camera_mouse_look && mControlsTakenPassedOnCount[CONTROL_LBUTTON_DOWN_INDEX] > 0)
3476-
|| (camera_mouse_look && mControlsTakenPassedOnCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0);
3472+
if (gAgentCamera.cameraMouselook())
3473+
{
3474+
return mControlsTakenCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0;
3475+
}
3476+
else
3477+
{
3478+
return mControlsTakenCount[CONTROL_LBUTTON_DOWN_INDEX] > 0;
3479+
}
34773480
}
34783481

34793482
bool LLAgent::rotateGrabbed() const

0 commit comments

Comments
 (0)