117 - Reload Effects
This commit is contained in:
parent
d7539845c6
commit
bfe46a2e91
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -76,4 +76,6 @@ void UBlasterAnimInstance::NativeUpdateAnimation(float DeltaSeconds)
|
|||
}
|
||||
|
||||
bUseFABRIK = BlasterCharacter->GetCombatState() != ECombatState::ECS_Reloading;
|
||||
bUseAimOffsets = BlasterCharacter->GetCombatState() != ECombatState::ECS_Reloading;
|
||||
bTransformRightHand = BlasterCharacter->GetCombatState() != ECombatState::ECS_Reloading;
|
||||
}
|
||||
|
|
|
@ -82,4 +82,10 @@ private:
|
|||
|
||||
UPROPERTY(BlueprintReadOnly, Category="Movement", meta=(AllowPrivateAccess = "true"))
|
||||
bool bUseFABRIK;
|
||||
|
||||
UPROPERTY(BlueprintReadOnly, Category="Movement", meta=(AllowPrivateAccess = "true"))
|
||||
bool bUseAimOffsets;
|
||||
|
||||
UPROPERTY(BlueprintReadOnly, Category="Movement", meta=(AllowPrivateAccess = "true"))
|
||||
bool bTransformRightHand;
|
||||
};
|
||||
|
|
|
@ -326,6 +326,10 @@ void UCombatComponent::EquipWeapon(AWeapon* WeaponToEquip)
|
|||
Controller->SetHUDCarriedAmmo(CarriedAmmo);
|
||||
}
|
||||
|
||||
if (EquippedWeapon->EquipSound)
|
||||
{
|
||||
UGameplayStatics::PlaySoundAtLocation(this, EquippedWeapon->EquipSound, Character->GetActorLocation());
|
||||
}
|
||||
Character->GetCharacterMovement()->bOrientRotationToMovement = false;
|
||||
Character->bUseControllerRotationYaw = true;
|
||||
}
|
||||
|
@ -427,6 +431,10 @@ void UCombatComponent::OnRep_EquippedWeapon()
|
|||
{
|
||||
HandSocket->AttachActor(EquippedWeapon, Character->GetMesh());
|
||||
}
|
||||
if (EquippedWeapon->EquipSound)
|
||||
{
|
||||
UGameplayStatics::PlaySoundAtLocation(this, EquippedWeapon->EquipSound, Character->GetActorLocation());
|
||||
}
|
||||
Character->GetCharacterMovement()->bOrientRotationToMovement = false;
|
||||
Character->bUseControllerRotationYaw = true;
|
||||
}
|
||||
|
|
|
@ -61,6 +61,9 @@ public:
|
|||
UPROPERTY(EditAnywhere, Category = Combat)
|
||||
bool bAutomatic = true;
|
||||
|
||||
UPROPERTY(EditAnywhere)
|
||||
class USoundCue* EquipSound;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category = Combat)
|
||||
float FireDelay = .15f;
|
||||
|
||||
|
|
Loading…
Reference in New Issue