Decrement Weapon AmmoCount in OnFire

This commit is contained in:
Louis Hobbs 2023-01-18 00:10:39 +00:00
parent ba7457dca9
commit a266215e98
1 changed files with 6 additions and 1 deletions

View File

@ -399,7 +399,12 @@ void APlayerCharacter::OnFire()
TArray<FHitResult> Hits = TArray<FHitResult>(); TArray<FHitResult> Hits = TArray<FHitResult>();
CalculateHits(&Hits); CalculateHits(&Hits);
// TODO: Decrement ammo count CurrentWeapon->DecrementAmmoCount(1);
if (CurrentWeapon->GetAmmoCount() == 0)
{
RemoveCurrentWeaponFromInventory();
}
// TODO: Play sound effect // TODO: Play sound effect