From 35386bbd2ceeeca83badccef88fa4509c6a68557 Mon Sep 17 00:00:00 2001 From: Phnod Date: Thu, 31 Aug 2023 19:36:31 -0400 Subject: [PATCH] port: modify default zoom level for dynamic zoom weapons if fovzoom ini option is enabled This affects the Sniper Rifle, Farsight, and Horizon Scanner --- src/game/bondgunreset.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/game/bondgunreset.c b/src/game/bondgunreset.c index eb30682d8..f5ba9690c 100644 --- a/src/game/bondgunreset.c +++ b/src/game/bondgunreset.c @@ -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"