SERVER: Add a Blacklist for weapons that should not play Pack-A-Punch fire sfx

This commit is contained in:
cypress 2024-01-08 12:39:48 -05:00
parent 3acd5282ea
commit 5e374479d8
2 changed files with 20 additions and 1 deletions

View file

@ -1183,7 +1183,7 @@ void(float side) W_Fire =
self.fire_delay2 = getWeaponDelay(self.weapon, FIRE) + time;
}
if (IsPapWeapon(self.weapon)) {
if (IsPapWeapon(self.weapon) && !WepDef_DoesNotPlayUpgradedSound(self.weapon)) {
sound (self, 0, "sounds/weapons/papfire.wav", 1, ATTN_NORM);
}

View file

@ -4567,6 +4567,25 @@ float(float weapon) WepDef_DoesNotADS =
return false;
}
//
// WepDef_DoesNotPlayUpgradedSound(weapon)
// Returns true if the weapon should not play
// the special Pack-A-Punch fire sound over
// it's standard weapon fire.
//
float(float weapon) WepDef_DoesNotPlayUpgradedSound =
{
switch(weapon) {
case W_DG3:
case W_PORTER:
return true;
default:
return false;
}
return false;
}
//
// WepDef_OnlyOneAllowed(weapon)
// Returns true if server is only allowed to distribute