Improve syntax

This commit is contained in:
Glowbal 2016-07-07 17:22:08 +02:00
parent 7157fcf420
commit da661afe9b
5 changed files with 5 additions and 5 deletions

View File

@ -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);
};

View File

@ -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);
};

View File

@ -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];

View File

@ -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"];

View File

@ -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;};