mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Medical Engine - Exit early if incoming damage is 0 (#9733)
This commit is contained in:
parent
caa4018623
commit
a684e874fb
@ -32,6 +32,11 @@ if (_hitPoint isEqualTo "") then {
|
|||||||
if !(isDamageAllowed _unit && {_unit getVariable [QEGVAR(medical,allowDamage), true]}) exitWith {_oldDamage};
|
if !(isDamageAllowed _unit && {_unit getVariable [QEGVAR(medical,allowDamage), true]}) exitWith {_oldDamage};
|
||||||
|
|
||||||
private _newDamage = _damage - _oldDamage;
|
private _newDamage = _damage - _oldDamage;
|
||||||
|
|
||||||
|
// Happens occasionally for vehiclehit events (see line 80 onwards)
|
||||||
|
// Just exit early to save some frametime
|
||||||
|
if (_newDamage == 0) exitWith {_oldDamage};
|
||||||
|
|
||||||
// Get scaled armor value of hitpoint and calculate damage before armor
|
// Get scaled armor value of hitpoint and calculate damage before armor
|
||||||
// We scale using passThrough to handle explosive-resistant armor properly (#9063)
|
// We scale using passThrough to handle explosive-resistant armor properly (#9063)
|
||||||
// We need realDamage to determine which limb was hit correctly
|
// We need realDamage to determine which limb was hit correctly
|
||||||
|
Loading…
Reference in New Issue
Block a user