diff --git a/port/src/main.c b/port/src/main.c index ae6abc84f..2ae3ccc61 100644 --- a/port/src/main.c +++ b/port/src/main.c @@ -71,6 +71,7 @@ static void gameLoadConfig(void) g_PlayerMouseAimMode = configGetIntClamped("Game.MouseAimMode", g_PlayerMouseAimMode, 0, 1); g_PlayerMouseAimSpeedX = configGetFloatClamped("Game.MouseAimSpeedX", g_PlayerMouseAimSpeedX, 0.f, 10.f); g_PlayerMouseAimSpeedY = configGetFloatClamped("Game.MouseAimSpeedY", g_PlayerMouseAimSpeedY, 0.f, 10.f); + g_PlayerFovAffectsZoom = configGetIntClamped("Game.FovAffectsZoom", g_PlayerFovAffectsZoom, 0, 1); } int main(int argc, const char **argv) diff --git a/src/game/game_0b0fd0.c b/src/game/game_0b0fd0.c index f801c2503..99a670f25 100644 --- a/src/game/game_0b0fd0.c +++ b/src/game/game_0b0fd0.c @@ -212,7 +212,12 @@ f32 currentPlayerGetGunZoomFov(void) #ifdef PLATFORM_N64 return fov; #else - return fov * (g_PlayerDefaultFovY / 60.0f); + if (g_PlayerFovAffectsZoom) { + return fov * (g_PlayerDefaultFovY / 60.0f); + } + else { + return fov; + } #endif } diff --git a/src/game/player.c b/src/game/player.c index e68aede10..0cbb7789e 100644 --- a/src/game/player.c +++ b/src/game/player.c @@ -208,6 +208,7 @@ f32 g_PlayerCrosshairSway = 1.f; s32 g_PlayerMouseAimMode = MOUSEAIM_CLASSIC; f32 g_PlayerMouseAimSpeedX = 0.75f; f32 g_PlayerMouseAimSpeedY = 0.75f; +s32 g_PlayerFovAffectsZoom = 1; #endif /** diff --git a/src/include/data.h b/src/include/data.h index c70056c8c..001a122c1 100644 --- a/src/include/data.h +++ b/src/include/data.h @@ -534,6 +534,7 @@ extern f32 g_PlayerDefaultFovY; extern s32 g_PlayerMouseAimMode; extern f32 g_PlayerMouseAimSpeedX; extern f32 g_PlayerMouseAimSpeedY; +extern s32 g_PlayerFovAffectsZoom; #endif #endif