mirror of
https://github.com/nzp-team/quakec.git
synced 2025-03-22 10:52:12 +00:00
SERVER: Fix cooling flamethrower weapons when not in active slot
This commit is contained in:
parent
57fb071bd5
commit
c694387819
1 changed files with 2 additions and 2 deletions
|
@ -444,7 +444,7 @@ void() PlayerPreThink =
|
|||
// FIXME: Weapon hardcode definition.
|
||||
float weapon_slot = Weapon_PlayerHasWeapon(self, W_M2, true);
|
||||
|
||||
if (!weapon_slot)
|
||||
if (weapon_slot == 0)
|
||||
return;
|
||||
|
||||
weapon_slot--;
|
||||
|
@ -455,7 +455,7 @@ void() PlayerPreThink =
|
|||
if (self.cooldown && self.weapons[weapon_slot].weapon_magazine > 20)
|
||||
self.cooldown = false;
|
||||
|
||||
if (self.weapons[weapon_slot].weapon_magazine < getWeaponMag(self.weapon)) {
|
||||
if (self.weapons[weapon_slot].weapon_magazine < getWeaponMag(self.weapons[weapon_slot].weapon_id)) {
|
||||
self.weapons[weapon_slot].weapon_magazine += 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue