Reset isLimping var

This commit is contained in:
PabstMirror 2017-09-26 17:43:54 -05:00
parent 0ff9a5bf64
commit 4c28c4de22
3 changed files with 9 additions and 4 deletions

View File

@ -22,20 +22,23 @@
private _unit = cursorTarget;
if (!(_unit isKindOf "CAManBase")) then {_unit = cursorObject};
if (!(_unit isKindOf "CAManBase")) then {_unit = player};
if (!(_unit isKindOf "CAManBase")) then {_unit = ACE_player};
if ((_unit != ACE_player) && {ACE_player getVariable ["ACE_isUnconscious", false]}) then {_unit = ACE_player};
if (!(_unit isKindOf "CAManBase")) exitWith {"No Unit?"};
private _return = [];
// Header:
_return pushBack format ["<t size='1.2'><t color='#%1'>%2</t> [%3]", (["00FF00", "0000FF"] select (_unit == player)), [_unit] call EFUNC(common,getName), typeOf _unit];
_return pushBack format ["<t size='1.2'><t color='#%1'>%2</t> [%3]", (["00FF00", "0000FF"] select (_unit == ACE_player)), [_unit] call EFUNC(common,getName), typeOf _unit];
_return pushBack "";
// State:
private _hasStableVitals = [_unit] call EFUNC(medical,hasStableVitals);
private _targetState = [_unit, GVAR(STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState;
private _color = switch (_targetState) do {case "Default": {"33FF33"}; case "Injured": {"FF3333"}; case "Unconscious": {"FF8833"}; case "CardiacArrest": {"FF33AA"}; default {"333333"}};
_return pushBack format ["<t color='#%1'>State: %2</t> [StableVitals: %3]", _color, _targetState, _hasStableVitals];
if (!local _unit) then {_targetState = "NotLocal";};
private _color = switch (_targetState) do {case "Default": {"33FF33"}; case "Injured": {"FF3333"}; case "Unconscious": {"FF8833"}; case "CardiacArrest": {"FF33AA"}; default {"555555"}};
private _unconcFlag = if (_unit getVariable ["ACE_isUnconscious", false]) then {"[<t color='#FFFFFF'>U</t>]"} else {""};
_return pushBack format ["<t color='#%1'>State: %2</t> [StableVitals: %3] %4", _color, _targetState, _hasStableVitals, _unconcFlag];
// Blood:
private _bloodVolume = _unit getVariable [QEGVAR(medical,bloodVolume), DEFAULT_BLOOD_VOLUME];

View File

@ -34,6 +34,7 @@ _unit setVariable [QGVAR(occludedMedications), nil, true]; //Delayed Medications
_unit setVariable [QGVAR(openWounds), [], true];
_unit setVariable [QGVAR(bandagedWounds), [], true];
_unit setVariable [QGVAR(stitchedWounds), [], true];
_unit setVariable [QEGVAR(medical_engine,isLimping), false, true];
// vitals
_unit setVariable [QGVAR(heartRate), DEFAULT_HEART_RATE, true];

View File

@ -28,6 +28,7 @@ _target setVariable [QGVAR(occludedMedications), nil, true];
_target setVariable [QEGVAR(medical,openWounds), [], true];
_target setVariable [QEGVAR(medical,bandagedWounds), [], true];
_target setVariable [QEGVAR(medical,stitchedWounds), [], true];
_target setVariable [QEGVAR(medical_engine,isLimping), false, true];
// vitals
_target setVariable [QEGVAR(medical,heartRate), 80, true];