Skip to content

Commit

Permalink
Fix Closest Point Calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Deaod committed Sep 4, 2023
1 parent 745edf0 commit b25c84a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/ST_Mutator.uc
Original file line number Diff line number Diff line change
Expand Up @@ -950,9 +950,9 @@ final function EnhancedHurtRadius(
dir = Normal(Delta);

if (Abs(Delta.Z) <= Victim.CollisionHeight) {
Closest = Victim.Location + dir * Victim.CollisionRadius;
Closest = HitLocation + Normal(DeltaXY) * (VSize(DeltaXY) - Victim.CollisionRadius);
} else if (VSize(DeltaXY) <= Victim.CollisionRadius) {
Closest = Victim.Location + dir * Victim.CollisionHeight;
Closest = HitLocation + (Delta.Z - Victim.CollisionHeight) * vect(0.0, 0.0, 1.0);
} else {
// Closest point must be on the cylinder rims, find out where
Closest = Victim.Location + dir * (Source.CollisionRadius / VSize(dir * vect(1.0, 1.0, 0.0)));
Expand Down

0 comments on commit b25c84a

Please sign in to comment.