Bugfix Assault Rifle Out of Alignment

This commit is contained in:
Philip W 2024-05-11 12:45:30 +01:00
parent d2df714b60
commit b96ba07b40
10 changed files with 20 additions and 17 deletions

View File

@ -108,6 +108,7 @@ void AEndlessVendettaCharacter::ReloadAnimationComplete()
{ {
if (IsValid(PrimaryWeapon)) if (IsValid(PrimaryWeapon))
{ {
if (!bIsReloading) return;
PrimaryWeapon->WeaponReload(); PrimaryWeapon->WeaponReload();
} }
if (IsValid(SecondaryWeapon)) if (IsValid(SecondaryWeapon))
@ -764,7 +765,8 @@ void AEndlessVendettaCharacter::GunReload()
if (IsValid(PrimaryWeapon)) if (IsValid(PrimaryWeapon))
{ {
if (PrimaryWeapon->currentAmmoCount == PrimaryWeapon->MagazineSize) return; if (PrimaryWeapon->currentAmmoCount == PrimaryWeapon->MagazineSize) return;
PrimaryWeapon->ReloadTimer(); StartReload.Broadcast();
//PrimaryWeapon->ReloadTimer();
bIsReloading = true; bIsReloading = true;
} }
else if (IsValid(SecondaryWeapon)) else if (IsValid(SecondaryWeapon))
@ -893,7 +895,7 @@ bool AEndlessVendettaCharacter::UpdateGadgetType(TSubclassOf<AGadgetBase> NewGad
if (NewGadgetClass.GetDefaultObject()->IsA(AReconGadget::StaticClass())) ToggleRecon(); if (NewGadgetClass.GetDefaultObject()->IsA(AReconGadget::StaticClass())) ToggleRecon();
else if (NewGadgetClass.GetDefaultObject()->IsA(ACombatGadget::StaticClass())) ToggleCombat(); else if (NewGadgetClass.GetDefaultObject()->IsA(ACombatGadget::StaticClass())) ToggleCombat();
return true; return true;
} }

View File

@ -200,7 +200,8 @@ void ABaseWeaponClass::Fire()
GetWorld()->LineTraceSingleByObjectType(outHit, traceStart, traceEnd, ObjectQueryParams, collisionParams); GetWorld()->LineTraceSingleByObjectType(outHit, traceStart, traceEnd, ObjectQueryParams, collisionParams);
WeaponFired.Broadcast(); WeaponFired.Broadcast();
playerControllerRef->PlayerCameraManager->StartCameraShake(CameraShakeClass, 1); playerControllerRef->PlayerCameraManager->StartCameraShake(CameraShakeClass, 1);
endlessVendettaChar->PawnNoiseEmitterComp->MakeNoise(endlessVendettaChar, 1, traceStart); //LITERALLY CHANGE THIS FOR SUPPRESSOR AND IT SHOULD WORK LOL endlessVendettaChar->PawnNoiseEmitterComp->MakeNoise(endlessVendettaChar, 1, traceStart);
//LITERALLY CHANGE THIS FOR SUPPRESSOR AND IT SHOULD WORK LOL
currentAmmoCount -= 1; currentAmmoCount -= 1;
GenerateRecoilVector(); GenerateRecoilVector();
ClickDetectionTimer(); ClickDetectionTimer();