Skip to content

Commit

Permalink
Backblast - Fix damage disabled units receiving damage from backblast (
Browse files Browse the repository at this point in the history
…acemod#7505)

* Fix damage disabled units receiving damage from backblast

* Add variable check
  • Loading branch information
diwako authored Feb 7, 2020
1 parent 10fa22f commit 65e1601
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions addons/overpressure/functions/fnc_overpressureDamage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,13 @@ TRACE_3("cache",_overpressureAngle,_overpressureRange,_overpressureDamage);
// If the target is the ACE_player
if (_x == ACE_player) then {[_damage * 100] call BIS_fnc_bloodEffect};

if (isClass (configFile >> "CfgPatches" >> "ACE_Medical")) then {
[_x, _damage, "body", "backblast", _firer] call EFUNC(medical,addDamageToUnit);
} else {
TRACE_1("",isDamageAllowed _x);
if (!isDamageAllowed _x) exitWith {}; // Skip damage if not allowed
_x setDamage (damage _x + _damage);
TRACE_1("",isDamageAllowed _x);
if (isDamageAllowed _x && {_x getVariable [QEGVAR(medical,allowDamage), true]}) then {
if (isClass (configFile >> "CfgPatches" >> "ACE_Medical")) then {
[_x, _damage, "body", "backblast", _firer] call EFUNC(medical,addDamageToUnit);
} else {
_x setDamage (damage _x + _damage);
};
};

#ifdef DEBUG_MODE_FULL
Expand Down

0 comments on commit 65e1601

Please sign in to comment.