mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
fixed #312 Error occurred with undefined damageTypes. In this case; getting run over by a vehicle.
This commit is contained in:
parent
b18d704686
commit
c210efcef0
@ -52,7 +52,12 @@ if (GVAR(level) >= 2) then {
|
||||
if (_damageReturn > 0.9) then {
|
||||
|
||||
_typeOfDamage = [_projectile] call FUNC(getTypeOfDamage);
|
||||
_minLethalDamage = GVAR(minLethalDamages) select (GVAR(allAvailableDamageTypes) find _typeOfDamage);
|
||||
|
||||
_typeIndex = (GVAR(allAvailableDamageTypes) find _typeOfDamage);
|
||||
_minLethalDamage = 0.01;
|
||||
if (_typeIndex >= 0) then {
|
||||
_minLethalDamage = GVAR(minLethalDamages) select _typeIndex;
|
||||
};
|
||||
|
||||
_hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"];
|
||||
_newDamage = _damage - (damage _unit);
|
||||
|
Loading…
Reference in New Issue
Block a user