HUD: sanity check before calling isempty...
This commit is contained in:
parent
f82bef274a
commit
64048e9b32
1 changed files with 8 additions and 6 deletions
|
@ -46,9 +46,10 @@ HUD_DrawWeaponSelect_Forward(void)
|
|||
|
||||
pSeat->m_flHUDWeaponSelectTime = time + 3;
|
||||
|
||||
if (g_weapons[pSeat->m_iHUDWeaponSelected].isempty) {
|
||||
if (g_weapons[pSeat->m_iHUDWeaponSelected].isempty(pl))
|
||||
HUD_DrawWeaponSelect_Forward();
|
||||
else if not (pl.g_items & g_weapons[pSeat->m_iHUDWeaponSelected].id)
|
||||
} else if not (pl.g_items & g_weapons[pSeat->m_iHUDWeaponSelected].id)
|
||||
HUD_DrawWeaponSelect_Forward();
|
||||
}
|
||||
|
||||
|
@ -74,9 +75,10 @@ HUD_DrawWeaponSelect_Back(void)
|
|||
|
||||
pSeat->m_flHUDWeaponSelectTime = time + 3;
|
||||
|
||||
if (g_weapons[pSeat->m_iHUDWeaponSelected].isempty) {
|
||||
if (g_weapons[pSeat->m_iHUDWeaponSelected].isempty(pl))
|
||||
HUD_DrawWeaponSelect_Back();
|
||||
else if not (pl.g_items & g_weapons[pSeat->m_iHUDWeaponSelected].id)
|
||||
} else if not (pl.g_items & g_weapons[pSeat->m_iHUDWeaponSelected].id)
|
||||
HUD_DrawWeaponSelect_Back();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue