mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-22 20:01:34 +00:00
SERVER: Fix Flamethrower regeneration
This commit is contained in:
parent
835fdcb1e2
commit
a3f2c2cb7e
2 changed files with 9 additions and 7 deletions
|
@ -323,17 +323,19 @@ void() PlayerPreThink =
|
|||
|
||||
JumpCheck(0);
|
||||
|
||||
// refuel/cool m2
|
||||
// refuel/cool flamethrowers
|
||||
if (self.ltime < time) {
|
||||
if (self.currentmag == 0 && !self.cooldown) {
|
||||
if (self.weapons[0].weapon_magazine == 0 && !self.cooldown) {
|
||||
self.cooldown = true;
|
||||
}
|
||||
|
||||
if (self.cooldown && self.currentmag > 20)
|
||||
if (self.cooldown && self.weapons[0].weapon_magazine > 20)
|
||||
self.cooldown = false;
|
||||
|
||||
if (self.weapon == W_M2 || self.weapon == W_FIW && self.currentmag < getWeaponMag(self.weapon))
|
||||
self.currentmag += 1;
|
||||
if (GetFiretype(self.weapon) == FIRETYPE_FLAME &&
|
||||
self.weapons[0].weapon_magazine < getWeaponMag(self.weapon)) {
|
||||
self.weapons[0].weapon_magazine += 1;
|
||||
}
|
||||
|
||||
self.ltime = time + 0.1;
|
||||
}
|
||||
|
|
|
@ -382,7 +382,7 @@ void(float side) W_Reload =
|
|||
if (self.zoom == 2)
|
||||
return;
|
||||
|
||||
if (self.weapon == W_M2 || self.weapon == W_FIW)
|
||||
if (GetFiretype(self.weapon) == FIRETYPE_FLAME)
|
||||
return;
|
||||
|
||||
if (side == S_BOTH) {
|
||||
|
@ -996,7 +996,7 @@ void (float shotcount, float sprd, float Damage, float side) FireTrace =
|
|||
|
||||
void(float side) W_Fire =
|
||||
{
|
||||
if (self.weapon == W_M2 || self.weapon == W_FIW && self.cooldown)
|
||||
if (GetFiretype(self.weapon) == FIRETYPE_FLAME && self.cooldown)
|
||||
return;
|
||||
|
||||
if (self.semiswitch == true)
|
||||
|
|
Loading…
Reference in a new issue