Implemented muzzle flash activation on revolver fire

This commit is contained in:
TjgL 2025-02-04 20:48:35 +01:00
parent 46e087b3de
commit 0a0b43da16
5 changed files with 9 additions and 4 deletions

Binary file not shown.

Binary file not shown.

View File

@ -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);
}

View File

@ -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);
}

View File

@ -47,6 +47,9 @@ public:
UFUNCTION(BlueprintCallable, BlueprintNativeEvent)
void OnDefaultReload();
UFUNCTION(BlueprintImplementableEvent, BlueprintCallable)
void OnFire();
protected:
UFUNCTION(BlueprintCallable)
void AllowRefire();