Decrement Weapon AmmoCount in OnFire
This commit is contained in:
parent
ba7457dca9
commit
a266215e98
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue