mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Change getBloodLoss to expect an array
This commit is contained in:
parent
f6eeb5e3ba
commit
74ca85cbd9
@ -131,7 +131,7 @@ GVAR(effectTimeBlood) = time;
|
||||
};
|
||||
};
|
||||
|
||||
_bleeding = ACE_player call FUNC(getBloodLoss);
|
||||
_bleeding = [ACE_player] call FUNC(getBloodLoss);
|
||||
// Bleeding Indicator
|
||||
if (_bleeding > 0 and GVAR(effectTimeBlood) + 3.5 < time) then {
|
||||
GVAR(effectTimeBlood) = time;
|
||||
@ -250,7 +250,7 @@ if (USE_WOUND_EVENT_SYNC) then {
|
||||
[
|
||||
{(((_this select 0) getvariable [QGVAR(bloodVolume), 100]) < 65)},
|
||||
{(((_this select 0) getvariable [QGVAR(pain), 0]) > 0.9)},
|
||||
{(((_this select 0) call FUNC(getBloodLoss)) > 0.25)},
|
||||
{(([_this select 0] call FUNC(getBloodLoss)) > 0.25)},
|
||||
{((_this select 0) getvariable [QGVAR(inReviveState), false])},
|
||||
{((_this select 0) getvariable [QGVAR(inCardiacArrest), false])},
|
||||
{((_this select 0) getvariable ["ACE_isDead", false])},
|
||||
|
@ -15,15 +15,17 @@
|
||||
|
||||
#define BLOODLOSSRATE_BASIC 0.2
|
||||
|
||||
private ["_totalBloodLoss","_tourniquets","_openWounds", "_value", "_cardiacOutput", "_internalWounds"];
|
||||
// TODO Only use this calculation if medium or higher, otherwise use vanilla calculations (for basic medical).
|
||||
private ["_unit", "_totalBloodLoss","_tourniquets","_openWounds", "_value", "_cardiacOutput", "_internalWounds"];
|
||||
|
||||
_unit = _this select 0;
|
||||
|
||||
_totalBloodLoss = 0;
|
||||
|
||||
// Advanced medical bloodloss handling
|
||||
if (GVAR(level) >= 2) then {
|
||||
_tourniquets = _this getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
|
||||
_openWounds = _this getvariable [QGVAR(openWounds), []];
|
||||
//_cardiacOutput = [_this] call FUNC(getCardiacOutput);
|
||||
_tourniquets = _unit getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
|
||||
_openWounds = _unit getvariable [QGVAR(openWounds), []];
|
||||
//_cardiacOutput = [_unit] call FUNC(getCardiacOutput);
|
||||
|
||||
{
|
||||
if ((_tourniquets select (_x select 2)) == 0) then {
|
||||
@ -34,7 +36,7 @@ if (GVAR(level) >= 2) then {
|
||||
};
|
||||
}foreach _openWounds;
|
||||
|
||||
_internalWounds = _this getvariable [QGVAR(internalWounds), []];
|
||||
_internalWounds = _unit getvariable [QGVAR(internalWounds), []];
|
||||
{
|
||||
_totalBloodLoss = _totalBloodLoss + ((_x select 4) * (_x select 3));
|
||||
}foreach _internalWounds;
|
||||
@ -42,6 +44,6 @@ if (GVAR(level) >= 2) then {
|
||||
// cap the blood loss to be no greater as the current cardiac output
|
||||
//(_totalBloodLoss min _cardiacOutput);
|
||||
} else {
|
||||
_totalBloodLoss = BLOODLOSSRATE_BASIC * (damage _this);
|
||||
_totalBloodLoss = BLOODLOSSRATE_BASIC * (damage _unit);
|
||||
};
|
||||
_totalBloodLoss * (GVAR(bleedingCoefficient) max 0);
|
||||
|
@ -34,7 +34,7 @@ private ["_unit","_bloodVolume","_bloodVolumeChange", "_ivVolume"];
|
||||
_unit = _this select 0;
|
||||
|
||||
_bloodVolume = _unit getvariable [QGVAR(bloodVolume), 100];
|
||||
_bloodVolumeChange = -(_unit call FUNC(getBloodLoss));
|
||||
_bloodVolumeChange = -([_unit] call FUNC(getBloodLoss));
|
||||
|
||||
if (_bloodVolume < 100.0) then {
|
||||
{
|
||||
|
@ -20,7 +20,7 @@ _unit = _this select 0;
|
||||
_hrIncrease = 0;
|
||||
if (!(_unit getvariable [QGVAR(inCardiacArrest),false])) then {
|
||||
_heartRate = _unit getvariable [QGVAR(heartRate), 80];
|
||||
_bloodLoss = _unit call FUNC(getBloodLoss);
|
||||
_bloodLoss = [_unit] call FUNC(getBloodLoss);
|
||||
|
||||
_adjustment = _unit getvariable [QGVAR(heartRateAdjustments), []];
|
||||
{
|
||||
@ -83,4 +83,4 @@ if (!(_unit getvariable [QGVAR(inCardiacArrest),false])) then {
|
||||
_hrIncrease = _hrIncrease - HEART_RATE_MODIFIER;
|
||||
};
|
||||
};
|
||||
_hrIncrease
|
||||
_hrIncrease
|
||||
|
@ -43,7 +43,7 @@ if (_bloodVolume < 90) then {
|
||||
};
|
||||
};
|
||||
|
||||
if ((_unit call FUNC(getBloodLoss)) > 0) then {
|
||||
if (([_unit] call FUNC(getBloodLoss)) > 0) then {
|
||||
if !(_unit getvariable [QGVAR(isBleeding), false]) then {
|
||||
_unit setvariable [QGVAR(isBleeding), true, true];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user