hit_foliage.c 589 B

1234567891011121314151617181920212223
  1. class Hit_Foliage : EffBulletImpactBase
  2. {
  3. void Hit_Foliage()
  4. {
  5. SetEnterParticle(ParticleList.IMPACT_FOLIAGE_ENTER);
  6. SetExitParticle(ParticleList.IMPACT_FOLIAGE_EXIT);
  7. SetRicochetParticle(ParticleList.IMPACT_FOLIAGE_RICOCHET);
  8. }
  9. override float CalculateStoppingForce(float in_speedf, float out_speedf, string ammoType, float weight)
  10. {
  11. if ( m_ImpactType == ImpactTypes.MELEE )
  12. {
  13. return 500;
  14. }
  15. float projectile_weight_coef = weight / DEFAULT_PROJECTILE_WEIGHT;
  16. float stopping_force = in_speedf * projectile_weight_coef * 0.5;
  17. return stopping_force;
  18. }
  19. }