From 8f6032b57e83facd53c0fcee538a9e09b26a114d Mon Sep 17 00:00:00 2001 From: MaxDorob Date: Wed, 20 Nov 2024 00:32:38 +0600 Subject: [PATCH] Effecter --- .../CombatExtended/Comps/CompCIWSImpactHandler.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/CombatExtended/CombatExtended/Comps/CompCIWSImpactHandler.cs b/Source/CombatExtended/CombatExtended/Comps/CompCIWSImpactHandler.cs index bc4d35e3d6..c068b69174 100644 --- a/Source/CombatExtended/CombatExtended/Comps/CompCIWSImpactHandler.cs +++ b/Source/CombatExtended/CombatExtended/Comps/CompCIWSImpactHandler.cs @@ -20,6 +20,10 @@ public virtual void OnImpact(ProjectileCE projectile, DamageInfo dinfo) { Props.impacted.PlayOneShot(new TargetInfo(parent.DrawPos.ToIntVec3(), parent.Map)); } + if (Props.impactEffecter != null) + { + Props.impactEffecter.Spawn(parent.DrawPos.ToIntVec3(), parent.Map); + } parent.Destroy(DestroyMode.Vanish); } @@ -31,5 +35,6 @@ public CompProperties_CIWSImpactHandler() compClass = typeof(CompCIWSImpactHandler); } public SoundDef impacted; + public EffecterDef impactEffecter; } }