diff --git a/addons/captives/functions/fnc_setHandcuffed.sqf b/addons/captives/functions/fnc_setHandcuffed.sqf index a4788db057..cf4e248bff 100644 --- a/addons/captives/functions/fnc_setHandcuffed.sqf +++ b/addons/captives/functions/fnc_setHandcuffed.sqf @@ -19,7 +19,7 @@ params ["_unit","_state"]; TRACE_2("params",_unit,_state); -if (!local _unit) exitwith { +if (!local _unit) exitWith { ERROR("running setHandcuffed on remote unit"); }; if ((_unit getVariable [QGVAR(isHandcuffed), false]) isEqualTo _state) exitWith { diff --git a/addons/captives/functions/fnc_setSurrendered.sqf b/addons/captives/functions/fnc_setSurrendered.sqf index 5af4454472..aea8adc918 100644 --- a/addons/captives/functions/fnc_setSurrendered.sqf +++ b/addons/captives/functions/fnc_setSurrendered.sqf @@ -19,7 +19,7 @@ params ["_unit","_state"]; TRACE_2("params",_unit,_state); -if (!local _unit) exitwith { +if (!local _unit) exitWith { ERROR("running surrender on remote unit"); }; diff --git a/addons/common/functions/fnc_debug.sqf b/addons/common/functions/fnc_debug.sqf index 6430a7bb11..6dd1f04163 100644 --- a/addons/common/functions/fnc_debug.sqf +++ b/addons/common/functions/fnc_debug.sqf @@ -22,7 +22,7 @@ private ["_defaultLoglevel", "_defaultLogDisplayLevel"]; _defaultLoglevel = [GVAR(LOGLEVEL), DEFAULT_LOGGING_LEVEL] select isNil QGVAR(LOGLEVEL); -if (_defaultLoglevel < 0) exitwith {false}; +if (_defaultLoglevel < 0) exitWith {false}; _defaultLogDisplayLevel = [GVAR(LOGDISPLAY_LEVEL), DEFAULT_TEXT_DISPLAY] select isNil QGVAR(LOGDISPLAY_LEVEL); diff --git a/addons/common/functions/fnc_defineVariable.sqf b/addons/common/functions/fnc_defineVariable.sqf index 6ea15adc43..e10a3bf59b 100644 --- a/addons/common/functions/fnc_defineVariable.sqf +++ b/addons/common/functions/fnc_defineVariable.sqf @@ -21,7 +21,7 @@ params ["_name", "_value", "_defaultGlobal", "_category", ["_code", 0], ["_persi if (isNil "_defaultGlobal") exitWith {}; -if (typeName _name != "STRING") exitwith { +if (typeName _name != "STRING") exitWith { [format ["Tried to the deinfe a variable with an invalid name: %1 Arguments: %2", _name, _this]] call FUNC(debug); }; diff --git a/addons/common/functions/fnc_displayIcon.sqf b/addons/common/functions/fnc_displayIcon.sqf index 8421f5be7e..be2e9edc3f 100644 --- a/addons/common/functions/fnc_displayIcon.sqf +++ b/addons/common/functions/fnc_displayIcon.sqf @@ -97,7 +97,7 @@ if (_show) then { _list pushBack [_iconId, _icon, _color, ACE_time]; } else { { - if (_x select 0 == _iconId) exitwith { + if (_x select 0 == _iconId) exitWith { _list set [_forEachIndex, [_iconId, _icon, _color, ACE_time]]; }; } forEach _list; diff --git a/addons/common/functions/fnc_getAllDefinedSetVariables.sqf b/addons/common/functions/fnc_getAllDefinedSetVariables.sqf index 18c8a18c72..ac13f73275 100644 --- a/addons/common/functions/fnc_getAllDefinedSetVariables.sqf +++ b/addons/common/functions/fnc_getAllDefinedSetVariables.sqf @@ -20,7 +20,7 @@ params ["_object", ["_category", ""]]; -if (isNil QGVAR(OBJECT_VARIABLES_STORAGE)) exitwith {[]}; +if (isNil QGVAR(OBJECT_VARIABLES_STORAGE)) exitWith {[]}; private ["_return", "_val"]; diff --git a/addons/common/functions/fnc_getDefinedVariableDefault.sqf b/addons/common/functions/fnc_getDefinedVariableDefault.sqf index 4bb4b12253..ba9ff20e23 100644 --- a/addons/common/functions/fnc_getDefinedVariableDefault.sqf +++ b/addons/common/functions/fnc_getDefinedVariableDefault.sqf @@ -17,7 +17,7 @@ params ["_varName"]; private "_variableDefinition"; _variableDefinition = [_varName] call FUNC(getDefinedVariableInfo); -if !(_variableDefinition isEqualTo []) exitwith { +if !(_variableDefinition isEqualTo []) exitWith { _variableDefinition select 1; }; diff --git a/addons/common/functions/fnc_loadPerson.sqf b/addons/common/functions/fnc_loadPerson.sqf index da729ed0d7..659d63224a 100644 --- a/addons/common/functions/fnc_loadPerson.sqf +++ b/addons/common/functions/fnc_loadPerson.sqf @@ -21,7 +21,7 @@ private ["_vehicle", "_loadcar", "_loadair", "_loadtank", "_loadboat"]; _vehicle = objNull; -if (!([_caller, _unit, ["isNotDragging", "isNotCarrying"]] call FUNC(canInteractWith)) || {_caller == _unit}) exitwith {_vehicle}; +if (!([_caller, _unit, ["isNotDragging", "isNotCarrying"]] call FUNC(canInteractWith)) || {_caller == _unit}) exitWith {_vehicle}; _loadcar = nearestObject [_unit, "Car"]; diff --git a/addons/common/functions/fnc_loadSettingsLocalizedText.sqf b/addons/common/functions/fnc_loadSettingsLocalizedText.sqf index 7b05902862..06cfc95aff 100644 --- a/addons/common/functions/fnc_loadSettingsLocalizedText.sqf +++ b/addons/common/functions/fnc_loadSettingsLocalizedText.sqf @@ -16,7 +16,7 @@ private "_fnc_parseConfigForDisplayNames"; _fnc_parseConfigForDisplayNames = { params ["_optionEntry"]; - if !(isClass _optionEntry) exitwith {false}; + if !(isClass _optionEntry) exitWith {false}; private "_values"; _values = getArray (_optionEntry >> "values"); diff --git a/addons/common/functions/fnc_setDefinedVariable.sqf b/addons/common/functions/fnc_setDefinedVariable.sqf index 480632394c..b6c8b2d601 100644 --- a/addons/common/functions/fnc_setDefinedVariable.sqf +++ b/addons/common/functions/fnc_setDefinedVariable.sqf @@ -23,7 +23,7 @@ if (isNil "_global") then { _definedVariable params ["", "", ["_global", false]]; }; -if (!isNil "_value") exitwith { +if (!isNil "_value") exitWith { _unit setVariable [_variable, _value, _global]; }; diff --git a/addons/common/functions/fnc_switchToGroupSide.sqf b/addons/common/functions/fnc_switchToGroupSide.sqf index 95f17a9c7b..9bbc4c6d20 100644 --- a/addons/common/functions/fnc_switchToGroupSide.sqf +++ b/addons/common/functions/fnc_switchToGroupSide.sqf @@ -27,7 +27,7 @@ if (_switch) then { _previousGroup = group _unit; _originalSide = side group _unit; - if (count units _previousGroup == 1 && _originalSide == _side) exitwith { + if (count units _previousGroup == 1 && _originalSide == _side) exitWith { [format ["Current group has only 1 member and is of same side as switch. Not switching unit %1", _id]] call FUNC(debug); }; @@ -41,7 +41,7 @@ if (_switch) then { private ["_currentGroup", "_newGroup"]; { - if (_id == (_x select 2)) exitwith { + if (_id == (_x select 2)) exitWith { _x set [ 3, false]; _previousGroupsList set [_forEachIndex, _x]; [format["found group with ID: %1", _id]] call FUNC(debug); @@ -51,7 +51,7 @@ if (_switch) then { reverse _previousGroupsList; { - if (_x select 3) exitwith {}; // stop at first id set to true + if (_x select 3) exitWith {}; // stop at first id set to true if !(_x select 3) then { _currentGroup = group _unit; if (!isNull (_x select 0)) then { diff --git a/addons/common/functions/fnc_unloadPersonLocal.sqf b/addons/common/functions/fnc_unloadPersonLocal.sqf index 67d104a9e4..7b0d8082af 100644 --- a/addons/common/functions/fnc_unloadPersonLocal.sqf +++ b/addons/common/functions/fnc_unloadPersonLocal.sqf @@ -51,12 +51,12 @@ if (_vehicle isKindOf "Ship") then { TRACE_1("getPosASL Vehicle Check", getPosASL _vehicle); -if !(_validVehiclestate) exitwith { +if !(_validVehiclestate) exitWith { ACE_LOGWARNING_4("Unable to unload patient because invalid (%1) vehicle state. Either moving or Not close enough on the ground. position: %2 isTouchingGround: %3 Speed: %4",_vehicle,getPos _vehicle,isTouchingGround _vehicle,speed _vehicle); false }; -if (count _emptyPos == 0) exitwith { +if (count _emptyPos == 0) exitWith { ACE_LOGWARNING_1("No safe empty spots to unload patient. %1",_emptyPos); false }; //consider displaying text saying there are no safe places to exit the vehicle diff --git a/addons/concertina_wire/functions/fnc_dismount.sqf b/addons/concertina_wire/functions/fnc_dismount.sqf index c7ba3f50b1..6e8ae8f4f5 100644 --- a/addons/concertina_wire/functions/fnc_dismount.sqf +++ b/addons/concertina_wire/functions/fnc_dismount.sqf @@ -15,7 +15,7 @@ #include "script_component.hpp" // If the cursorMenu is open, the loading bar will fail. If we execute the function one frame later, it will work fine -if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exitwith { +if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exitWith { [{ _this call FUNC(dismount); }, _this] call EFUNC(common,execNextFrame); diff --git a/addons/dagr/functions/fnc_outputVector.sqf b/addons/dagr/functions/fnc_outputVector.sqf index 7f36facae8..ef93a53d8a 100644 --- a/addons/dagr/functions/fnc_outputVector.sqf +++ b/addons/dagr/functions/fnc_outputVector.sqf @@ -29,7 +29,7 @@ private ["_xGrid", "_yGrid", "_dagrGrid", "_bearing", "_dagrDist", "_dagrElevati __background ctrlSetText QUOTE(PATHTOF(UI\dagr_vector.paa)); -if (GVAR(noVectorData)) exitwith {}; +if (GVAR(noVectorData)) exitWith {}; GVAR(LAZPOS) params ["_lazPosX", "_lazPosY", "_lazPosZ"]; // Incase grids go neg due to 99-00 boundry diff --git a/addons/disarming/functions/fnc_openDisarmDialog.sqf b/addons/disarming/functions/fnc_openDisarmDialog.sqf index c2a3a6396e..c18b3ab7ac 100644 --- a/addons/disarming/functions/fnc_openDisarmDialog.sqf +++ b/addons/disarming/functions/fnc_openDisarmDialog.sqf @@ -20,7 +20,7 @@ params ["_caller", "_target"]; private "_display"; #define DEFUALTPATH "\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa" //Sanity Checks -if (_caller != ACE_player) exitwith {ERROR("Player isn't caller?");}; +if (_caller != ACE_player) exitWith {ERROR("Player isn't caller?");}; if (!([_player, _target] call FUNC(canPlayerDisarmUnit))) exitWith {ERROR("Can't Disarm Unit");}; if (dialog) then {ERROR("Dialog open when trying to open disarm dialog"); closeDialog 0;}; diff --git a/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf b/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf index b11fc3697d..736b6c0890 100644 --- a/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf +++ b/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf @@ -57,7 +57,7 @@ _startingAmmoCounts = []; }; } forEach (magazinesAmmoFull _player); -if ((count _startingAmmoCounts) < 2) exitwith {ERROR("Not Enough Mags to Repack");}; +if ((count _startingAmmoCounts) < 2) exitWith {ERROR("Not Enough Mags to Repack");}; _simEvents = [_fullMagazineCount, _startingAmmoCounts, _isBelt] call FUNC(simulateRepackEvents); _totalTime = (_simEvents select ((count _simEvents) - 1) select 0); diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index 064f78682f..bec734b987 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -160,7 +160,7 @@ GVAR(lastHeartBeatSound) = ACE_time; if (GVAR(level) == 1) then { _heartRate = 60 + 40 * _pain; }; - if (_heartRate <= 0) exitwith {}; + if (_heartRate <= 0) exitWith {}; _interval = 60 / (_heartRate min 40); if ((ACE_player getVariable ["ACE_isUnconscious", false])) then { @@ -246,7 +246,7 @@ GVAR(lastHeartBeatSound) = ACE_time; }; ["SettingsInitialized", { - if (GVAR(level) == 2) exitwith { + if (GVAR(level) == 2) exitWith { [ {(((_this select 0) getvariable [QGVAR(bloodVolume), 100]) < 65)}, {(((_this select 0) getvariable [QGVAR(pain), 0]) - ((_this select 0) getvariable [QGVAR(painSuppress), 0])) > 0.9}, diff --git a/addons/medical/functions/fnc_actionLoadUnit.sqf b/addons/medical/functions/fnc_actionLoadUnit.sqf index 42a94997d8..41970e23d2 100644 --- a/addons/medical/functions/fnc_actionLoadUnit.sqf +++ b/addons/medical/functions/fnc_actionLoadUnit.sqf @@ -17,7 +17,7 @@ private "_vehicle"; params ["_caller", "_target"]; -if ([_target] call EFUNC(common,isAwake)) exitwith { +if ([_target] call EFUNC(common,isAwake)) exitWith { ["displayTextStructured", [_caller], [[LSTRING(CanNotLoaded), [_target] call EFUNC(common,getName)], 1.5, _caller]] call EFUNC(common,targetEvent); }; if ([_target] call FUNC(isBeingCarried)) then { diff --git a/addons/medical/functions/fnc_actionRemoveTourniquet.sqf b/addons/medical/functions/fnc_actionRemoveTourniquet.sqf index b920f276f0..3e753d6454 100644 --- a/addons/medical/functions/fnc_actionRemoveTourniquet.sqf +++ b/addons/medical/functions/fnc_actionRemoveTourniquet.sqf @@ -23,7 +23,7 @@ _part = [_selectionName] call FUNC(selectionNameToNumber); _tourniquets = _target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; // Check if there is a tourniquet on this bodypart -if ((_tourniquets select _part) == 0) exitwith { +if ((_tourniquets select _part) == 0) exitWith { _output = LSTRING(noTourniquetOnBodyPart); ["displayTextStructured", [_caller], [_output, 1.5, _caller]] call EFUNC(common,targetEvent); }; diff --git a/addons/medical/functions/fnc_actionUnloadUnit.sqf b/addons/medical/functions/fnc_actionUnloadUnit.sqf index 6bb4f5beed..3d6d1d964c 100644 --- a/addons/medical/functions/fnc_actionUnloadUnit.sqf +++ b/addons/medical/functions/fnc_actionUnloadUnit.sqf @@ -18,7 +18,7 @@ params ["_caller", "_target", ["_drag", false]]; // cannot unload a unit not in a vehicle. -if (vehicle _target == _target) exitwith {}; -if (([_target] call EFUNC(common,isAwake))) exitwith {}; +if (vehicle _target == _target) exitWith {}; +if (([_target] call EFUNC(common,isAwake))) exitWith {}; ["unloadPersonEvent", _target, [_target, vehicle _target]] call EFUNC(common,targetEvent) diff --git a/addons/medical/functions/fnc_addToInjuredCollection.sqf b/addons/medical/functions/fnc_addToInjuredCollection.sqf index 0ed9b9747f..f927d54e67 100644 --- a/addons/medical/functions/fnc_addToInjuredCollection.sqf +++ b/addons/medical/functions/fnc_addToInjuredCollection.sqf @@ -17,11 +17,11 @@ params ["_unit", ["_force", false]]; if ([_unit] call FUNC(hasMedicalEnabled) || _force) then { - if !(local _unit) exitwith { + if !(local _unit) exitWith { [[_unit, _force], QUOTE(DFUNC(addToInjuredCollection)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ }; - if ((_unit getvariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitwith{}; + if ((_unit getvariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitWith{}; _unit setvariable [QGVAR(addedToUnitLoop), true, true]; [{ diff --git a/addons/medical/functions/fnc_addToLog.sqf b/addons/medical/functions/fnc_addToLog.sqf index 0e341792c9..22f59f205c 100644 --- a/addons/medical/functions/fnc_addToLog.sqf +++ b/addons/medical/functions/fnc_addToLog.sqf @@ -19,7 +19,7 @@ private ["_moment", "_logVarName", "_log","_newLog", "_logs"]; params ["_unit", "_type", "_message", "_arguments"]; -if (!local _unit) exitwith { +if (!local _unit) exitWith { [_this, QFUNC(addToLog), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ }; diff --git a/addons/medical/functions/fnc_addToTriageCard.sqf b/addons/medical/functions/fnc_addToTriageCard.sqf index b1df46f751..56104bf5e4 100644 --- a/addons/medical/functions/fnc_addToTriageCard.sqf +++ b/addons/medical/functions/fnc_addToTriageCard.sqf @@ -17,7 +17,7 @@ private ["_log", "_inList", "_amount"]; params ["_unit", "_newItem"]; -if (!local _unit) exitwith { +if (!local _unit) exitWith { [_this, QUOTE(DFUNC(addToTriageCard)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ }; @@ -25,7 +25,7 @@ _log = _unit getvariable [QGVAR(triageCard), []]; _inList = false; _amount = 1; { - if ((_x select 0) == _newItem) exitwith { + if ((_x select 0) == _newItem) exitWith { private "_info"; _info = _log select _foreachIndex; _info set [1,(_info select 1) + 1]; diff --git a/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf b/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf index 2aecfb9a12..81e8351c6a 100644 --- a/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf +++ b/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf @@ -22,9 +22,9 @@ _accessLevel = _target getvariable [QGVAR(allowSharedEquipmentAccess), -1]; _return = false; if (_accessLevel >= 0) then { - if (_accessLevel == 0) exitwith { _return = true; }; - if (_accessLevel == 1) exitwith { _return = (side _target == side _caller); }; - if (_accessLevel == 2) exitwith { _return = (group _target == group _caller); }; + if (_accessLevel == 0) exitWith { _return = true; }; + if (_accessLevel == 1) exitWith { _return = (side _target == side _caller); }; + if (_accessLevel == 2) exitWith { _return = (group _target == group _caller); }; }; _return; diff --git a/addons/medical/functions/fnc_canTreat.sqf b/addons/medical/functions/fnc_canTreat.sqf index 60685ee20a..a23e012e5d 100644 --- a/addons/medical/functions/fnc_canTreat.sqf +++ b/addons/medical/functions/fnc_canTreat.sqf @@ -27,27 +27,27 @@ if !(_target isKindOf "CAManBase") exitWith { false }; _config = (ConfigFile >> "ACE_Medical_Actions" >> (["Basic", "Advanced"] select (GVAR(level)>=2)) >> _className); -if !(isClass _config) exitwith {false}; +if !(isClass _config) exitWith {false}; // Allow self treatment check -if (_caller == _target && {getNumber (_config >> "allowSelfTreatment") == 0}) exitwith {false}; +if (_caller == _target && {getNumber (_config >> "allowSelfTreatment") == 0}) exitWith {false}; _medicRequired = if (isNumber (_config >> "requiredMedic")) then { getNumber (_config >> "requiredMedic"); } else { // Check for required class - if (isText (_config >> "requiredMedic")) exitwith { + if (isText (_config >> "requiredMedic")) exitWith { missionNamespace getvariable [(getText (_config >> "requiredMedic")), 0] }; 0; }; -if !([_caller, _medicRequired] call FUNC(isMedic)) exitwith { false }; +if !([_caller, _medicRequired] call FUNC(isMedic)) exitWith { false }; _items = getArray (_config >> "items"); -if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitwith { false }; +if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitWith { false }; _allowedSelections = getArray (_config >> "allowedSelections"); -if !("All" in _allowedSelections || {(_selectionName in _allowedSelections)}) exitwith { false }; +if !("All" in _allowedSelections || {(_selectionName in _allowedSelections)}) exitWith { false }; _return = true; if (getText (_config >> "condition") != "") then { @@ -63,27 +63,27 @@ if (getText (_config >> "condition") != "") then { _return = [_caller, _target, _selectionName, _className] call _condition; }; }; -if (!_return) exitwith { false }; +if (!_return) exitWith { false }; _patientStateCondition = if (isText(_config >> "patientStateCondition")) then { missionNamespace getvariable [getText(_config >> "patientStateCondition"), 0] } else { getNumber(_config >> "patientStateCondition") }; -if (_patientStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitwith {false}; +if (_patientStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitWith {false}; _locations = getArray (_config >> "treatmentLocations"); -if ("All" in _locations) exitwith { true }; +if ("All" in _locations) exitWith { true }; private [ "_medFacility", "_medVeh"]; _medFacility = {([_caller] call FUNC(isInMedicalFacility)) || ([_target] call FUNC(isInMedicalFacility))}; _medVeh = {([_caller] call FUNC(isInMedicalVehicle)) || ([_target] call FUNC(isInMedicalVehicle))}; { - if (_x == "field") exitwith {_return = true;}; - if (_x == "MedicalFacility" && _medFacility) exitwith {_return = true;}; - if (_x == "MedicalVehicle" && _medVeh) exitwith {_return = true;}; - if !(isnil _x) exitwith { + if (_x == "field") exitWith {_return = true;}; + if (_x == "MedicalFacility" && _medFacility) exitWith {_return = true;}; + if (_x == "MedicalVehicle" && _medVeh) exitWith {_return = true;}; + if !(isnil _x) exitWith { private "_val"; _val = missionNamespace getvariable _x; if (typeName _val == "SCALAR") then { diff --git a/addons/medical/functions/fnc_copyDeadBody.sqf b/addons/medical/functions/fnc_copyDeadBody.sqf index 9cd43dada6..4d13d3823e 100644 --- a/addons/medical/functions/fnc_copyDeadBody.sqf +++ b/addons/medical/functions/fnc_copyDeadBody.sqf @@ -17,7 +17,7 @@ private ["_newUnit", "_class", "_group", "_position", "_side", "_name"]; params ["_oldBody", "_caller"]; -if (alive _oldBody) exitwith {_oldBody}; // we only want to do this for dead bodies +if (alive _oldBody) exitWith {_oldBody}; // we only want to do this for dead bodies _name = _oldBody getvariable ["ACE_name", "unknown"]; _class = typeof _oldBody; diff --git a/addons/medical/functions/fnc_createLitter.sqf b/addons/medical/functions/fnc_createLitter.sqf index 54fd6694dd..4341fdd704 100644 --- a/addons/medical/functions/fnc_createLitter.sqf +++ b/addons/medical/functions/fnc_createLitter.sqf @@ -24,17 +24,17 @@ private ["_config", "_litter", "_createLitter", "_position", "_createdLitter"]; params ["_caller", "_target", "_selectionName", "_className", "", "_usersOfItems", "_previousDamage"]; -if !(GVAR(allowLitterCreation)) exitwith {}; -if (vehicle _caller != _caller || vehicle _target != _target) exitwith {}; +if !(GVAR(allowLitterCreation)) exitWith {}; +if (vehicle _caller != _caller || vehicle _target != _target) exitWith {}; _config = (configFile >> "ACE_Medical_Actions" >> "Basic" >> _className); if (GVAR(level) >= 2) then { _config = (configFile >> "ACE_Medical_Actions" >> "Advanced" >> _className); }; -if !(isClass _config) exitwith {false}; +if !(isClass _config) exitWith {false}; -if !(isArray (_config >> "litter")) exitwith {}; +if !(isArray (_config >> "litter")) exitWith {}; _litter = getArray (_config >> "litter"); _createLitter = { @@ -60,7 +60,7 @@ _createLitter = { _createdLitter = []; { if (typeName _x == "ARRAY") then { - if (count _x < MIN_ENTRIES_LITTER_CONFIG) exitwith {}; + if (count _x < MIN_ENTRIES_LITTER_CONFIG) exitWith {}; _x params ["_selection", "_litterCondition", "_litterOptions"]; @@ -72,7 +72,7 @@ _createdLitter = []; _litterCondition = missionNamespace getvariable _litterCondition; if (typeName _litterCondition != "CODE") then {_litterCondition = {false}}; }; - if !([_caller, _target, _selectionName, _className, _usersOfItems, _previousDamage] call _litterCondition) exitwith {}; + if !([_caller, _target, _selectionName, _className, _usersOfItems, _previousDamage] call _litterCondition) exitWith {}; if (typeName _litterOptions == "ARRAY") then { // Loop through through the litter options and place the litter diff --git a/addons/medical/functions/fnc_determineIfFatal.sqf b/addons/medical/functions/fnc_determineIfFatal.sqf index 7fc4823202..2f460e5256 100644 --- a/addons/medical/functions/fnc_determineIfFatal.sqf +++ b/addons/medical/functions/fnc_determineIfFatal.sqf @@ -25,9 +25,9 @@ private ["_damageThreshold", "_damageBodyPart", "_chanceFatal"]; params ["_unit", "_part", ["_withDamage", 0]]; -if (!alive _unit) exitwith {true}; -if (_part < 0 || _part > 5) exitwith {false}; -if ((vehicle _unit != _unit) && {!alive (vehicle _unit)}) exitwith { true }; +if (!alive _unit) exitWith {true}; +if (_part < 0 || _part > 5) exitWith {false}; +if ((vehicle _unit != _unit) && {!alive (vehicle _unit)}) exitWith { true }; // Find the correct Damage threshold for unit. _damageThreshold = [1,1,1]; @@ -41,13 +41,13 @@ _damageThreshold params ["_thresholdHead", "_thresholdTorso", "_thresholdLimbs" _damageBodyPart = ((_unit getvariable [QGVAR(bodyPartStatus),[0, 0, 0, 0, 0, 0]]) select _part) + _withDamage; // Check if damage to body part is higher as damage head -if (_part == 0) exitwith { +if (_part == 0) exitWith { _chanceFatal = CHANGE_FATAL_HEAD + ((INCREASE_CHANCE_HEAD * (_damageBodyPart - _thresholdHead)) * 10); (_damageBodyPart >= _thresholdHead && {(_chanceFatal >= random(1))}); }; // Check if damage to body part is higher as damage torso -if (_part == 1) exitwith { +if (_part == 1) exitWith { _chanceFatal = CHANGE_FATAL_TORSO + ((INCREASE_CHANCE_TORSO * (_damageBodyPart - _thresholdTorso)) * 10); (_damageBodyPart >= _thresholdTorso && {(_chanceFatal >= random(1))}); }; diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical/functions/fnc_displayPatientInformation.sqf index 222de4463f..183b878ba6 100644 --- a/addons/medical/functions/fnc_displayPatientInformation.sqf +++ b/addons/medical/functions/fnc_displayPatientInformation.sqf @@ -36,10 +36,10 @@ if (_show) then { params ["_args", "_idPFH"]; _args params ["_target", "_selectionN"]; - if (GVAR(displayPatientInformationTarget) != _target || GVAR(currentSelectedSelectionN) != _selectionN) exitwith { + if (GVAR(displayPatientInformationTarget) != _target || GVAR(currentSelectedSelectionN) != _selectionN) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; - if (ACE_player distance _target > MAX_DISTANCE) exitwith { + if (ACE_player distance _target > MAX_DISTANCE) exitWith { ("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; [_idPFH] call CBA_fnc_removePerFrameHandler; ["displayTextStructured", [ACE_player], [[LSTRING(DistanceToFar), [_target] call EFUNC(common,getName)], 1.75, ACE_player]] call EFUNC(common,targetEvent); @@ -47,7 +47,7 @@ if (_show) then { disableSerialization; _display = uiNamespace getvariable QGVAR(DisplayInformation); - if (isnil "_display") exitwith { + if (isnil "_display") exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; diff --git a/addons/medical/functions/fnc_displayTriageCard.sqf b/addons/medical/functions/fnc_displayTriageCard.sqf index 9849242de1..7454b76451 100644 --- a/addons/medical/functions/fnc_displayTriageCard.sqf +++ b/addons/medical/functions/fnc_displayTriageCard.sqf @@ -27,13 +27,13 @@ if (_show) then { private ["_target", "_display", "_alphaLevel", "_alphaLevel", "_lbCtrl"]; params ["_args", "_idPFH"]; _args params ["_target"]; - if (GVAR(TriageCardTarget) != _target) exitwith { + if (GVAR(TriageCardTarget) != _target) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; disableSerialization; _display = uiNamespace getvariable QGVAR(triageCard); - if (isnil "_display") exitwith { + if (isnil "_display") exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; diff --git a/addons/medical/functions/fnc_dropDownTriageCard.sqf b/addons/medical/functions/fnc_dropDownTriageCard.sqf index d207c7f9a4..d44d1fed7c 100644 --- a/addons/medical/functions/fnc_dropDownTriageCard.sqf +++ b/addons/medical/functions/fnc_dropDownTriageCard.sqf @@ -18,7 +18,7 @@ params ["_show"]; disableSerialization; _display = uiNamespace getvariable QGVAR(triageCard); -if (isnil "_display") exitwith {}; +if (isnil "_display") exitWith {}; _pos = [0,0,0,0]; if (_show) then { diff --git a/addons/medical/functions/fnc_getTypeOfDamage.sqf b/addons/medical/functions/fnc_getTypeOfDamage.sqf index 7a351e0b77..56cb8f75ef 100644 --- a/addons/medical/functions/fnc_getTypeOfDamage.sqf +++ b/addons/medical/functions/fnc_getTypeOfDamage.sqf @@ -17,7 +17,7 @@ params ["_typeOfProjectile"]; if (_typeOfProjectile isKindOf "BulletBase") exitWith {"bullet"}; -if (_typeOfProjectile isKindOf "ShotgunBase") exitwith {"bullet"}; +if (_typeOfProjectile isKindOf "ShotgunBase") exitWith {"bullet"}; if (_typeOfProjectile isKindOf "GrenadeCore") exitWith {"grenade"}; if (_typeOfProjectile isKindOf "TimeBombCore") exitWith {"explosive"}; if (_typeOfProjectile isKindOf "MineCore") exitWith {"explosive"}; diff --git a/addons/medical/functions/fnc_getUnconsciousCondition.sqf b/addons/medical/functions/fnc_getUnconsciousCondition.sqf index c354dd6ebd..70f820d6a0 100644 --- a/addons/medical/functions/fnc_getUnconsciousCondition.sqf +++ b/addons/medical/functions/fnc_getUnconsciousCondition.sqf @@ -22,7 +22,7 @@ if (isnil QGVAR(unconsciousConditions)) then { _return = false; { - if (typeName _x == typeName {} && {([_unit] call _x)}) exitwith { + if (typeName _x == typeName {} && {([_unit] call _x)}) exitWith { _return = true; }; } foreach GVAR(unconsciousConditions); diff --git a/addons/medical/functions/fnc_handleBandageOpening.sqf b/addons/medical/functions/fnc_handleBandageOpening.sqf index 4a32adb9e5..3ae7166a89 100644 --- a/addons/medical/functions/fnc_handleBandageOpening.sqf +++ b/addons/medical/functions/fnc_handleBandageOpening.sqf @@ -56,7 +56,7 @@ _injuryType = _injury select 1; _exist = false; _bandagedInjury = []; { - if ((_x select 1) == _injuryType && (_x select 2) == (_injury select 2)) exitwith { + if ((_x select 1) == _injuryType && (_x select 2) == (_injury select 2)) exitWith { _exist = true; _existingInjury = _x; _existingInjury set [3, (_existingInjury select 3) + _impact]; @@ -83,7 +83,7 @@ if (random(1) <= _reopeningChance) then { //if (alive _target) then { _openWounds = _target getvariable [QGVAR(openWounds), []]; - if ((count _openWounds)-1 < _injuryIndex) exitwith {}; + if ((count _openWounds)-1 < _injuryIndex) exitWith {}; _selectedInjury = _openWounds select _injuryIndex; if (_selectedInjury select 1 == _injury select 1 && (_selectedInjury select 2) == (_injury select 2)) then { // matching the IDs _selectedInjury set [3, (_selectedInjury select 3) + _impact]; @@ -93,7 +93,7 @@ if (random(1) <= _reopeningChance) then { _exist = false; _injuryId = _injury select 1; { - if ((_x select 1) == _injuryId && (_x select 2) == (_injury select 2)) exitwith { + if ((_x select 1) == _injuryId && (_x select 2) == (_injury select 2)) exitWith { _exist = true; _existingInjury = _x; _existingInjury set [3, ((_existingInjury select 3) - _impact) max 0]; diff --git a/addons/medical/functions/fnc_handleCreateLitter.sqf b/addons/medical/functions/fnc_handleCreateLitter.sqf index 31e65218c2..54de72db01 100644 --- a/addons/medical/functions/fnc_handleCreateLitter.sqf +++ b/addons/medical/functions/fnc_handleCreateLitter.sqf @@ -57,7 +57,7 @@ if(!GVAR(litterPFHRunning) && {GVAR(litterCleanUpDelay) > 0}) then { } forEach GVAR(allCreatedLitter); GVAR(allCreatedLitter) = GVAR(allCreatedLitter) - [objNull]; - if ( (count GVAR(allCreatedLitter)) == 0) exitwith { + if ( (count GVAR(allCreatedLitter)) == 0) exitWith { [(_this select 1)] call CBA_fnc_removePerFrameHandler; GVAR(litterPFHRunning) = false; }; diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf index 6d955e72fd..e63f8f3d91 100644 --- a/addons/medical/functions/fnc_handleDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage.sqf @@ -82,7 +82,7 @@ if (vehicle _unit != _unit && {!(vehicle _unit isKindOf "StaticWeapon")} && {isN }; if ((_minLethalDamage <= _newDamage) && {[_unit, [_selection] call FUNC(selectionNameToNumber), _newDamage] call FUNC(determineIfFatal)}) then { - if ((_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)])) exitwith { + if ((_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)])) exitWith { _damageReturn = 0.9; }; if ([_unit] call FUNC(setDead)) then { @@ -109,7 +109,7 @@ if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitW }; if (_damageReturn >= 0.9 && {_selection in ["", "head", "body"]}) exitWith { - if (_unit getvariable ["ACE_isUnconscious", false]) exitwith { + if (_unit getvariable ["ACE_isUnconscious", false]) exitWith { [_unit] call FUNC(setDead); 0.89; }; diff --git a/addons/medical/functions/fnc_handleDamage_advanced.sqf b/addons/medical/functions/fnc_handleDamage_advanced.sqf index 5035fbe282..517acce0ba 100644 --- a/addons/medical/functions/fnc_handleDamage_advanced.sqf +++ b/addons/medical/functions/fnc_handleDamage_advanced.sqf @@ -23,7 +23,7 @@ private ["_typeOfProjectile", "_part", "_damageBodyParts", "_hitPoints"]; params ["_unit", "_selectionName", "_amountOfDamage", "_sourceOfDamage", "_typeOfProjectile", "_hitPointNumber", "_newDamage"]; _part = [_selectionName] call FUNC(selectionNameToNumber); -if (_part < 0) exitwith {}; +if (_part < 0) exitWith {}; _hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"]; // Sorting out the damage diff --git a/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf b/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf index bac5a32976..e42e6be725 100644 --- a/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf @@ -15,7 +15,7 @@ params ["_unit"]; -if (!local _unit) exitwith {}; +if (!local _unit) exitWith {}; private "_bodyStatus"; diff --git a/addons/medical/functions/fnc_handleDamage_airway.sqf b/addons/medical/functions/fnc_handleDamage_airway.sqf index 8b627faae1..e5180e519c 100644 --- a/addons/medical/functions/fnc_handleDamage_airway.sqf +++ b/addons/medical/functions/fnc_handleDamage_airway.sqf @@ -21,7 +21,7 @@ private "_bodyPartn"; params ["_unit", "_selectionName", "_amountOfDamage", "_sourceOfDamage", "_typeOfDamage"]; _bodyPartn = [_selectionName] call FUNC(selectionNameToNumber); -if (_bodyPartn > 1) exitwith {}; +if (_bodyPartn > 1) exitWith {}; if (_amountOfDamage > 0.5) then { if (random(1) >= 0.8) then { diff --git a/addons/medical/functions/fnc_handleDamage_basic.sqf b/addons/medical/functions/fnc_handleDamage_basic.sqf index 92fc97c717..a54de43696 100644 --- a/addons/medical/functions/fnc_handleDamage_basic.sqf +++ b/addons/medical/functions/fnc_handleDamage_basic.sqf @@ -26,7 +26,7 @@ TRACE_4("ACE_DEBUG: HandleDamage BASIC",_unit, _damageBodyParts,_cache_params,_c _x params ["_unit","_selectionName","_amountOfDamage","_sourceOfDamage","_typeOfProjectile","_typeOfDamage"]; if !(isNull _sourceOfDamage && {_typeOfProjectile == ""} && {vehicle _unit == _unit} && {(_selectionName == "head" || isBurning _unit)}) then { _part = [_selectionName] call FUNC(selectionNameToNumber); - if (_part < 0) exitwith {}; + if (_part < 0) exitWith {}; private ["_newDamage", "_pain"]; _newDamage = (_cache_damages select _foreachIndex); diff --git a/addons/medical/functions/fnc_handleDamage_caching.sqf b/addons/medical/functions/fnc_handleDamage_caching.sqf index 910221a850..b3f82e7397 100644 --- a/addons/medical/functions/fnc_handleDamage_caching.sqf +++ b/addons/medical/functions/fnc_handleDamage_caching.sqf @@ -106,7 +106,7 @@ if (_selectionName != "") then { private ["_index","_otherDamage"]; _index = _cache_projectiles find _projectile; // Check if the current projectile has already been handled once - if (_index >= 0 && {_projectile != "falling"}) exitwith { + if (_index >= 0 && {_projectile != "falling"}) exitWith { _cache_damages = _unit getVariable QGVAR(cachedDamages); // Find the previous damage this projectile has done _otherDamage = (_cache_damages select _index); diff --git a/addons/medical/functions/fnc_handleDamage_wounds.sqf b/addons/medical/functions/fnc_handleDamage_wounds.sqf index ae032e6d64..05c7165cd2 100644 --- a/addons/medical/functions/fnc_handleDamage_wounds.sqf +++ b/addons/medical/functions/fnc_handleDamage_wounds.sqf @@ -37,7 +37,7 @@ _foundIndex = -1; _bodyPartNToAdd = _x select 2; { // Check if we have an id of the given class on the given bodypart already - if (_x select 1 == _toAddClassID && {_x select 2 == _bodyPartNToAdd}) exitwith { + if (_x select 1 == _toAddClassID && {_x select 2 == _bodyPartNToAdd}) exitWith { _foundIndex = _foreachIndex; }; } foreach _openWounds; diff --git a/addons/medical/functions/fnc_handleDamage_woundsOld.sqf b/addons/medical/functions/fnc_handleDamage_woundsOld.sqf index dc21012dd6..fabc642915 100644 --- a/addons/medical/functions/fnc_handleDamage_woundsOld.sqf +++ b/addons/medical/functions/fnc_handleDamage_woundsOld.sqf @@ -23,7 +23,7 @@ TRACE_6("ACE_DEBUG: HandleDamage_WoundsOLD Called",_unit, _selectionName, _damag // Convert the selectionName to a number and ensure it is a valid selection. _bodyPartn = [_selectionName] call FUNC(selectionNameToNumber); -if (_bodyPartn < 0) exitwith {}; +if (_bodyPartn < 0) exitWith {}; // Get the injury type information. Format: [typeDamage thresholds, selectionSpecific, woundTypes] _injuryTypeInfo = missionNamespace getvariable [format[QGVAR(woundInjuryType_%1), _typeOfDamage],[[], false, []]]; @@ -70,7 +70,7 @@ _allPossibleInjuries = []; } foreach _allInjuriesForDamageType; // No possible wounds available for this damage type or damage amount. -if (_highestPossibleSpot < 0) exitwith {}; +if (_highestPossibleSpot < 0) exitWith {}; // Administration for open wounds and ids _openWounds = _unit getvariable[QGVAR(openWounds), []]; @@ -79,7 +79,7 @@ _woundID = _unit getvariable[QGVAR(lastUniqueWoundID), 1]; _painToAdd = 0; _woundsCreated = []; { - if (_x select 0 <= _damage) exitwith { + if (_x select 0 <= _damage) exitWith { for "_i" from 0 to (1+ floor(random(_x select 1)-1)) /* step +1 */ do { // Find the injury we are going to add. Format [ classID, allowdSelections, bloodloss, painOfInjury, minimalDamage] @@ -92,7 +92,7 @@ _woundsCreated = []; if ((_injuryTypeInfo select 1)) then { { // Check if we have an id of the given class on the given bodypart already - if (_x select 1 == _toAddClassID && {_x select 2 == _bodyPartNToAdd}) exitwith { + if (_x select 1 == _toAddClassID && {_x select 2 == _bodyPartNToAdd}) exitWith { _foundIndex = _foreachIndex; }; } foreach _openWounds; diff --git a/addons/medical/functions/fnc_handleKilled.sqf b/addons/medical/functions/fnc_handleKilled.sqf index d6a4440d76..485dac273d 100644 --- a/addons/medical/functions/fnc_handleKilled.sqf +++ b/addons/medical/functions/fnc_handleKilled.sqf @@ -15,7 +15,7 @@ private "_openWounds"; params ["_unit"]; -if (!local _unit) exitwith {}; +if (!local _unit) exitWith {}; _unit setvariable [QGVAR(pain), 0]; if (GVAR(level) >= 2) then { diff --git a/addons/medical/functions/fnc_handleUnitVitals.sqf b/addons/medical/functions/fnc_handleUnitVitals.sqf index fddf5489da..0fa3607b52 100644 --- a/addons/medical/functions/fnc_handleUnitVitals.sqf +++ b/addons/medical/functions/fnc_handleUnitVitals.sqf @@ -98,7 +98,7 @@ if (GVAR(level) == 1) then { // handle advanced medical, with vitals if (GVAR(level) >= 2) then { TRACE_6("ACE_DEBUG_ADVANCED_VITALS",_painStatus,_bloodVolume, _unit getVariable QGVAR(hasPain),_unit getVariable QGVAR(morphine),_syncValues,_unit); - if (_bloodVolume < 30) exitwith { + if (_bloodVolume < 30) exitWith { [_unit] call FUNC(setDead); }; diff --git a/addons/medical/functions/fnc_hasItem.sqf b/addons/medical/functions/fnc_hasItem.sqf index df1a3828f5..e70144f617 100644 --- a/addons/medical/functions/fnc_hasItem.sqf +++ b/addons/medical/functions/fnc_hasItem.sqf @@ -21,11 +21,11 @@ params ["_medic", "_patient", "_item"]; if (isnil QGVAR(setting_allowSharedEquipment)) then { GVAR(setting_allowSharedEquipment) = true; }; -if (GVAR(setting_allowSharedEquipment) && {[_patient, _item] call EFUNC(common,hasItem)}) exitwith { +if (GVAR(setting_allowSharedEquipment) && {[_patient, _item] call EFUNC(common,hasItem)}) exitWith { true }; -if ([_medic, _item] call EFUNC(common,hasItem)) exitwith { +if ([_medic, _item] call EFUNC(common,hasItem)) exitWith { true }; @@ -33,7 +33,7 @@ _return = false; if ((vehicle _medic != _medic) && {[vehicle _medic] call FUNC(isMedicalVehicle)}) then { _crew = crew vehicle _medic; { - if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitwith { + if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitWith { _return = true; }; } foreach _crew; diff --git a/addons/medical/functions/fnc_hasItems.sqf b/addons/medical/functions/fnc_hasItems.sqf index dd53cb3337..f033b0b6c0 100644 --- a/addons/medical/functions/fnc_hasItems.sqf +++ b/addons/medical/functions/fnc_hasItems.sqf @@ -21,10 +21,10 @@ params ["_medic", "_patient", "_items"]; _return = true; { // - if (typeName _x == "ARRAY" && {({[_medic, _patient, _x] call FUNC(hasItem)}count _x == 0)}) exitwith { + if (typeName _x == "ARRAY" && {({[_medic, _patient, _x] call FUNC(hasItem)}count _x == 0)}) exitWith { _return = false; }; - if (typeName _x == "STRING" && {!([_medic, _patient, _x] call FUNC(hasItem))}) exitwith { + if (typeName _x == "STRING" && {!([_medic, _patient, _x] call FUNC(hasItem))}) exitWith { _return = false; }; }foreach _items; diff --git a/addons/medical/functions/fnc_hasMedicalEnabled.sqf b/addons/medical/functions/fnc_hasMedicalEnabled.sqf index cbf40078fd..44f653286a 100644 --- a/addons/medical/functions/fnc_hasMedicalEnabled.sqf +++ b/addons/medical/functions/fnc_hasMedicalEnabled.sqf @@ -20,7 +20,7 @@ private "_medicalEnabled"; params ["_unit"]; _medicalEnabled = _unit getvariable QGVAR(enableMedical); -if (isnil "_medicalEnabled") exitwith { +if (isnil "_medicalEnabled") exitWith { (((GVAR(enableFor) == 0 && (isPlayer _unit || (_unit getvariable [QEGVAR(common,isDeadPlayer), false])))) || (GVAR(enableFor) == 1) || GVAR(level) == 1) }; diff --git a/addons/medical/functions/fnc_isInMedicalFacility.sqf b/addons/medical/functions/fnc_isInMedicalFacility.sqf index 34f1cf4244..9c4b15eb2d 100644 --- a/addons/medical/functions/fnc_isInMedicalFacility.sqf +++ b/addons/medical/functions/fnc_isInMedicalFacility.sqf @@ -39,14 +39,14 @@ _medicalFacility = _objects = (lineIntersectsWith [_unit modelToWorldVisual [0, 0, (_eyePos select 2)], _unit modelToWorldVisual [0, 0, (_eyePos select 2) +10], _unit]); { - if (((typeOf _x) in _medicalFacility) || (_x getVariable [QGVAR(isMedicalFacility),false])) exitwith { + if (((typeOf _x) in _medicalFacility) || (_x getVariable [QGVAR(isMedicalFacility),false])) exitWith { _isInBuilding = true; }; } foreach _objects; if (!_isInBuilding) then { _objects = position _unit nearObjects 7.5; { - if (((typeOf _x) in _medicalFacility) || (_x getVariable [QGVAR(isMedicalFacility),false])) exitwith { + if (((typeOf _x) in _medicalFacility) || (_x getVariable [QGVAR(isMedicalFacility),false])) exitWith { _isInBuilding = true; }; } foreach _objects; diff --git a/addons/medical/functions/fnc_isInStableCondition.sqf b/addons/medical/functions/fnc_isInStableCondition.sqf index 763185640c..1fcfc08e0f 100644 --- a/addons/medical/functions/fnc_isInStableCondition.sqf +++ b/addons/medical/functions/fnc_isInStableCondition.sqf @@ -16,7 +16,7 @@ private ["_openWounds", "_openWounds"]; params ["_unit"]; -if (GVAR(level) <= 1) exitwith { +if (GVAR(level) <= 1) exitWith { ([_unit] call FUNC(getBloodloss)) == 0; }; diff --git a/addons/medical/functions/fnc_modifyMedicalAction.sqf b/addons/medical/functions/fnc_modifyMedicalAction.sqf index d16ab762d5..e324a75859 100644 --- a/addons/medical/functions/fnc_modifyMedicalAction.sqf +++ b/addons/medical/functions/fnc_modifyMedicalAction.sqf @@ -19,7 +19,7 @@ params ["_target", "_player", "_selectionN", "_actionData"]; -if (GVAR(level) < 2 || {!([_target] call FUNC(hasMedicalEnabled))}) exitwith { +if (GVAR(level) < 2 || {!([_target] call FUNC(hasMedicalEnabled))}) exitWith { private ["_pointDamage"]; _pointDamage = (_target getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]) select _selectionN; @@ -35,7 +35,7 @@ private ["_openWounds", "_amountOf"]; _openWounds = _target getvariable [QGVAR(openWounds), []]; { _x params ["", "", "_selectionX", "_amountOf", "_x4"]; - if (_amountOf > 0 && {(_selectionN == _selectionX)} && {_x4 > 0}) exitwith { + if (_amountOf > 0 && {(_selectionN == _selectionX)} && {_x4 > 0}) exitWith { _actionData set [2, QUOTE(PATHTOF(UI\icons\medical_crossRed.paa))]; }; } foreach _openWounds; diff --git a/addons/medical/functions/fnc_onMedicationUsage.sqf b/addons/medical/functions/fnc_onMedicationUsage.sqf index 6bef38fa27..a85f775e48 100644 --- a/addons/medical/functions/fnc_onMedicationUsage.sqf +++ b/addons/medical/functions/fnc_onMedicationUsage.sqf @@ -25,7 +25,7 @@ _foundEntry = false; _allUsedMedication = _target getvariable [QGVAR(allUsedMedication), []]; { _x params ["_variableX", "_allMedsFromClassname"]; - if (_variableX== _variable) exitwith { + if (_variableX== _variable) exitWith { if !(_className in _allMedsFromClassname) then { _allMedsFromClassname pushback _className; _x set [1, _allMedsFromClassname]; diff --git a/addons/medical/functions/fnc_onPropagateWound.sqf b/addons/medical/functions/fnc_onPropagateWound.sqf index f8b361ad17..c9c6f34ca7 100644 --- a/addons/medical/functions/fnc_onPropagateWound.sqf +++ b/addons/medical/functions/fnc_onPropagateWound.sqf @@ -23,7 +23,7 @@ if (!local _unit) then { _exists = false; { - if (_x select 0 == _injuryID) exitwith { + if (_x select 0 == _injuryID) exitWith { _exists = true; _openWounds set [_foreachIndex, _injury]; }; diff --git a/addons/medical/functions/fnc_parseConfigForInjuries.sqf b/addons/medical/functions/fnc_parseConfigForInjuries.sqf index 764d0bf591..839769e595 100644 --- a/addons/medical/functions/fnc_parseConfigForInjuries.sqf +++ b/addons/medical/functions/fnc_parseConfigForInjuries.sqf @@ -43,7 +43,7 @@ GVAR(fractureClassNames) = []; // function for parsing a sublcass of an injury _parseForSubClassWounds = { _subClass = _this select 0; - if (isClass (_entry >> _subClass)) exitwith { + if (isClass (_entry >> _subClass)) exitWith { _subClassConfig = (_entry >> _subClass); _subClasstype = _classType + (configName _subClassConfig); _subClassselections = if (isArray(_subClassConfig >> "selections")) then { getArray(_subClassConfig >> "selections");} else { _selections }; @@ -82,7 +82,7 @@ if (isClass _woundsConfig) then { _classDisplayName = if (isText(_entry >> "name")) then { getText(_entry >> "name");} else {_classType}; // TODO instead of hardcoding minor, medium and large just go through all sub classes recursively until none are found - if (["Minor"] call _parseForSubClassWounds || ["Medium"] call _parseForSubClassWounds || ["Large"] call _parseForSubClassWounds) exitwith {}; // continue to the next one + if (["Minor"] call _parseForSubClassWounds || ["Medium"] call _parseForSubClassWounds || ["Large"] call _parseForSubClassWounds) exitWith {}; // continue to the next one // There were no subclasses, so we will add this one instead. if (count _selections > 0 && count _causes > 0) then { diff --git a/addons/medical/functions/fnc_playInjuredSound.sqf b/addons/medical/functions/fnc_playInjuredSound.sqf index 4792f879ec..4e3fe5820e 100644 --- a/addons/medical/functions/fnc_playInjuredSound.sqf +++ b/addons/medical/functions/fnc_playInjuredSound.sqf @@ -18,14 +18,14 @@ private ["_unit","_availableSounds_A","_availableSounds_B","_availableSounds_C","_sound", "_pain"]; params ["_unit", "_pain"]; -if (!local _unit || !GVAR(enableScreams)) exitwith{}; +if (!local _unit || !GVAR(enableScreams)) exitWith{}; // Lock if the unit is already playing a sound. -if ((_unit getvariable [QGVAR(playingInjuredSound),false])) exitwith {}; +if ((_unit getvariable [QGVAR(playingInjuredSound),false])) exitWith {}; _unit setvariable [QGVAR(playingInjuredSound),true]; // Play the sound if there is any damage present. -if (_pain > 0 && {[_unit] call EFUNC(common,isAwake)}) exitwith { +if (_pain > 0 && {[_unit] call EFUNC(common,isAwake)}) exitWith { // Classnames of the available sounds. _availableSounds_A = [ "WoundedGuyA_01", diff --git a/addons/medical/functions/fnc_requestWoundSync.sqf b/addons/medical/functions/fnc_requestWoundSync.sqf index 31cf726214..feb46633d8 100644 --- a/addons/medical/functions/fnc_requestWoundSync.sqf +++ b/addons/medical/functions/fnc_requestWoundSync.sqf @@ -16,7 +16,7 @@ params [ "_target", "_caller"]; -if (local _target || GVAR(level) < 2) exitwith {}; // if the target is local, we already got the most update to date information -if (_target getvariable [QGVAR(isWoundSynced), false]) exitwith {}; +if (local _target || GVAR(level) < 2) exitWith {}; // if the target is local, we already got the most update to date information +if (_target getvariable [QGVAR(isWoundSynced), false]) exitWith {}; _target setvariable [QGVAR(isWoundSynced), true]; ["medical_woundUpdateRequest", [_target], [_target, _caller]] call EFUNC(common,targetEvent); diff --git a/addons/medical/functions/fnc_setCardiacArrest.sqf b/addons/medical/functions/fnc_setCardiacArrest.sqf index 017befcaad..6e770ae6d2 100644 --- a/addons/medical/functions/fnc_setCardiacArrest.sqf +++ b/addons/medical/functions/fnc_setCardiacArrest.sqf @@ -17,7 +17,7 @@ private "_timeInCardiacArrest"; params ["_unit"]; -if (_unit getvariable [QGVAR(inCardiacArrest),false]) exitwith {}; +if (_unit getvariable [QGVAR(inCardiacArrest),false]) exitWith {}; _unit setvariable [QGVAR(inCardiacArrest), true,true]; _unit setvariable [QGVAR(heartRate), 0]; @@ -32,11 +32,11 @@ _timeInCardiacArrest = 120 + round(random(600)); _args params ["_unit", "_startTime", "_timeInCardiacArrest"]; _heartRate = _unit getvariable [QGVAR(heartRate), 80]; - if (_heartRate > 0 || !alive _unit) exitwith { + if (_heartRate > 0 || !alive _unit) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; _unit setvariable [QGVAR(inCardiacArrest), nil,true]; }; - if (ACE_time - _startTime >= _timeInCardiacArrest) exitwith { + if (ACE_time - _startTime >= _timeInCardiacArrest) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; _unit setvariable [QGVAR(inCardiacArrest), nil,true]; [_unit] call FUNC(setDead); diff --git a/addons/medical/functions/fnc_setDead.sqf b/addons/medical/functions/fnc_setDead.sqf index c8c81a699e..4f0d8e76c7 100644 --- a/addons/medical/functions/fnc_setDead.sqf +++ b/addons/medical/functions/fnc_setDead.sqf @@ -16,15 +16,15 @@ private ["_unit", "_force", "_reviveVal", "_lifesLeft"]; params ["_unit", ["_force", false]]; -if (!alive _unit) exitwith{true}; -if (!local _unit) exitwith { +if (!alive _unit) exitWith{true}; +if (!local _unit) exitWith { [[_unit, _force], QUOTE(DFUNC(setDead)), _unit, false] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ false; }; _reviveVal = _unit getVariable [QGVAR(enableRevive), GVAR(enableRevive)]; -if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal == 2)) && !_force) exitwith { - if (_unit getvariable [QGVAR(inReviveState), false]) exitwith { +if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal == 2)) && !_force) exitWith { + if (_unit getvariable [QGVAR(inReviveState), false]) exitWith { if (GVAR(amountOfReviveLives) > 0) then { _lifesLeft = _unit getvariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)]; if (_lifesLeft == 0) then { @@ -45,14 +45,14 @@ if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal == _args params ["_unit"]; _startTime = _unit getvariable [QGVAR(reviveStartTime), 0]; - if (GVAR(maxReviveTime) > 0 && {ACE_time - _startTime > GVAR(maxReviveTime)}) exitwith { + if (GVAR(maxReviveTime) > 0 && {ACE_time - _startTime > GVAR(maxReviveTime)}) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; _unit setvariable [QGVAR(inReviveState), nil, true]; _unit setvariable [QGVAR(reviveStartTime), nil]; [_unit, true] call FUNC(setDead); }; - if !(_unit getvariable [QGVAR(inReviveState), false]) exitwith { + 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)]; diff --git a/addons/medical/functions/fnc_setUnconscious.sqf b/addons/medical/functions/fnc_setUnconscious.sqf index aac48a8641..1b54177212 100644 --- a/addons/medical/functions/fnc_setUnconscious.sqf +++ b/addons/medical/functions/fnc_setUnconscious.sqf @@ -32,13 +32,13 @@ params ["_unit", ["_set", true], ["_minWaitingTime", DEFAULT_DELAY], ["_force", // No change, fuck off. (why is there no xor?) if (_set isEqualTo (_unit getVariable ["ACE_isUnconscious", false])) exitWith {}; -if !(_set) exitwith { +if !(_set) exitWith { _unit setvariable ["ACE_isUnconscious", false, true]; }; -if !(!(isNull _unit) && {(_unit isKindOf "CAManBase") && ([_unit] call EFUNC(common,isAwake))}) exitwith{}; +if !(!(isNull _unit) && {(_unit isKindOf "CAManBase") && ([_unit] call EFUNC(common,isAwake))}) exitWith{}; -if (!local _unit) exitwith { +if (!local _unit) exitWith { [[_unit, _set, _minWaitingTime, _force], QUOTE(DFUNC(setUnconscious)), _unit, false] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ }; diff --git a/addons/medical/functions/fnc_translateSelections.sqf b/addons/medical/functions/fnc_translateSelections.sqf index f2fe4c1de9..16bcf8db33 100644 --- a/addons/medical/functions/fnc_translateSelections.sqf +++ b/addons/medical/functions/fnc_translateSelections.sqf @@ -39,10 +39,10 @@ if (_selection in HEAD_SELECTIONS) exitWith {"head"}; if (_selection in TORSO_SELECTIONS) exitWith {"body"}; // Not necessary unless we get more hitpoints variants in an next arma update -/*if (_selection in L_ARM_SELECTIONS) exitwith {"hand_l"}; -if (_selection in R_ARM_SELECTIONS) exitwith {"hand_r"}; -if (_selection in L_LEG_SELECTIONS) exitwith {"leg_l"}; -if (_selection in R_LEG_SELECTIONS) exitwith {"leg_r"};*/ +/*if (_selection in L_ARM_SELECTIONS) exitWith {"hand_l"}; +if (_selection in R_ARM_SELECTIONS) exitWith {"hand_r"}; +if (_selection in L_LEG_SELECTIONS) exitWith {"leg_l"}; +if (_selection in R_LEG_SELECTIONS) exitWith {"leg_r"};*/ //Backup method to detect weird selections/hitpoints if ((_selection == "?") || {!(_selection in GVAR(SELECTIONS))}) exitWith { diff --git a/addons/medical/functions/fnc_treatment.sqf b/addons/medical/functions/fnc_treatment.sqf index 2d0e44d488..9b373df77e 100644 --- a/addons/medical/functions/fnc_treatment.sqf +++ b/addons/medical/functions/fnc_treatment.sqf @@ -20,7 +20,7 @@ private ["_config", "_medicRequired", "_items", "_locations", "_return", "_callb params ["_caller", "_target", "_selectionName", "_className"]; // If the cursorMenu is open, the loading bar will fail. If we execute the function one frame later, it will work fine -if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exitwith { +if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exitWith { [{ _this call FUNC(treatment); }, _this] call EFUNC(common,execNextFrame); @@ -32,29 +32,29 @@ _config = (configFile >> "ACE_Medical_Actions" >> "Basic" >> _className); if (GVAR(level) >= 2) then { _config = (configFile >> "ACE_Medical_Actions" >> "Advanced" >> _className); }; -if !(isClass _config) exitwith {false}; +if !(isClass _config) exitWith {false}; // Allow self treatment check -if (_caller == _target && {getNumber (_config >> "allowSelfTreatment") == 0}) exitwith {false}; +if (_caller == _target && {getNumber (_config >> "allowSelfTreatment") == 0}) exitWith {false}; _medicRequired = if (isNumber (_config >> "requiredMedic")) then { getNumber (_config >> "requiredMedic"); } else { // Check for required class - if (isText (_config >> "requiredMedic")) exitwith { + if (isText (_config >> "requiredMedic")) exitWith { missionNamespace getvariable [(getText (_config >> "requiredMedic")), 0]; }; 0; }; -if !([_caller, _medicRequired] call FUNC(isMedic)) exitwith {false}; +if !([_caller, _medicRequired] call FUNC(isMedic)) exitWith {false}; _allowedSelections = getArray (_config >> "allowedSelections"); -if !("All" in _allowedSelections || {(_selectionName in _allowedSelections)}) exitwith {false}; +if !("All" in _allowedSelections || {(_selectionName in _allowedSelections)}) exitWith {false}; // Check item _items = getArray (_config >> "items"); -if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitwith {false}; +if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitWith {false}; _return = true; if (isText (_config >> "Condition")) then { @@ -72,14 +72,14 @@ if (isText (_config >> "Condition")) then { }; }; }; -if (!_return) exitwith {false}; +if (!_return) exitWith {false}; _patientStateCondition = if (isText(_config >> "patientStateCondition")) then { missionNamespace getvariable [getText(_config >> "patientStateCondition"), 0] } else { getNumber(_config >> "patientStateCondition") }; -if (_patientStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitwith {false}; +if (_patientStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitWith {false}; // Check allowed locations _locations = getArray (_config >> "treatmentLocations"); @@ -92,10 +92,10 @@ if ("All" in _locations) then { _medVeh = {([_caller] call FUNC(isInMedicalVehicle)) || ([_target] call FUNC(isInMedicalVehicle))}; { - if (_x == "field") exitwith {_return = true;}; - if (_x == "MedicalFacility" && _medFacility) exitwith {_return = true;}; - if (_x == "MedicalVehicle" && _medVeh) exitwith {_return = true;}; - if !(isnil _x) exitwith { + if (_x == "field") exitWith {_return = true;}; + if (_x == "MedicalFacility" && _medFacility) exitWith {_return = true;}; + if (_x == "MedicalVehicle" && _medVeh) exitWith {_return = true;}; + if !(isnil _x) exitWith { private "_val"; _val = missionNamespace getvariable _x; if (typeName _val == "SCALAR") then { @@ -111,14 +111,14 @@ if ("All" in _locations) then { } foreach _locations; }; -if !(_return) exitwith {false}; +if !(_return) exitWith {false}; _usersOfItems = []; _consumeItems = if (isNumber (_config >> "itemConsumed")) then { getNumber (_config >> "itemConsumed"); } else { // Check for required class - if (isText (_config >> "itemConsumed")) exitwith { + if (isText (_config >> "itemConsumed")) exitWith { missionNamespace getvariable [(getText (_config >> "itemConsumed")), 0]; }; 0; @@ -198,14 +198,14 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then { _treatmentTime = if (isNumber (_config >> "treatmentTime")) then { getNumber (_config >> "treatmentTime"); } else { - if (isText (_config >> "treatmentTime")) exitwith { + if (isText (_config >> "treatmentTime")) exitWith { _treatmentTimeConfig = getText(_config >> "treatmentTime"); if (isnil _treatmentTimeConfig) then { _treatmentTimeConfig = compile _treatmentTimeConfig; } else { _treatmentTimeConfig = missionNamespace getvariable _treatmentTimeConfig; }; - if (typeName _treatmentTimeConfig == "SCALAR") exitwith { + if (typeName _treatmentTimeConfig == "SCALAR") exitWith { _treatmentTimeConfig; }; [_caller, _target, _selectionName, _className] call _treatmentTimeConfig; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf b/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf index cf18475866..ed572fda62 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf @@ -22,7 +22,7 @@ params ["_caller", "_target", "_selectionName", "_className", "_items", "", ["_s [_target, "activity", LSTRING(Activity_bandagedPatient), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); [_target, "activity_view", LSTRING(Activity_bandagedPatient), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message -if !([_target] call FUNC(hasMedicalEnabled)) exitwith { +if !([_target] call FUNC(hasMedicalEnabled)) exitWith { _this call FUNC(treatmentBasic_bandage); }; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf index 2ef1174e63..2a93769930 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf @@ -20,11 +20,11 @@ params ["_target", "_bandage", "_selectionName", ["_specificClass", -1]]; // Ensure it is a valid bodypart _part = [_selectionName] call FUNC(selectionNameToNumber); -if (_part < 0) exitwith {false}; +if (_part < 0) exitWith {false}; // Get the open wounds for this unit _openWounds = _target getvariable [QGVAR(openWounds), []]; -if (count _openWounds == 0) exitwith {false}; // nothing to do here! +if (count _openWounds == 0) exitWith {false}; // nothing to do here! // Get the default effectiveness for the used bandage _config = (ConfigFile >> "ACE_Medical_Advanced" >> "Treatment" >> "Bandaging"); @@ -58,7 +58,7 @@ _exit = false; }; TRACE_2("Wound classes: ", _specificClass, _classID); - if (_specificClass == _classID) exitwith { + if (_specificClass == _classID) exitWith { _effectivenessFound = _woundEffectivenss; _mostEffectiveSpot = _foreachIndex; _mostEffectiveInjury = _x; @@ -72,10 +72,10 @@ _exit = false; _mostEffectiveInjury = _x; }; }; - if (_exit) exitwith {}; + if (_exit) exitWith {}; } foreach _openWounds; -if (_effectivenessFound == -1) exitwith {}; // Seems everything is patched up on this body part already.. +if (_effectivenessFound == -1) exitWith {}; // Seems everything is patched up on this body part already.. // TODO refactor this part diff --git a/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf index ed5eb0858d..7791e249e9 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf @@ -13,7 +13,7 @@ private "_allUsedMedication"; params ["_caller", "_target"]; -if (alive _target) exitwith { +if (alive _target) exitWith { _target setVariable [QGVAR(pain), 0, true]; _target setVariable [QGVAR(morphine), 0, true]; diff --git a/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf b/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf index ee04decfbd..c79008799c 100644 --- a/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf +++ b/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf @@ -22,7 +22,7 @@ _damageBodyParts = _target getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; // Ensure it is a valid bodypart _part = [_selectionName] call FUNC(selectionNameToNumber); -if (_part < 0) exitwith {false}; +if (_part < 0) exitWith {false}; if ((_damageBodyParts select _part) > 0) then { _damageOnPart = (_damageBodyParts select _part); diff --git a/addons/medical/functions/fnc_treatmentIV.sqf b/addons/medical/functions/fnc_treatmentIV.sqf index 2a7bbc6adf..bf18370a5e 100644 --- a/addons/medical/functions/fnc_treatmentIV.sqf +++ b/addons/medical/functions/fnc_treatmentIV.sqf @@ -19,7 +19,7 @@ private "_removeItem"; params ["_caller", "_target", "_selectionName", "_className", "_items"]; -if (count _items == 0) exitwith {false}; +if (count _items == 0) exitWith {false}; _removeItem = _items select 0; [[_target, _className], QUOTE(DFUNC(treatmentIVLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ diff --git a/addons/medical/functions/fnc_treatmentIVLocal.sqf b/addons/medical/functions/fnc_treatmentIVLocal.sqf index 37cba2ad1b..98927dff0b 100644 --- a/addons/medical/functions/fnc_treatmentIVLocal.sqf +++ b/addons/medical/functions/fnc_treatmentIVLocal.sqf @@ -19,7 +19,7 @@ private ["_config", "_volumeAdded", "_typeOf", "_varName", "_bloodVolume"]; params ["_target", "_treatmentClassname"]; _bloodVolume = _target getvariable [QGVAR(bloodVolume), 100]; -if (_bloodVolume >= 100) exitwith {}; +if (_bloodVolume >= 100) exitWith {}; // Find the proper attributes for the used IV _config = (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "IV"); diff --git a/addons/medical/functions/fnc_treatmentTourniquet.sqf b/addons/medical/functions/fnc_treatmentTourniquet.sqf index 5d3ba6e1d4..45d5f58630 100644 --- a/addons/medical/functions/fnc_treatmentTourniquet.sqf +++ b/addons/medical/functions/fnc_treatmentTourniquet.sqf @@ -24,16 +24,16 @@ _selectionName = _this select 2; _className = _this select 3; _items = _this select 4; -if (count _items == 0) exitwith {false}; +if (count _items == 0) exitWith {false}; _part = [_selectionName] call FUNC(selectionNameToNumber); -if (_part == 0 || _part == 1) exitwith { +if (_part == 0 || _part == 1) exitWith { // ["displayTextStructured", [_caller], ["You cannot apply a CAT on this body part!"]] call EFUNC(common,targetEvent); false; }; _tourniquets = _target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; -if ((_tourniquets select _part) > 0) exitwith { +if ((_tourniquets select _part) > 0) exitWith { _output = "There is already a tourniquet on this body part!"; // TODO localization ["displayTextStructured", [_caller], [_output, 1.5, _caller]] call EFUNC(common,targetEvent); false; diff --git a/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf b/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf index d1ffd34e4b..ae25b8c748 100644 --- a/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf +++ b/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf @@ -30,12 +30,12 @@ _target setvariable [QGVAR(tourniquets), _tourniquets, true]; params ["_args", "_idPFH"]; _args params ["_target", "_applyingTo", "_part", "_time"]; - if (!alive _target) exitwith { + if (!alive _target) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; _tourniquets = _target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; - if !((_tourniquets select _part) == _applyingTo) exitwith { + if !((_tourniquets select _part) == _applyingTo) exitWith { // Tourniquet has been removed [_idPFH] call CBA_fnc_removePerFrameHandler; }; diff --git a/addons/medical/functions/fnc_unconsciousPFH.sqf b/addons/medical/functions/fnc_unconsciousPFH.sqf index 0e8c424ca3..698e327d0e 100644 --- a/addons/medical/functions/fnc_unconsciousPFH.sqf +++ b/addons/medical/functions/fnc_unconsciousPFH.sqf @@ -25,7 +25,7 @@ _args params ["_unit", "_originalPos", "_startingTime", "_minWaitingTime", "_has TRACE_6("ACE_DEBUG_Unconscious_PFH",_unit, _originalPos, _startingTime, _minWaitingTime, _hasMovedOut, _parachuteCheck); -if (!alive _unit) exitwith { +if (!alive _unit) exitWith { if ("ACE_FakePrimaryWeapon" in (weapons _unit)) then { TRACE_1("Removing fake weapon [on death]",_unit); _unit removeWeapon "ACE_FakePrimaryWeapon"; @@ -47,7 +47,7 @@ if (!alive _unit) exitwith { }; // In case the unit is no longer in an unconscious state, we are going to check if we can already reset the animation -if !(_unit getvariable ["ACE_isUnconscious",false]) exitwith { +if !(_unit getvariable ["ACE_isUnconscious",false]) exitWith { TRACE_7("ACE_DEBUG_Unconscious_PFH",_unit, _args, [_unit] call FUNC(isBeingCarried), [_unit] call FUNC(isBeingDragged), _idPFH, _unit getvariable QGVAR(unconsciousArguments),animationState _unit); // TODO, handle this with carry instead, so we can remove the PFH here. // Wait until the unit isn't being carried anymore, so we won't end up with wierd animations @@ -128,7 +128,7 @@ if (_parachuteCheck) then { }; }; -if (!local _unit) exitwith { +if (!local _unit) exitWith { TRACE_6("ACE_DEBUG_Unconscious_PFH",_unit, _args, _startingTime, _minWaitingTime, _idPFH, _unit getvariable QGVAR(unconsciousArguments)); _args set [3, _minWaitingTime - (ACE_time - _startingTime)]; _unit setvariable [QGVAR(unconsciousArguments), _args, true]; @@ -136,7 +136,7 @@ if (!local _unit) exitwith { }; // Ensure we are waiting at least a minimum period before checking if we can wake up the unit again, allows for temp knock outs -if ((ACE_time - _startingTime) >= _minWaitingTime) exitwith { +if ((ACE_time - _startingTime) >= _minWaitingTime) exitWith { TRACE_2("ACE_DEBUG_Unconscious_Temp knock outs",_unit, [_unit] call FUNC(getUnconsciousCondition)); if (!([_unit] call FUNC(getUnconsciousCondition))) then { _unit setvariable ["ACE_isUnconscious", false, true]; diff --git a/addons/medical/functions/fnc_useItem.sqf b/addons/medical/functions/fnc_useItem.sqf index 770d8b6ea7..ed2d402bc6 100644 --- a/addons/medical/functions/fnc_useItem.sqf +++ b/addons/medical/functions/fnc_useItem.sqf @@ -23,12 +23,12 @@ if (isnil QGVAR(setting_allowSharedEquipment)) then { GVAR(setting_allowSharedEquipment) = true; }; -if (GVAR(setting_allowSharedEquipment) && {[_patient, _item] call EFUNC(common,hasItem)}) exitwith { +if (GVAR(setting_allowSharedEquipment) && {[_patient, _item] call EFUNC(common,hasItem)}) exitWith { [[_patient, _item], QUOTE(EFUNC(common,useItem)), _patient] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ [true, _patient]; }; -if ([_medic, _item] call EFUNC(common,hasItem)) exitwith { +if ([_medic, _item] call EFUNC(common,hasItem)) exitWith { [[_medic, _item], QUOTE(EFUNC(common,useItem)), _medic] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ [true, _medic]; }; @@ -37,7 +37,7 @@ _return = [false, objNull]; if ([vehicle _medic] call FUNC(isMedicalVehicle) && {vehicle _medic != _medic}) then { _crew = crew vehicle _medic; { - if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitwith { + if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitWith { _return = [true, _x]; [[_x, _item], QUOTE(EFUNC(common,useItem)), _x] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ }; diff --git a/addons/medical/functions/fnc_useItems.sqf b/addons/medical/functions/fnc_useItems.sqf index 0d937c0938..85e01b4fb8 100644 --- a/addons/medical/functions/fnc_useItems.sqf +++ b/addons/medical/functions/fnc_useItems.sqf @@ -24,14 +24,14 @@ _itemsUsedBy = []; if (typeName _x == "ARRAY") then { { _itemUsedInfo = [_medic, _patient, _x] call FUNC(useItem); - if (_itemUsedInfo select 0) exitwith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; + if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; } foreach _x; }; // handle required item if (typeName _x == "STRING") then { _itemUsedInfo = [_medic, _patient, _x] call FUNC(useItem); - if (_itemUsedInfo select 0) exitwith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; + if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; }; } foreach _items; diff --git a/addons/medical_menu/XEH_postInit.sqf b/addons/medical_menu/XEH_postInit.sqf index ad1acabdb3..92e2af341f 100644 --- a/addons/medical_menu/XEH_postInit.sqf +++ b/addons/medical_menu/XEH_postInit.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" -if (!hasInterface) exitwith {}; +if (!hasInterface) exitWith {}; GVAR(MenuPFHID) = -1; GVAR(lastOpenedOn) = -1; @@ -24,7 +24,7 @@ GVAR(pendingReopen) = false; // Conditions: canInteract if !([ACE_player, _target, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; - if !([ACE_player, _target] call FUNC(canOpenMenu)) exitwith {false}; + if !([ACE_player, _target] call FUNC(canOpenMenu)) exitWith {false}; // Statement [_target] call FUNC(openMenu); diff --git a/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf b/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf index 2bb4499753..8cbbe2d32f 100644 --- a/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf +++ b/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf @@ -21,7 +21,7 @@ params ["_player", "_target", "_name"]; private ["_actions", "_collectedActions", "_bodyPart"]; -if (!([ACE_player, _target, ["isNotInside"]] call EFUNC(common,canInteractWith))) exitwith {[]}; +if (!([ACE_player, _target, ["isNotInside"]] call EFUNC(common,canInteractWith))) exitWith {[]}; _actions = if (EGVAR(medical,level) == 2) then { GVAR(actionsAdvanced); diff --git a/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf b/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf index e5b49e58bc..3e646ddaf5 100644 --- a/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf +++ b/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf @@ -19,7 +19,7 @@ #define END_IDC 27 #define AMOUNT_OF_ENTRIES (count _entries) -if (!hasInterface) exitwith{}; +if (!hasInterface) exitWith{}; private ["_entries", "_display", "_newTarget", "_ctrl", "_code"]; @@ -28,9 +28,9 @@ params ["_name"]; disableSerialization; _display = uiNamespace getVariable QGVAR(medicalMenu); -if (isNil "_display") exitwith {}; // no valid dialog present +if (isNil "_display") exitWith {}; // no valid dialog present -if (_name isEqualTo "toggle") exitwith { +if (_name isEqualTo "toggle") exitWith { _newTarget = ACE_player; //If we are on the player, and only if our old target is still valid, switch to it: if ((GVAR(INTERACTION_TARGET) == ACE_player) && @@ -61,7 +61,7 @@ GVAR(LatestDisplayOptionMenu) = _name; // The triage card has no options available lbClear 212; -if (_name isEqualTo "triage") exitwith { +if (_name isEqualTo "triage") exitWith { ctrlEnable [212, true]; private ["_log", "_triageCardTexts", "_message"]; @@ -81,7 +81,7 @@ if (_name isEqualTo "triage") exitwith { nil; } count _log; - if (count _triageCardTexts == 0) exitwith { + if (count _triageCardTexts == 0) exitWith { lbAdd [212,(localize ELSTRING(medical,TriageCard_NoEntry))]; }; { @@ -96,7 +96,7 @@ _entries = [ACE_player, GVAR(INTERACTION_TARGET), _name] call FUNC(getTreatmentO { //player sidechat format["TRIGGERED: %1",_x]; - if (_forEachIndex > END_IDC) exitwith {}; + if (_forEachIndex > END_IDC) exitWith {}; _ctrl = (_display displayCtrl (START_IDC + _forEachIndex)); if (!(_forEachIndex > AMOUNT_OF_ENTRIES)) then { _ctrl ctrlSetText (_x select 0); diff --git a/addons/medical_menu/functions/fnc_onMenuOpen.sqf b/addons/medical_menu/functions/fnc_onMenuOpen.sqf index 2b47312453..806338b7a6 100644 --- a/addons/medical_menu/functions/fnc_onMenuOpen.sqf +++ b/addons/medical_menu/functions/fnc_onMenuOpen.sqf @@ -20,7 +20,7 @@ private "_target"; params ["_display"]; -if (isNil "_display") exitwith {}; +if (isNil "_display") exitWith {}; if (EGVAR(interact_menu,menuBackground)==1) then {[QGVAR(id), true] call EFUNC(common,blurScreen);}; if (EGVAR(interact_menu,menuBackground)==2) then {0 cutRsc[QEGVAR(interact_menu,menuBackground), "PLAIN", 1, false];}; diff --git a/addons/medical_menu/functions/fnc_openMenu.sqf b/addons/medical_menu/functions/fnc_openMenu.sqf index 1c77da6a5a..a8a51ff028 100644 --- a/addons/medical_menu/functions/fnc_openMenu.sqf +++ b/addons/medical_menu/functions/fnc_openMenu.sqf @@ -17,7 +17,7 @@ params ["_interactionTarget"]; -if (dialog || {isNull _interactionTarget}) exitwith { +if (dialog || {isNull _interactionTarget}) exitWith { disableSerialization; private ["_display", "_handled"]; diff --git a/addons/medical_menu/functions/fnc_updateUIInfo.sqf b/addons/medical_menu/functions/fnc_updateUIInfo.sqf index 56a22689db..8c2090fc73 100644 --- a/addons/medical_menu/functions/fnc_updateUIInfo.sqf +++ b/addons/medical_menu/functions/fnc_updateUIInfo.sqf @@ -23,7 +23,7 @@ private["_allInjuryTexts", "_bandagedwounds", "_damaged", "_genericMessages", "_ if (isNil "_display" || {isNull _display}) exitWith {ERROR("No display");}; _selectionN = GVAR(selectedBodyPart); -if (_selectionN < 0 || {_selectionN > 5}) exitwith {}; +if (_selectionN < 0 || {_selectionN > 5}) exitWith {}; _genericMessages = []; _partText = [ELSTRING(medical,Head), ELSTRING(medical,Torso), ELSTRING(medical,LeftArm) ,ELSTRING(medical,RightArm) ,ELSTRING(medical,LeftLeg), ELSTRING(medical,RightLeg)] select _selectionN; diff --git a/addons/mk6mortar/functions/fnc_handleFired.sqf b/addons/mk6mortar/functions/fnc_handleFired.sqf index 8c40e65409..d22b0efa47 100644 --- a/addons/mk6mortar/functions/fnc_handleFired.sqf +++ b/addons/mk6mortar/functions/fnc_handleFired.sqf @@ -59,7 +59,7 @@ if (_newMuzzleVelocityCoefficent != 1) then { PARAMS_2(_args,_pfID); EXPLODE_4_PVT(_args,_shell,_airFriction,_time,_relativeDensity); - if (isNull _shell || {!alive _shell}) exitwith { + if (isNull _shell || {!alive _shell}) exitWith { [_pfID] call CBA_fnc_removePerFrameHandler; }; diff --git a/addons/modules/XEH_postInit.sqf b/addons/modules/XEH_postInit.sqf index 1935714dc8..41013b7fe5 100644 --- a/addons/modules/XEH_postInit.sqf +++ b/addons/modules/XEH_postInit.sqf @@ -12,9 +12,9 @@ private _logicType = typeof _logic; _logic hideobject true; - if (_logic getvariable [QGVAR(initalized), false]) exitwith {}; + if (_logic getvariable [QGVAR(initalized), false]) exitWith {}; private _config = (configFile >> "CfgVehicles" >> _logicType); - if !(isClass _config) exitwith {}; + if !(isClass _config) exitWith {}; private _isGlobal = getNumber (_config >> "isGlobal") > 0; private _isDisposable = getNumber (_config >> "isDisposable") > 0; diff --git a/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf b/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf index d756a0ef83..5cc16312f9 100644 --- a/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf +++ b/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf @@ -16,7 +16,7 @@ private ["_logic"]; _logic = _this select 0; -if (isMultiplayer) exitwith {}; +if (isMultiplayer) exitWith {}; if (_logic getvariable ["allowconfigurationExport", false]) then { GVAR(serverConfigGeneration) = 1; diff --git a/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf b/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf index 6c0cb56519..4283f43218 100644 --- a/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf +++ b/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf @@ -18,7 +18,7 @@ private ["_name", "_typeName", "_isClientSetable", "_localizedName", "_localizedDescription", "_possibleValues", "_defaultValue", "_setting", "_menu", "_settingsMenu"]; -if (GVAR(serverConfigGeneration) == 0 || isMultiplayer) exitwith {closeDialog 145246;}; +if (GVAR(serverConfigGeneration) == 0 || isMultiplayer) exitWith {closeDialog 145246;}; // Filter only user setable setting GVAR(serverSideOptions) = []; diff --git a/addons/repair/functions/fnc_canRepair.sqf b/addons/repair/functions/fnc_canRepair.sqf index 8fb2a4938e..a12a61104f 100644 --- a/addons/repair/functions/fnc_canRepair.sqf +++ b/addons/repair/functions/fnc_canRepair.sqf @@ -24,19 +24,19 @@ TRACE_4("params",_caller,_target,_hitPoint,_className); private ["_config", "_engineerRequired", "_items", "_locations", "_return", "_condition", "_vehicleStateCondition", "_settingName", "_settingItemsArray"]; _config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className); -if !(isClass _config) exitwith {false}; // or go for a default? -if(isEngineOn _target) exitwith {false}; +if !(isClass _config) exitWith {false}; // or go for a default? +if(isEngineOn _target) exitWith {false}; _engineerRequired = if (isNumber (_config >> "requiredEngineer")) then { getNumber (_config >> "requiredEngineer"); } else { // Check for required class - if (isText (_config >> "requiredEngineer")) exitwith { + if (isText (_config >> "requiredEngineer")) exitWith { missionNamespace getVariable [(getText (_config >> "requiredEngineer")), 0]; }; 0; }; -if !([_caller, _engineerRequired] call FUNC(isEngineer)) exitwith {false}; +if !([_caller, _engineerRequired] call FUNC(isEngineer)) exitWith {false}; //Items can be an array of required items or a string to a ACE_Setting array _items = if (isArray (_config >> "items")) then { @@ -49,7 +49,7 @@ _items = if (isArray (_config >> "items")) then { }; _settingItemsArray select (missionNamespace getVariable _settingName); }; -if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitwith {false}; +if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitWith {false}; _return = true; if (getText (_config >> "condition") != "") then { @@ -66,27 +66,27 @@ if (getText (_config >> "condition") != "") then { }; }; -if (!_return) exitwith {false}; +if (!_return) exitWith {false}; _vehicleStateCondition = if (isText(_config >> "vehicleStateCondition")) then { missionNamespace getVariable [getText(_config >> "vehicleStateCondition"), 0] } else { getNumber(_config >> "vehicleStateCondition") }; -// if (_vehicleStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitwith {false}; +// if (_vehicleStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitWith {false}; _locations = getArray (_config >> "repairLocations"); -if ("All" in _locations) exitwith {true}; +if ("All" in _locations) exitWith {true}; private ["_repairFacility", "_repairVeh"]; _repairFacility = {([_caller] call FUNC(isInRepairFacility)) || ([_target] call FUNC(isInRepairFacility))}; _repairVeh = {([_caller] call FUNC(isNearRepairVehicle)) || ([_target] call FUNC(isNearRepairVehicle))}; { - if (_x == "field") exitwith {_return = true;}; - if (_x == "RepairFacility" && _repairFacility) exitwith {_return = true;}; - if (_x == "RepairVehicle" && _repairVeh) exitwith {_return = true;}; - if !(isnil _x) exitwith { + if (_x == "field") exitWith {_return = true;}; + if (_x == "RepairFacility" && _repairFacility) exitWith {_return = true;}; + if (_x == "RepairVehicle" && _repairVeh) exitWith {_return = true;}; + if !(isnil _x) exitWith { private "_val"; _val = missionNamespace getVariable _x; if (typeName _val == "SCALAR") then { diff --git a/addons/repair/functions/fnc_canReplaceWheel.sqf b/addons/repair/functions/fnc_canReplaceWheel.sqf index cf7a047f19..a4c68b5024 100644 --- a/addons/repair/functions/fnc_canReplaceWheel.sqf +++ b/addons/repair/functions/fnc_canReplaceWheel.sqf @@ -21,7 +21,7 @@ params ["_unit", "_target", "_hitPoint", ["_wheel", false]]; TRACE_4("params",_unit,_target,_hitPoint,_wheel); // TODO [_unit, _wheel] call EFUNC(common,claim); on start of action -//if !([_unit, _target, _hitpoint, "ReplaceWheel"] call FUNC(canRepair)) exitwith {false}; +//if !([_unit, _target, _hitpoint, "ReplaceWheel"] call FUNC(canRepair)) exitWith {false}; if !([_unit, _target, ["isNotDragging", "isNotCarrying", "isNotOnLadder"]] call EFUNC(common,canInteractWith)) exitWith {false}; diff --git a/addons/repair/functions/fnc_doRepairTrack.sqf b/addons/repair/functions/fnc_doRepairTrack.sqf index de04e71920..22cf7bb82f 100644 --- a/addons/repair/functions/fnc_doRepairTrack.sqf +++ b/addons/repair/functions/fnc_doRepairTrack.sqf @@ -31,7 +31,7 @@ _wheel = objNull; _wheel = _x; }; } forEach nearestObjects [_unit, ["ACE_Track"], 5]; -if (isNull _wheel) exitwith {}; +if (isNull _wheel) exitWith {}; // get current hitpoint damage diff --git a/addons/repair/functions/fnc_doReplaceTrack.sqf b/addons/repair/functions/fnc_doReplaceTrack.sqf index a95a669159..31820b4b5f 100644 --- a/addons/repair/functions/fnc_doReplaceTrack.sqf +++ b/addons/repair/functions/fnc_doReplaceTrack.sqf @@ -31,7 +31,7 @@ _wheel = objNull; _wheel = _x; }; } forEach nearestObjects [_unit, ["ACE_Track"], 5]; -if (isNull _wheel) exitwith {}; +if (isNull _wheel) exitWith {}; // get current hitpoint damage _hitPointDamage = _vehicle getHitPointDamage _hitPoint; diff --git a/addons/repair/functions/fnc_doReplaceWheel.sqf b/addons/repair/functions/fnc_doReplaceWheel.sqf index f10712d65d..ba131c7f15 100644 --- a/addons/repair/functions/fnc_doReplaceWheel.sqf +++ b/addons/repair/functions/fnc_doReplaceWheel.sqf @@ -31,7 +31,7 @@ _wheel = objNull; _wheel = _x; }; } forEach nearestObjects [_unit, ["ACE_Wheel"], 5]; -if (isNull _wheel) exitwith {}; +if (isNull _wheel) exitWith {}; // get current hitpoint damage _hitPointDamage = _vehicle getHitPointDamage _hitPoint; diff --git a/addons/repair/functions/fnc_getPostRepairDamage.sqf b/addons/repair/functions/fnc_getPostRepairDamage.sqf index 797f7a4f22..36e4bf39ae 100644 --- a/addons/repair/functions/fnc_getPostRepairDamage.sqf +++ b/addons/repair/functions/fnc_getPostRepairDamage.sqf @@ -19,7 +19,7 @@ params ["_unit"]; TRACE_1("params",_unit); // TODO when near repair station, full repair? -if (([_unit] call FUNC(isInRepairFacility) || {[_unit] call FUNC(isNearRepairVehicle)})) exitwith {0}; +if (([_unit] call FUNC(isInRepairFacility) || {[_unit] call FUNC(isNearRepairVehicle)})) exitWith {0}; if ([_unit, GVAR(engineerSetting_Repair) + 1] call FUNC(isEngineer)) exitWith {GVAR(repairDamageThreshold_Engineer)}; if ([_unit, GVAR(engineerSetting_Repair)] call FUNC(isEngineer)) exitWith {GVAR(repairDamageThreshold)}; diff --git a/addons/repair/functions/fnc_hasItems.sqf b/addons/repair/functions/fnc_hasItems.sqf index 2f070c8bb6..d0030b3c07 100644 --- a/addons/repair/functions/fnc_hasItems.sqf +++ b/addons/repair/functions/fnc_hasItems.sqf @@ -23,10 +23,10 @@ private ["_return"]; _return = true; { - if (typeName _x == "ARRAY" && {({[_unit, _x] call EFUNC(common,hasItem)} count _x == 0)}) exitwith { + if (typeName _x == "ARRAY" && {({[_unit, _x] call EFUNC(common,hasItem)} count _x == 0)}) exitWith { _return = false; }; - if (typeName _x == "STRING" && {!([_unit, _x] call EFUNC(common,hasItem))}) exitwith { + if (typeName _x == "STRING" && {!([_unit, _x] call EFUNC(common,hasItem))}) exitWith { _return = false; }; } forEach _items; diff --git a/addons/repair/functions/fnc_isInRepairFacility.sqf b/addons/repair/functions/fnc_isInRepairFacility.sqf index 0c062ff0b3..b72d8a5985 100644 --- a/addons/repair/functions/fnc_isInRepairFacility.sqf +++ b/addons/repair/functions/fnc_isInRepairFacility.sqf @@ -26,7 +26,7 @@ _repairFacility = []; _objects = (lineIntersectsWith [_object modelToWorldVisual [0, 0, (_position select 2)], _object modelToWorldVisual [0, 0, (_position select 2) +10], _object]); { - if (((typeOf _x) in _repairFacility) || (_x getVariable ["ACE_isRepairFacility",0]) > 0) exitwith { + if (((typeOf _x) in _repairFacility) || (_x getVariable ["ACE_isRepairFacility",0]) > 0) exitWith { _isInBuilding = true; }; } forEach _objects; @@ -34,7 +34,7 @@ _objects = (lineIntersectsWith [_object modelToWorldVisual [0, 0, (_position sel if (!_isInBuilding) then { _objects = position _object nearObjects 7.5; { - if (((typeOf _x) in _repairFacility) || (_x getVariable ["ACE_isRepairFacility",0]) > 0) exitwith { + if (((typeOf _x) in _repairFacility) || (_x getVariable ["ACE_isRepairFacility",0]) > 0) exitWith { _isInBuilding = true; }; } forEach _objects; diff --git a/addons/repair/functions/fnc_isNearRepairVehicle.sqf b/addons/repair/functions/fnc_isNearRepairVehicle.sqf index 677f489a88..463e281faa 100644 --- a/addons/repair/functions/fnc_isNearRepairVehicle.sqf +++ b/addons/repair/functions/fnc_isNearRepairVehicle.sqf @@ -24,7 +24,7 @@ _nearObjects = nearestObjects [_unit, ["Air","LandVehicle"], 20]; _return = false; { - if ([_x] call FUNC(isRepairVehicle)) exitwith {_return = true;}; + if ([_x] call FUNC(isRepairVehicle)) exitWith {_return = true;}; } forEach _nearObjects; _return; diff --git a/addons/repair/functions/fnc_isRepairVehicle.sqf b/addons/repair/functions/fnc_isRepairVehicle.sqf index 121bda0fe3..2c0b5a1e21 100644 --- a/addons/repair/functions/fnc_isRepairVehicle.sqf +++ b/addons/repair/functions/fnc_isRepairVehicle.sqf @@ -18,6 +18,6 @@ params ["_vehicle"]; TRACE_1("params",_vehicle); -if (_vehicle isKindOf "CAManBase") exitwith {false}; +if (_vehicle isKindOf "CAManBase") exitWith {false}; ((_vehicle getVariable ["ACE_isRepairVehicle", getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(canRepair))]) > 0); diff --git a/addons/repair/functions/fnc_repair.sqf b/addons/repair/functions/fnc_repair.sqf index fd3b4f032b..841ede0ea0 100644 --- a/addons/repair/functions/fnc_repair.sqf +++ b/addons/repair/functions/fnc_repair.sqf @@ -24,19 +24,19 @@ TRACE_4("params",_calller,_target,_hitPoint,_className); private["_callbackProgress", "_callerAnim", "_calller", "_condition", "_config", "_consumeItems", "_displayText", "_engineerRequired", "_iconDisplayed", "_items", "_locations", "_repairTime", "_repairTimeConfig", "_return", "_usersOfItems", "_vehicleStateCondition", "_wpn", "_settingName", "_settingItemsArray"]; _config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className); -if !(isClass _config) exitwith {false}; // or go for a default? +if !(isClass _config) exitWith {false}; // or go for a default? _engineerRequired = if (isNumber (_config >> "requiredEngineer")) then { getNumber (_config >> "requiredEngineer"); } else { // Check for required class - if (isText (_config >> "requiredEngineer")) exitwith { + if (isText (_config >> "requiredEngineer")) exitWith { missionNamespace getVariable [(getText (_config >> "requiredEngineer")), 0]; }; 0; }; -if !([_caller, _engineerRequired] call FUNC(isEngineer)) exitwith {false}; -if (isEngineOn _target) exitwith {false}; +if !([_caller, _engineerRequired] call FUNC(isEngineer)) exitWith {false}; +if (isEngineOn _target) exitWith {false}; //Items can be an array of required items or a string to a ACE_Setting array _items = if (isArray (_config >> "items")) then { @@ -49,7 +49,7 @@ _items = if (isArray (_config >> "items")) then { }; _settingItemsArray select (missionNamespace getVariable _settingName); }; -if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitwith {false}; +if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitWith {false}; _return = true; if (getText (_config >> "condition") != "") then { @@ -65,27 +65,27 @@ if (getText (_config >> "condition") != "") then { _return = [_caller, _target, _hitPoint, _className] call _condition; }; }; -if (!_return) exitwith {false}; +if (!_return) exitWith {false}; _vehicleStateCondition = if (isText(_config >> "vehicleStateCondition")) then { missionNamespace getVariable [getText(_config >> "vehicleStateCondition"), 0] } else { getNumber(_config >> "vehicleStateCondition") }; -// if (_vehicleStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitwith {false}; +// if (_vehicleStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitWith {false}; _locations = getArray (_config >> "repairLocations"); -if ("All" in _locations) exitwith {true}; +if ("All" in _locations) exitWith {true}; private ["_repairFacility", "_repairVeh"]; _repairFacility = {([_caller] call FUNC(isInRepairFacility)) || ([_target] call FUNC(isInRepairFacility))}; _repairVeh = {([_caller] call FUNC(isNearRepairVehicle)) || ([_target] call FUNC(isNearRepairVehicle))}; { - if (_x == "field") exitwith {_return = true;}; - if (_x == "RepairFacility" && _repairFacility) exitwith {_return = true;}; - if (_x == "RepairVehicle" && _repairVeh) exitwith {_return = true;}; - if !(isnil _x) exitwith { + if (_x == "field") exitWith {_return = true;}; + if (_x == "RepairFacility" && _repairFacility) exitWith {_return = true;}; + if (_x == "RepairVehicle" && _repairVeh) exitWith {_return = true;}; + if !(isnil _x) exitWith { private "_val"; _val = missionNamespace getVariable _x; if (typeName _val == "SCALAR") then { @@ -100,13 +100,13 @@ _repairVeh = {([_caller] call FUNC(isNearRepairVehicle)) || ([_target] call FUNC }; } forEach _locations; -if !(_return && alive _target) exitwith {false}; +if !(_return && alive _target) exitWith {false}; _consumeItems = if (isNumber (_config >> "itemConsumed")) then { getNumber (_config >> "itemConsumed"); } else { // Check for required class - if (isText (_config >> "itemConsumed")) exitwith { + if (isText (_config >> "itemConsumed")) exitWith { missionNamespace getVariable [(getText (_config >> "itemConsumed")), 0]; }; 0; @@ -160,14 +160,14 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then { _repairTime = if (isNumber (_config >> "repairingTime")) then { getNumber (_config >> "repairingTime"); } else { - if (isText (_config >> "repairingTime")) exitwith { + if (isText (_config >> "repairingTime")) exitWith { _repairTimeConfig = getText(_config >> "repairingTime"); if (isnil _repairTimeConfig) then { _repairTimeConfig = compile _repairTimeConfig; } else { _repairTimeConfig = missionNamespace getVariable _repairTimeConfig; }; - if (typeName _repairTimeConfig == "SCALAR") exitwith { + if (typeName _repairTimeConfig == "SCALAR") exitWith { _repairTimeConfig; }; [_caller, _target, _hitPoint, _className] call _repairTimeConfig; diff --git a/addons/repair/functions/fnc_useItem.sqf b/addons/repair/functions/fnc_useItem.sqf index 218a7a1ee4..a32fed59cf 100644 --- a/addons/repair/functions/fnc_useItem.sqf +++ b/addons/repair/functions/fnc_useItem.sqf @@ -19,7 +19,7 @@ params ["_unit", "_item"]; TRACE_2("params",_unit,_item); -if ([_unit, _item] call EFUNC(common,hasItem)) exitwith { +if ([_unit, _item] call EFUNC(common,hasItem)) exitWith { [[_unit, _item], QUOTE(EFUNC(common,useItem)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ [true, _unit]; }; diff --git a/addons/repair/functions/fnc_useItems.sqf b/addons/repair/functions/fnc_useItems.sqf index f8aa176018..8771847d4e 100644 --- a/addons/repair/functions/fnc_useItems.sqf +++ b/addons/repair/functions/fnc_useItems.sqf @@ -27,14 +27,14 @@ _itemsUsedBy = []; if (typeName _x == "ARRAY") then { { _itemUsedInfo = [_unit, _x] call FUNC(useItem); - if (_itemUsedInfo select 0) exitwith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; + if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; } forEach _x; }; // handle required item if (typeName _x == "STRING") then { _itemUsedInfo = [_unit, _x] call FUNC(useItem); - if (_itemUsedInfo select 0) exitwith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; + if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; }; } forEach _items; diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index 8f29b20296..ee71685fa2 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -177,7 +177,7 @@ switch (toLower _mode) do { }; // Handle held keys (prevent repeat calling) - if (GVAR(heldKeys) param [_dik,false]) exitwith {}; + if (GVAR(heldKeys) param [_dik,false]) exitWith {}; // Exclude movement/adjustment keys so that speed can be adjusted on fly if !(_dik in [16,17,30,31,32,44,74,78]) then { GVAR(heldKeys) set [_dik,true]; diff --git a/addons/spectator/functions/fnc_setSpectator.sqf b/addons/spectator/functions/fnc_setSpectator.sqf index 065ca0079b..333dc023c9 100644 --- a/addons/spectator/functions/fnc_setSpectator.sqf +++ b/addons/spectator/functions/fnc_setSpectator.sqf @@ -27,7 +27,7 @@ params [["_set",true,[true]], ["_force",true,[true]]]; if (!hasInterface) exitWith {}; // Exit if no change -if (_set isEqualTo GVAR(isSet)) exitwith {}; +if (_set isEqualTo GVAR(isSet)) exitWith {}; // Handle common addon audio if (["ace_hearing"] call EFUNC(common,isModLoaded)) then { diff --git a/addons/spectator/functions/fnc_stageSpectator.sqf b/addons/spectator/functions/fnc_stageSpectator.sqf index 61445f3dd9..87b2faffa8 100644 --- a/addons/spectator/functions/fnc_stageSpectator.sqf +++ b/addons/spectator/functions/fnc_stageSpectator.sqf @@ -26,7 +26,7 @@ params [["_unit",player,[objNull]], ["_set",true,[true]]]; // No change, no service (but allow spectators to be reset) if !(_set || (GETVAR(_unit,GVAR(isStaged),false))) exitWith {}; -if !(local _unit) exitwith { +if !(local _unit) exitWith { [[_unit, _set], QFUNC(stageSpectator), _unit] call EFUNC(common,execRemoteFnc); }; diff --git a/addons/weaponselect/functions/fnc_displayGrenadeTypeAndNumber.sqf b/addons/weaponselect/functions/fnc_displayGrenadeTypeAndNumber.sqf index 6ae945e2fd..4ab09a105f 100644 --- a/addons/weaponselect/functions/fnc_displayGrenadeTypeAndNumber.sqf +++ b/addons/weaponselect/functions/fnc_displayGrenadeTypeAndNumber.sqf @@ -16,7 +16,7 @@ */ #include "script_component.hpp" -if !(GVAR(DisplayText)) exitwith {}; +if !(GVAR(DisplayText)) exitWith {}; params ["_magazine", "_numberofGrenades"]; diff --git a/addons/zeus/functions/fnc_addObjectToCurator.sqf b/addons/zeus/functions/fnc_addObjectToCurator.sqf index be814266ab..6f87e5d684 100644 --- a/addons/zeus/functions/fnc_addObjectToCurator.sqf +++ b/addons/zeus/functions/fnc_addObjectToCurator.sqf @@ -13,11 +13,11 @@ #include "script_component.hpp" -if (!isServer) exitwith {}; +if (!isServer) exitWith {}; params ["_object"]; -if (!(_object getvariable [QGVAR(addObject), GVAR(autoAddObjects)])) exitwith {}; +if (!(_object getvariable [QGVAR(addObject), GVAR(autoAddObjects)])) exitWith {}; { _x addCuratorEditableObjects [[_object], true]; diff --git a/addons/zeus/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index bd9fd73e8d..f6421c71a9 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -24,7 +24,7 @@ _activated = _this select 2; if (_activated) then { //--- Terminate when not created on the server - if (!isserver && local _logic && isnull (getassignedcuratorunit _logic)) exitwith { + if (!isserver && local _logic && isnull (getassignedcuratorunit _logic)) exitWith { [format ["%1 is trying to create curator logic ModuleCurator_F",profilename],"bis_fnc_error",false] call bis_fnc_mp; deletevehicle _logic; }; @@ -133,14 +133,14 @@ if (_activated) then { waituntil {isplayer (missionnamespace getvariable [_ownerVar,objnull]) || isnull _logic}; }; }; - if (isnull _logic) exitwith {}; + if (isnull _logic) exitWith {}; //--- Assign _player = objnull; switch true do { case (_ownerUID > 0): { { - if (getplayeruid _x == _ownerVar) exitwith {_player = _x;}; + if (getplayeruid _x == _ownerVar) exitWith {_player = _x;}; } foreach playableunits; }; default { @@ -150,7 +150,7 @@ if (_activated) then { waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic}; waituntil {_player assignCurator _logic; getassignedcuratorunit _logic == _player || isnull _logic}; - if (isnull _logic) exitwith {}; + if (isnull _logic) exitWith {}; //--- Add radio channels { @@ -194,7 +194,7 @@ if (_activated) then { waituntil {_player != missionnamespace getvariable [_ownerVar,objnull] || isnull _logic}; }; }; - if (isnull _logic) exitwith {}; + if (isnull _logic) exitWith {}; //--- Add radio channels { @@ -203,7 +203,7 @@ if (_activated) then { //--- Unassign waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic}; - if (isnull _logic) exitwith {}; + if (isnull _logic) exitWith {}; }; }; diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index 23168279ba..bdbd43b30e 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -36,13 +36,13 @@ if ({local _x} count (objectcurators _logic) > 0) then { _logic hideobject false; _logic setpos position _logic; }; -if !(isserver) exitwith {}; +if !(isserver) exitWith {}; if (_activated) then { _ammo = _logic getvariable ["type",gettext (configfile >> "CfgVehicles" >> typeof _logic >> "ammo")]; if (_ammo != "") then { _CfgAmmo = configfile >> "CfgAmmo" >> _ammo; - //if !(isclass _CfgAmmo) exitwith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;}; + //if !(isclass _CfgAmmo) exitWith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;}; _dirVar = _fnc_scriptname + typeof _logic; _logic setdir (missionnamespace getvariable [_dirVar,direction _logic]); //--- Restore custom direction _pos = getposatl _logic; diff --git a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf index a9e1f35080..6077e447df 100644 --- a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf +++ b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf @@ -23,7 +23,7 @@ _activated = _this select 2; if (_activated && local _logic && !isnull curatorcamera) then { //--- Terminate when remote control is already in progress - if !(isnull (missionnamespace getvariable ["bis_fnc_moduleRemoteControl_unit",objnull])) exitwith {}; + if !(isnull (missionnamespace getvariable ["bis_fnc_moduleRemoteControl_unit",objnull])) exitWith {}; //--- Get unit under cursor _unit = objnull;