From 48aa042ee108294aa411b15312fd26d0641fc020 Mon Sep 17 00:00:00 2001 From: SanyaSho <68691958+SanyaSho@users.noreply.github.com> Date: Wed, 3 Aug 2022 16:22:17 +0300 Subject: [PATCH] Fov cvar fix (#98) * game: set fov_desired cvar max value to 110 * scripts: waifulib: change '4.9,9' to '4.9,21' in configure example --- game/client/hl1/hl1_clientmode.cpp | 2 +- game/client/hl2/clientmode_hlnormal.cpp | 2 +- game/client/portal/clientmode_portal.cpp | 3 +-- game/shared/gamerules.cpp | 2 +- scripts/waifulib/xcompile.py | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/game/client/hl1/hl1_clientmode.cpp b/game/client/hl1/hl1_clientmode.cpp index cf1e92e6..55076221 100644 --- a/game/client/hl1/hl1_clientmode.cpp +++ b/game/client/hl1/hl1_clientmode.cpp @@ -13,7 +13,7 @@ // default FOV for HL1 ConVar default_fov( "default_fov", "90", FCVAR_CHEAT ); -ConVar fov_desired( "fov_desired", "90", FCVAR_ARCHIVE | FCVAR_USERINFO, "Sets the base field-of-view.", true, 75.0, true, 90.0 ); +ConVar fov_desired( "fov_desired", "90", FCVAR_ARCHIVE | FCVAR_USERINFO, "Sets the base field-of-view.", true, 75.0, true, 110.0 ); // The current client mode. Always ClientModeNormal in HL. IClientMode *g_pClientMode = NULL; diff --git a/game/client/hl2/clientmode_hlnormal.cpp b/game/client/hl2/clientmode_hlnormal.cpp index dc1415af..ad3989c3 100644 --- a/game/client/hl2/clientmode_hlnormal.cpp +++ b/game/client/hl2/clientmode_hlnormal.cpp @@ -19,7 +19,7 @@ extern bool g_bRollingCredits; -ConVar fov_desired( "fov_desired", "75", FCVAR_ARCHIVE | FCVAR_USERINFO, "Sets the base field-of-view.", true, 75.0, true, 90.0 ); +ConVar fov_desired( "fov_desired", "75", FCVAR_ARCHIVE | FCVAR_USERINFO, "Sets the base field-of-view.", true, 75.0, true, 110.0 ); //----------------------------------------------------------------------------- // Globals diff --git a/game/client/portal/clientmode_portal.cpp b/game/client/portal/clientmode_portal.cpp index d1fbb004..e7cdc525 100644 --- a/game/client/portal/clientmode_portal.cpp +++ b/game/client/portal/clientmode_portal.cpp @@ -20,8 +20,7 @@ // default FOV for HL2 ConVar default_fov( "default_fov", "75", FCVAR_CHEAT ); -ConVar fov_desired( "fov_desired", "75", FCVAR_ARCHIVE | FCVAR_USERINFO, "Sets the base field-of-view.", true, 75.0, true, 90.0 ); - +ConVar fov_desired( "fov_desired", "75", FCVAR_ARCHIVE | FCVAR_USERINFO, "Sets the base field-of-view.", true, 75.0, true, 110.0 ); // The current client mode. Always ClientModeNormal in HL. IClientMode *g_pClientMode = NULL; diff --git a/game/shared/gamerules.cpp b/game/shared/gamerules.cpp index 81fa7bfa..f24d5658 100644 --- a/game/shared/gamerules.cpp +++ b/game/shared/gamerules.cpp @@ -859,7 +859,7 @@ void CGameRules::ClientSettingsChanged( CBasePlayer *pPlayer ) if ( pszFov ) { int iFov = atoi(pszFov); - iFov = clamp( iFov, 75, 90 ); + iFov = clamp( iFov, 75, 110 ); pPlayer->SetDefaultFOV( iFov ); } diff --git a/scripts/waifulib/xcompile.py b/scripts/waifulib/xcompile.py index df70352d..09b9120f 100644 --- a/scripts/waifulib/xcompile.py +++ b/scripts/waifulib/xcompile.py @@ -318,7 +318,7 @@ class Android: def options(opt): android = opt.add_option_group('Android options') android.add_option('--android', action='store', dest='ANDROID_OPTS', default=None, - help='enable building for android, format: --android=,,, example: --android=armeabi-v7a-hard,4.9,9') + help='enable building for android, format: --android=,,, example: --android=armeabi-v7a-hard,4.9,21') def configure(conf): if conf.options.ANDROID_OPTS: