port: apply FovAffectsZoom changes to max zoom level for sniper, farsight and horizon scanner

This commit is contained in:
Phnod committed 2023-08-31 20:39:29 -04:00
1 parent 35386bbd2c
commit 1c1164d9e8
1 file changed
+13
+13
View File
@@ -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
}
}