Repository navigation
Fix widescreen camera FOV and world rendering - #5564
Open
MohabCodeX wants to merge 3 commits into
Open
MohabCodeX wants to merge 3 commits into
MohabCodeX wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new FOV clamps alter valid scripted zooms between 0 and 1 or 179 and 180 degrees, affecting both rendering and values returned by getCameraMatrix.
1 open issue
What changed in this PR
Updates the GTA: San Andreas client’s camera and world rendering for widescreen displays, complementing the HUD changes in #5563 toward resolving #2753.
Changes:
- Adds Hor+ field-of-view scaling and adjusts third-person aiming to match.
- Separates base FOV from rendered FOV for script queries and level-of-detail calculations.
- Adjusts sprite proportions and widens sky geometry for widescreen rendering.
Include the goals, implementation reasoning, and testing details in the commit message.
| File | Description |
|---|---|
Client/sdk/game/CSettings.h |
Exposes base FOV through the settings interface. |
Client/mods/deathmatch/logic/CClientCamera.cpp |
Uses base FOV for camera queries outside transitions. |
Client/game_sa/CSettingsSA.h |
Declares the base-FOV accessor implementation. |
Client/game_sa/CSettingsSA.cpp |
Implements FOV scaling, aiming hooks, and world-rendering adjustments. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #2753


Switches camera field of view scaling to Hor+ on aspect ratios wider than 4:3 so vertical visibility stays consistent across 16:9, 21:9, and 32:9 displays without changing 4:3 behavior or the FOV slider range. Third-person aiming and crosshairs align with the widened frustum, world LOD distances and scripted camera FOV queries stay tied to the base FOV to avoid premature LOD pop-in or zoom loops, coronas, the moon, stars, and clouds keep their intended proportions, and sky backdrop geometry widens to prevent side gaps. Combined with the preceding widescreen HUD scaling PR (#5563), this completes the full fix for #2753.