From 5b2d9d338f25306b5e8b2850ce59aa3c53e435d3 Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Tue, 27 Aug 2024 20:21:38 +0200 Subject: [PATCH] Fix Unintended Headshots While Crouched --- Classes/ST_Mutator.uc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Classes/ST_Mutator.uc b/Classes/ST_Mutator.uc index 28262d7..e26c3c1 100644 --- a/Classes/ST_Mutator.uc +++ b/Classes/ST_Mutator.uc @@ -437,6 +437,9 @@ function bool CheckHeadShot(Pawn P, vector HitLocation, vector Direction) { 0 ); + if (HeadHalfHeight <= 0.0) + return false; + CollChecker.SetCollision(true, false, false); CollChecker.SetCollisionSize(WeaponSettings.HeadRadius, WeaponSettings.HeadHalfHeight); CollChecker.SetLocation(P.Location + vect(0,0,1)*(BodyOffsetZ + BodyHalfHeight + HeadHalfHeight));