Fixed weapon firing animation being incorrect
Signed-off-by: TjgL <lithmoneo@gmail.com>
This commit is contained in:
parent
28af663a4d
commit
fd942ed309
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/ABP_Arms.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Weapon/Revolver/FireAnimationTest/ABP_Arms.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Weapon/Revolver/FireAnimationTest/ABP_Revolver.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Weapon/Revolver/FireAnimationTest/ABP_Revolver.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Weapon/Revolver/FireAnimationTest/AM_Arms_Fire.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Weapon/Revolver/FireAnimationTest/AM_Arms_Fire.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Weapon/Revolver/FireAnimationTest/AM_Gun.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Weapon/Revolver/FireAnimationTest/AM_Gun.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Weapon/Revolver/FireAnimationTest/AM_Revolver_Fire.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Weapon/Revolver/FireAnimationTest/AM_Revolver_Fire.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Weapon/Revolver/FireAnimationTest/A_Arms_Fire.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Weapon/Revolver/FireAnimationTest/A_Arms_Fire.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Weapon/Revolver/FireAnimationTest/A_Gun_Fire.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Weapon/Revolver/FireAnimationTest/A_Gun_Fire.uasset
(Stored with Git LFS)
Binary file not shown.
@ -131,6 +131,11 @@ void ALMPlayer::SetWeaponManager(ULMWeaponManager* Manager)
|
||||
|
||||
void ALMPlayer::PlayAnimation(UAnimMontage* Animation)
|
||||
{
|
||||
UAnimInstance* AnimInstance = GetArms()->GetAnimInstance();
|
||||
if (AnimInstance && Animation)
|
||||
{
|
||||
AnimInstance->Montage_Play(Animation);
|
||||
}
|
||||
}
|
||||
|
||||
void ALMPlayer::FireBullets(const FLMBulletInfo Settings)
|
||||
|
@ -29,10 +29,10 @@ void ALMRevolver::PrimaryFire()
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
PlayEvent(FireEvent);
|
||||
PlayAnimation(PrimaryFireAnimation);
|
||||
Player->PlayAnimation(PrimaryFireArmsAnimation);
|
||||
|
||||
const FVector Origin = Player->GetWeaponFiringOrigin();
|
||||
const FVector Direction = Player->GetAimVector();
|
||||
|
@ -77,7 +77,7 @@ void ALMWeaponBase::PlayEvent(UFMODEvent* Event) const
|
||||
void ALMWeaponBase::PlayAnimation(UAnimMontage* Animation)
|
||||
{
|
||||
UAnimInstance* AnimInstance = WeaponMesh->GetAnimInstance();
|
||||
|
||||
|
||||
if (Animation && AnimInstance)
|
||||
{
|
||||
AnimInstance->Montage_Play(Animation);
|
||||
|
@ -85,11 +85,15 @@ protected: /* Weapon Data */
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds")
|
||||
TObjectPtr<UFMODEvent> EquipSound;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Animations", meta=(AllowPrivateAccess=true))
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Animations|Fire", meta=(AllowPrivateAccess=true))
|
||||
TObjectPtr<UAnimMontage> PrimaryFireAnimation;
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Animations|Fire", meta=(AllowPrivateAccess=true))
|
||||
TObjectPtr<UAnimMontage> PrimaryFireArmsAnimation;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Legumix|Animations", meta=(AllowPrivateAccess=true))
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Legumix|Animations|Reload", meta=(AllowPrivateAccess=true))
|
||||
TObjectPtr<UAnimMontage> ReloadAnimation;
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Legumix|Animations|Reload", meta=(AllowPrivateAccess=true))
|
||||
TObjectPtr<UAnimMontage> ReloadArmsAnimation;
|
||||
|
||||
/** The number of seconds before being able to fire again. */
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Weapon", meta=(AllowPrivateAccess=true))
|
||||
|
Reference in New Issue
Block a user