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"
}