Clip count was not properly reset when all ammo is used, this caused the enforcer and pulsegun to still play a reload animation even when reloading is disabled.

This commit is contained in:
Marisa the Magician 2018-06-14 00:48:32 +02:00
commit 2251b978d6
2 changed files with 4 additions and 4 deletions

View file

@ -574,7 +574,7 @@ Class PulseGun : UTWeapon
if ( weap.Ammo1.Amount <= 0 ) return;
if ( !weap.DepleteAmmo(weap.bAltFire,true,1) ) return;
invoker.clipcount--;
if ( !CVar.GetCVar('flak_pulsereload').GetBool() && (invoker.clipcount <= 0) ) invoker.clipcount = Min(50,weap.Ammo1.Amount);
if ( !CVar.GetCVar('flak_pulsereload').GetBool() && (invoker.clipcount <= 0) ) invoker.clipcount = (weap.Ammo1.Amount>0)?Min(50,weap.Ammo1.Amount):50;
invoker.FireEffect();
UTMainHandler.DoFlash(self,Color(32,128,255,128),1);
A_AlertMonsters();
@ -634,7 +634,7 @@ Class PulseGun : UTWeapon
if ( weap.Ammo1.Amount <= 0 ) return;
if ( !weap.DepleteAmmo(weap.bAltFire,true,1) ) return;
invoker.clipcount--;
if ( !CVar.GetCVar('flak_pulsereload').GetBool() && (invoker.clipcount <=0) ) invoker.clipcount = Min(50,weap.Ammo1.Amount);
if ( !CVar.GetCVar('flak_pulsereload').GetBool() && (invoker.clipcount <=0) ) invoker.clipcount = (weap.Ammo1.Amount>0)?Min(50,weap.Ammo1.Amount):50;
invoker.FireEffect();
UTMainHandler.DoFlash(self,Color(32,128,255,128),1);
A_AlertMonsters();