summaryrefslogtreecommitdiff
path: root/indra/newview/llquickprefs.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2026-05-31 08:11:04 +0700
committerGitHub <noreply@github.com>2026-05-31 08:11:04 +0700
commite1290b7bcfad38602c15f764481840ecd69d2f02 (patch)
treecb0ca16c8a6e19701723048608f3c5ca9f671585 /indra/newview/llquickprefs.cpp
parent184cd85f01b7654e8dd3e476b2c268849d97ee78 (diff)
parent390597c3bd532b29b4dfb4fb63cae9ac71bdbed9 (diff)
Merge pull request #23 from HadetTheUndying/combat-features
Combat features
Diffstat (limited to 'indra/newview/llquickprefs.cpp')
-rw-r--r--indra/newview/llquickprefs.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/llquickprefs.cpp b/indra/newview/llquickprefs.cpp
index 800aa7abac..9e83857a15 100644
--- a/indra/newview/llquickprefs.cpp
+++ b/indra/newview/llquickprefs.cpp
@@ -26,6 +26,8 @@
#include "llquickprefs.h"
#include "llagent.h"
+#include "llagentcamera.h"
+#include "llcheckboxctrl.h"
#include "llsliderctrl.h"
#include "lltextbox.h"
#include "llviewercontrol.h"
@@ -97,6 +99,14 @@ bool LLFloaterQuickPrefs::postBuild()
}
onRegionChanged(); // evaluate current region immediately
+ // OTS aim mode checkbox
+ mOTSEnabledCheck = getChild<LLCheckBoxCtrl>("ots_enabled");
+ if (mOTSEnabledCheck)
+ {
+ mOTSEnabledCheck->setCommitCallback(
+ boost::bind(&LLFloaterQuickPrefs::onOTSEnabledChanged, this));
+ }
+
return true;
}
@@ -203,3 +213,16 @@ void LLFloaterQuickPrefs::syncAvatarZOffsetFromPreferenceSetting()
F32 value = gSavedPerAccountSettings.getF32("AvatarHoverOffsetZ");
mAvatarZOffsetSlider->setValue(value, false); // false = no commit signal
}
+
+void LLFloaterQuickPrefs::onOTSEnabledChanged()
+{
+ if (mOTSEnabledCheck)
+ {
+ gSavedSettings.setBOOL("OTSEnabled", mOTSEnabledCheck->get());
+ // If currently in OTS mode and checkbox was unchecked, exit OTS
+ if (!mOTSEnabledCheck->get() && gAgentCamera.cameraOTS())
+ {
+ gAgentCamera.changeCameraFromOTS();
+ }
+ }
+}