mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-29 12:52:18 -05:00
[Accessibility] Add ability to disable camera re-centering on idle (#2503)
* Add ability to disable camera recentering on idle * Remove platform check * Update else camera comment
This commit is contained in:
parent
0daa91f4e3
commit
b74be9196c
@ -302,6 +302,15 @@ namespace GameMenuBar {
|
|||||||
UIWidgets::EnhancementRadioButton("French", "gLanguages", LANGUAGE_FRA);
|
UIWidgets::EnhancementRadioButton("French", "gLanguages", LANGUAGE_FRA);
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UIWidgets::Spacer(0);
|
||||||
|
|
||||||
|
if (ImGui::BeginMenu("Accessibility")) {
|
||||||
|
UIWidgets::PaddedEnhancementCheckbox("Disable Idle Camera Re-Centering", "gA11yDisableIdleCam");
|
||||||
|
UIWidgets::Tooltip("Disables the automatic re-centering of the camera when idle.");
|
||||||
|
|
||||||
|
ImGui::EndMenu();
|
||||||
|
}
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1677,16 +1677,18 @@ s32 Camera_Normal1(Camera* camera) {
|
|||||||
Camera_ClampDist(camera, eyeAdjustment.r, norm1->distMin, norm1->distMax, anim->unk_28);
|
Camera_ClampDist(camera, eyeAdjustment.r, norm1->distMin, norm1->distMax, anim->unk_28);
|
||||||
|
|
||||||
if (anim->startSwingTimer <= 0) {
|
if (anim->startSwingTimer <= 0) {
|
||||||
|
if (CVarGetInteger("gA11yDisableIdleCam", 0)) return;
|
||||||
eyeAdjustment.pitch = atEyeNextGeo.pitch;
|
eyeAdjustment.pitch = atEyeNextGeo.pitch;
|
||||||
eyeAdjustment.yaw =
|
eyeAdjustment.yaw =
|
||||||
Camera_LERPCeilS(anim->swingYawTarget, atEyeNextGeo.yaw, 1.0f / camera->yawUpdateRateInv, 0xA);
|
Camera_LERPCeilS(anim->swingYawTarget, atEyeNextGeo.yaw, 1.0f / camera->yawUpdateRateInv, 0xA);
|
||||||
} else if (anim->swing.unk_18 != 0) {
|
} else if (anim->swing.unk_18 != 0) {
|
||||||
|
if (CVarGetInteger("gA11yDisableIdleCam", 0)) return;
|
||||||
eyeAdjustment.yaw =
|
eyeAdjustment.yaw =
|
||||||
Camera_LERPCeilS(anim->swing.unk_16, atEyeNextGeo.yaw, 1.0f / camera->yawUpdateRateInv, 0xA);
|
Camera_LERPCeilS(anim->swing.unk_16, atEyeNextGeo.yaw, 1.0f / camera->yawUpdateRateInv, 0xA);
|
||||||
eyeAdjustment.pitch =
|
eyeAdjustment.pitch =
|
||||||
Camera_LERPCeilS(anim->swing.unk_14, atEyeNextGeo.pitch, 1.0f / camera->yawUpdateRateInv, 0xA);
|
Camera_LERPCeilS(anim->swing.unk_14, atEyeNextGeo.pitch, 1.0f / camera->yawUpdateRateInv, 0xA);
|
||||||
} else {
|
} else {
|
||||||
// rotate yaw to follow player.
|
// rotate yaw to follow player while moving around - to keep player on camera.
|
||||||
eyeAdjustment.yaw =
|
eyeAdjustment.yaw =
|
||||||
Camera_CalcDefaultYaw(camera, atEyeNextGeo.yaw, camera->playerPosRot.rot.y, norm1->unk_14, sp94);
|
Camera_CalcDefaultYaw(camera, atEyeNextGeo.yaw, camera->playerPosRot.rot.y, norm1->unk_14, sp94);
|
||||||
eyeAdjustment.pitch =
|
eyeAdjustment.pitch =
|
||||||
|
Loading…
Reference in New Issue
Block a user