[Frosting:288] Ability to left-click sit on one's own objects only.
Debug Settings DisableClickSitOtherOwner added. Checkbox added to System Preferences for disabling click-to-sit on objects you don't own. Also redid onCommitCheckBox a bit, best viewed without space changes. There's more to this feature, but it doesn't work yet.
This commit is contained in:
@@ -213,9 +213,17 @@ BOOL LLToolPie::handleLeftClickPick()
|
||||
break;
|
||||
case CLICK_ACTION_SIT:
|
||||
{
|
||||
if (!gSavedSettings.getBOOL("DisableClickSit"))
|
||||
if (isAgentAvatarValid() && !gAgentAvatarp->isSitting()) // agent not already sitting
|
||||
{
|
||||
bool disable_click_sit = gSavedSettings.getBOOL("DisableClickSit");
|
||||
if (!disable_click_sit)
|
||||
{
|
||||
if (gSavedSettings.getBOOL("DisableClickSitOtherOwner"))
|
||||
{
|
||||
disable_click_sit = !object->permYouOwner();
|
||||
}
|
||||
}
|
||||
if (disable_click_sit) return true;
|
||||
handle_object_sit_or_stand();
|
||||
// put focus in world when sitting on an object
|
||||
gFocusMgr.setKeyboardFocus(NULL);
|
||||
|
||||
Reference in New Issue
Block a user