item_ctfbackpack: add bleep1 noise when refreshing ammo
This commit is contained in:
parent
c3726e85b9
commit
144bc13816
4 changed files with 14 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
}
|
Loading…
Reference in a new issue