HUD_SlotSelect: Only allow this if we've got any weapons at all.
This commit is contained in:
parent
197b373335
commit
5cb0ad1bb3
4 changed files with 20 additions and 0 deletions
|
@ -116,6 +116,11 @@ void HUD_SlotSelect(int slot)
|
|||
int curslot = g_weapons[pSeat->fHUDWeaponSelected].slot;
|
||||
int i;
|
||||
|
||||
/* hack to see if we have ANY weapons at all. */
|
||||
if (!pl.activeweapon) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (pSeat->fHUDWeaponSelectTime < time) {
|
||||
sound(pSeat->ePlayer, CHAN_ITEM, "common/wpn_hudon.wav", 0.5, ATTN_NONE);
|
||||
} else {
|
||||
|
|
|
@ -122,6 +122,11 @@ void HUD_SlotSelect(int slot)
|
|||
int curslot = g_weapons[pSeat->fHUDWeaponSelected].slot;
|
||||
int i;
|
||||
|
||||
/* hack to see if we have ANY weapons at all. */
|
||||
if (!pl.activeweapon) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (pSeat->fHUDWeaponSelectTime < time) {
|
||||
sound(pSeat->ePlayer, CHAN_ITEM, "common/wpn_hudon.wav", 0.5, ATTN_NONE);
|
||||
} else {
|
||||
|
|
|
@ -124,6 +124,11 @@ void HUD_SlotSelect(int slot)
|
|||
int curslot = g_weapons[pSeat->fHUDWeaponSelected].slot;
|
||||
int i;
|
||||
|
||||
/* hack to see if we have ANY weapons at all. */
|
||||
if (!pl.activeweapon) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (pSeat->fHUDWeaponSelectTime < time) {
|
||||
sound(pSeat->ePlayer, CHAN_ITEM, "common/wpn_hudon.wav", 0.5, ATTN_NONE);
|
||||
} else {
|
||||
|
|
|
@ -116,6 +116,11 @@ void HUD_SlotSelect(int slot)
|
|||
int curslot = g_weapons[pSeat->fHUDWeaponSelected].slot;
|
||||
int i;
|
||||
|
||||
/* hack to see if we have ANY weapons at all. */
|
||||
if (!pl.activeweapon) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (pSeat->fHUDWeaponSelectTime < time) {
|
||||
sound(pSeat->ePlayer, CHAN_ITEM, "common/wpn_hudon.wav", 0.5, ATTN_NONE);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue