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:
parent
0f18c1837d
commit
557b8fe105
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user