mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-13 12:38:55 -04:00
feat(camera): option for free look to follow the default camera distance (#6757)
Free Look pinned the camera to the fixed "Camera Distance" setting, so it never pulled in or out the way the vanilla camera does for the current situation. Add an opt-in "Follow Default Camera Distance" setting (FreeLook.UseGameDistance) that uses the game's per-mode default distance instead. The fixed distance slider is hidden while it is enabled. Closes #4050 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1513,7 +1513,11 @@ s32 Camera_Free(Camera* camera) {
|
||||
camera->play->camY = -0x228C;
|
||||
}
|
||||
|
||||
f32 distTarget = CVarGetInteger(CVAR_SETTING("FreeLook.MaxCameraDistance"), para1->distTarget);
|
||||
// SOH [Enhancement] When set, use the game's per-mode default distance (para1->distTarget)
|
||||
// instead of the fixed free-look distance.
|
||||
f32 distTarget = CVarGetInteger(CVAR_SETTING("FreeLook.UseGameDistance"), 0)
|
||||
? para1->distTarget
|
||||
: CVarGetInteger(CVAR_SETTING("FreeLook.MaxCameraDistance"), para1->distTarget);
|
||||
f32 speedScaler = CVarGetInteger(CVAR_SETTING("FreeLook.TransitionSpeed"), 25);
|
||||
f32 distDiff = ABS(distTarget - camera->dist);
|
||||
if (distDiff > 0)
|
||||
|
||||
Reference in New Issue
Block a user