Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion addons/medical_status/functions/fnc_getBloodLoss.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ private _woundBleeding = GET_WOUND_BLEEDING(_unit);
if (_woundBleeding == 0) exitWith {0};

private _cardiacOutput = [_unit] call FUNC(getCardiacOutput);
private _resistance = _unit getVariable [VAR_PERIPH_RES, DEFAULT_PERIPH_RES]; // can use value directly since this is sum of default and adjustments

// even if heart stops blood will still flow slowly (gravity)
private _bloodLoss = (_woundBleeding * (_cardiacOutput max CARDIAC_OUTPUT_MIN) * EGVAR(medical,bleedingCoefficient));
private _bloodLoss = (_woundBleeding * (_cardiacOutput max CARDIAC_OUTPUT_MIN) * (DEFAULT_PERIPH_RES / _resistance) * EGVAR(medical,bleedingCoefficient));

private _eventArgs = [_unit, _bloodLoss]; // Pass by reference

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@

params ["_unit", "_peripheralResistanceAdjustment", "_deltaT", "_syncValue"];

_unit setVariable [VAR_PERIPH_RES, 0 max (DEFAULT_PERIPH_RES + _peripheralResistanceAdjustment), _syncValue];
_unit setVariable [VAR_PERIPH_RES, 1 max (DEFAULT_PERIPH_RES + _peripheralResistanceAdjustment), _syncValue];