fix: disable Idle camera re-center no longer stuck on level geometry (#3094)

This commit is contained in:
Adam Bird 2023-08-06 12:05:34 -04:00 committed by GitHub
parent f68a4e930d
commit f5ab1a9b5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1678,12 +1678,13 @@ 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) {
// idle camera re-center
if (CVarGetInteger("gA11yDisableIdleCam", 0)) return; 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; // camera adjustments when obstructed/pushed by scene geometry
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 =