Hit Reactions - Add check for disabled damage (#8474)

This commit is contained in:
GhostIsSpooky 2021-10-10 11:04:54 -03:00 committed by GitHub
parent 7bf9f3112e
commit 755c5ea50d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,6 +22,9 @@ params ["_unit", "_firer", "_damage"];
// exit if system is disabled
if (GVAR(minDamageToTrigger) == -1) exitWith {};
// exit if damage is disabled on unit
if !(isDamageAllowed _unit && {_unit getVariable [QEGVAR(medical,allowDamage), true]}) exitWith {};
// don't fall after minor damage
if (_damage < GVAR(minDamageToTrigger)) exitWith {};