Server: Fix precache of the item_weaponbox pickup sound.

This commit is contained in:
Marco Cawthorne 2024-01-30 00:40:03 -08:00
parent 4e232c6875
commit b47a64b850
Signed by: eukara
GPG key ID: CE2032F0A2882A22
3 changed files with 7 additions and 1 deletions

View file

@ -54,7 +54,7 @@ item_weaponbox::Touch(entity eToucher)
player pl = (player)eToucher; player pl = (player)eToucher;
Logging_Pickup(eToucher, this, __NULL__); Logging_Pickup(eToucher, this, __NULL__);
sound(pl, CHAN_ITEM, "items/gunpickup2.wav", 1, ATTN_NORM); StartSoundDef("item_weaponbox.Pickup", CHAN_ITEM, true);
pl.ammo_9mm += ammo_9mm; pl.ammo_9mm += ammo_9mm;
pl.ammo_357 += ammo_357; pl.ammo_357 += ammo_357;

View file

@ -29,6 +29,7 @@ Game_Worldspawn(void)
{ {
Sound_Precache("Player.FlashLightOff"); Sound_Precache("Player.FlashLightOff");
Sound_Precache("Player.FlashLightOn"); Sound_Precache("Player.FlashLightOn");
Sound_Precache("item_weaponbox.Pickup");
precache_model("models/player.mdl"); precache_model("models/player.mdl");
precache_model("models/w_weaponbox.mdl"); precache_model("models/w_weaponbox.mdl");

View file

@ -27,3 +27,8 @@ weapon.pickup
{ {
sample items/gunpickup2.wav sample items/gunpickup2.wav
} }
item_weaponbox.Pickup
{
sample items/gunpickup2.wav
}