Skip to content

Commit

Permalink
Hit Reactions - Add check for disabled damage (#8474)
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkIsGrim authored Oct 10, 2021
1 parent 7bf9f31 commit 755c5ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions addons/hitreactions/functions/fnc_fallDown.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {};

Expand Down

0 comments on commit 755c5ea

Please sign in to comment.