Fix `PlayFireSoundAtLocation` bugs

This commit is contained in:
Louis Hobbs 2023-03-16 23:50:15 +00:00
parent bd8721a693
commit 9d2d3c0187
2 changed files with 2 additions and 2 deletions

View File

@ -310,7 +310,7 @@ void APlayerCharacter::OnFire()
CurrentWeapon->DecrementAmmoCount(1);
CurrentWeapon->PlayFireSoundAtLocation(GetActorLocation());
CurrentWeapon->PlayFireSoundAtLocation(this->GetTransform().GetLocation());
// TODO: Play some animation here

View File

@ -71,7 +71,7 @@ void AWeapon::SetFireSound(USoundBase* USoundBase)
void AWeapon::PlayFireSoundAtLocation(FVector location)
{
if (!FireSound)
if (FireSound)
{
UGameplayStatics::PlaySoundAtLocation(this, FireSound, location);
}