SERVER: Fix downing always setting reserve ammunition to 0

This commit is contained in:
Steam Deck User 2023-03-18 16:21:06 -04:00
parent a063935aba
commit 6e16bb264f

View file

@ -353,16 +353,18 @@ void () GetUp =
self.currentammobk -= self.teslacount;
// Take from the mag if the reserve is empty now
if (self.currentammobk < 0)
if (self.currentammobk < 0) {
self.currentmagbk += self.currentammobk;
self.currentammobk = 0;
self.currentammobk = 0;
}
} else if (self.weapon == self.secondaryweapon) {
self.secondaryammo -= self.teslacount;
// Take from the mag if the reserve is empty now
if (self.secondaryammo < 0)
if (self.secondaryammo < 0) {
self.secondarymag += self.secondaryammo;
self.secondaryammo = 0;
self.secondaryammo = 0;
}
}
}