Skip to content

Commit

Permalink
Merge branch 'master' into medRW-ai
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror committed Jun 23, 2019
2 parents 229a6a3 + f04b26b commit 1b428d8
Show file tree
Hide file tree
Showing 63 changed files with 384 additions and 171 deletions.
4 changes: 2 additions & 2 deletions addons/common/functions/fnc_isEOD.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
* is the unit an EOD <BOOL>
*
* Example:
* isSpecialist = [player] call FUNC(isEOD);
* [player] call ace_common_fnc_isEOD
*
* Public: Yes
*/

params ["_unit"];

_unit getVariable ["ACE_isEOD", _unit getUnitTrait "explosiveSpecialist"] // return
(_unit getVariable ["ACE_isEOD", _unit getUnitTrait "explosiveSpecialist"]) in [1, true]
6 changes: 3 additions & 3 deletions addons/medical/dev/watchVariable.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -85,23 +85,23 @@

// Wounds:
_return pushBack "------- Wounds: -------";
private _wounds = _unit getVariable [QEGVAR(medical,openWounds), []];
private _wounds = GET_OPEN_WOUNDS(_unit);
{
_x params ["_xClassID", "_xBodyPartN", "_xAmountOf", "_xBleeding", "_xDamage"];
_return pushBack format ["%1: [%2] [x%3] [Bld: %4] [Dmg: %5]", ALL_SELECTIONS select _xBodyPartN, _xClassID, _xAmountOf toFixed 1, _xBleeding toFixed 4, _xDamage toFixed 2];
} forEach _wounds;

// Bandaged Wounds:
_return pushBack "------- Bandaged Wounds: -------";
private _wounds = _unit getVariable [QEGVAR(medical,bandagedWounds), []];
private _wounds = GET_BANDAGED_WOUNDS(_unit);
{
_x params ["_xClassID", "_xBodyPartN", "_xAmountOf", "_xBleeding", "_xDamage"];
_return pushBack format ["%1: [%2] [x%3] [Bld: %4] [Dmg: %5]", ALL_SELECTIONS select _xBodyPartN, _xClassID, _xAmountOf toFixed 1, _xBleeding toFixed 4, _xDamage toFixed 2];
} forEach _wounds;

// Stitched Wounds:
_return pushBack "------- Stitched Wounds: -------";
private _wounds = _unit getVariable [QEGVAR(medical,stitchedWounds), []];
private _wounds = GET_STITCHED_WOUNDS(_unit);
{
_x params ["_xClassID", "_xBodyPartN", "_xAmountOf", "_xBleeding", "_xDamage"];
_return pushBack format ["%1: [%2] [x%3] [Bld: %4] [Dmg: %5]", ALL_SELECTIONS select _xBodyPartN, _xClassID, _xAmountOf toFixed 1, _xBleeding toFixed 4, _xDamage toFixed 2];
Expand Down
10 changes: 5 additions & 5 deletions addons/medical_damage/ACE_Medical_Injuries.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// bleeding - maximum possible bleeding rate for a given wound type (0 .. 1)
// bleeding - maximum possible percentage of cardiac output bled for a given wound type (0 .. 1)
// pain - maximum possible pain level for a given wound type (0 .. 1)

class ACE_Medical_Injuries {
Expand All @@ -16,15 +16,15 @@ class ACE_Medical_Injuries {
// Occur when an entire structure or part of it is forcibly pulled away, such as the loss of a permanent tooth or an ear lobe. Explosions, gunshots, and animal bites may cause avulsions.
class Avulsion {
causes[] = {"explosive", "vehiclecrash", "collision", "grenade", "shell", "bullet", "backblast", "bite"};
bleeding = 0.25;
bleeding = 0.1;
pain = 1.0;
minDamage = 0.01;
causeLimping = 1;
};
// Also called bruises, these are the result of a forceful trauma that injures an internal structure without breaking the skin. Blows to the chest, abdomen, or head with a blunt instrument (e.g. a football or a fist) can cause contusions.
class Contusion {
causes[] = {"bullet", "backblast", "punch", "vehiclecrash", "collision", "falling"};
bleeding = 0.0;
bleeding = 0;
pain = 0.3;
minDamage = 0.02;
maxDamage = 0.35;
Expand All @@ -41,7 +41,7 @@ class ACE_Medical_Injuries {
// Slicing wounds made with a sharp instrument, leaving even edges. They may be as minimal as a paper cut or as significant as a surgical incision.
class Cut {
causes[] = {"vehiclecrash", "collision", "grenade", "explosive", "shell", "backblast", "stab", "unknown"};
bleeding = 0.04;
bleeding = 0.01;
pain = 0.1;
minDamage = 0.1;
};
Expand All @@ -56,7 +56,7 @@ class ACE_Medical_Injuries {
// Also called velocity wounds, they are caused by an object entering the body at a high speed, typically a bullet or small peices of shrapnel.
class VelocityWound {
causes[] = {"bullet", "grenade","explosive", "shell", "unknown"};
bleeding = 0.5;
bleeding = 0.2;
pain = 0.9;
minDamage = 0.35;
causeLimping = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ _bodyPartDamage params ["_headDamage", "_bodyDamage", "_leftArmDamage", "_rightA
if (_bodyPartN == 1 && {_damage < PENETRATION_THRESHOLD}) then {
_bodyDamage = _bodyDamage - (_amountOf * _damage);
};
} forEach (_unit getVariable [QEGVAR(medical,openWounds), []]);
} forEach GET_OPEN_WOUNDS(_unit);

private _damageThreshold = [
EGVAR(medical,AIDamageThreshold),
Expand Down
6 changes: 3 additions & 3 deletions addons/medical_damage/functions/fnc_woundsHandler.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if (isNil {GVAR(allDamageTypesData) getVariable _typeOfDamage} ) then {
};

// Administration for open wounds and ids
private _openWounds = _unit getVariable [QEGVAR(medical,openWounds), []];
private _openWounds = GET_OPEN_WOUNDS(_unit);
private _woundID = _unit getVariable [QEGVAR(medical,lastUniqueWoundID), 1]; // Unique wound ids are not used anywhere: ToDo Remove from openWounds array

TRACE_4("extension call",_bodyPart,_damage,_typeOfDamage,_woundID);
Expand Down Expand Up @@ -128,7 +128,7 @@ private _bodyPartVisParams = [_unit, false, false, false, false]; // params arra
};
} forEach _woundsCreated;

_unit setVariable [QEGVAR(medical,openWounds), _openWounds, true];
_unit setVariable [VAR_OPEN_WOUNDS, _openWounds, true];
_unit setVariable [QEGVAR(medical,bodyPartDamage), _bodyPartDamage, true];

[_unit] call EFUNC(medical_status,updateWoundBloodLoss);
Expand All @@ -141,4 +141,4 @@ if (_critialDamage || {_painLevel > PAIN_UNCONSCIOUS}) then {
[_unit] call FUNC(handleIncapacitation);
};

TRACE_5("exit",_unit,_painLevel,GET_PAIN(_unit),_unit getVariable QEGVAR(medical,openWounds),_woundsCreated);
TRACE_5("exit",_unit,_painLevel,GET_PAIN(_unit),GET_OPEN_WOUNDS(_unit),_woundsCreated);
34 changes: 20 additions & 14 deletions addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private _allPossibleInjuries = [];
if (_highestPossibleSpot < 0) exitWith { TRACE_2("no wounds possible",_damage,_highestPossibleSpot); };

// Administration for open wounds and ids
private _openWounds = _unit getVariable [QEGVAR(medical,openWounds), []];
private _openWounds = GET_OPEN_WOUNDS(_unit);

private _updateDamageEffects = false;
private _painLevel = 0;
Expand All @@ -75,11 +75,11 @@ private _bodyPartVisParams = [_unit, false, false, false, false]; // params arra

{
_x params ["_thresholdMinDam", "_thresholdWoundCount"];
if (_thresholdMinDam <= _damage) exitWith {
if (_damage > _thresholdMinDam) exitWith {
private _woundDamage = _damage / (_thresholdWoundCount max 1); // If the damage creates multiple wounds
for "_i" from 1 to _thresholdWoundCount do {
// Find the injury we are going to add. Format [ classID, allowdSelections, bleedingRate, injuryPain]
private _oldInjury = if (random 1 >= 0.85) then {
// Find the injury we are going to add. Format [ classID, allowedSelections, bleedingRate, injuryPain]
private _oldInjury = if (random 1 < 0.15) then {
_woundTypes select _highestPossibleSpot
} else {
selectRandom _allPossibleInjuries
Expand All @@ -93,17 +93,24 @@ private _bodyPartVisParams = [_unit, false, false, false, false]; // params arra
_bodyPartVisParams set [[1,2,3,3,4,4] select _bodyPartNToAdd, true]; // Mark the body part index needs updating


// The higher the nastiness likelihood the higher the change to get a painful and bloody wound
private _nastinessLikelihood = linearConversion [0, 20, (_woundDamage / _thresholdWoundCount), 0.5, 30, true];
private _bleedingModifier = 0.25 + 8 * exp ((random [-4.5, -5, -6]) / _nastinessLikelihood);
private _painModifier = 0.05 + 2 * exp (-2 / _nastinessLikelihood);
// Damage to limbs/head is scaled higher than torso by engine
// Anything above this value is guaranteed worst wound possible
private _worstDamage = [2, 1, 4, 4, 4, 4] select _bodyPartNToAdd;

private _bleeding = _injuryBleedingRate * _bleedingModifier;
// More wounds means more likely to get nasty wound
private _countModifier = 1 + random(_i - 1);

// Config specifies bleeding and pain for worst possible wound
// Worse wound correlates to higher damage, damage is not capped at 1
private _bleedModifier = linearConversion [0.1, _worstDamage, _woundDamage * _countModifier, 0.25, 1, true];
private _painModifier = (_bleedModifier * random [0.7, 1, 1.3]) min 1; // Pain isn't directly scaled to bleeding

private _bleeding = _injuryBleedingRate * _bleedModifier;
private _pain = _injuryPain * _painModifier;
_painLevel = _painLevel + _pain;

// wound category (minor [0..0.5], medium[0.5..1.0], large[1.0+])
private _category = floor linearConversion [0, 1, _bleedingModifier, 0, 2, true];
// wound category (minor [0.25-0.5], medium [0.5-0.75], large [0.75+])
private _category = floor linearConversion [0.25, 0.75, _bleedModifier, 0, 2, true];

private _classComplex = 10 * _woundClassIDToAdd + _category;

Expand Down Expand Up @@ -135,7 +142,6 @@ private _bodyPartVisParams = [_unit, false, false, false, false]; // params arra
};
case (_causeFracture && {EGVAR(medical,fractures) > 0} && {_bodyPartNToAdd > 1} && {_woundDamage > FRACTURE_DAMAGE_THRESHOLD}): {
TRACE_1("limb fracture",_bodyPartNToAdd);
// todo: play sound?
private _fractures = GET_FRACTURES(_unit);
_fractures set [_bodyPartNToAdd, 1];
_unit setVariable [VAR_FRACTURES, _fractures, true];
Expand Down Expand Up @@ -180,7 +186,7 @@ if (_updateDamageEffects) then {
[_unit] call EFUNC(medical_engine,updateDamageEffects);
};

_unit setVariable [QEGVAR(medical,openWounds), _openWounds, true];
_unit setVariable [VAR_OPEN_WOUNDS, _openWounds, true];
_unit setVariable [QEGVAR(medical,bodyPartDamage), _bodyPartDamage, true];

[_unit] call EFUNC(medical_status,updateWoundBloodLoss);
Expand All @@ -193,4 +199,4 @@ if (_critialDamage || {_painLevel > PAIN_UNCONSCIOUS}) then {
[_unit] call FUNC(handleIncapacitation);
};

TRACE_4("exit",_unit,_painLevel,GET_PAIN(_unit),_unit getVariable QEGVAR(medical,openWounds));
TRACE_4("exit",_unit,_painLevel,GET_PAIN(_unit),GET_OPEN_WOUNDS(_unit));
4 changes: 2 additions & 2 deletions addons/medical_engine/functions/fnc_updateDamageEffects.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ if (EGVAR(medical,fractures) > 0) then {
};

if (!_isLimping && {EGVAR(medical,limping) > 0}) then {
private _woundsToCheck = _unit getVariable [QEGVAR(medical,openWounds), []];
private _woundsToCheck = GET_OPEN_WOUNDS(_unit);
if (EGVAR(medical,limping) == 2) then {
_woundsToCheck = _woundsToCheck + (_unit getVariable [QEGVAR(medical,bandagedWounds), []]); // do not append
_woundsToCheck = _woundsToCheck + GET_BANDAGED_WOUNDS(_unit); // do not append
};
{
_x params ["_xClassID", "_xBodyPartN", "_xAmountOf", "", "_xDamage"];
Expand Down
2 changes: 1 addition & 1 deletion addons/medical_engine/script_component.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define COMPONENT medical_engine
#define COMPONENT_BEAUTIFIED Medical (Engine)
#define COMPONENT_BEAUTIFIED Medical Engine
#include "\z\ace\addons\main\script_mod.hpp"

// #define DEBUG_MODE_FULL
Expand Down
52 changes: 29 additions & 23 deletions addons/medical_engine/script_macros_medical.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,38 +118,44 @@
// - Unit Variables ----------------------------------------------------
// These variables get stored in object space and used across components
// Defined here for easy consistency with GETVAR/SETVAR (also a list for reference)
#define VAR_BLOOD_PRESS QEGVAR(medical,bloodPressure)
#define VAR_BLOOD_VOL QEGVAR(medical,bloodVolume)
#define VAR_WOUND_BLEEDING QEGVAR(medical,woundBleeding)
#define VAR_CRDC_ARRST QEGVAR(medical,inCardiacArrest)
#define VAR_HEART_RATE QEGVAR(medical,heartRate)
#define VAR_PAIN QEGVAR(medical,pain)
#define VAR_PAIN_SUPP QEGVAR(medical,painSuppress)
#define VAR_PERIPH_RES QEGVAR(medical,peripheralResistance)
#define VAR_UNCON "ACE_isUnconscious"
#define VAR_BLOOD_PRESS QEGVAR(medical,bloodPressure)
#define VAR_BLOOD_VOL QEGVAR(medical,bloodVolume)
#define VAR_WOUND_BLEEDING QEGVAR(medical,woundBleeding)
#define VAR_CRDC_ARRST QEGVAR(medical,inCardiacArrest)
#define VAR_HEART_RATE QEGVAR(medical,heartRate)
#define VAR_PAIN QEGVAR(medical,pain)
#define VAR_PAIN_SUPP QEGVAR(medical,painSuppress)
#define VAR_PERIPH_RES QEGVAR(medical,peripheralResistance)
#define VAR_UNCON "ACE_isUnconscious"
#define VAR_OPEN_WOUNDS QEGVAR(medical,openWounds)
#define VAR_BANDAGED_WOUNDS QEGVAR(medical,bandagedWounds)
#define VAR_STITCHED_WOUNDS QEGVAR(medical,stitchedWounds)
// These variables track gradual adjustments (from medication, etc.)
#define VAR_MEDICATIONS QEGVAR(medical,medications)
#define VAR_MEDICATIONS QEGVAR(medical,medications)
// These variables track the current state of status values above
#define VAR_HEMORRHAGE QEGVAR(medical,hemorrhage)
#define VAR_IN_PAIN QEGVAR(medical,inPain)
#define VAR_TOURNIQUET QEGVAR(medical,tourniquets)
#define VAR_FRACTURES QEGVAR(medical,fractures)
#define VAR_HEMORRHAGE QEGVAR(medical,hemorrhage)
#define VAR_IN_PAIN QEGVAR(medical,inPain)
#define VAR_TOURNIQUET QEGVAR(medical,tourniquets)
#define VAR_FRACTURES QEGVAR(medical,fractures)

// - Unit Functions ---------------------------------------------------
// Retrieval macros for common unit values
// Defined for easy consistency and speed
#define GET_BLOOD_VOLUME(unit) (unit getVariable [VAR_BLOOD_VOL,DEFAULT_BLOOD_VOLUME])
#define GET_WOUND_BLEEDING(unit) (unit getVariable [VAR_WOUND_BLEEDING,0])
#define GET_HEART_RATE(unit) (unit getVariable [VAR_HEART_RATE,DEFAULT_HEART_RATE])
#define GET_HEMORRHAGE(unit) (unit getVariable [VAR_HEMORRHAGE,0])
#define GET_PAIN(unit) (unit getVariable [VAR_PAIN,0])
#define GET_PAIN_SUPPRESS(unit) (unit getVariable [VAR_PAIN_SUPP,0])
#define GET_BLOOD_VOLUME(unit) (unit getVariable [VAR_BLOOD_VOL, DEFAULT_BLOOD_VOLUME])
#define GET_WOUND_BLEEDING(unit) (unit getVariable [VAR_WOUND_BLEEDING, 0])
#define GET_HEART_RATE(unit) (unit getVariable [VAR_HEART_RATE, DEFAULT_HEART_RATE])
#define GET_HEMORRHAGE(unit) (unit getVariable [VAR_HEMORRHAGE, 0])
#define GET_PAIN(unit) (unit getVariable [VAR_PAIN, 0])
#define GET_PAIN_SUPPRESS(unit) (unit getVariable [VAR_PAIN_SUPP, 0])
#define GET_TOURNIQUETS(unit) (unit getVariable [VAR_TOURNIQUET, DEFAULT_TOURNIQUET_VALUES])
#define GET_FRACTURES(unit) (unit getVariable [VAR_FRACTURES, DEFAULT_FRACTURE_VALUES])
#define IN_CRDC_ARRST(unit) (unit getVariable [VAR_CRDC_ARRST,false])
#define IN_CRDC_ARRST(unit) (unit getVariable [VAR_CRDC_ARRST, false])
#define IS_BLEEDING(unit) (GET_WOUND_BLEEDING(unit) > 0)
#define IS_IN_PAIN(unit) (unit getVariable [VAR_IN_PAIN,false])
#define IS_UNCONSCIOUS(unit) (unit getVariable [VAR_UNCON,false])
#define IS_IN_PAIN(unit) (unit getVariable [VAR_IN_PAIN, false])
#define IS_UNCONSCIOUS(unit) (unit getVariable [VAR_UNCON, false])
#define GET_OPEN_WOUNDS(unit) (unit getVariable [VAR_OPEN_WOUNDS, []])
#define GET_BANDAGED_WOUNDS(unit) (unit getVariable [VAR_BANDAGED_WOUNDS, []])
#define GET_STITCHED_WOUNDS(unit) (unit getVariable [VAR_STITCHED_WOUNDS, []])

// The following function calls are defined here just for consistency
#define GET_BLOOD_LOSS(unit) ([unit] call EFUNC(medical_status,getBloodLoss))
Expand Down
20 changes: 20 additions & 0 deletions addons/medical_feedback/CfgSounds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,24 @@ class CfgSounds {
sound[] = {QPATHTOF(sounds\slow_2.wav), "db+1", 1};
titles[] = {};
};
class ACE_fracture_1 {
name = "ACE_fracture_1";
sound[] = {QPATHTOF(sounds\fracture_1.wav), "db+1", 1};
titles[] = {};
};
class ACE_fracture_2 {
name = "ACE_fracture_2";
sound[] = {QPATHTOF(sounds\fracture_2.wav), "db+1", 1};
titles[] = {};
};
class ACE_fracture_3 {
name = "ACE_fracture_3";
sound[] = {QPATHTOF(sounds\fracture_3.wav), "db+1", 1};
titles[] = {};
};
class ACE_fracture_4 {
name = "ACE_fracture_4";
sound[] = {QPATHTOF(sounds\fracture_4.wav), "db+1", 1};
titles[] = {};
};
};
8 changes: 8 additions & 0 deletions addons/medical_feedback/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@
[_unit, "moan", PAIN_TO_MOAN(_painLevel)] call FUNC(playInjuredSound);
}] call CBA_fnc_addEventHandler;

[QEGVAR(medical,fracture), {
params ["_unit"];

if (_unit == ACE_player) then {
playSound SND_FRACTURE;
};
}] call CBA_fnc_addEventHandler;

if (!hasInterface) exitWith {};

GVAR(nextFadeIn) = 0;
Expand Down
1 change: 1 addition & 0 deletions addons/medical_feedback/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@
#define SND_HEARBEAT_FAST (selectRandom ["ACE_heartbeat_fast_1", "ACE_heartbeat_fast_2", "ACE_heartbeat_fast_3"])
#define SND_HEARBEAT_NORMAL (selectRandom ["ACE_heartbeat_norm_1", "ACE_heartbeat_norm_2"])
#define SND_HEARBEAT_SLOW (selectRandom ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"])
#define SND_FRACTURE (selectRandom ["ACE_fracture_1", "ACE_fracture_2", "ACE_fracture_3", "ACE_fracture_4"])

#define VOL_UNCONSCIOUS 0.25
Binary file added addons/medical_feedback/sounds/fracture_1.wav
Binary file not shown.
Binary file added addons/medical_feedback/sounds/fracture_2.wav
Binary file not shown.
Binary file added addons/medical_feedback/sounds/fracture_3.wav
Binary file not shown.
Binary file added addons/medical_feedback/sounds/fracture_4.wav
Binary file not shown.
2 changes: 1 addition & 1 deletion addons/medical_gui/functions/fnc_modifyAction.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ private _bloodLossOnBodyPart = 0;
if (_bodyPartN == _partIndex) then {
_bloodLossOnBodyPart = _bloodLossOnBodyPart + (_amountOf * _bleeding);
};
} forEach (_target getvariable [QEGVAR(medical,openWounds), []]);
} forEach GET_OPEN_WOUNDS(_target);

private _frBL = 0 max (_bloodLossOnBodyPart / BLOOD_LOSS_RED_THRESHOLD) min 1;
private _colorInt = ceil (_frBL * (BLOOD_LOSS_TOTAL_COLORS - 1)); // ceil because any bleeding more than zero shouldn't be white
Expand Down
29 changes: 29 additions & 0 deletions addons/medical_gui/functions/fnc_onMenuOpen.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,32 @@ if (GVAR(menuPFH) != -1) exitWith {
};

GVAR(menuPFH) = [FUNC(menuPFH), 0, []] call CBA_fnc_addPerFrameHandler;

// Hide categories if they don't have any actions (airway)
private _list = [
[IDC_TRIAGE, true],
[IDC_EXAMINE, true],
[IDC_BANDAGE, "bandage"],
[IDC_MEDICATION, "medication"],
[IDC_AIRWAY, "airway"],
[IDC_ADVANCED, "advanced"],
[IDC_DRAG, "drag"],
[IDC_TOGGLE, true]
];
private _countEnabled = {
_x params ["", "_category"];
if (_category isEqualType "") then { _x set [1, (GVAR(actions) findIf {_category == _x select 1}) > -1]; };
_x select 1
} count _list;
private _offsetX = POS_X(1.5) + 0.5 * (POS_X(12) - POS_X(_countEnabled * 1.5));
{
_x params ["_idc", "_enabled"];
private _ctrl = _display displayCtrl _idc;
if (_enabled) then {
_ctrl ctrlSetPositionX _offsetX;
_ctrl ctrlCommit 0;
_offsetX = _offsetX + POS_W(1.5);
} else {
_ctrl ctrlShow false;
};
} forEach _list;
2 changes: 1 addition & 1 deletion addons/medical_gui/functions/fnc_updateBodyImage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ private _bodyPartBloodLoss = [0, 0, 0, 0, 0, 0];
{
_x params ["", "_bodyPartN", "_amountOf", "_bleeding"];
_bodyPartBloodLoss set [_bodyPartN, (_bodyPartBloodLoss select _bodyPartN) + (_bleeding * _amountOf)];
} forEach (_target getVariable [QEGVAR(medical,openWounds), []]);
} forEach GET_OPEN_WOUNDS(_target);

{
_x params ["_bodyPartIDC", ["_tourniquetIDC", -1], ["_fractureIDC", -1]];
Expand Down
Loading

0 comments on commit 1b428d8

Please sign in to comment.