public void SendHitEvent(CollectSplashTargetsEvent evt, SplashWeaponNode weapon) { SplashHitData splashHit = evt.SplashHit; SelfSplashHitEvent eventInstance = new SelfSplashHitEvent(splashHit.DirectTargets, splashHit.StaticHit, splashHit.SplashTargets); base.ScheduleEvent(eventInstance, weapon); }
public void PrepareHit(CollectSplashTargetsEvent evt, SplashWeaponNode weapon) { SplashHitData splashHit = evt.SplashHit; List <HitTarget> directTargets = splashHit.DirectTargets; if (directTargets.Count <= 0) { base.ScheduleEvent(new CalculateSplashCenterByStaticHitEvent(splashHit), weapon.Entity); } else { HitTarget target = directTargets.First <HitTarget>(); Entity entity = target.Entity; base.ScheduleEvent(new CalculateSplashCenterByDirectTargetEvent(splashHit, target.LocalHitPoint), entity); } }