item_ctfbackpack: add bleep1 noise when refreshing ammo

This commit is contained in:
Marco Cawthorne 2023-07-06 16:31:09 -07:00
parent c3726e85b9
commit 144bc13816
Signed by: eukara
GPG key ID: CE2032F0A2882A22
4 changed files with 14 additions and 2 deletions

View file

@ -240,7 +240,7 @@ void
CSEv_ClassJoin_f(float classSelection)
{
OP4CTFRules rule = (OP4CTFRules)g_grMode;
string playerModel;
string playerModel = "";
player pl = (player)self;
/* random black mesa char */
@ -291,6 +291,10 @@ CSEv_ClassJoin_f(float classSelection)
break;
}
if (playerModel == "") {
error("invalid model selection, erroring out");
}
/* if we're alive, kill them (we need to drop the flag anyhow */
if (pl.IsAlive()) {
pl.m_oldModel = playerModel;

View file

@ -49,4 +49,6 @@ item_ctfbackpack::Spawned(void)
m_vecScoreColor = [1,1,0];
model = "models/w_backpack.mdl";
super::Spawned();
Sound_Precache("op4ctf_backpack.refresh");
}

View file

@ -32,7 +32,7 @@ player::PowerupThink(void)
if (activeweapon) {
if (Weapons_AddItem(this, activeweapon, 1)) {
print("added ammo\n");
StartSoundDef("op4ctf_backpack.refresh", CHAN_ITEM, false);
}
}
}

View file

@ -21,3 +21,9 @@ op4ctf_op4.flag_capture
attenuation none
sample "ctf/marine_flag_capture.wav"
}
op4ctf_backpack.refresh
{
attenuation none
sample "buttons/blip1.wav"
}