Skip to content

Commit

Permalink
Restore EnhancedSplash Compatibility With Movers
Browse files Browse the repository at this point in the history
  • Loading branch information
Deaod committed Feb 29, 2024
1 parent 6ac9064 commit 4da8b09
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Classes/ST_Mutator.uc
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,23 @@ final function EnhancedHurtRadius(
CollChecker.SetCollisionSize(DamageRadius, DamageRadius);
CollChecker.SetLocation(HitLocation);

foreach Source.VisibleCollidingActors(class'Actor', Victim, DamageRadius, HitLocation, , true) {
if (Victim.IsA('Brush') == false)
continue;

dir = Victim.Location - HitLocation;
dist = FMax(1,VSize(dir));
dir = dir / dist;
damageScale = 1 - FMax(0, (dist - Victim.CollisionRadius) / DamageRadius);
Victim.TakeDamage(
damageScale * DamageAmount,
Instigator,
Victim.Location - 0.5 * (Victim.CollisionHeight + Victim.CollisionRadius) * dir,
(damageScale * Momentum * dir),
DamageName
);
}

foreach CollChecker.TouchingActors(class'Actor', Victim) {
if (Victim == self)
continue;
Expand Down

0 comments on commit 4da8b09

Please sign in to comment.