Fixed weapons messing up when interacting while reloading
This commit is contained in:
parent
adc07b3849
commit
4587dfdea5
@ -251,6 +251,7 @@ void AEndlessVendettaCharacter::SetupPlayerInputComponent(class UInputComponent*
|
||||
|
||||
void AEndlessVendettaCharacter::Interact()
|
||||
{
|
||||
if (bIsReloading) return;
|
||||
UE_LOG(LogTemp, Warning, TEXT("Interaction Has Been Called"));
|
||||
if (InPauseMenu) return;
|
||||
if (bIsInDialogue)
|
||||
@ -336,6 +337,7 @@ float AEndlessVendettaCharacter::TakeDamage(const float DamageAmount, FDamageEve
|
||||
|
||||
void AEndlessVendettaCharacter::ToggleRecon()
|
||||
{
|
||||
if (bIsReloading) return;
|
||||
if (PlayerOnShip || InPauseMenu) return;
|
||||
if (!GadgetManager->IsValidReconGadget()) return;
|
||||
|
||||
@ -359,6 +361,7 @@ void AEndlessVendettaCharacter::ToggleRecon()
|
||||
|
||||
void AEndlessVendettaCharacter::ToggleCombat()
|
||||
{
|
||||
if (bIsReloading) return;
|
||||
if (PlayerOnShip || InPauseMenu) return;
|
||||
if (!GadgetManager->IsValidCombatGadget()) return;
|
||||
|
||||
@ -384,6 +387,7 @@ void AEndlessVendettaCharacter::ToggleCombat()
|
||||
//When 1 is pressed it calls EquipPrimary
|
||||
void AEndlessVendettaCharacter::EquipPrimary()
|
||||
{
|
||||
if (bIsReloading) return;
|
||||
if (PlayerOnShip || InPauseMenu) return;
|
||||
if (!IsValid(PrimaryWeaponClass)) return;
|
||||
FActorSpawnParameters spawnParams;
|
||||
@ -444,6 +448,7 @@ void AEndlessVendettaCharacter::EquipPrimary()
|
||||
|
||||
void AEndlessVendettaCharacter::EquipSecondary()
|
||||
{
|
||||
if (bIsReloading) return;
|
||||
if (!IsValid(SecondaryWeaponClass)) return;
|
||||
if (PlayerOnShip || InPauseMenu) return;
|
||||
FActorSpawnParameters spawnParams;
|
||||
@ -498,6 +503,7 @@ void AEndlessVendettaCharacter::EquipSecondary()
|
||||
|
||||
void AEndlessVendettaCharacter::WeaponSwitcher(AActor* Outhit)
|
||||
{
|
||||
if (bIsReloading) return;
|
||||
FAttachmentTransformRules AttachmentRules(EAttachmentRule::SnapToTarget, true);
|
||||
FDetachmentTransformRules DetatchRules(EDetachmentRule::KeepWorld, false);
|
||||
FActorSpawnParameters spawnParams;
|
||||
@ -571,6 +577,7 @@ void AEndlessVendettaCharacter::WeaponSwitcher(AActor* Outhit)
|
||||
//Calls the fire function in the baseWeaponClass
|
||||
void AEndlessVendettaCharacter::FireCaller()
|
||||
{
|
||||
if (bIsReloading) return;
|
||||
if (InPauseMenu) return;
|
||||
if (IsValid(PrimaryWeapon) && !bIsReloading)
|
||||
{
|
||||
@ -596,6 +603,7 @@ void AEndlessVendettaCharacter::StopFire()
|
||||
|
||||
void AEndlessVendettaCharacter::GunRightClick()
|
||||
{
|
||||
if (bIsReloading) return;
|
||||
if (InPauseMenu) return;
|
||||
if (IsValid(PrimaryWeapon) && !bIsScoped)
|
||||
{
|
||||
@ -615,6 +623,7 @@ void AEndlessVendettaCharacter::GunRightClick()
|
||||
|
||||
void AEndlessVendettaCharacter::StopGunRightClick()
|
||||
{
|
||||
if (bIsReloading) return;
|
||||
if (IsValid(PrimaryWeapon))
|
||||
{
|
||||
bIsScoped = false;
|
||||
|
Loading…
Reference in New Issue
Block a user