Setting for getting rid of hitpoint damage after adv medical damage

This commit is contained in:
Glowbal 2015-04-07 21:06:48 +02:00
parent c823826f17
commit ffbe9f0c71
2 changed files with 9 additions and 2 deletions

View File

@ -113,4 +113,8 @@ class ACE_Settings {
typeName = "BOOL";
value = 1;
};
class GVAR(healHitPointAfterAdvBandage) {
typeName = "BOOL";
value = 1;
};
};

View File

@ -96,8 +96,11 @@ if (_impact > 0 && {GVAR(enableAdvancedWounds)}) then {
};
// If all wounds have been bandaged, we will reset all damage to 0, so the unit is not showing any blood on the model anymore.
if (count _openWounds == 0) then {
_target setDamage 0;
if (GVAR(healHitPointAfterAdvBandage) && {{(_x select 2) == _part && {_x select 3 > 0}}count _openWounds == 0}) then {
_hitSelections = ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"];
_hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"];
_point = _hitPoints select (_hitSelections find _selectionName);
[_target, _point, 0] call FUNC(setHitPointDamage);
// _target setvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true];
};