Skip to content

Commit

Permalink
HUD: Ammo: Reset fOnTarget flag
Browse files Browse the repository at this point in the history
  • Loading branch information
tmp64 committed Dec 26, 2024
1 parent f7c6b25 commit b06b59d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/game/client/hud/ammo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ void CHudAmmo::Reset(void)
{
m_fFade = 0;
m_pWeapon = NULL;
m_fOnTarget = FALSE;
m_fOnTarget = false;
m_iFlags |= HUD_ACTIVE; //!!!

gpActiveSel = NULL;
Expand Down Expand Up @@ -552,10 +552,7 @@ int CHudAmmo::MsgFunc_CurWeapon(const char *pszName, int iSize, void *pbuf)
int iClip = READ_CHAR();

// detect if we're also on target
if (iState > 1)
{
m_fOnTarget = TRUE;
}
m_fOnTarget = iState > 1;

if (iId < 1)
{
Expand Down
2 changes: 1 addition & 1 deletion src/game/client/hud/ammo.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class CHudAmmo : public CHudElemBase<CHudAmmo>
private:
float m_fFade;
WEAPON *m_pWeapon;
int m_fOnTarget;
bool m_fOnTarget;
int m_HUD_bucket0;
int m_HUD_selection;
int m_iMaxSlot; // There are 5 (0-4) slots by default and they can extend to 6. This will be used to draw additional weapon bucket(s) on a hud.
Expand Down

0 comments on commit b06b59d

Please sign in to comment.