fix: calculating the extra ammo for the "Ammo regeneration" trait

Use MaxAmmo instead of SpareAmmo for the "Ammo regeneration" trait
when calculating additional ammo.
This commit is contained in:
GenZmeY 2020-10-13 12:02:10 +03:00
parent 0f18c1837d
commit 557b8fe105

View File

@ -27,7 +27,7 @@ function Timer()
{ {
if( W.SpareAmmoCount[i] < W.SpareAmmoCapacity[i] ) if( W.SpareAmmoCount[i] < W.SpareAmmoCapacity[i] )
{ {
ExtraAmmo = Min(FMax(float(W.SpareAmmoCapacity[i])*RegCount,1.f),W.SpareAmmoCapacity[i]); ExtraAmmo = FMax(float(W.SpareAmmoCapacity[i] + W.MagazineCapacity[i])*RegCount,1.f);
if ( i==0 ) if ( i==0 )
{ {
W.AddAmmo(ExtraAmmo); W.AddAmmo(ExtraAmmo);