Skip to content

Commit

Permalink
Client: HUD: Health: Adjust position
Browse files Browse the repository at this point in the history
  • Loading branch information
tmp64 committed Sep 29, 2024
1 parent 752589f commit 0acd869
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/game/client/hud/battery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ void CHudBattery::Draw(float flTime)

y = ScreenHeight - gHUD.m_iFontHeight - gHUD.m_iFontHeight / 2;

// this used to just be ScreenWidth/5 but that caused real issues at higher resolutions. Instead, base it on the width of this sprite.
x = 3 * m_rc1.GetWidth();
// this used to just be ScreenWidth/5 but that caused real issues at higher resolutions. Instead, base it on the width of digit 0
x = 10 * gHUD.GetSpriteRect(gHUD.m_HUD_number_0).GetWidth();

// make sure we have the right sprite handles
if (!m_hSprite1)
Expand Down
1 change: 0 additions & 1 deletion src/game/client/hud/health.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ void CHudHealth::Draw(float flTime)
SPR_DrawAdditive(0, x, y - iOffset, &m_rcCross);

x = CrossWidth + HealthWidth / 2;
y += (int)(gHUD.m_iFontHeight * 0.2f);

x = gHUD.DrawHudNumber(x, y, DHN_3DIGITS | DHN_DRAWZERO, m_iHealth, r, g, b);

Expand Down

0 comments on commit 0acd869

Please sign in to comment.