Skip to content

Commit

Permalink
Snapshud 2 bars fix (#179)
Browse files Browse the repository at this point in the history
* cgame: invert snapshud 2 bars if rightmove

* Remove single used var

* Typo
  • Loading branch information
suburbski authored and boutetnico committed Jan 22, 2019
1 parent 34aeeb2 commit 876c537
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cgame/cg_drawtools.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ void CG_FillAngleYaw(float start, float end, float viewangle, float y, float hei
width = fabs(CG_WideX(SCREEN_WIDTH) * (tan(DEG2RAD(viewangle + end)) - tan(DEG2RAD(viewangle + start))) / (fovscale * 2)) + 1;
if (cg_drawVelocitySnapping.integer == 2) {
width /= 2;
if (cg.predictedPlayerState.stats[STAT_USERCMD_MOVE] & UMOVE_RIGHT) {
x += width; // invert white bars if moving to the right
}
}

trap_R_SetColor(color);
Expand Down

0 comments on commit 876c537

Please sign in to comment.