port: add ini config parameter to control whether ini FOV change should affect the max zoom of weapons

This commit is contained in:
Phnod committed 2023-08-31 20:39:29 -04:00
1 parent 85c1adb258
commit 96bd8e05aa
4 files changed
+9 -1

No files matched your search

+1
View File
@@ -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)
+6 -1
View File
@@ -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
}
+1
View File
@@ -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
/**
+1
View File
@@ -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