private void PrepareImpactByBaseHitEvent(HitEvent evt, ImpactWeakeningNode weapon) { DamageWeakeningByDistanceComponent damageWeakeningByDistance = weapon.damageWeakeningByDistance; List <HitTarget> targets = evt.Targets; int count = targets.Count; float impactForce = weapon.impact.ImpactForce; for (int i = 0; i < count; i++) { HitTarget target = targets[i]; float hitDistance = target.HitDistance; float impactWeakeningByRange = base.GetImpactWeakeningByRange(hitDistance, damageWeakeningByDistance); base.PrepareImpactForHitTarget(weapon.Entity, target, impactForce, impactWeakeningByRange); } }
public void PrepareImpact(HitEvent evt, ImpactWeakeningNode weapon) { this.PrepareImpactByBaseHitEvent(evt, weapon); }