Skip to content

Commit

Permalink
Fix Unintended Headshots While Crouched
Browse files Browse the repository at this point in the history
  • Loading branch information
Deaod committed Aug 27, 2024
1 parent e611411 commit 5b2d9d3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Classes/ST_Mutator.uc
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 5b2d9d3

Please sign in to comment.