explosion damage amount is a power function

This commit is contained in:
in0finite 2020-06-27 22:50:50 +02:00
parent bc605534e6
commit ba4e10bb3a
2 changed files with 2 additions and 2 deletions

View file

@ -24,7 +24,7 @@ namespace SanAndreasUnity.Behaviours.Vehicles
public float explosionForceMultiplier = 700f;
public float explosionChassisForceMultiplier = 11000f;
public float explosionDamageRadius = 7f;
public float explosionDamageMultiplier = 1f;
[Range(0.1f, 3f)] public float explosionMassToDamageExponent = 1f;
public float explosionLeftoverPartsLifetime = 20f;
public float explosionLeftoverPartsMaxDepenetrationVelocity = 15f;

View file

@ -185,7 +185,7 @@ namespace SanAndreasUnity.Behaviours.Vehicles
// inflict damage to nearby objects
Damageable.InflictDamageToObjectsInArea(
explosionCenter, VehicleManager.Instance.explosionDamageRadius, this.HandlingData.Mass * VehicleManager.Instance.explosionDamageMultiplier);
explosionCenter, VehicleManager.Instance.explosionDamageRadius, Mathf.Pow(this.HandlingData.Mass, VehicleManager.Instance.explosionMassToDamageExponent));
// create explosion effect