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 itmaster
parent
281c7cf664
commit
65d70a8d8f
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue