diff --git a/Assets/Scripts/Behaviours/Vehicles/VehicleManager.cs b/Assets/Scripts/Behaviours/Vehicles/VehicleManager.cs index 0ea8b820..f8823120 100644 --- a/Assets/Scripts/Behaviours/Vehicles/VehicleManager.cs +++ b/Assets/Scripts/Behaviours/Vehicles/VehicleManager.cs @@ -21,6 +21,8 @@ namespace SanAndreasUnity.Behaviours.Vehicles public float vehicleSyncRate = 20; + [Range(0.1f, 3f)] public float massToHealthExponent = 1f; + public float explosionForceMultiplier = 700f; public float explosionChassisForceMultiplier = 11000f; public float explosionDamageRadius = 7f; diff --git a/Assets/Scripts/Behaviours/Vehicles/Vehicle_Spawning.cs b/Assets/Scripts/Behaviours/Vehicles/Vehicle_Spawning.cs index 72548700..f30cb198 100644 --- a/Assets/Scripts/Behaviours/Vehicles/Vehicle_Spawning.cs +++ b/Assets/Scripts/Behaviours/Vehicles/Vehicle_Spawning.cs @@ -450,7 +450,7 @@ namespace SanAndreasUnity.Behaviours.Vehicles InitializePhysics(); - this.Health = this.MaxHealth = this.HandlingData.Mass; + this.Health = this.MaxHealth = Mathf.Pow(this.HandlingData.Mass, VehicleManager.Instance.massToHealthExponent); foreach (var pair in _frames.Where(x => x.Name.StartsWith("door_"))) {