Updated sound handling for firing animations
Signed-off-by: TjgL <lithmoneo@gmail.com>
This commit is contained in:
parent
2a455f83b6
commit
6b0ad46704
BIN
Content/Legumix/Weapon/Revolver/BP_Revolver.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Weapon/Revolver/BP_Revolver.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Weapon/Revolver/FireAnimationTest/AM_Arms_Fire.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Weapon/Revolver/FireAnimationTest/AM_Arms_Fire.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Weapon/Revolver/FireAnimationTest/AM_Revolver_Fire.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Weapon/Revolver/FireAnimationTest/AM_Revolver_Fire.uasset
(Stored with Git LFS)
Binary file not shown.
@ -154,7 +154,6 @@ bool ULMMovementComponent::IsCustomMovementMode(ECustomMovementModes InCustomMov
|
|||||||
|
|
||||||
void ULMMovementComponent::EnterSlide()
|
void ULMMovementComponent::EnterSlide()
|
||||||
{
|
{
|
||||||
UE_LOG(LogTemp, Error, TEXT("Entering Slide"));
|
|
||||||
bWantsToCrouch = true;
|
bWantsToCrouch = true;
|
||||||
Velocity += Velocity.GetSafeNormal2D() * SlideEnterImpulse;
|
Velocity += Velocity.GetSafeNormal2D() * SlideEnterImpulse;
|
||||||
SetMovementMode(EMovementMode::MOVE_Custom, ECustomMovementModes::ECMM_Sliding);
|
SetMovementMode(EMovementMode::MOVE_Custom, ECustomMovementModes::ECMM_Sliding);
|
||||||
@ -162,7 +161,6 @@ void ULMMovementComponent::EnterSlide()
|
|||||||
|
|
||||||
void ULMMovementComponent::ExitSlide()
|
void ULMMovementComponent::ExitSlide()
|
||||||
{
|
{
|
||||||
UE_LOG(LogTemp, Error, TEXT("Exiting Slide"));
|
|
||||||
bWantsToCrouch = false;
|
bWantsToCrouch = false;
|
||||||
|
|
||||||
FQuat NewRotation = FRotationMatrix::MakeFromXZ(UpdatedComponent->GetForwardVector().GetSafeNormal2D(), FVector::UpVector).ToQuat();
|
FQuat NewRotation = FRotationMatrix::MakeFromXZ(UpdatedComponent->GetForwardVector().GetSafeNormal2D(), FVector::UpVector).ToQuat();
|
||||||
|
@ -30,7 +30,6 @@ void ALMRevolver::PrimaryFire()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayEvent(FireEvent);
|
|
||||||
PlayAnimation(PrimaryFireAnimation);
|
PlayAnimation(PrimaryFireAnimation);
|
||||||
Player->PlayAnimation(PrimaryFireArmsAnimation);
|
Player->PlayAnimation(PrimaryFireArmsAnimation);
|
||||||
|
|
||||||
|
@ -30,7 +30,6 @@ void ALMShotgun::PrimaryFire()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayEvent(FireEvent);
|
|
||||||
PlayAnimation(PrimaryFireAnimation);
|
PlayAnimation(PrimaryFireAnimation);
|
||||||
|
|
||||||
const FVector Origin = Player->GetWeaponFiringOrigin();
|
const FVector Origin = Player->GetWeaponFiringOrigin();
|
||||||
|
@ -100,12 +100,13 @@ bool ALMWeaponBase::DefaultReload()
|
|||||||
if (ClipAmmo >= MaxClip)
|
if (ClipAmmo >= MaxClip)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// TODO: replace with anim notifies
|
||||||
PlayEvent(ReloadSound);
|
PlayEvent(ReloadSound);
|
||||||
PlayAnimation(ReloadAnimation);
|
PlayAnimation(ReloadAnimation);
|
||||||
|
Player->PlayAnimation(ReloadArmsAnimation);
|
||||||
|
|
||||||
State = EWeaponState::EWS_Reloading;
|
State = EWeaponState::EWS_Reloading;
|
||||||
|
|
||||||
// TODO: Use Animations
|
|
||||||
OnDefaultReload();
|
OnDefaultReload();
|
||||||
GetWorldTimerManager().SetTimer(ReloadTimer, this, &ALMWeaponBase::AllowRefire, ReloadDelay);
|
GetWorldTimerManager().SetTimer(ReloadTimer, this, &ALMWeaponBase::AllowRefire, ReloadDelay);
|
||||||
Player->OnReload();
|
Player->OnReload();
|
||||||
|
@ -71,10 +71,6 @@ public:
|
|||||||
protected: /* Weapon Data */
|
protected: /* Weapon Data */
|
||||||
FTimerHandle FireTimer;
|
FTimerHandle FireTimer;
|
||||||
FTimerHandle ReloadTimer;
|
FTimerHandle ReloadTimer;
|
||||||
|
|
||||||
/** The sound to play when firing. */
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds")
|
|
||||||
TObjectPtr<UFMODEvent> FireEvent;
|
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds")
|
||||||
TObjectPtr<UFMODEvent> ReloadSound;
|
TObjectPtr<UFMODEvent> ReloadSound;
|
||||||
|
Reference in New Issue
Block a user