diff --git a/code/cgame/cg_weapons.cpp b/code/cgame/cg_weapons.cpp index 09a5b20ad4..31657d9720 100644 --- a/code/cgame/cg_weapons.cpp +++ b/code/cgame/cg_weapons.cpp @@ -1126,9 +1126,10 @@ void CG_AddViewWeapon( playerState_t *ps ) AnglesToAxis( angles, hand.axis ); - if ( cg_fovViewmodel.integer ) { - float fracDistFOV = tanf( cg.refdef.fov_x * ( M_PI/180 ) * 0.5f ); - float fracWeapFOV = (1.0f / fracDistFOV) * tanf( actualFOV * (M_PI / 180) * 0.5f ); + if ( cg_fovViewmodel.integer ) + { + float fracDistFOV = tanf( cg_fov.value * ( M_PI/180 ) * 0.5f ); + float fracWeapFOV = (1.0f / fracDistFOV) * tanf( cg_fovViewmodel.value * (M_PI / 180) * 0.5f ); VectorScale( hand.axis[0], fracWeapFOV, hand.axis[0] ); } diff --git a/codeJK2/cgame/cg_weapons.cpp b/codeJK2/cgame/cg_weapons.cpp index 6bfbbd5a85..55f423fa12 100644 --- a/codeJK2/cgame/cg_weapons.cpp +++ b/codeJK2/cgame/cg_weapons.cpp @@ -1039,8 +1039,8 @@ void CG_AddViewWeapon( playerState_t *ps ) if ( cg_fovViewmodel.integer ) { - float fracDistFOV = tanf( cg.refdef.fov_x * ( M_PI/180 ) * 0.5f ); - float fracWeapFOV = ( 1.0f / fracDistFOV ) * tanf( cgFov * ( M_PI/180 ) * 0.5f ); + float fracDistFOV = tanf( cg_fov.value * ( M_PI/180 ) * 0.5f ); + float fracWeapFOV = ( 1.0f / fracDistFOV ) * tanf( cg_fovViewmodel.value * ( M_PI/180 ) * 0.5f ); VectorScale( hand.axis[0], fracWeapFOV, hand.axis[0] ); } diff --git a/codemp/cgame/cg_weapons.c b/codemp/cgame/cg_weapons.c index 4bb3b55524..2bc3907e7c 100644 --- a/codemp/cgame/cg_weapons.c +++ b/codemp/cgame/cg_weapons.c @@ -848,8 +848,8 @@ void CG_AddViewWeapon( playerState_t *ps ) { if ( cg_fovViewmodel.integer ) { - float fracDistFOV = tanf( cg.refdef.fov_x * ( M_PI/180 ) * 0.5f ); - float fracWeapFOV = ( 1.0f / fracDistFOV ) * tanf( cgFov * ( M_PI/180 ) * 0.5f ); + float fracDistFOV = tanf( cg_fov.value * ( M_PI/180 ) * 0.5f ); + float fracWeapFOV = ( 1.0f / fracDistFOV ) * tanf( cg_fovViewmodel.value * ( M_PI/180 ) * 0.5f ); VectorScale( hand.axis[0], fracWeapFOV, hand.axis[0] ); }