HUD: Only call weapon switch if we're going to a different weapon.
This commit is contained in:
parent
63f5ebe014
commit
d457262d0c
1 changed files with 5 additions and 1 deletions
|
@ -82,8 +82,12 @@ void
|
|||
HUD_DrawWeaponSelect_Trigger(void)
|
||||
{
|
||||
player pl = (player)pSeat->m_ePlayer;
|
||||
|
||||
if (pl.activeweapon != pSeat->m_iHUDWeaponSelected)
|
||||
sendevent("PlayerSwitchWeapon", "i", pSeat->m_iHUDWeaponSelected);
|
||||
|
||||
pl.activeweapon = pSeat->m_iHUDWeaponSelected;
|
||||
sendevent("PlayerSwitchWeapon", "i", pSeat->m_iHUDWeaponSelected);
|
||||
|
||||
sound(pSeat->m_ePlayer, CHAN_ITEM, "common/wpn_select.wav", 0.5f, ATTN_NONE);
|
||||
pSeat->m_iHUDWeaponSelected = pSeat->m_flHUDWeaponSelectTime = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue