HUD_SlotSelect: Only allow this if we've got any weapons at all.

This commit is contained in:
Marco Cawthorne 2020-03-31 09:34:21 +02:00
parent 197b373335
commit 5cb0ad1bb3
4 changed files with 20 additions and 0 deletions

View file

@ -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 {

View file

@ -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 {

View file

@ -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 {

View file

@ -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 {