mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Improve syntax
This commit is contained in:
parent
7157fcf420
commit
da661afe9b
@ -11,7 +11,7 @@ if (_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal == 2)
|
||||
false;
|
||||
};
|
||||
|
||||
private _lifesLeft = _unit getVariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)];
|
||||
private _lifesLeft = _unit getVariable [QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)];
|
||||
if (GVAR(amountOfReviveLives) > 0 && _lifesLeft == 0) exitWith {
|
||||
[_unit, "NoLives", []] call FUNC(stateEvent);
|
||||
};
|
||||
|
@ -18,7 +18,7 @@
|
||||
params ["_unit", "_local"];
|
||||
if (_local) then {
|
||||
// If the unit had a loop tracking its vitals, restart it locally
|
||||
if (_unit getVariable[QGVAR(addedToUnitLoop),false]) then {
|
||||
if (_unit getVariable [QGVAR(addedToUnitLoop),false]) then {
|
||||
[_unit, true] call FUNC(addVitalLoop);
|
||||
};
|
||||
|
||||
|
@ -34,7 +34,7 @@ if (GVAR(maxReviveTime) > 0 && {CBA_missionTime - _startTime > GVAR(maxReviveTim
|
||||
if !(_unit getVariable [QGVAR(inReviveState), false]) exitWith {
|
||||
// Revived without dieing, so in case we have lifes, remove one.
|
||||
if (GVAR(amountOfReviveLives) > 0) then {
|
||||
_lifesLeft = _unit getVariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)];
|
||||
_lifesLeft = _unit getVariable [QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)];
|
||||
_unit setVariable [QGVAR(amountOfReviveLives), _lifesLeft - 1, true];
|
||||
};
|
||||
_unit setVariable [QGVAR(reviveStartTime), nil];
|
||||
|
@ -23,7 +23,7 @@ diag_log format["ace_medical_stateEvent: %1", _this];
|
||||
|
||||
_event = toLower _event;
|
||||
|
||||
private _unitState = _unit getvariable [QGVAR(state), [CBA_missionTime, GVAR(STATE_MACHINE) getVariable "Default"]];
|
||||
private _unitState = _unit getVariable [QGVAR(state), [CBA_missionTime, GVAR(STATE_MACHINE) getVariable "Default"]];
|
||||
_unitState params ["_lastTime", "_state"];
|
||||
_state params ["_name", "_handler", "_onEntry", "_onExit", "_transitions"];
|
||||
|
||||
|
@ -21,7 +21,7 @@ GVAR(monitoredUnitsListIsSorted) = false;
|
||||
_x params ["_unit"];
|
||||
|
||||
if (!isNull _unit && alive _unit) then {
|
||||
private _unitState = _unit getvariable [QGVAR(state), [CBA_missionTime, DEFAULT_STATE]];
|
||||
private _unitState = _unit getVariable [QGVAR(state), [CBA_missionTime, DEFAULT_STATE]];
|
||||
_unitState params ["_lastTime", "_state"];
|
||||
|
||||
if ((_lastTime + DELAY) > CBA_missionTime) exitWith {_exit = true;};
|
||||
|
Loading…
Reference in New Issue
Block a user