Updated sound handling for firing animations

Signed-off-by: TjgL <lithmoneo@gmail.com>
This commit is contained in:
TjgL 2025-03-14 14:02:13 +01:00
parent 2a455f83b6
commit 6b0ad46704
8 changed files with 8 additions and 15 deletions

Binary file not shown.

Binary file not shown.

View File

@ -154,7 +154,6 @@ bool ULMMovementComponent::IsCustomMovementMode(ECustomMovementModes InCustomMov
void ULMMovementComponent::EnterSlide()
{
UE_LOG(LogTemp, Error, TEXT("Entering Slide"));
bWantsToCrouch = true;
Velocity += Velocity.GetSafeNormal2D() * SlideEnterImpulse;
SetMovementMode(EMovementMode::MOVE_Custom, ECustomMovementModes::ECMM_Sliding);
@ -162,7 +161,6 @@ void ULMMovementComponent::EnterSlide()
void ULMMovementComponent::ExitSlide()
{
UE_LOG(LogTemp, Error, TEXT("Exiting Slide"));
bWantsToCrouch = false;
FQuat NewRotation = FRotationMatrix::MakeFromXZ(UpdatedComponent->GetForwardVector().GetSafeNormal2D(), FVector::UpVector).ToQuat();

View File

@ -30,7 +30,6 @@ void ALMRevolver::PrimaryFire()
return;
}
PlayEvent(FireEvent);
PlayAnimation(PrimaryFireAnimation);
Player->PlayAnimation(PrimaryFireArmsAnimation);

View File

@ -30,7 +30,6 @@ void ALMShotgun::PrimaryFire()
return;
}
PlayEvent(FireEvent);
PlayAnimation(PrimaryFireAnimation);
const FVector Origin = Player->GetWeaponFiringOrigin();

View File

@ -100,12 +100,13 @@ bool ALMWeaponBase::DefaultReload()
if (ClipAmmo >= MaxClip)
return false;
// TODO: replace with anim notifies
PlayEvent(ReloadSound);
PlayAnimation(ReloadAnimation);
Player->PlayAnimation(ReloadArmsAnimation);
State = EWeaponState::EWS_Reloading;
// TODO: Use Animations
OnDefaultReload();
GetWorldTimerManager().SetTimer(ReloadTimer, this, &ALMWeaponBase::AllowRefire, ReloadDelay);
Player->OnReload();

View File

@ -71,10 +71,6 @@ public:
protected: /* Weapon Data */
FTimerHandle FireTimer;
FTimerHandle ReloadTimer;
/** The sound to play when firing. */
UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds")
TObjectPtr<UFMODEvent> FireEvent;
UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds")
TObjectPtr<UFMODEvent> ReloadSound;