Skip to content

Commit

Permalink
Merge branch 'pr-fov-gun-scale'
Browse files Browse the repository at this point in the history
  • Loading branch information
Diordany committed May 22, 2024
2 parents a597c27 + 4ab882e commit 8357210
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Quake/r_alias.c
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ void R_DrawAliasModel_ShowTris (entity_t *e)
{
aliashdr_t *paliashdr;
lerpdata_t lerpdata;
float fovscale = 1.0f;
float fovscale = 1.0f;

if (R_CullModelForEntity(e))
return;
Expand All @@ -990,13 +990,13 @@ void R_DrawAliasModel_ShowTris (entity_t *e)
R_SetupAliasFrame (paliashdr, e->frame, &lerpdata);
R_SetupEntityTransform (e, &lerpdata);

if (e == &cl.viewent && scr_fov.value > 90.f && cl_gun_fovscale.value)
fovscale = tan(scr_fov.value * (0.5f * M_PI / 180.f));
if (e == &cl.viewent && scr_fov.value > 90.f && cl_gun_fovscale.value)
fovscale = tan(scr_fov.value * (0.5f * M_PI / 180.f));

glPushMatrix ();
R_RotateForEntity (lerpdata.origin,lerpdata.angles, e->scale);
glTranslatef (paliashdr->scale_origin[0], paliashdr->scale_origin[1] * fovscale, paliashdr->scale_origin[2] * fovscale);
glScalef (paliashdr->scale[0], paliashdr->scale[1] * fovscale, paliashdr->scale[2] * fovscale);
glTranslatef (paliashdr->scale_origin[0], paliashdr->scale_origin[1] * fovscale, paliashdr->scale_origin[2] * fovscale);
glScalef (paliashdr->scale[0], paliashdr->scale[1] * fovscale, paliashdr->scale[2] * fovscale);

shading = false;
glColor3f(1,1,1);
Expand Down

0 comments on commit 8357210

Please sign in to comment.