ped can be damaged by explosion

This commit is contained in:
in0finite 2020-06-27 22:00:10 +02:00
parent 9d18c2ec55
commit 16bd731403

View file

@ -95,7 +95,9 @@ namespace SanAndreasUnity.Behaviours
DamageInfo damageInfo = this.Damageable.LastDamageInfo;
float amount = this.PlayerModel.GetAmountOfDamageForBone(damageInfo.raycastHitTransform, damageInfo.amount);
float amount = damageInfo.raycastHitTransform != null
? this.PlayerModel.GetAmountOfDamageForBone(damageInfo.raycastHitTransform, damageInfo.amount)
: damageInfo.amount;
this.Health -= amount;