don't apply explosion force 2 times

This commit is contained in:
in0finite 2020-06-21 15:33:19 +02:00
parent aaf9af8c3f
commit 44fe30d8df
3 changed files with 5 additions and 3 deletions

View file

@ -23335,7 +23335,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 0ac1691131a8c844dafe8b6ace6a172a, type: 3}
m_Name:
m_EditorClassIdentifier:
explosionForce: 20
explosionForce: 500
upwardsModifier: 3
radius: 10
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0

View file

@ -206,7 +206,7 @@ namespace SanAndreasUnity.Behaviours.Vehicles
rigidBody.mass = mass;
rigidBody.drag = 0.05f;
rigidBody.maxDepenetrationVelocity = VehicleManager.Instance.explosionLeftoverPartsMaxDepenetrationVelocity;
rigidBody.AddExplosionForce(explosionForce, explosionCenter, explosionRadius);
//rigidBody.AddExplosionForce(explosionForce, explosionCenter, explosionRadius);
Object.Destroy(meshFilter.gameObject, VehicleManager.Instance.explosionLeftoverPartsLifetime * Random.Range(0.8f, 1.2f));
}

@ -1 +1 @@
Subproject commit 2cfe2611ba93a0cd8f61e68f6989d8fa7f6357f0
Subproject commit e2abbfcf853f5c7b3a5fe891df0b08ffa396afd4