diff --git a/Source/Blaster/Components/CombatComponent.cpp b/Source/Blaster/Components/CombatComponent.cpp index bc6b062..6cfba8e 100644 --- a/Source/Blaster/Components/CombatComponent.cpp +++ b/Source/Blaster/Components/CombatComponent.cpp @@ -213,6 +213,10 @@ void UCombatComponent::FireTimerFinished() { Fire(); } + if (EquippedWeapon->IsEmpty()) + { + Reload(); + } } bool UCombatComponent::CanFire() @@ -330,6 +334,11 @@ void UCombatComponent::EquipWeapon(AWeapon* WeaponToEquip) { UGameplayStatics::PlaySoundAtLocation(this, EquippedWeapon->EquipSound, Character->GetActorLocation()); } + + if (EquippedWeapon->IsEmpty()) + { + Reload(); + } Character->GetCharacterMovement()->bOrientRotationToMovement = false; Character->bUseControllerRotationYaw = true; }