port: modify default zoom level for dynamic zoom weapons if fovzoom ini option is enabled

This affects the Sniper Rifle, Farsight, and Horizon Scanner
This commit is contained in:
Phnod committed 2023-08-31 20:39:29 -04:00
1 parent 96bd8e05aa
commit 35386bbd2c
1 file changed
+13
+13
View File
@@ -239,9 +239,22 @@ void bgunReset(void)
g_Vars.currentplayer->gunammooff = 0;
g_Vars.currentplayer->gunsightoff = GUNSIGHTREASON_NOTAIMING;
#ifdef PLATFORM_N64
g_Vars.currentplayer->gunzoomfovs[0] = 15;
g_Vars.currentplayer->gunzoomfovs[1] = 60;
g_Vars.currentplayer->gunzoomfovs[2] = 30;
#else
if (g_PlayerFovAffectsZoom) {
g_Vars.currentplayer->gunzoomfovs[0] = 15 * (g_PlayerDefaultFovY / 60.0f);
g_Vars.currentplayer->gunzoomfovs[1] = 60 * (g_PlayerDefaultFovY / 60.0f);
g_Vars.currentplayer->gunzoomfovs[2] = 30 * (g_PlayerDefaultFovY / 60.0f);
}
else {
g_Vars.currentplayer->gunzoomfovs[0] = 15;
g_Vars.currentplayer->gunzoomfovs[1] = 60;
g_Vars.currentplayer->gunzoomfovs[2] = 30;
}
#endif
if (stageGetIndex(g_Vars.stagenum) == STAGEINDEX_AIRBASE) {
g_Weapons[WEAPON_EYESPY]->name = L_GUN_061; // "DrugSpy"