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)
|
void ALMPlayer::PlayAnimation(UAnimMontage* Animation)
|
||||||
{
|
{
|
||||||
|
UAnimInstance* AnimInstance = GetArms()->GetAnimInstance();
|
||||||
|
if (AnimInstance && Animation)
|
||||||
|
{
|
||||||
|
AnimInstance->Montage_Play(Animation);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ALMPlayer::FireBullets(const FLMBulletInfo Settings)
|
void ALMPlayer::FireBullets(const FLMBulletInfo Settings)
|
||||||
|
@ -29,10 +29,10 @@ void ALMRevolver::PrimaryFire()
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PlayEvent(FireEvent);
|
PlayEvent(FireEvent);
|
||||||
PlayAnimation(PrimaryFireAnimation);
|
PlayAnimation(PrimaryFireAnimation);
|
||||||
|
Player->PlayAnimation(PrimaryFireArmsAnimation);
|
||||||
|
|
||||||
const FVector Origin = Player->GetWeaponFiringOrigin();
|
const FVector Origin = Player->GetWeaponFiringOrigin();
|
||||||
const FVector Direction = Player->GetAimVector();
|
const FVector Direction = Player->GetAimVector();
|
||||||
|
@ -77,7 +77,7 @@ void ALMWeaponBase::PlayEvent(UFMODEvent* Event) const
|
|||||||
void ALMWeaponBase::PlayAnimation(UAnimMontage* Animation)
|
void ALMWeaponBase::PlayAnimation(UAnimMontage* Animation)
|
||||||
{
|
{
|
||||||
UAnimInstance* AnimInstance = WeaponMesh->GetAnimInstance();
|
UAnimInstance* AnimInstance = WeaponMesh->GetAnimInstance();
|
||||||
|
|
||||||
if (Animation && AnimInstance)
|
if (Animation && AnimInstance)
|
||||||
{
|
{
|
||||||
AnimInstance->Montage_Play(Animation);
|
AnimInstance->Montage_Play(Animation);
|
||||||
|
@ -85,11 +85,15 @@ protected: /* Weapon Data */
|
|||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds")
|
||||||
TObjectPtr<UFMODEvent> EquipSound;
|
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;
|
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;
|
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. */
|
/** The number of seconds before being able to fire again. */
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Weapon", meta=(AllowPrivateAccess=true))
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Weapon", meta=(AllowPrivateAccess=true))
|
||||||
|
Reference in New Issue
Block a user