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

@ -273,12 +273,12 @@ Class Enforcer : UTWeapon replaces Pistol
if ( slave )
{
invoker.slaveclipcount--;
if ( !CVar.GetCVar('flak_enforcerreload').GetBool() && (invoker.slaveclipcount <=0) ) invoker.slaveclipcount = Min(20,weap.Ammo1.Amount);
if ( !CVar.GetCVar('flak_enforcerreload').GetBool() && (invoker.slaveclipcount <=0) ) invoker.slaveclipcount = (weap.Ammo1.Amount>0)?Min(20,weap.Ammo1.Amount):20;
}
else
{
invoker.clipcount--;
if ( !CVar.GetCVar('flak_enforcerreload').GetBool() && (invoker.clipcount <=0) ) invoker.clipcount = Min(20,weap.Ammo1.Amount);
if ( !CVar.GetCVar('flak_enforcerreload').GetBool() && (invoker.clipcount <=0) ) invoker.clipcount = (weap.Ammo1.Amount>0)?Min(20,weap.Ammo1.Amount):20;
}
invoker.FireEffect();
UTMainHandler.DoFlash(self,Color(32,255,128,0),1);