mirror of
https://github.com/nzp-team/quakec.git
synced 2025-02-16 17:10:55 +00:00
SERVER: Fix downing always setting reserve ammunition to 0
This commit is contained in:
parent
a063935aba
commit
6e16bb264f
1 changed files with 6 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue