Made basic medical bleeding information work with new damage system

This commit is contained in:
Glowbal 2015-09-05 11:57:17 +02:00
parent 39ff82e764
commit 130569c485
2 changed files with 7 additions and 6 deletions

View File

@ -21,7 +21,7 @@ params ["_target", "_player", "_selectionN", "_actionData"];
if (GVAR(level) < 2) exitwith {
private ["_pointDamage"];
_pointDamage = _target getHitPointDamage (["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"] select _selectionN);
_pointDamage = (_target getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]) select _selectionN;
if (_pointDamage >= 0.8) exitWith {
_actionData set [2, QUOTE(PATHTOF(UI\icons\medical_crossRed.paa))];

View File

@ -105,11 +105,12 @@ if (EGVAR(medical,level) >= 2) then {
} forEach _bandagedwounds;
} else {
_damaged = [true, true, true, true, true, true];
{
_selectionBloodLoss set [_forEachIndex, _target getHitPointDamage _x];
if (_target getHitPointDamage _x > 0 && _forEachIndex == _selectionN) then {
_pointDamage = _target getHitPointDamage _x;
{
_selectionBloodLoss set [_forEachIndex, _x];
if (_x > 0 && _forEachIndex == _selectionN) then {
_pointDamage = _x;
_severity = switch (true) do {
case (_pointDamage > 0.5): {localize ELSTRING(medical,HeavilyWounded)};
case (_pointDamage > 0.1): {localize ELSTRING(medical,LightlyWounded)};
@ -125,7 +126,7 @@ if (EGVAR(medical,level) >= 2) then {
] select _forEachIndex);
_allInjuryTexts pushBack [format ["%1 %2", _severity, toLower _part], [1,1,1,1]];
};
} forEach ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"];
} forEach (_target getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]);
};
[_selectionBloodLoss, _display] call FUNC(updateBodyImage);