mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add support to toggle allowDamage (#6266)
This commit is contained in:
parent
3bbc1d21e4
commit
0e50aca9d8
@ -46,6 +46,9 @@ if (_hitPointIndex < 0) then {
|
||||
_unit setVariable [HIT_CRASH, -1];
|
||||
};
|
||||
|
||||
// Damage can be disabled with old variable or via sqf command allowDamage
|
||||
if !(isDamageAllowed _unit && _unit getVariable [QEGVAR(medical,allowDamage), true]) exitWith {_oldDamage};
|
||||
|
||||
private _newDamage = _damage - _oldDamage;
|
||||
_unit setVariable [format [QGVAR($%1), _hitPoint], _newDamage];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user