mirror of
https://github.com/nzp-team/quakec.git
synced 2025-01-31 13:40:52 +00:00
SERVER: Fix improper handling of ammunition used in Last Stand
fixes infinite ammo bug :p
This commit is contained in:
parent
11f4d470c8
commit
578fa2d44e
1 changed files with 17 additions and 4 deletions
|
@ -345,11 +345,24 @@ void () GetUp =
|
|||
self.classname = "player";
|
||||
|
||||
// Take away the ammo that was fired while in last stand.
|
||||
if (self.weapon == self.weaponbk) {
|
||||
self.currentammobk -= self.teslacount;
|
||||
} else if (self.weapon == self.secondaryweapon) {
|
||||
self.secondaryammo -= self.teslacount;
|
||||
if (self.weapon != W_COLT) {
|
||||
if (self.weapon == self.weaponbk) {
|
||||
self.currentammobk -= self.teslacount;
|
||||
|
||||
// Take from the mag if the reserve is empty now
|
||||
if (self.currentammobk < 0)
|
||||
self.currentmagbk += self.currentammobk;
|
||||
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)
|
||||
self.secondarymag += self.secondaryammo;
|
||||
self.secondaryammo = 0;
|
||||
}
|
||||
}
|
||||
|
||||
self.teslacount = 0;
|
||||
|
||||
if (!coop) {
|
||||
|
|
Loading…
Reference in a new issue