Added more log checks for Shotguns

This commit is contained in:
MH261677 2024-03-02 23:08:02 +00:00
parent 82c87ed7a5
commit 54f4e9afa6
5 changed files with 11 additions and 9 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

@ -37,7 +37,11 @@ void AShotgunClass::Fire()
FVector newStartTrace = UKismetMathLibrary::RandomPointInBoundingBox(traceStart, ShotgunBulletSpread); FVector newStartTrace = UKismetMathLibrary::RandomPointInBoundingBox(traceStart, ShotgunBulletSpread);
traceEnd = newStartTrace + (GunStartArrow->GetForwardVector() * BulletDistance); traceEnd = newStartTrace + (GunStartArrow->GetForwardVector() * BulletDistance);
GetWorld()->LineTraceSingleByChannel(outHit, newStartTrace, traceEnd, ECC_Visibility, collisionParams); 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 --; currentAmmoCount --;
playerControllerRef->PlayerCameraManager->StartCameraShake(CameraShakeClass, 1); playerControllerRef->PlayerCameraManager->StartCameraShake(CameraShakeClass, 1);