Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

Commit

Permalink
sbar_show_bg compensation for fov and view origin.
Browse files Browse the repository at this point in the history
  • Loading branch information
qbism committed Sep 20, 2015
1 parent 2e65e07 commit 30f6d7a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions qbS8.workspace
Expand Up @@ -2,7 +2,5 @@
<CodeBlocks_workspace_file>
<Workspace title="Workspace">
<Project filename="qbismSuper8.cbp" />
<Project filename="../../Q1sources/qbWinQuakeDX/WinQuake.cbp" />
<Project filename="../../q2sources/q2xp/quake2.cbp" />
</Workspace>
</CodeBlocks_workspace_file>
2 changes: 1 addition & 1 deletion r_main.c
Expand Up @@ -941,7 +941,7 @@ void R_ViewChanged (vrect_t *pvrect, int lineadj)
}
else
{
pixelAspect = nativeaspect/((float)(r_refdef.vrect.width) /(float)(r_refdef.vrect.height)); //qb: Lavent correction
pixelAspect = nativeaspect/((float)(r_refdef.vrect.width) /(float)(r_refdef.vrect.height+lineadj)); //qb: lineadj and Lavent correction
if(vid_windowed_mode.value)
screenAspect = 1;
else
Expand Down
4 changes: 1 addition & 3 deletions view.c
Expand Up @@ -862,7 +862,7 @@ void V_CalcRefdef (void)
for (i=0 ; i<3 ; i++)
r_refdef.vieworg[i] += scr_ofsx.value*forward[i]
+ scr_ofsy.value*right[i]
+ scr_ofsz.value*up[i];
+ (scr_ofsz.value + 0.5 - ((float)sb_lines * 0.01)) *up[i]; //qb: sbar_show_bg compensation

V_BoundOffsets ();

Expand All @@ -879,8 +879,6 @@ void V_CalcRefdef (void)
view->origin[i] += forward[i]*bob*0.4;
}
view->origin[2] += bob;
if (!cl_nobob.value) // Manoel Kasimier - cl_nobob
view->origin[2] += 2; // Manoel Kasimier - cl_nobob

view->model = cl.model_precache[cl.stats[STAT_WEAPON]];
view->frame = cl.stats[STAT_WEAPONFRAME];
Expand Down

0 comments on commit 30f6d7a

Please sign in to comment.