From 0e6ac1fc2f17b2d41fb67bd35abc7403cdbe96c2 Mon Sep 17 00:00:00 2001 From: baz Date: Wed, 10 Apr 2024 01:31:48 +0100 Subject: [PATCH] Disable DebugLines for shots --- Source/Nakatomi/EnemyCharacter.cpp | 3 +-- Source/Nakatomi/PlayerCharacter.cpp | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/Nakatomi/EnemyCharacter.cpp b/Source/Nakatomi/EnemyCharacter.cpp index 3ef65ce..fdb3a1b 100644 --- a/Source/Nakatomi/EnemyCharacter.cpp +++ b/Source/Nakatomi/EnemyCharacter.cpp @@ -107,7 +107,6 @@ void AEnemyCharacter::CalculateHits(TArray* hits, FVector* dir) // Set up randomness const int32 RandomSeed = FMath::Rand(); FRandomStream WeaponRandomStream(RandomSeed); - const float Spread = CurrentWeapon->GetWeaponProperties()->WeaponSpread; const float Spread = CurrentWeapon->GetWeaponProperties()->WeaponSpread * WeaponSpreadModifier; const float Range = CurrentWeapon->GetWeaponProperties()->ProjectileRange; @@ -138,7 +137,7 @@ void AEnemyCharacter::CalculateHits(TArray* hits, FVector* dir) for (FHitResult Result : HitResults) { hits->Add(Result); - DrawDebugLine(GetWorld(), TraceStart, Result.ImpactPoint, FColor::Red, true, 500, 0U, 0); + // DrawDebugLine(GetWorld(), TraceStart, Result.ImpactPoint, FColor::Red, true, 500, 0U, 0); } } } diff --git a/Source/Nakatomi/PlayerCharacter.cpp b/Source/Nakatomi/PlayerCharacter.cpp index 7c6ff69..c71a169 100644 --- a/Source/Nakatomi/PlayerCharacter.cpp +++ b/Source/Nakatomi/PlayerCharacter.cpp @@ -15,7 +15,7 @@ #include "NakatomiCMC.h" #include "WeaponThrowable.h" #include "NiagaraFunctionLibrary.h" -#include "GameFramework/CharacterMovementComponent.h" +#include "GameFramework/CharacterMovementComponent.h" #define COLLISION_WEAPON ECC_GameTraceChannel1 @@ -369,7 +369,7 @@ void APlayerCharacter::CalculateHits(TArray* hits, FVector* dir) for (FHitResult Result : HitResults) { hits->Add(Result); - DrawDebugLine(GetWorld(), TraceStart, Result.ImpactPoint, FColor::Blue, true, 500, 0U, 0); + // DrawDebugLine(GetWorld(), TraceStart, Result.ImpactPoint, FColor::Blue, true, 500, 0U, 0); } } }