SERVER: Fix for PaP giving duplicate primary weapon if there's no secondary

This commit is contained in:
Steam Deck User 2023-03-04 23:24:33 -05:00
parent c3c2bfe65c
commit 8fc831684b

View file

@ -1943,8 +1943,12 @@ void touch_pap() {
useprint (other, 7, 0, 0);
if (other.button7) {
if (!other.secondaryweapon) {
WeaponSwitch(other);
// Back-up current weapon into second slot, it's getting replaced.
if (!other.secondaryweapon && other.weapon != EqualPapWeapon(self.weapon)) {
other.secondaryweapon = other.weapon;
other.secondarymag = other.currentmag;
other.secondarymag2 = other.currentmag2;
other.secondaryammo = other.currentammo;
}
other.weapon = EqualPapWeapon(self.weapon);