From a5ae074c2b80a565d22531c5ce119196e90bc85b Mon Sep 17 00:00:00 2001 From: baz Date: Wed, 9 Apr 2025 23:55:10 +0100 Subject: [PATCH] Implement WeaponAction PlaySound --- Source/vampires/Weapon.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/vampires/Weapon.cpp b/Source/vampires/Weapon.cpp index 6c681ad..d14353d 100644 --- a/Source/vampires/Weapon.cpp +++ b/Source/vampires/Weapon.cpp @@ -4,6 +4,7 @@ #include "Weapon.h" #include "EXPComponent.h" +#include "Kismet/GameplayStatics.h" // Sets default values AWeapon::AWeapon() @@ -28,7 +29,12 @@ void AWeapon::ResetWeaponTimer() void AWeapon::FireWeaponAction_Implementation() { - // This should be overridden in child weapon classes + // This should be overridden in child weapon classes + + if (WeaponActivatedSoundBase) + { + UGameplayStatics::PlaySound2D(GetWorld(), WeaponActivatedSoundBase); + } } bool AWeapon::UpgradeWeapon_Implementation()