mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-14 16:27:19 +00:00
ped can be damaged by explosion
This commit is contained in:
parent
9d18c2ec55
commit
16bd731403
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue