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
master
Sekkmer 2025-04-29 05:29:52 +02:00 committed by GitHub
parent 281c7cf664
commit 65d70a8d8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 5 deletions

View File

@ -3469,11 +3469,14 @@ 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)
|| (!camera_mouse_look && mControlsTakenPassedOnCount[CONTROL_LBUTTON_DOWN_INDEX] > 0)
|| (camera_mouse_look && mControlsTakenPassedOnCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0);
if (gAgentCamera.cameraMouselook())
{
return mControlsTakenCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0;
}
else
{
return mControlsTakenCount[CONTROL_LBUTTON_DOWN_INDEX] > 0;
}
}
bool LLAgent::rotateGrabbed() const