From 1c1164d9e81a45d56fde11e107d13f87fa5f9e1d Mon Sep 17 00:00:00 2001 From: Phnod Date: Thu, 31 Aug 2023 20:03:56 -0400 Subject: [PATCH] port: apply FovAffectsZoom changes to max zoom level for sniper, farsight and horizon scanner --- src/game/game_0b0fd0.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/game/game_0b0fd0.c b/src/game/game_0b0fd0.c index 99a670f25..bb0937703 100644 --- a/src/game/game_0b0fd0.c +++ b/src/game/game_0b0fd0.c @@ -280,9 +280,22 @@ void currentPlayerZoomIn(f32 fovpersec) g_Vars.currentplayer->gunzoomfovs[index] /= 1 + amount * 0.1f; +#ifdef PLATFORM_N64 if (g_Vars.currentplayer->gunzoomfovs[index] < 2) { g_Vars.currentplayer->gunzoomfovs[index] = 2; } +#else + if (g_PlayerFovAffectsZoom) { + if (g_Vars.currentplayer->gunzoomfovs[index] < 2 * (g_PlayerDefaultFovY / 60.0f)) { + g_Vars.currentplayer->gunzoomfovs[index] = 2 * (g_PlayerDefaultFovY / 60.0f); + } + } + else { + if (g_Vars.currentplayer->gunzoomfovs[index] < 2) { + g_Vars.currentplayer->gunzoomfovs[index] = 2; + } + } +#endif } }