mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix QGVAR medical variables
This commit is contained in:
parent
81f1365a41
commit
9b5c5bc866
@ -40,14 +40,14 @@ if (!isNull _instigator) then {
|
||||
};
|
||||
|
||||
#ifdef DEBUG_TESTRESULTS
|
||||
private _startDmg = +(_unit getVariable [QGVAR(medical,bodyPartDamage), [-1]]);
|
||||
private _startDmg = +(_unit getVariable [QEGVAR(medical,bodyPartDamage), [-1]]);
|
||||
private _startPain = GET_PAIN(_unit);
|
||||
#endif
|
||||
|
||||
[QEGVAR(medical,woundReceived), [_unit, _bodyPart, _damageToAdd, _instigator, _typeOfDamage]] call CBA_fnc_localEvent;
|
||||
|
||||
#ifdef DEBUG_TESTRESULTS
|
||||
private _endDmg = _unit getVariable [QGVAR(medical,bodyPartDamage), [-1]];
|
||||
private _endDmg = _unit getVariable [QEGVAR(medical,bodyPartDamage), [-1]];
|
||||
private _endPain = GET_PAIN(_unit);
|
||||
private _typeOfDamageAdj = _typeOfDamage call EFUNC(medical_damage,getTypeOfDamage);
|
||||
private _config = configFile >> "ACE_Medical_Injuries" >> "damageTypes" >> _typeOfDamageAdj;
|
||||
|
@ -24,10 +24,10 @@ if (_painLevel > 0) then {
|
||||
// Handle spontaneous wakeup from unconsciousness
|
||||
if (EGVAR(medical,spontaneousWakeUpChance) > 0) then {
|
||||
if (_unit call EFUNC(medical_status,hasStableVitals)) then {
|
||||
private _lastWakeUpCheck = _unit getVariable [EQGVAR(medical,lastWakeUpCheck), CBA_missionTime];
|
||||
private _lastWakeUpCheck = _unit getVariable [QEGVAR(medical,lastWakeUpCheck), CBA_missionTime];
|
||||
if (CBA_missionTime - _lastWakeUpCheck > SPONTANEOUS_WAKE_UP_INTERVAL) then {
|
||||
TRACE_2("Checking for wake up",_unit,EGVAR(medical,spontaneousWakeUpChance));
|
||||
_unit setVariable [EQGVAR(medical,lastWakeUpCheck), CBA_missionTime];
|
||||
_unit setVariable [QEGVAR(medical,lastWakeUpCheck), CBA_missionTime];
|
||||
if ((random 1) < EGVAR(medical,spontaneousWakeUpChance)) then {
|
||||
TRACE_1("Spontaneous wake up!",_unit);
|
||||
[QEGVAR(medical,WakeUp), _unit] call CBA_fnc_localEvent;
|
||||
@ -35,6 +35,6 @@ if (EGVAR(medical,spontaneousWakeUpChance) > 0) then {
|
||||
};
|
||||
} else {
|
||||
// Unstable vitals, procrastinate the next wakeup check
|
||||
_unit setVariable [EQGVAR(medical,lastWakeUpCheck), CBA_missionTime];
|
||||
_unit setVariable [QEGVAR(medical,lastWakeUpCheck), CBA_missionTime];
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user