Merge branch 'dev' into GunAnimation

This commit is contained in:
Philip W 2024-03-05 14:37:13 +00:00
commit e8c3a10c57
9 changed files with 26 additions and 15 deletions

View File

@ -1,2 +0,0 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/Environment/Highlighting/HighlightingSourceSnapshotLocation/@EntryValue">C:\Users\Rafal\AppData\Local\JetBrains\Rider2023.3\resharper-host\temp\Rider\vAny\CoverageData\_EndlessVendetta.-1253833435\Snapshot\snapshot.utdcvr</s:String></wpf:ResourceDictionary>

View File

@ -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;

View File

@ -37,7 +37,11 @@ void AShotgunClass::Fire()
FVector newStartTrace = UKismetMathLibrary::RandomPointInBoundingBox(traceStart, ShotgunBulletSpread);
traceEnd = newStartTrace + (GunStartArrow->GetForwardVector() * BulletDistance);
GetWorld()->LineTraceSingleByChannel(outHit, newStartTrace, traceEnd, ECC_Visibility, collisionParams);
DrawDebugLine(this->GetWorld(), newStartTrace, traceEnd, FColor::Black , false, 0.2f, 0U, 0.2f);
DrawDebugLine(this->GetWorld(), newStartTrace, traceEnd, FColor::Yellow , false, 500.2f, 0U, 0.2f);
if (outHit.bBlockingHit)
{
GEngine->AddOnScreenDebugMessage(-1, 20.f, FColor::Orange, FString(TEXT("SHOTGUN HIT")));
}
}
currentAmmoCount --;
playerControllerRef->PlayerCameraManager->StartCameraShake(CameraShakeClass, 1);