Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions code/cgame/cg_weapons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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] );
}

Expand Down
4 changes: 2 additions & 2 deletions codeJK2/cgame/cg_weapons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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] );
}

Expand Down
4 changes: 2 additions & 2 deletions codemp/cgame/cg_weapons.c
Original file line number Diff line number Diff line change
Expand Up @@ -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] );
}

Expand Down
Loading