Conversation
|
Tests fine, but resets FOV to 30 if you have existing settings prior to this change. Pls fix and then should be good to merge |
|
gotta fix some default setting after the merge resolution |
|
oh cool :0 |
|
I'm not a huge fan of doing this offsetting as that will realisticaly result in weird behavior if we change how settings are stored. Why is the FOV getting reset to the minimum value anyway? |
|
To prevent a player's FOV from being changed when they update, I added the conversion check to see if we need to convert their old FOV setting to a new one. The way I implemented this check is by changing |
|
IMO there’s two better, sane fixes than offsetting the value for this particular situation. Either of these are probably good fixes.
I’m not super specifically familiar with how settings are being serialized so it’s possible one of these is far easier than the other, but I’d much prefer this over letting magic number offset consequences trickle down deep into the codebase. |
A data versioning system would probably be better for longevity, but instead of bootstrapping that system here I think it'll be better to break it off into a separate PR first before we implement this. I'll set that system up (should be straightforward) and rebase these changes on top. |
|
I messed up some git things with this due to inexperience so I'm going to submit a new PR tomorrow with these changes built on top of the SettingFixer system (#1097). I have it marked as a draft for now and would appreciate your feedback. |
Description
This PR fixes the FOV slider to use the pre-existing FOV option as intended instead of hooking into gameRenderer. It also fixes some other minor issues with the existing FOV system and increases the range of FOV to 30-110.
Changes
Previous Behavior
The FOV slider was inaccurate because it modified a value gameRenderer expected to be hardcoded.
Additional Issues:
Root Cause
The FOV slider implemented by 4J in the debug menu (which was used as a reference for the slider in settings) modified the m_fov value in gameRenderer instead of modifying the existing option.
The FOV slider was also implemented as a 0-100 slider and the value was used to calculate an FOV, meaning that multiple stops of the slider corresponded with a single FOV value
The hand renderering code calls for the target FOV, meaning it is affected by FOV scaling.
New Behavior
The FOV slider now modifies the intended option value that gameRenderer expects it to. The FOV slider also now goes from 30-110 instead of 70-110.
The FOV slider is now 1:1, with each tick / stop corresponding to one discrete FOV value.
The hand viewmodel no longer scales with screen FOV.
Fix Implementation
Instead of using
gameRenderer->SetFovVal();, the slider now modifiesoptions->fov. This change is used in UIScene_SettingsGraphicsMenu.cpp, UIScene_DebugOverlay.cpp, and Consoles_App.cpp.Changed how
m_sliderFOVwas implemented, making it 0-80 to match the range of 30-110Added a hardcoded value into
gluPerspective();inGameRenderer::renderItemInHand();AI Use Disclosure
No AI was used to modify the code or author this pull request.
Related Issues