From e62345d6903ee1d1ce219c7c79e07c7956b2eb43 Mon Sep 17 00:00:00 2001
From: MARCEL HARA <MH261677@falmouth.ac.uk>
Date: Mon, 16 Oct 2023 11:40:53 +0100
Subject: [PATCH] Updated Recoil Pitch to Stop Being Perfect for Guns

---
 .../Source/EndlessVendetta/WeaponSystem/BaseWeaponClass.cpp      | 1 +
 1 file changed, 1 insertion(+)

diff --git a/EndlessVendetta/Source/EndlessVendetta/WeaponSystem/BaseWeaponClass.cpp b/EndlessVendetta/Source/EndlessVendetta/WeaponSystem/BaseWeaponClass.cpp
index e348490a..53f2de68 100644
--- a/EndlessVendetta/Source/EndlessVendetta/WeaponSystem/BaseWeaponClass.cpp
+++ b/EndlessVendetta/Source/EndlessVendetta/WeaponSystem/BaseWeaponClass.cpp
@@ -106,6 +106,7 @@ void ABaseWeaponClass::ApplyRecoil(float DeltaTime)
 			playerInWorld->AddControllerPitchInput(GetRecoilPitch(amplitude, recoilTime));
 			currentPitch += GetRecoilPitch(amplitude,recoilTime);
 		}
+		playerInWorld->AddControllerPitchInput(FMath::RandRange(-5 * DeltaTime, 5* DeltaTime));
 		GunStartArrow->AddRelativeRotation(FRotator(-GetRecoilPitch(amplitude, recoilTime), 0, 0));
 		playerInWorld->AddControllerYawInput(GetRecoilYaw(amplitude, recoilTime));
 		UpdateSamples(amplitude, recoilTime);