Disable Click-to-sit

Signed-off-by: Beeks <HgDelirium@gmail.com>
This commit is contained in:
Beeks
2010-09-10 19:58:40 -04:00
parent b27508df29
commit 7099ee393b
3 changed files with 7 additions and 5 deletions

View File

@@ -10172,7 +10172,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
<integer>0</integer>
</map>
<key>PlayIMSound</key>
<map>

View File

@@ -100,6 +100,7 @@ private:
BOOL mPrivateLookAt;
BOOL mShowLookAt;
BOOL mRevokePermsOnStandUp;
BOOL mDisableClickSit;
};
@@ -189,6 +190,7 @@ void LLPrefsAscentSysImpl::refreshValues()
mPrivateLookAt = gSavedSettings.getBOOL("PrivateLookAt");
mShowLookAt = LLHUDEffectLookAt::sDebugLookAt;
mRevokePermsOnStandUp = gSavedSettings.getBOOL("RevokePermsOnStandUp");
mDisableClickSit = gSavedSettings.getBOOL("DisableClickSit");
}
void LLPrefsAscentSysImpl::refresh()
@@ -280,6 +282,7 @@ void LLPrefsAscentSysImpl::refresh()
childSetValue("private_look_at_check", mPrivateLookAt);
childSetValue("show_look_at_check", mShowLookAt);
childSetValue("revoke_perms_on_stand_up_check", mRevokePermsOnStandUp);
childSetValue("disable_click_sit_check", mDisableClickSit);
}
void LLPrefsAscentSysImpl::cancel()
@@ -454,6 +457,7 @@ void LLPrefsAscentSysImpl::apply()
gSavedSettings.setBOOL("PrivateLookAt", childGetValue("private_look_at_check"));
LLHUDEffectLookAt::sDebugLookAt = childGetValue("show_look_at_check");
gSavedSettings.setBOOL("RevokePermsOnStandUp", childGetValue("revoke_perms_on_stand_up_check"));
gSavedSettings.setBOOL("DisableClickSit", childGetValue("disable_click_sit_check"));
refreshValues();
refresh();

View File

@@ -192,11 +192,9 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show)
// touch behavior down below...
break;
case CLICK_ACTION_SIT:
if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->mIsSitting)) // agent not already sitting
if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->mIsSitting)
&& (!gSavedSettings.getBOOL("DisableClickSit"))) // agent not already sitting
{
// <edit>
if(!gSavedSettings.getBOOL("DisableClickSit"))
// </edit>
handle_sit_or_stand();
// put focus in world when sitting on an object
gFocusMgr.setKeyboardFocus(NULL);