mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
staged work
This commit is contained in:
parent
af255604ac
commit
c88479d54d
@ -59,20 +59,30 @@ if (isClass (_config >> _className)) then {
|
||||
_bandagedWounds = _target getvariable [QGVAR(bandagedWounds), []];
|
||||
_exist = false;
|
||||
_injuryId = _injury select 0;
|
||||
_bandagedInjury = [];
|
||||
{
|
||||
if ((_x select 0) == _injuryId) exitwith {
|
||||
_exist = true;
|
||||
_existingInjury = _x;
|
||||
_existingInjury set [3, (_existingInjury select 3) + _impact];
|
||||
_bandagedWounds set [_foreachIndex, _existingInjury];
|
||||
|
||||
_bandagedInjury = _existingInjury;
|
||||
};
|
||||
}foreach _bandagedWounds;
|
||||
|
||||
if !(_exist) then {
|
||||
// [ID, classID, bodypart, percentage treated, bloodloss rate]
|
||||
_bandagedWounds pushback [_injuryId, _injury select 1, _injury select 2, _impact, _injury select 4];
|
||||
_bandagedInjury = [_injuryId, _injury select 1, _injury select 2, _impact, _injury select 4];
|
||||
_bandagedWounds pushback _bandagedInjury;
|
||||
};
|
||||
|
||||
_target setvariable [QGVAR(bandagedWounds), _bandagedWounds, !USE_WOUND_EVENT_SYNC];
|
||||
|
||||
if (USE_WOUND_EVENT_SYNC) then {
|
||||
// sync _bandagedInjury
|
||||
|
||||
};
|
||||
_target setvariable [QGVAR(bandagedWounds), _bandagedWounds, true];
|
||||
|
||||
// Check if we are ever going to reopen this
|
||||
if (random(1) <= _reopeningChance) then {
|
||||
@ -109,7 +119,7 @@ if (random(1) <= _reopeningChance) then {
|
||||
}foreach _bandagedWounds;
|
||||
|
||||
if (_exist) then {
|
||||
_target setvariable [QGVAR(bandagedWounds), _bandagedWounds, true];
|
||||
_target setvariable [QGVAR(bandagedWounds), _bandagedWounds, !USE_WOUND_EVENT_SYNC];
|
||||
};
|
||||
};
|
||||
// Otherwise something went wrong, we we don't reopen them..
|
||||
|
@ -28,6 +28,7 @@ _unit setvariable [QGVAR(tourniquets), [0,0,0,0,0,0], true];
|
||||
_unit setvariable [QGVAR(openWounds), [], true];
|
||||
_unit setvariable [QGVAR(bandagedWounds), [], true];
|
||||
_unit setVariable [QGVAR(internalWounds), [], true];
|
||||
_unit setvariable [QGVAR(lastUniqueWoundID), 1];
|
||||
|
||||
// vitals
|
||||
_unit setVariable [QGVAR(heartRate), 80];
|
||||
|
@ -92,7 +92,8 @@ if (USE_WOUND_EVENT_SYNC) then {
|
||||
};
|
||||
// Handle the reopening of bandaged wounds
|
||||
if (_impact > 0 && {GVAR(enableAdvancedWounds)}) then {
|
||||
[_target, _impact, _part, _mostEffectiveSpot, _mostEffectiveInjury, _bandage] call FUNC(handleBandageOpening);
|
||||
// TODO temp disabled until bandaged wounds are supported by event sync.
|
||||
// [_target, _impact, _part, _mostEffectiveSpot, _mostEffectiveInjury, _bandage] call FUNC(handleBandageOpening);
|
||||
};
|
||||
|
||||
// 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.
|
||||
|
Loading…
Reference in New Issue
Block a user