mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-28 14:52:29 +00:00
SERVER: Add a Blacklist for weapons that should not play Pack-A-Punch fire sfx
This commit is contained in:
parent
3acd5282ea
commit
5e374479d8
2 changed files with 20 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue