mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
switched back to old init method
This commit is contained in:
parent
d1fabf9733
commit
f6bbeb6bd6
@ -4,4 +4,7 @@ private ["_unit"];
|
||||
_unit = _this select 0;
|
||||
|
||||
_unit addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}];
|
||||
[_unit] call FUNC(init);
|
||||
|
||||
if (local _unit) then {
|
||||
[_unit] call FUNC(init);
|
||||
};
|
||||
|
@ -6,7 +6,7 @@ _unit = _this select 0;
|
||||
|
||||
if !(local _unit) exitWith {};
|
||||
|
||||
[_unit, true] call FUNC(init);
|
||||
[_unit] call FUNC(init);
|
||||
|
||||
//Reset captive status for respawning unit
|
||||
if (!(_unit getVariable ["ACE_isUnconscious", false])) then {
|
||||
|
@ -16,22 +16,19 @@
|
||||
private ["_unit", "_allUsedMedication", "_logs", "_forceNew"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_forceNew = if (count _this > 1) then {_this select 1} else {false};
|
||||
|
||||
if (!(isnil {_unit getvariable QGVAR(pain)}) && !_forceNew) exitwith {};
|
||||
|
||||
_unit setVariable [QGVAR(pain), 0];
|
||||
_unit setVariable [QGVAR(morphine), 0];
|
||||
_unit setVariable [QGVAR(bloodVolume), 100];
|
||||
_unit setVariable [QGVAR(pain), 0, true];
|
||||
_unit setVariable [QGVAR(morphine), 0, true];
|
||||
_unit setVariable [QGVAR(bloodVolume), 100, true];
|
||||
|
||||
// tourniquets
|
||||
_unit setvariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
|
||||
_unit setvariable [QGVAR(tourniquets), [0,0,0,0,0,0], true];
|
||||
|
||||
// wounds and injuries
|
||||
_unit setvariable [QGVAR(openWounds), []];
|
||||
_unit setvariable [QGVAR(bandagedWounds), []];
|
||||
_unit setVariable [QGVAR(internalWounds), []];
|
||||
_unit setvariable [QGVAR(lastUniqueWoundID), 1];
|
||||
_unit setvariable [QGVAR(openWounds), [], true];
|
||||
_unit setvariable [QGVAR(bandagedWounds), [], true];
|
||||
_unit setVariable [QGVAR(internalWounds), [], true];
|
||||
_unit setvariable [QGVAR(lastUniqueWoundID), 1, true];
|
||||
|
||||
// vitals
|
||||
_unit setVariable [QGVAR(heartRate), 80];
|
||||
@ -40,19 +37,19 @@ _unit setvariable [QGVAR(bloodPressure), [80, 120]];
|
||||
_unit setVariable [QGVAR(peripheralResistance), 100];
|
||||
|
||||
// fractures
|
||||
_unit setVariable [QGVAR(fractures), []];
|
||||
_unit setVariable [QGVAR(fractures), [], true];
|
||||
|
||||
// triage card and logs
|
||||
_unit setvariable [QGVAR(triageLevel), 0];
|
||||
_unit setvariable [QGVAR(triageCard), []];
|
||||
_unit setvariable [QGVAR(triageLevel), 0, true];
|
||||
_unit setvariable [QGVAR(triageCard), [], true];
|
||||
|
||||
// IVs
|
||||
_unit setVariable [QGVAR(salineIVVolume), 0];
|
||||
_unit setVariable [QGVAR(plasmaIVVolume), 0];
|
||||
_unit setVariable [QGVAR(bloodIVVolume), 0];
|
||||
_unit setVariable [QGVAR(salineIVVolume), 0, true];
|
||||
_unit setVariable [QGVAR(plasmaIVVolume), 0, true];
|
||||
_unit setVariable [QGVAR(bloodIVVolume), 0, true];
|
||||
|
||||
// damage storage
|
||||
_unit setvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]];
|
||||
_unit setvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true];
|
||||
|
||||
// airway
|
||||
_unit setvariable [QGVAR(airwayStatus), 100];
|
||||
@ -60,26 +57,26 @@ _unit setVariable [QGVAR(airwayOccluded), false];
|
||||
_unit setvariable [QGVAR(airwayCollapsed), false];
|
||||
|
||||
// generic medical admin
|
||||
_unit setvariable [QGVAR(addedToUnitLoop), false];
|
||||
_unit setvariable [QGVAR(inCardiacArrest), false];
|
||||
_unit setVariable ["ACE_isUnconscious", false];
|
||||
_unit setvariable [QGVAR(hasLostBlood), false];
|
||||
_unit setvariable [QGVAR(isBleeding), false];
|
||||
_unit setvariable [QGVAR(hasPain), false];
|
||||
_unit setvariable [QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)];
|
||||
_unit setvariable [QGVAR(addedToUnitLoop), false, true];
|
||||
_unit setvariable [QGVAR(inCardiacArrest), false, true];
|
||||
_unit setVariable ["ACE_isUnconscious", false, true];
|
||||
_unit setvariable [QGVAR(hasLostBlood), false, true];
|
||||
_unit setvariable [QGVAR(isBleeding), false, true];
|
||||
_unit setvariable [QGVAR(hasPain), false, true];
|
||||
_unit setvariable [QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives), true];
|
||||
|
||||
// medication
|
||||
_allUsedMedication = _unit getVariable [QGVAR(allUsedMedication), []];
|
||||
{
|
||||
_unit setvariable [_x select 0, nil];
|
||||
} foreach _allUsedMedication;
|
||||
_unit setVariable [QGVAR(allUsedMedication), []];
|
||||
_unit setVariable [QGVAR(allUsedMedication), [], true];
|
||||
|
||||
_logs = _unit getvariable [QGVAR(allLogs), []];
|
||||
{
|
||||
_unit setvariable [_x, nil];
|
||||
} foreach _logs;
|
||||
_unit setvariable [QGVAR(allLogs), []];
|
||||
_unit setvariable [QGVAR(allLogs), [], true];
|
||||
|
||||
// items
|
||||
[{
|
||||
|
Loading…
Reference in New Issue
Block a user