Skip to content

Commit

Permalink
Fix battery drawing above health
Browse files Browse the repository at this point in the history
  • Loading branch information
sabianroberts committed Oct 27, 2024
1 parent 67d130f commit d5df24d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cl_dll/battery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ int CHudBattery::Draw(float flTime)
int iOffset = (m_prc1->bottom - m_prc1->top)/6;

y = ScreenHeight - gHUD.m_iFontHeight - gHUD.m_iFontHeight / 2;
y += (int)(gHUD.m_iFontHeight * 0.2f);
int width = (m_prc1->right - m_prc1->left);
// 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 * width;
Expand Down

0 comments on commit d5df24d

Please sign in to comment.