From 0a0b43da16e4de2bfa952b030bf24cf92b8d13fb Mon Sep 17 00:00:00 2001 From: TjgL Date: Tue, 4 Feb 2025 20:48:35 +0100 Subject: [PATCH] Implemented muzzle flash activation on revolver fire --- Content/Legumix/Weapon/Revolver/BP_Revolver.uasset | 4 ++-- .../Weapon/Revolver/VFX_MuzzleFlash/NS_MuzzleFlash.uasset | 4 ++-- Source/LegumeMix/Private/Weapon/LMRevolver.cpp | 1 + Source/LegumeMix/Private/Weapon/LMShotgun.cpp | 1 + Source/LegumeMix/Public/Weapon/LMWeaponBase.h | 3 +++ 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Content/Legumix/Weapon/Revolver/BP_Revolver.uasset b/Content/Legumix/Weapon/Revolver/BP_Revolver.uasset index 67a53f2..f523f63 100644 --- a/Content/Legumix/Weapon/Revolver/BP_Revolver.uasset +++ b/Content/Legumix/Weapon/Revolver/BP_Revolver.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8ccb1fda36ba3ed2ceb7fe3b95800d4eead6da3f1aedc8e62955dabfed97b4fa -size 30152 +oid sha256:d24798de748b9e2c9dbcea3e3573668ca10e352c7098efa22e391c6b99bbf7c4 +size 41706 diff --git a/Content/Legumix/Weapon/Revolver/VFX_MuzzleFlash/NS_MuzzleFlash.uasset b/Content/Legumix/Weapon/Revolver/VFX_MuzzleFlash/NS_MuzzleFlash.uasset index 1c9d28d..5cd4cce 100644 --- a/Content/Legumix/Weapon/Revolver/VFX_MuzzleFlash/NS_MuzzleFlash.uasset +++ b/Content/Legumix/Weapon/Revolver/VFX_MuzzleFlash/NS_MuzzleFlash.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:007a329cc7ad3b7e6f8761819f6e13840c103c85bcd53a76cd594b21abbd66c6 -size 748230 +oid sha256:9a8e80791956ad33e253a651a0606c523f308883d4bc83e2379379ee2ebbfc82 +size 731032 diff --git a/Source/LegumeMix/Private/Weapon/LMRevolver.cpp b/Source/LegumeMix/Private/Weapon/LMRevolver.cpp index 03e9c8f..1bfc3f2 100644 --- a/Source/LegumeMix/Private/Weapon/LMRevolver.cpp +++ b/Source/LegumeMix/Private/Weapon/LMRevolver.cpp @@ -46,6 +46,7 @@ void ALMRevolver::PrimaryFire() FLMBulletInfo ShotInfo = FLMBulletInfo(1, Origin, Direction, WeaponSpread, MaxDistance, DamageFalloff, AmmoType, Damage); Player->FireBullets(ShotInfo); + OnFire(); GetWorldTimerManager().SetTimer(FireTimer, this, &ALMRevolver::AllowRefire, RefireDelay); } diff --git a/Source/LegumeMix/Private/Weapon/LMShotgun.cpp b/Source/LegumeMix/Private/Weapon/LMShotgun.cpp index e7d9e67..7d2ecee 100644 --- a/Source/LegumeMix/Private/Weapon/LMShotgun.cpp +++ b/Source/LegumeMix/Private/Weapon/LMShotgun.cpp @@ -45,6 +45,7 @@ void ALMShotgun::PrimaryFire() FLMBulletInfo ShotInfo = FLMBulletInfo(PelletCount, Origin, Direction, WeaponSpread, MaxDistance, DamageFalloff, AmmoType, Damage); Player->FireBullets(ShotInfo); + OnFire(); GetWorldTimerManager().SetTimer(FireTimer, this, &ALMShotgun::AllowRefire, RefireDelay); } diff --git a/Source/LegumeMix/Public/Weapon/LMWeaponBase.h b/Source/LegumeMix/Public/Weapon/LMWeaponBase.h index d23ab71..d59e45d 100644 --- a/Source/LegumeMix/Public/Weapon/LMWeaponBase.h +++ b/Source/LegumeMix/Public/Weapon/LMWeaponBase.h @@ -47,6 +47,9 @@ public: UFUNCTION(BlueprintCallable, BlueprintNativeEvent) void OnDefaultReload(); + UFUNCTION(BlueprintImplementableEvent, BlueprintCallable) + void OnFire(); + protected: UFUNCTION(BlueprintCallable) void AllowRefire();