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;
|
pSeat->m_flHUDWeaponSelectTime = time + 3;
|
||||||
|
|
||||||
if (g_weapons[pSeat->m_iHUDWeaponSelected].isempty(pl))
|
if (g_weapons[pSeat->m_iHUDWeaponSelected].isempty) {
|
||||||
HUD_DrawWeaponSelect_Forward();
|
if (g_weapons[pSeat->m_iHUDWeaponSelected].isempty(pl))
|
||||||
else if not (pl.g_items & g_weapons[pSeat->m_iHUDWeaponSelected].id)
|
HUD_DrawWeaponSelect_Forward();
|
||||||
|
} else if not (pl.g_items & g_weapons[pSeat->m_iHUDWeaponSelected].id)
|
||||||
HUD_DrawWeaponSelect_Forward();
|
HUD_DrawWeaponSelect_Forward();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,9 +75,10 @@ HUD_DrawWeaponSelect_Back(void)
|
||||||
|
|
||||||
pSeat->m_flHUDWeaponSelectTime = time + 3;
|
pSeat->m_flHUDWeaponSelectTime = time + 3;
|
||||||
|
|
||||||
if (g_weapons[pSeat->m_iHUDWeaponSelected].isempty(pl))
|
if (g_weapons[pSeat->m_iHUDWeaponSelected].isempty) {
|
||||||
HUD_DrawWeaponSelect_Back();
|
if (g_weapons[pSeat->m_iHUDWeaponSelected].isempty(pl))
|
||||||
else if not (pl.g_items & g_weapons[pSeat->m_iHUDWeaponSelected].id)
|
HUD_DrawWeaponSelect_Back();
|
||||||
|
} else if not (pl.g_items & g_weapons[pSeat->m_iHUDWeaponSelected].id)
|
||||||
HUD_DrawWeaponSelect_Back();
|
HUD_DrawWeaponSelect_Back();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue