diff options
| author | Toru the Red Fox <needforspeedfun@gmail.com> | 2026-03-17 19:47:34 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-17 19:47:34 +0000 |
| commit | c98153bf07613636f565ebcfa0cda647246d22ba (patch) | |
| tree | 7144b768c7d2d747d4dcfed43f7890d51e78a491 | |
| parent | a5f5595c63d61299c199b7aa06eb5f0b45860216 (diff) | |
Fix FOV modification so it respects applyEffects (#1297)
| -rw-r--r-- | Minecraft.Client/GameRenderer.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Minecraft.Client/GameRenderer.cpp b/Minecraft.Client/GameRenderer.cpp index 8c9dd591..4eeccef9 100644 --- a/Minecraft.Client/GameRenderer.cpp +++ b/Minecraft.Client/GameRenderer.cpp @@ -359,14 +359,17 @@ void GameRenderer::pick(float a) } } +// Toru - wrapping these methods for backwards compatibility, +// no longer setting m_fov as its use doesn't respect applyEffects param in GameRenderer::getFov void GameRenderer::SetFovVal(float fov) { - m_fov=fov; + //m_fov=fov; + mc->options->set(Options::Option::FOV, (fov - 70) / 40); } float GameRenderer::GetFovVal() { - return m_fov; + return 70 + mc->options->fov * 40;//m_fov; } void GameRenderer::tickFov() @@ -392,7 +395,7 @@ float GameRenderer::getFov(float a, bool applyEffects) float fov = m_fov;//70; if (applyEffects) { - //fov += mc->options->fov * 40; + fov += mc->options->fov * 40; fov *= oFov[playerIdx] + (this->fov[playerIdx] - oFov[playerIdx]) * a; } if (player->getHealth() <= 0) |
