This commit is contained in:
SzwedzikPL 2015-12-02 15:24:39 +01:00
commit d0c7b0035e
240 changed files with 867 additions and 867 deletions

View File

@ -7,7 +7,7 @@
<img src="https://img.shields.io/badge/Version-3.4.0-blue.svg?style=flat-square" alt="ACE3 Version">
</a>
<a href="https://github.com/acemod/ACE3/releases/download/v3.4.0/ace3_3.4.0.zip">
<img src="https://img.shields.io/badge/Download-65.7_MB-green.svg?style=flat-square" alt="ACE3 Download">
<img src="https://img.shields.io/badge/Download-72.6_MB-green.svg?style=flat-square" alt="ACE3 Download">
</a>
<a href="https://github.com/acemod/ACE3/issues">
<img src="https://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat-square&label=Issues" alt="ACE3 Issues">

View File

@ -36,7 +36,7 @@ GVAR(Protractor) = true;
if !(GVAR(Protractor) && !(weaponLowered ACE_player) && currentWeapon ACE_player == primaryWeapon ACE_player) exitWith {
GVAR(Protractor) = false;
1 cutText ["", "PLAIN"];
[_idPFH] call cba_fnc_removePerFrameHandler;
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
1 cutRsc ["RscProtractor", "PLAIN", 1, false];

View File

@ -54,7 +54,7 @@ if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "CfgWeapons" >> _wea
if (_abort || !(GVAR(extensionAvailable))) exitWith {
if (missionNamespace getVariable [QEGVAR(windDeflection,enabled), false]) then {
EGVAR(windDeflection,trackedBullets) pushBack [_bullet, getNumber(configFile >> "cfgAmmo" >> _ammo >> "airFriction")];
EGVAR(windDeflection,trackedBullets) pushBack [_bullet, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")];
};
};

View File

@ -40,7 +40,7 @@ GVAR(currentGrid) = 0;
#ifdef DEBUG_MODE_FULL
systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", ceil(ACE_time - _initStartTime)];
#endif
[_idPFH] call cba_fnc_removePerFrameHandler;
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
for "_i" from 1 to 50 do {

View File

@ -54,7 +54,7 @@ GVAR(active) = true;
GVAR(DialogPFH) = [{
if (!GVAR(active)) exitWith {
[_this select 1] call cba_fnc_removePerFrameHandler;
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
__ctrlBackground ctrlSetText format [QUOTE(PATHTOF(UI\ATRAG_%1.paa)), ["N", "D"] select (call EFUNC(common,ambientBrightness))];
}, 60, []] call CBA_fnc_addPerFrameHandler;

View File

@ -2,4 +2,4 @@
uiNamespace setVariable ['ATragMX_Display', nil];
GVAR(active) = false;
[GVAR(DialogPFH)] call cba_fnc_removePerFrameHandler;
[GVAR(DialogPFH)] call CBA_fnc_removePerFrameHandler;

View File

@ -37,7 +37,7 @@ if !(ctrlVisible 9000) then {
false call FUNC(show_target_speed_assist_timer);
true call FUNC(show_target_speed_assist);
[_this select 1] call cba_fnc_removePerFrameHandler;
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
ctrlSetText [9001, Str(Round((ACE_time - _startTime) * 10) / 10)];

View File

@ -10,7 +10,7 @@
* Arguments:
* 0: Unit (player) <OBJECT>
* 1: attachToVehicle <OBJECT>
* 2: Item Classname (cfgWeapon/cfgMagazine) <STRING>
* 2: Item Classname (CfgWeapon/CfgMagazine) <STRING>
* 3: Light Vehicle Classname <STRING>
* 4: On Attach Text <STRING>
* 5: Starting Pos of dummy item <ARRAY>

View File

@ -45,7 +45,7 @@ if (_state) then {
};
if (!(_unit getVariable [QGVAR(isEscorting), false])) then {
[(_this select 1)] call cba_fnc_removePerFrameHandler;
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
[objNull, _target, false] call EFUNC(common,claim);
detach _target;
_unit removeAction _actionID;

View File

@ -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 {

View File

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

View File

@ -17,4 +17,4 @@
params ["_object"];
_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeof _object >> QGVAR(space))]
_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(space))]

View File

@ -24,7 +24,7 @@ private ["_loaded", "_space", "_itemSize"];
if !([_item, _vehicle] call FUNC(canLoadItemIn)) exitWith {false};
_loaded = _vehicle getVariable [QGVAR(loaded), []];
_loaded pushback _item;
_loaded pushBack _item;
_vehicle setVariable [QGVAR(loaded), _loaded, true];
TRACE_1("added to loaded array",_loaded);

View File

@ -23,7 +23,7 @@ _vehicle = [_player] call FUNC(findNearestVehicle);
if (isNull _vehicle || _vehicle isKindOf "Cargo_Base_F") then {
{
if ([_object, _x] call FUNC(canLoadItemIn)) exitWith {_vehicle = _x};
} foreach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]);
} forEach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]);
};
if (isNull _vehicle) exitWith {false};

View File

@ -41,7 +41,7 @@ class GVAR(ProgressBar_Dialog) {
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
colorFrame[] = {1,1,1,0.5};
colorBar[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.77])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.51])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.08])","(profilenamespace getvariable ['GUI_BCG_RGB_A',0.8])"};
colorBar[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.77])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.51])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.08])","(profilenamespace getVariable ['GUI_BCG_RGB_A',0.8])"};
texture = "#(argb,8,8,3)color(1,1,1,0.7)";
};
class TitleText: TitleBackground {

View File

@ -115,18 +115,18 @@ class RscDisplayInventory {
// map
class RscDisplayMainMap {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Ingame')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Ingame')])] call FUNC(localEvent););
};
class RscDisplayGetReady: RscDisplayMainMap {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Briefing')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Briefing')])] call FUNC(localEvent););
};
class RscDisplayServerGetReady: RscDisplayGetReady {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'ServerBriefing')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'ServerBriefing')])] call FUNC(localEvent););
};
class RscDisplayClientGetReady: RscDisplayGetReady {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'ClientBriefing')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'ClientBriefing')])] call FUNC(localEvent););
};

View File

@ -88,7 +88,7 @@ class CfgUIGrids {
// check dll
class RscStandardDisplay;
class RscDisplayMain: RscStandardDisplay {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDisplayMain"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); [ARR_5('header','tail',{0},{},_this select 0)] call COMPILE_FILE(functions\fnc_errorMessage));
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDisplayMain"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); [ARR_5('header','tail',{0},{},_this select 0)] call COMPILE_FILE(functions\fnc_errorMessage));
};
*/

View File

@ -116,9 +116,9 @@ class ACE_gui_editBase
};
colorSelection[] =
{
"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])",
"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])",
"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",
"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.3843])",
"(profilenamespace getVariable ['GUI_BCG_RGB_G',0.7019])",
"(profilenamespace getVariable ['GUI_BCG_RGB_B',0.8862])",
1
};
autocomplete = "";
@ -249,7 +249,7 @@ class ACE_gui_listBoxBase : RscListBox{
colorSelect2[] = {0.95, 0.95, 0.95, 1};
colorSelectBackground[] = {0, 0, 0, 1};
colorSelectBackground2[] = {0.543, 0.5742, 0.4102, 1.0};
colorDisabled[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", 0.25};
colorDisabled[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", 0.25};
period = 1.2;
rowHeight = 0.03;
colorBackground[] = {0, 0, 0, 1};
@ -505,7 +505,7 @@ onMouseButtonDblClick = "";
iconCanceled = "\A3\ui_f\data\map\mapcontrol\taskIconCanceled_CA.paa";
iconDone = "\A3\ui_f\data\map\mapcontrol\taskIconDone_CA.paa";
iconFailed = "\A3\ui_f\data\map\mapcontrol\taskIconFailed_CA.paa";
color[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_A',0.8])"};
color[] = {"(profilenamespace getVariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getVariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getVariable ['IGUI_TEXT_RGB_B',1])","(profilenamespace getVariable ['IGUI_TEXT_RGB_A',0.8])"};
colorCreated[] = {1,1,1,1};
colorCanceled[] = {0.7,0.7,0.7,1};
colorDone[] = {0.7,1,0.3,1};

View File

@ -32,7 +32,7 @@ if (isServer) then {
private "_eventLog";
_eventLog = _internalData select 1;
_eventLog pushback [ACE_diagTime, _args, _ttl];
_eventLog pushBack [ACE_diagTime, _args, _ttl];
};
};

View File

@ -18,6 +18,6 @@ _dlg = ctrlParent _this;
_dlg displayAddEventHandler ["unload", {
if (_this select 1 == 1) then {
[missionnamespace getvariable ["BIS_fnc_initCuratorAttributes_target", objNull]] call FUNC(fixCrateContent);
[missionnamespace getVariable ["BIS_fnc_initCuratorAttributes_target", objNull]] call FUNC(fixCrateContent);
};
}];

View File

@ -28,7 +28,7 @@ if (_show) then {
GVAR(SHOW_BLUR_SCREEN_COLLECTION) pushBack _id;
// show blur
if (isnil QGVAR(MENU_ppHandle_GUI_BLUR_SCREEN)) then {
if (isNil QGVAR(MENU_ppHandle_GUI_BLUR_SCREEN)) then {
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) = ppEffectCreate ["DynamicBlur", 102];
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) ppEffectAdjust [0.9];
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) ppEffectEnable true;

View File

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

View File

@ -14,5 +14,5 @@
params ["_entity"];
GVAR(LOGDISPLAY_LEVEL) = call compile (_entity getvariable ["logDisplayLevel","4"]);
GVAR(LOGLEVEL) = call compile (_entity getvariable ["logLevel","4"]);
GVAR(LOGDISPLAY_LEVEL) = call compile (_entity getVariable ["logDisplayLevel","4"]);
GVAR(LOGLEVEL) = call compile (_entity getVariable ["logLevel","4"]);

View File

@ -73,11 +73,11 @@ _refresh = {
_ctrl = (findDisplay 46) ctrlCreate ["RscPicture", _forEachIndex + 19000];
_position = switch (_setting) do {
case TOP_RIGHT_DOWN: {[X_POS_ICONS, Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
case TOP_RIGHT_LEFT: {[X_POS_ICONS_SECOND - ((_foreachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND - (ICON_WIDTH / 2), ICON_WIDTH, ICON_WIDTH]};
case TOP_LEFT_DOWN: {[LEFT_SIDE + (0.5 * ICON_WIDTH), Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
case TOP_LEFT_RIGHT: {[LEFT_SIDE + (0.5 * ICON_WIDTH) - ((_foreachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND, ICON_WIDTH, ICON_WIDTH]};
default {[X_POS_ICONS, Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
case TOP_RIGHT_DOWN: {[X_POS_ICONS, Y_POS_ICONS + (_forEachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
case TOP_RIGHT_LEFT: {[X_POS_ICONS_SECOND - ((_forEachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND - (ICON_WIDTH / 2), ICON_WIDTH, ICON_WIDTH]};
case TOP_LEFT_DOWN: {[LEFT_SIDE + (0.5 * ICON_WIDTH), Y_POS_ICONS + (_forEachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
case TOP_LEFT_RIGHT: {[LEFT_SIDE + (0.5 * ICON_WIDTH) - ((_forEachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND, ICON_WIDTH, ICON_WIDTH]};
default {[X_POS_ICONS, Y_POS_ICONS + (_forEachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
};
_ctrl ctrlSetPosition _position;
@ -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;

View File

@ -48,10 +48,10 @@ _ctrlHint ctrlSetBackgroundColor GVAR(displayTextColor);
_ctrlHint ctrlSetTextColor GVAR(displayTextFontColor);
/*
// This does not function at the moment. Has been disabled until it fixed.
_xPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_X", ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))];
_yPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safezoneH];
_wPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_W", (10 *(((safezoneW / safezoneH) min 1.2) / 40))];
_hPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_H", (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))];
_xPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_X", ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))];
_yPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safezoneH];
_wPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_W", (10 *(((safezoneW / safezoneH) min 1.2) / 40))];
_hPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_H", (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))];
*/
_xPos = ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40));

View File

@ -92,7 +92,7 @@ _bottomPosY = (_ctrlBcgCommonPos select 1) + _ctrlTextPosH + (_marginY * 2) + _b
_xPos set [1, _bottomPosY];
_x ctrlSetPosition _xPos;
_x ctrlCommit 0;
} foreach [
} forEach [
_ctrlBackgroundButtonOK,
_ctrlBackgroundButtonMiddle,
_ctrlBackgroundButtonCancel,

View File

@ -20,14 +20,14 @@
params ["_object", ["_category", ""]];
if (isNil QGVAR(OBJECT_VARIABLES_STORAGE)) exitwith {[]};
if (isNil QGVAR(OBJECT_VARIABLES_STORAGE)) exitWith {[]};
private ["_return", "_val"];
_return = [];
{
_val = _object getvariable (_x select 0);
_val = _object getVariable (_x select 0);
if (!isNil "_val") then {
if (_category == "" || _category == _x select 3) then {

View File

@ -16,7 +16,7 @@
params ["_unit", "_variable", "_defaultValue"];
private "_value";
_value = _unit getvariable _variable;
_value = _unit getVariable _variable;
if (isNil "_value") then {
if (!isNil "_defaultValue") then {

View File

@ -17,7 +17,7 @@ params ["_varName"];
private "_variableDefinition";
_variableDefinition = [_varName] call FUNC(getDefinedVariableInfo);
if !(_variableDefinition isEqualTo []) exitwith {
if !(_variableDefinition isEqualTo []) exitWith {
_variableDefinition select 1;
};

View File

@ -14,4 +14,4 @@
params ["_unit"];
!(_unit getvariable ["ACE_isUnconscious", false]) && alive _unit && !(_unit getvariable ["ACE_isDead", false]) // return
!(_unit getVariable ["ACE_isUnconscious", false]) && alive _unit && !(_unit getVariable ["ACE_isDead", false]) // return

View File

@ -14,4 +14,4 @@
params ["_modName"];
isClass (configFile >> "cfgPatches" >> _modName) // return
isClass (configFile >> "CfgPatches" >> _modName) // return

View File

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

View File

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

View File

@ -16,9 +16,9 @@ params ["_unit", "_id", "_accepted"];
private ["_requestID", "_info", "_callBack", "_caller", "_replyParams", "_requestMessage", "_target"];
_info = _unit getvariable _id;
_info = _unit getVariable _id;
if (!isnil "_info") then {
if (!isNil "_info") then {
_caller = _info select 0;
_target = _info select 1;
_requestID = _info select 2;
@ -26,16 +26,16 @@ if (!isnil "_info") then {
_callBack = _info select 4;
_replyParams = [_info, _accepted];
[_replyParams, QFUNC(requestCallback), _caller, false] call FUNC(execRemoteFnc);
_unit setvariable [_id, nil];
_unit setVariable [_id, nil];
};
GVAR(RECIEVE_REQUEST_ID_KEY_BINDING) = nil;
if (!isnil QGVAR(RECIEVE_REQUEST_ADD_ACTION_ACCEPT)) then {
if (!isNil QGVAR(RECIEVE_REQUEST_ADD_ACTION_ACCEPT)) then {
_unit removeAction GVAR(RECIEVE_REQUEST_ADD_ACTION_ACCEPT);
GVAR(RECIEVE_REQUEST_ADD_ACTION_ACCEPT) = nil;
};
if (!isnil QGVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE)) then {
if (!isNil QGVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE)) then {
_unit removeAction GVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE);
GVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE) = nil;
};

View File

@ -17,7 +17,7 @@
#include "script_component.hpp"
//paramsArray is a normal variable not a command
private _paramsArray = missionnamespace getvariable ["paramsArray", []];
private _paramsArray = missionnamespace getVariable ["paramsArray", []];
TRACE_1("Reading missionConfigFile params",_paramsArray);
@ -60,4 +60,4 @@ TRACE_1("Reading missionConfigFile params",_paramsArray);
// Update the variable globaly and Force
[_settingName, _settingValue, true, true] call FUNC(setSetting);
};
} foreach _paramsArray;
} forEach _paramsArray;

View File

@ -53,7 +53,7 @@ GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT) = [ACE_time, _target, _requestID] spawn {
private "_id";
_id = _target getVariable _requestID;
waituntil {
waitUntil {
_id = _target getVariable _requestID;
(ACE_time > _time || isNil "_id")

View File

@ -14,8 +14,8 @@
params ["_unit"];
_unit setvariable ["ACE_isDead", nil, true];
_unit setvariable ["ACE_isUnconscious", nil, true];
_unit setVariable ["ACE_isDead", nil, true];
_unit setVariable ["ACE_isUnconscious", nil, true];
if (isPlayer _unit) then {
[true] call FUNC(setVolume);
@ -36,7 +36,7 @@ if (isPlayer _unit) then {
{
if !(_x select 4) then {
_unit setvariable [_x select 0, nil, _x select 3];
_unit setVariable [_x select 0, nil, _x select 3];
};
false
} count ([_unit] call FUNC(getAllDefinedSetVariables));

View File

@ -1,6 +1,6 @@
/*
* Author: Glowbal
* Setvariable value
* setVariable value
*
* Arguments:
* 0: Unit <OBJECT>
@ -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];
};

View File

@ -25,8 +25,8 @@ _elements = [];
{
_theElement = toArray (_x select _elementN);
_indexes pushback _foreachIndex;
_elements pushback _theElement;
_indexes pushBack _forEachIndex;
_elements pushBack _theElement;
} forEach _array;
for "_i" from 1 to (count _elements) - 1 do {
@ -45,7 +45,7 @@ for "_i" from 1 to (count _elements) - 1 do {
_returnArray = [];
{
_returnArray pushback (_array select _x);
_returnArray pushBack (_array select _x);
} forEach _indexes;
_returnArray

View File

@ -18,7 +18,7 @@
params [["_unit", objNull], ["_switch", false], ["_id", ""], ["_side", side _unit]];
private "_previousGroupsList";
_previousGroupsList = _unit getvariable [QGVAR(previousGroupSwitchTo), []];
_previousGroupsList = _unit getVariable [QGVAR(previousGroupSwitchTo), []];
if (_switch) then {
// go forward
@ -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 {

View File

@ -24,7 +24,7 @@ if (_vehicle == _unit) exitWith {false};
if (speed _vehicle > 1 || getPos _vehicle select 2 > 2) exitWith {false};
private "_emptyPos";
_emptyPos = (getPos _vehicle) findEmptyPosition [0, 10, typeof _unit]; // @todo to small?
_emptyPos = (getPos _vehicle) findEmptyPosition [0, 10, typeOf _unit]; // @todo to small?
if (count _emptyPos == 0) exitWith {false};

View File

@ -27,7 +27,7 @@ if (_vehicle isKindOf "Ship") then {
TRACE_1("SHIP Ground Check",getPos _vehicle);
_emptyPos = (ASLToAGL getPosASL _vehicle) findEmptyPosition [0, 13, typeof _unit]; // TODO: if spot is underwater pick another spot.
_emptyPos = (ASLToAGL getPosASL _vehicle) findEmptyPosition [0, 13, typeOf _unit]; // TODO: if spot is underwater pick another spot.
} else {
if (_vehicle isKindOf "Air") then {
if (speed _vehicle > 1 || {isTouchingGround _vehicle}) then {
@ -45,18 +45,18 @@ if (_vehicle isKindOf "Ship") then {
TRACE_1("Vehicle Ground Check", isTouchingGround _vehicle);
_emptyPos = (ASLToAGL getPosASL _vehicle) findEmptyPosition [0, 13, typeof _unit];
_emptyPos = (ASLToAGL getPosASL _vehicle) findEmptyPosition [0, 13, typeOf _unit];
};
};
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
@ -95,9 +95,9 @@ _unit action ["Eject", vehicle _unit];
[_unit, false, GROUP_SWITCH_ID, side group _unit] call FUNC(switchToGroupSide);
_loaded = _vehicle getvariable [QGVAR(loaded_persons),[]];
_loaded = _vehicle getVariable [QGVAR(loaded_persons),[]];
_loaded deleteAt (_loaded find _unit);
_vehicle setvariable [QGVAR(loaded_persons), _loaded, true];
_vehicle setVariable [QGVAR(loaded_persons), _loaded, true];
true

View File

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

View File

@ -57,7 +57,7 @@ if (_mode == 0) then {
if (count _no > 0) exitWith {
_found = true; //diag_log "found";
};
} foreach _wireCheckPosAr;
} forEach _wireCheckPosAr;
// Double coil found!
if (_found) then {
_mode = 1;

View File

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

View File

@ -14,7 +14,7 @@
true
},
{false},
[0, [false, true, false]], false] call cba_fnc_addKeybind; // (empty default key)
[0, [false, true, false]], false] call CBA_fnc_addKeybind; // (empty default key)
["ACE3 Equipment", QGVAR(ToggleKey), "Toggle DAGR",
{
@ -27,7 +27,7 @@
true
},
{false},
[0, [false, false, false]], false] call cba_fnc_addKeybind; // (empty default key)
[0, [false, false, false]], false] call CBA_fnc_addKeybind; // (empty default key)
//Add deviceKey entry:
private ["_conditonCode", "_toggleCode", "_closeCode"];

View File

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

View File

@ -33,13 +33,13 @@ class GVAR(remoteInventory) {
fadeout = 0;
class Colors {
dragValidBgr[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])",0.5};
dragInvalidBgr[] = {"(profilenamespace getvariable ['IGUI_ERROR_RGB_R',0.8])","(profilenamespace getvariable ['IGUI_ERROR_RGB_G',0.0])","(profilenamespace getvariable ['IGUI_ERROR_RGB_B',0.0])",0.5};
dragValidBar[] = {"(profilenamespace getvariable ['IGUI_WARNING_RGB_R',0.8])","(profilenamespace getvariable ['IGUI_WARNING_RGB_G',0.5])","(profilenamespace getvariable ['IGUI_WARNING_RGB_B',0.0])",0.5};
dragInvalidBar[] = {"(profilenamespace getvariable ['IGUI_ERROR_RGB_R',0.8])","(profilenamespace getvariable ['IGUI_ERROR_RGB_G',0.0])","(profilenamespace getvariable ['IGUI_ERROR_RGB_B',0.0])",0.5};
progressBar[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])",1};
progressBarBgr[] = {"(profilenamespace getvariable ['IGUI_BCG_RGB_R',0])","(profilenamespace getvariable ['IGUI_BCG_RGB_G',1])","(profilenamespace getvariable ['IGUI_BCG_RGB_B',1])",0.75};
highlight[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])",0.5};
dragValidBgr[] = {"(profilenamespace getVariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getVariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getVariable ['IGUI_TEXT_RGB_B',1])",0.5};
dragInvalidBgr[] = {"(profilenamespace getVariable ['IGUI_ERROR_RGB_R',0.8])","(profilenamespace getVariable ['IGUI_ERROR_RGB_G',0.0])","(profilenamespace getVariable ['IGUI_ERROR_RGB_B',0.0])",0.5};
dragValidBar[] = {"(profilenamespace getVariable ['IGUI_WARNING_RGB_R',0.8])","(profilenamespace getVariable ['IGUI_WARNING_RGB_G',0.5])","(profilenamespace getVariable ['IGUI_WARNING_RGB_B',0.0])",0.5};
dragInvalidBar[] = {"(profilenamespace getVariable ['IGUI_ERROR_RGB_R',0.8])","(profilenamespace getVariable ['IGUI_ERROR_RGB_G',0.0])","(profilenamespace getVariable ['IGUI_ERROR_RGB_B',0.0])",0.5};
progressBar[] = {"(profilenamespace getVariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getVariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getVariable ['IGUI_TEXT_RGB_B',1])",1};
progressBarBgr[] = {"(profilenamespace getVariable ['IGUI_BCG_RGB_R',0])","(profilenamespace getVariable ['IGUI_BCG_RGB_G',1])","(profilenamespace getVariable ['IGUI_BCG_RGB_B',1])",0.75};
highlight[] = {"(profilenamespace getVariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getVariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getVariable ['IGUI_TEXT_RGB_B',1])",0.5};
};
class controlsBackground {};

View File

@ -52,7 +52,7 @@ if !([_unit] call EFUNC(common,isPlayer)) then {
//don't do anything until projectile is null (exploded/max range)
if (isNull _projectile) then {
//Remove PFEH:
[_idPFH] call cba_fnc_removePerFrameHandler;
[_idPFH] call CBA_fnc_removePerFrameHandler;
//If (tube is dropped) OR (is dead) OR (is player) just exit
if (((secondaryWeapon _unit) != _tube) || {!alive _unit} || {([_unit] call EFUNC(common,isPlayer))}) exitWith {};

View File

@ -21,4 +21,4 @@ if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false};
// a static weapon has to be empty for dragging (ignore UAV AI)
if (((typeOf _target) isKindOf "StaticWeapon") && {{(getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false};
alive _target && {vehicle _target == _target} && {_target getVariable [QGVAR(canCarry), false]} && {animationState _target in ["", "unconscious"] || (_target getvariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})}
alive _target && {vehicle _target == _target} && {_target getVariable [QGVAR(canCarry), false]} && {animationState _target in ["", "unconscious"] || (_target getVariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})}

View File

@ -24,4 +24,4 @@ if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false};
// a static weapon has to be empty for dragging (ignore UAV AI)
if ((typeOf _target) isKindOf "StaticWeapon" && {{(getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false};
alive _target && {vehicle _target == _target} && {_target getVariable [QGVAR(canDrag), false]} && {animationState _target in ["", "unconscious"] || (_target getvariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})};
alive _target && {vehicle _target == _target} && {_target getVariable [QGVAR(canDrag), false]} && {animationState _target in ["", "unconscious"] || (_target getVariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})};

View File

@ -22,7 +22,7 @@ params ["_unit", "_target"];
private "_inBuilding";
_inBuilding = [_unit] call FUNC(isObjectOnObject);
if !(_unit getvariable ["ACE_isUnconscious", false]) then {
if !(_unit getVariable ["ACE_isUnconscious", false]) then {
// play release animation
_unit playAction "released";
};
@ -63,7 +63,7 @@ if !(_target isKindOf "CAManBase") then {
["fixFloating", _target, _target] call EFUNC(common,targetEvent);
};
if (_unit getvariable ["ACE_isUnconscious", false]) then {
if (_unit getVariable ["ACE_isUnconscious", false]) then {
[_unit, "unconscious", 2, true] call EFUNC(common,doAnimation);
};

View File

@ -31,7 +31,7 @@ detach _target;
// fix anim when aborting carrying persons
if (_target isKindOf "CAManBase" || {animationState _unit in CARRY_ANIMATIONS}) then {
if (vehicle _unit == _unit && {!(_unit getvariable ["ACE_isUnconscious", false])}) then {
if (vehicle _unit == _unit && {!(_unit getVariable ["ACE_isUnconscious", false])}) then {
[_unit, "", 2, true] call EFUNC(common,doAnimation);
};

View File

@ -39,7 +39,7 @@ _totalWeight = 0;
];
// add Weight of create to totalWeight
_totalWeight = _totalWeight + (getNumber (configFile >> "CfgVehicles" >> typeof _object >> "mass"));
_totalWeight = _totalWeight + (getNumber (configFile >> "CfgVehicles" >> typeOf _object >> "mass"));
// Mass in Arma isn't an exact amount but rather a volume/weight value. This attempts to work around that by making it a usable value. (sort of).
_totalWeight * 0.5

View File

@ -19,9 +19,9 @@ class Rsc_ACE_CallScreen_Edit:RscEdit {
colorText[] = {0,0,0,1};
colorDisabled[] = {1,1,1,0.25};
colorSelection[] = {
"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])",
"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])",
"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",
"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])",
"(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])",
"(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])",
1
};
text = "";

View File

@ -43,7 +43,7 @@ GVAR(CurrentSpeedDial) = 0;
GVAR(placeAction) = PLACE_CANCEL;
};
//Show defuse actions on cfgAmmos (allMines):
//Show defuse actions on CfgAmmos (allMines):
_this call FUNC(interactEH);
}] call EFUNC(common,addEventHandler);

View File

@ -29,7 +29,7 @@ if ((_code) == "") exitWith {
};
{
if ((_x select 0) == _name) exitWith {
_speedDial set [_foreachindex, _this];
_speedDial set [_forEachIndex, _this];
_found = true;
};
} forEach _speedDial;

View File

@ -30,10 +30,10 @@ _result = true;
if (!_ignoreRange && {(_unit distance (_item select 0)) > _range}) exitWith {TRACE_1("out of range",_range); false};
if (getNumber (ConfigFile >> "CfgAmmo" >> typeof (_item select 0) >> "TriggerWhenDestroyed") == 0) then {
if (getNumber (ConfigFile >> "CfgAmmo" >> typeOf (_item select 0) >> "TriggerWhenDestroyed") == 0) then {
private ["_exp", "_previousExp"];
_previousExp = _item select 0;
_exp = getText (ConfigFile >> "CfgAmmo" >> typeof (_previousExp) >> "ACE_Explosive");
_exp = getText (ConfigFile >> "CfgAmmo" >> typeOf (_previousExp) >> "ACE_Explosive");
if (_exp != "") then {
_exp = createVehicle [_exp, [0,0,15001], [], 0, "NONE"];
_exp setDir (getDir _previousExp);

View File

@ -30,7 +30,7 @@ private "_explosive";
_explosive = [_code] call FUNC(getSpeedDialExplosive);
if (_i >= (count _arr + 2)) then {
[_pfID] call CALLSTACK(cba_fnc_removePerFrameHandler);
[_pfID] call CALLSTACK(CBA_fnc_removePerFrameHandler);
if ((count _explosive) > 0) then {
[_unit, -1, [_explosive select 0, _explosive select 2]] call FUNC(detonateExplosive);
};

View File

@ -44,9 +44,9 @@ _list = [];
if (_adjustedList) then {
_clackerList = _clackerList - ["X"];
if (count _clackerList == 0) then {
_unit SetVariable [QGVAR(Clackers), nil, true];
_unit setVariable [QGVAR(Clackers), nil, true];
} else {
_unit SetVariable [QGVAR(Clackers), _clackerList, true];
_unit setVariable [QGVAR(Clackers), _clackerList, true];
};
};

View File

@ -29,7 +29,7 @@ _config = ConfigFile >> "CfgWeapons" >> _item;
if (isClass _config && {getNumber(_config >> "ACE_Detonator") == 1}) then {
private ["_clackerItems"];
_clackerItems = _giver getVariable [QGVAR(Clackers), []];
_receiver SetVariable [QGVAR(Clackers), (_receiver getVariable [QGVAR(Clackers), []]) + _clackerItems, true];
_receiver setVariable [QGVAR(Clackers), (_receiver getVariable [QGVAR(Clackers), []]) + _clackerItems, true];
_detonators = [_giver] call FUNC(getDetonators);
if (count _detonators == 0) then {

View File

@ -62,8 +62,8 @@ if (isNumber (_magazineTrigger >> "digDistance")) then {
_canDigDown = true;
_surfaceType = surfaceType _pos;
if ((_surfaceType select [0,1]) == "#") then {_surfaceType = _surfaceType select [1, 99];};
if ((_surfaceType != "") || {isClass (configfile >> "CfgSurfaces" >> _surfaceType >> "soundEnviron")}) then {
_soundEnviron = getText (configfile >> "CfgSurfaces" >> _surfaceType >> "soundEnviron");
if ((_surfaceType != "") || {isClass (configFile >> "CfgSurfaces" >> _surfaceType >> "soundEnviron")}) then {
_soundEnviron = getText (configFile >> "CfgSurfaces" >> _surfaceType >> "soundEnviron");
TRACE_2("Dig Down Surface",_surfaceType,_soundEnviron);
_canDigDown = !(_soundEnviron in ["road", "tarmac", "concrete", "concrete_int", "int_concrete", "concrete_ext"]);
};

View File

@ -28,7 +28,7 @@
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call FUNC(keyUp);
false
},
[15, [false, false, false]], false] call cba_fnc_addKeybind; //Tab Key
[15, [false, false, false]], false] call CBA_fnc_addKeybind; //Tab Key
["ACE3 Vehicles", QGVAR(adjustRangeUp), localize LSTRING(AdjustRangeUp),
{
@ -42,7 +42,7 @@
true
},
{false},
[201, [false, false, false]], false] call cba_fnc_addKeybind; //PageUp Key
[201, [false, false, false]], false] call CBA_fnc_addKeybind; //PageUp Key
["ACE3 Vehicles", QGVAR(adjustRangDown), localize LSTRING(AdjustRangeDown),
{
@ -56,4 +56,4 @@
true
},
{false},
[209, [false, false, false]], false] call cba_fnc_addKeybind; //PageDown Key
[209, [false, false, false]], false] call CBA_fnc_addKeybind; //PageDown Key

View File

@ -19,5 +19,5 @@ GVAR(pfeh_id) = -1;
_this call FUNC(keyPress);
},
{false},
[41, [true, false, false]], true] call cba_fnc_addKeybind; // Shift + Tilda (hold)
[41, [true, false, false]], true] call CBA_fnc_addKeybind; // Shift + Tilda (hold)
}] call EFUNC(common,addEventHandler);

View File

@ -20,7 +20,7 @@ for "_i" from _index to ((_index+2) min (count _explosions)) do {
};
_index = _index + 2;
if(_index >= (count _explosions)) then {
[(_this select 1)] call cba_fnc_removePerFrameHandler;
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
} else {
_params set[1, _index];
};

View File

@ -29,7 +29,7 @@ if(_zIndex < 5) then {
};
for "_i" from 0 to _radi do {
_test = true;
_vec = [1, ((_i*_split)+_rand) mod 360, _zAng] call cba_fnc_polar2vect;
_vec = [1, ((_i*_split)+_rand) mod 360, _zAng] call CBA_fnc_polar2vect;
for "_x" from 1 to _distanceCount do {
_testPos = _pos vectorAdd (_vec vectorMultiply _x);
// drop ["\a3\data_f\Cl_basic","","Billboard",1,15,ASLtoATL _testPos,[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,1]],[0],0.0,2.0,"","",""];
@ -122,5 +122,5 @@ if(_zIndex < 5) then {
// _dirvec = _dirvec vectorMultiply 100;
// _can setVelocity _dirvec;
[DFUNC(doExplosions), 0, [_explosions, 0]] call CBA_fnc_addPerFrameHandler;
[(_this select 1)] call cba_fnc_removePerFrameHandler;
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
};

View File

@ -1,5 +1,5 @@
#include "script_component.hpp"
if(GVAR(tracesStarted)) then {
GVAR(tracesStarted) = false;
[GVAR(traceID)] call cba_fnc_removePerFrameHandler;
[GVAR(traceID)] call CBA_fnc_removePerFrameHandler;
};

View File

@ -10,5 +10,5 @@ if (alive _tracerObj && (count GVAR(traces)) > 0) then {
_positions = _data select 4;
_positions set [(count _positions), [(getPos _tracerObj), vectorMagnitude (velocity _tracerObj)]];
} else {
[(_this select 1)] call cba_fnc_removePerFrameHandler;
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
};

View File

@ -26,7 +26,7 @@ GVAR(time4) = 0;
["playerChanged", {
GVAR(deafnessDV) = 0;
GVAR(deafnessPrior) = 0;
ACE_player setvariable [QGVAR(deaf), false];
ACE_player setVariable [QGVAR(deaf), false];
GVAR(beep) = false;
GVAR(beep2) = false;

View File

@ -42,7 +42,7 @@ if (!_justUpdateVolume) then {
GVAR(deafnessPrior) = GVAR(deafnessDV);
if (GVAR(deafnessDV) > 19.75) then {
ACE_player setvariable [QGVAR(deaf), true];
ACE_player setVariable [QGVAR(deaf), true];
if ((!GVAR(DisableEarRinging)) && {ACE_time > GVAR(time4)}) then {
playSound "ACE_Combat_Deafness";
GVAR(beep2) = true;
@ -50,7 +50,7 @@ if (!_justUpdateVolume) then {
GVAR(time4) = ACE_time + 30;
};
} else {
ACE_player setvariable [QGVAR(deaf), false];
ACE_player setVariable [QGVAR(deaf), false];
};
if (GVAR(deafnessDV) > 10) then {

View File

@ -93,7 +93,7 @@ GVAR(no_cams) sort true;
GVAR(pos) = getPosVisual GVAR(huntIR);
if ((!dialog) || (count GVAR(no_cams) == 0) || ((GVAR(pos) select 2) <= 20)) exitWith {
[_this select 1] call cba_fnc_removePerFrameHandler;
[_this select 1] call CBA_fnc_removePerFrameHandler;
GVAR(stop) = true;

View File

@ -48,7 +48,7 @@ createDialog "ace_huntir_cam_dialog_off";
_nearestHuntIRs = ACE_player nearEntities ["ACE_HuntIR", HUNTIR_MAX_TRANSMISSION_RANGE];
if ((!dialog) || GVAR(done)) exitWith {
[_this select 1] call cba_fnc_removePerFrameHandler;
[_this select 1] call CBA_fnc_removePerFrameHandler;
if (dialog && GVAR(state) == "connected") then {
[_nearestHuntIRs select 0] call FUNC(cam);

View File

@ -41,14 +41,14 @@ GVAR(ParsedTextCached) = [];
// Statement
[0] call FUNC(keyDown)
},{[0,false] call FUNC(keyUp)},
[219, [false, false, false]], false] call cba_fnc_addKeybind; //Left Windows Key
[219, [false, false, false]], false] call CBA_fnc_addKeybind; //Left Windows Key
["ACE3 Common", QGVAR(SelfInteractKey), (localize LSTRING(SelfInteractKey)),
{
// Statement
[1] call FUNC(keyDown)
},{[1,false] call FUNC(keyUp)},
[219, [false, true, false]], false] call cba_fnc_addKeybind; //Left Windows Key + Ctrl/Strg
[219, [false, true, false]], false] call CBA_fnc_addKeybind; //Left Windows Key + Ctrl/Strg
// Listens for the falling unconscious event, just in case the menu needs to be closed

View File

@ -116,7 +116,7 @@ _angle = _centerAngle - _angleSpan / 2;
private ["_offset","_newPos"];
_newPos = if (GVAR(UseListMenu)) then {
[(_sPos select 0) + _scaleX,
(_sPos select 1) + _scaleY * (_foreachindex - _numChildren/2 + 0.5)];
(_sPos select 1) + _scaleY * (_forEachIndex - _numChildren/2 + 0.5)];
} else {
[(_sPos select 0) - _scaleX * (cos _angle),
(_sPos select 1) + _scaleY * (sin _angle)];

View File

@ -55,7 +55,7 @@ if (((count _weaponConfig) < 1) || {(getNumber (_weaponConfig select 0)) != 1})
_fireDisabledEH = [_fireDisabledEH] call FUNC(enableFire);
};
[(_this select 1)] call cba_fnc_removePerFrameHandler;
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
GVAR(pfehID) = -1;
};

View File

@ -19,7 +19,7 @@
[ACE_player] call FUNC(lockKeyUp);
false
},
[15, [false, false, false]], false] call cba_fnc_addKeybind; //Tab Key
[15, [false, false, false]], false] call CBA_fnc_addKeybind; //Tab Key
["ACE3 Weapons", QGVAR(cycleFireMode), localize LSTRING(CycleFireMode),
{ false },
@ -27,4 +27,4 @@
[ACE_player] call FUNC(cycleFireMode);
false
},
[15, [false, true, false]], false] call cba_fnc_addKeybind; //Ctrl+Tab Key
[15, [false, true, false]], false] call CBA_fnc_addKeybind; //Ctrl+Tab Key

View File

@ -23,7 +23,7 @@ private ["_outputData"];
_outputData = [] call FUNC(generateOutputData);
{
ctrlSetText [_x , _outputData select _foreachindex];
ctrlSetText [_x , _outputData select _forEachIndex];
} forEach [74100, 74200, 74201, 74300, 74301, 74302, 74303, 74304, 74305, 74400, 74401, 74500, 74600, 74601, 74602, 74603, 74604, 74605];
if (GVAR(referenceHeadingMenu) == 1) then {

View File

@ -10,7 +10,7 @@ _shooter = _args select 1;
_uuid = _args select 2;
if(isNull _laserTarget || !alive _shooter) exitWith {
[(_this select 1)] call cba_fnc_removePerFrameHandler;
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
REM(GVAR(VanillaLasers), _laserTarget);
// Remove laseron

View File

@ -1,6 +1,6 @@
/*
* Author: PabstMirror
* Checks if object is a fence. Should work on any fence type, even (typeof == "").
* Checks if object is a fence. Should work on any fence type, even (typeOf == "").
* Call is fairly expensive because of all of the string checking.
*
* Arguments:

View File

@ -27,7 +27,7 @@ _unitMagCounts = [];
private "_xFullMagazineCount";
_x params ["_xClassname", "_xCount", "_xLoaded", "_xType"];
_xFullMagazineCount = getNumber (configfile >> "CfgMagazines" >> _xClassname >> "count");
_xFullMagazineCount = getNumber (configFile >> "CfgMagazines" >> _xClassname >> "count");
//for every partial magazine, that is either in inventory or can be moved there
if ((_xCount < _xFullMagazineCount) && {_xCount > 0} && {(!_xLoaded) || {_player canAdd _xClassname}}) then {

View File

@ -24,7 +24,7 @@ private ["_structuredOutputText", "_picture", "_fullMags", "_partialMags", "_ful
params ["_args", "_elapsedTime", "_totalTime", "_errorCode"];
_args params ["_magazineClassname", "_lastAmmoCount"];
_fullMagazineCount = getNumber (configfile >> "CfgMagazines" >> _magazineClassname >> "count");
_fullMagazineCount = getNumber (configFile >> "CfgMagazines" >> _magazineClassname >> "count");
//Don't show anything if player can't interact:
if (!([ACE_player, objNull, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith))) exitWith {};

View File

@ -24,7 +24,7 @@ private ["_magazineCfg", "_fullMagazineCount", "_isBelt", "_startingAmmoCounts",
params ["_target", "_player", "_magazineClassname"];
if (isNil "_magazineClassname" || {_magazineClassname == ""}) exitWith {ERROR("Bad Mag Classname");};
_magazineCfg = configfile >> "CfgMagazines" >> _magazineClassname;
_magazineCfg = configFile >> "CfgMagazines" >> _magazineClassname;
// Calculate actual ammo to transfer during repack
_fullMagazineCount = getNumber (_magazineCfg >> "count");
//Is linked belt magazine:
@ -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);

View File

@ -16,7 +16,7 @@ private ["_config", "_marker", "_a", "_scope", "_icon", "_rgba", "_name"];
// init marker types
if (isNil QGVAR(MarkersCache)) then {
_config = configfile >> "CfgMarkers";
_config = configFile >> "CfgMarkers";
GVAR(MarkersCache) = [];
for "_a" from 0 to (count _config - 1) do {
@ -32,7 +32,7 @@ if (isNil QGVAR(MarkersCache)) then {
// init marker colors
if (isNil QGVAR(MarkerColorsCache)) then {
_config = configfile >> "CfgMarkerColors";
_config = configFile >> "CfgMarkerColors";
GVAR(MarkerColorsCache) = [];
for "_a" from 0 to (count _config - 1) do {

View File

@ -25,6 +25,6 @@ _data = _ctrl lbValue _index;
GVAR(curSelMarkerColor) = _index;
_config = (configfile >> "CfgMarkerColors") select _data;
_config = (configFile >> "CfgMarkerColors") select _data;
GVAR(currentMarkerColorConfigName) = (configName _config);

View File

@ -25,6 +25,6 @@ _data = _ctrl lbValue _index;
GVAR(curSelMarkerShape) = _index;
_config = (configfile >> "CfgMarkers") select _data;
_config = (configFile >> "CfgMarkers") select _data;
GVAR(currentMarkerConfigName) = (configName _config);

View File

@ -29,14 +29,14 @@ TRACE_3("params",_allMapMarkers,_allMapMarkersProperties,_logic);
_data = _allMapMarkersProperties select _index;
_data params ["_name", "_color", "_pos", "_dir"];
_config = (configfile >> "CfgMarkers") >> _name;
_config = (configFile >> "CfgMarkers") >> _name;
if (!isClass _config) then {
WARNING("CfgMarker not found, changed to milDot");
_config == (configFile >> "CfgMarkers" >> "MilDot");
};
_x setMarkerTypeLocal (configName _config);
_config = (configfile >> "CfgMarkerColors") >> _color;
_config = (configFile >> "CfgMarkerColors") >> _color;
if (!isClass _config) then {
WARNING("CfgMarkerColors not found, changed to Default");
_config == (configFile >> "CfgMarkerColors" >> "Default");

View File

@ -24,14 +24,14 @@ _data params ["_markerClassname", "_colorClassname", "_markerPos", "_markerDir"]
TRACE_2("params",_marker,_data);
_config = (configfile >> "CfgMarkers") >> _markerClassname;
_config = (configFile >> "CfgMarkers") >> _markerClassname;
if (!isClass _config) then {
WARNING("CfgMarker not found, changed to milDot");
_config == (configFile >> "CfgMarkers" >> "MilDot");
};
_marker setMarkerTypeLocal (configName _config);
_config = (configfile >> "CfgMarkerColors") >> _colorClassname;
_config = (configFile >> "CfgMarkerColors") >> _colorClassname;
if (!isClass _config) then {
WARNING("CfgMarkerColors not found, changed to Default");
_config == (configFile >> "CfgMarkerColors" >> "Default");

View File

@ -496,7 +496,7 @@ class CfgVehicles {
class GVAR(loadPatient) {
displayName = CSTRING(LoadPatient);
distance = 5;
condition = QUOTE(_target getvariable[ARR_2(QUOTE(QUOTE(ACE_isUnconscious)),false)] && vehicle _target == _target);
condition = QUOTE(_target getVariable[ARR_2(QUOTE(QUOTE(ACE_isUnconscious)),false)] && vehicle _target == _target);
statement = QUOTE([ARR_2(_player, _target)] call DFUNC(actionLoadUnit));
showDisabled = 0;
priority = 2;
@ -506,7 +506,7 @@ class CfgVehicles {
class GVAR(UnLoadPatient) {
displayName = CSTRING(UnloadPatient);
distance = 5;
condition = QUOTE(_target getvariable[ARR_2(QUOTE(QUOTE(ACE_isUnconscious)),false)] && vehicle _target != _target);
condition = QUOTE(_target getVariable[ARR_2(QUOTE(QUOTE(ACE_isUnconscious)),false)] && vehicle _target != _target);
statement = QUOTE([ARR_2(_player, _target)] call DFUNC(actionUnloadUnit));
showDisabled = 0;
priority = 2;

View File

@ -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 {
@ -175,11 +175,11 @@ GVAR(lastHeartBeatSound) = ACE_time;
// Pain effect, no pain effect in zeus camera
if (isNull curatorCamera) then {
_strength = ((_pain - (ACE_player getvariable [QGVAR(painSuppress), 0])) max 0) min 1;
_strength = ((_pain - (ACE_player getVariable [QGVAR(painSuppress), 0])) max 0) min 1;
_strength = _strength * (ACE_player getVariable [QGVAR(painCoefficient), GVAR(painCoefficient)]);
if (GVAR(painEffectType) == 1) then {
GVAR(effectPainCC) ppEffectEnable false;
if (_pain > (ACE_player getvariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then {
if (_pain > (ACE_player getVariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then {
_strength = _strength * 0.15;
GVAR(effectPainCA) ppEffectEnable true;
GVAR(effectPainCA) ppEffectAdjust [_strength, _strength, false];
@ -201,7 +201,7 @@ GVAR(lastHeartBeatSound) = ACE_time;
};
} else {
GVAR(effectPainCA) ppEffectEnable false;
if (_pain > (ACE_player getvariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then {
if (_pain > (ACE_player getVariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then {
_strength = _strength * 0.9;
GVAR(effectPainCC) ppEffectEnable true;
GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - _strength,1 - _strength,0,0,0,0.2,2]];
@ -246,24 +246,24 @@ 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},
{(((_this select 0) getVariable [QGVAR(bloodVolume), 100]) < 65)},
{(((_this select 0) getVariable [QGVAR(pain), 0]) - ((_this select 0) getVariable [QGVAR(painSuppress), 0])) > 0.9},
{(([_this select 0] call FUNC(getBloodLoss)) > 0.25)},
{((_this select 0) getvariable [QGVAR(inReviveState), false])},
{((_this select 0) getvariable [QGVAR(inCardiacArrest), false])},
{((_this select 0) getvariable ["ACE_isDead", false])},
{(((_this select 0) getvariable [QGVAR(airwayStatus), 100]) < 80)}
{((_this select 0) getVariable [QGVAR(inReviveState), false])},
{((_this select 0) getVariable [QGVAR(inCardiacArrest), false])},
{((_this select 0) getVariable ["ACE_isDead", false])},
{(((_this select 0) getVariable [QGVAR(airwayStatus), 100]) < 80)}
] call FUNC(addUnconsciousCondition);
};
[
{(((_this select 0) getvariable [QGVAR(bloodVolume), 100]) < 40)},
{(((_this select 0) getvariable [QGVAR(pain), 0]) - ((_this select 0) getvariable [QGVAR(painSuppress), 0])) > 0.6},
{(((_this select 0) getVariable [QGVAR(bloodVolume), 100]) < 40)},
{(((_this select 0) getVariable [QGVAR(pain), 0]) - ((_this select 0) getVariable [QGVAR(painSuppress), 0])) > 0.6},
{(([_this select 0] call FUNC(getBloodLoss)) > 0.1)},
{((_this select 0) getvariable [QGVAR(inReviveState), false])},
{((_this select 0) getvariable ["ACE_isDead", false])}
{((_this select 0) getVariable [QGVAR(inReviveState), false])},
{((_this select 0) getVariable ["ACE_isDead", false])}
] call FUNC(addUnconsciousCondition);
}] call EFUNC(common,addEventHandler);

View File

@ -17,7 +17,7 @@ class CfgPatches {
#include "CfgFactionClasses.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "CFgSounds.hpp"
#include "CfgSounds.hpp"
#include "ACE_Medical_Treatments.hpp"
#include "ACE_Settings.hpp"
#include "UI\RscTitles.hpp"

View File

@ -17,7 +17,7 @@
private ["_heartRateOutput", "_heartRate", "_logOutPut"];
params ["_caller", "_unit", "_selectionName"];
_heartRate = _unit getvariable [QGVAR(heartRate), 80];
_heartRate = _unit getVariable [QGVAR(heartRate), 80];
if (!alive _unit) then {
_heartRate = 0;
};

View File

@ -21,25 +21,25 @@ _genericMessages = [LSTRING(diagnoseMessage)];
_genericMessages pushBack ([_target] call EFUNC(common,getName));
if (alive _target) then {
_genericMessages pushback LSTRING(diagnoseAlive);
_genericMessages pushBack LSTRING(diagnoseAlive);
} else {
_genericMessages pushback LSTRING(diagnoseDead);
_genericMessages pushBack LSTRING(diagnoseDead);
};
if (_target getvariable[QGVAR(hasLostBlood), 0] > 0) then {
if (_target getvariable[QGVAR(hasLostBlood), 0] > 1) then {
_genericMessages pushback LSTRING(lostBloodALot);
if (_target getVariable[QGVAR(hasLostBlood), 0] > 0) then {
if (_target getVariable[QGVAR(hasLostBlood), 0] > 1) then {
_genericMessages pushBack LSTRING(lostBloodALot);
} else {
_genericMessages pushback LSTRING(lostBlood);
_genericMessages pushBack LSTRING(lostBlood);
};
} else {
_genericMessages pushback LSTRING(noBloodloss);
_genericMessages pushBack LSTRING(noBloodloss);
};
if (alive _target) then {
if (_target getvariable[QGVAR(hasPain), false]) then {
_genericMessages pushback LSTRING(inPain);
if (_target getVariable[QGVAR(hasPain), false]) then {
_genericMessages pushBack LSTRING(inPain);
} else {
_genericMessages pushback LSTRING(noPain);
_genericMessages pushBack LSTRING(noPain);
};
};

View File

@ -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 {

View File

@ -20,17 +20,17 @@ params ["_caller", "_target", "_selectionName"];
// grab the required data
_part = [_selectionName] call FUNC(selectionNameToNumber);
_tourniquets = _target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
_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);
};
// Removing the tourniquet
_tourniquets set[_part, 0];
_target setvariable [QGVAR(tourniquets), _tourniquets, true];
_target setVariable [QGVAR(tourniquets), _tourniquets, true];
// Adding the tourniquet item to the caller
_caller addItem "ACE_tourniquet";

View File

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

View File

@ -19,7 +19,7 @@
params [["_unit", objNull, [objNull]], ["_value", 0, [0]], ["_time", 1, [0]], ["_callBack", {}, [{}]]];
_adjustment = _unit getvariable [QGVAR(heartRateAdjustments), []];
_adjustment pushback [_value, _time, _callBack];
_unit setvariable [QGVAR(heartRateAdjustments), _adjustment ];
_adjustment = _unit getVariable [QGVAR(heartRateAdjustments), []];
_adjustment pushBack [_value, _time, _callBack];
_unit setVariable [QGVAR(heartRateAdjustments), _adjustment ];
["Medical_onHeartRateAdjustmentAdded", [_unit, _value, _time]] call EFUNC(common,localEvent);

View File

@ -17,12 +17,12 @@ 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{};
_unit setvariable [QGVAR(addedToUnitLoop), true, true];
if ((_unit getVariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitWith{};
_unit setVariable [QGVAR(addedToUnitLoop), true, true];
[{
params ["_args", "_idPFH"];
@ -34,17 +34,17 @@ if ([_unit] call FUNC(hasMedicalEnabled) || _force) then {
[_idPFH] call CBA_fnc_removePerFrameHandler;
if (!local _unit) then {
if (GVAR(level) >= 2) then {
_unit setvariable [QGVAR(heartRate), _unit getvariable [QGVAR(heartRate), 80], true];
_unit setvariable [QGVAR(bloodPressure), _unit getvariable [QGVAR(bloodPressure), [80, 120]], true];
_unit setVariable [QGVAR(heartRate), _unit getVariable [QGVAR(heartRate), 80], true];
_unit setVariable [QGVAR(bloodPressure), _unit getVariable [QGVAR(bloodPressure), [80, 120]], true];
};
_unit setvariable [QGVAR(bloodVolume), _unit getvariable [QGVAR(bloodVolume), 100], true];
_unit setVariable [QGVAR(bloodVolume), _unit getVariable [QGVAR(bloodVolume), 100], true];
};
} else {
[_unit, _interval] call FUNC(handleUnitVitals);
private "_pain";
_pain = _unit getvariable [QGVAR(pain), 0];
if (_pain > (_unit getvariable [QGVAR(painSuppress), 0])) then {
_pain = _unit getVariable [QGVAR(pain), 0];
if (_pain > (_unit getVariable [QGVAR(painSuppress), 0])) then {
// This introduces wierd unconscious behaviour for basic medical and possibly also advanced.
// TODO This is disabled as it's considered non critical code.
// We will need to decide if we want unconscious triggered on high pain levels or if we can get rid of this entirely.

View File

@ -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 */
};
@ -29,24 +29,24 @@ _moment = format [ (["%1:%2", "%1:0%2"] select (_minute < 10)), _hour, _minute];
_logVarName = format[QGVAR(logFile_%1), _type];
_log = _unit getvariable [_logVarName, []];
_log = _unit getVariable [_logVarName, []];
if (count _log >= 8) then {
_newLog = [];
{
// ensure the first element will not be added
if (_foreachIndex > 0) then {
_newLog pushback _x;
if (_forEachIndex > 0) then {
_newLog pushBack _x;
};
} foreach _log;
} forEach _log;
_log = _newLog;
};
_log pushback [_message, _moment, _type, _arguments];
_log pushBack [_message, _moment, _type, _arguments];
_unit setvariable [_logVarName, _log, true];
_unit setVariable [_logVarName, _log, true];
["medical_onLogEntryAdded", [_unit, _type, _message, _arguments]] call EFUNC(common,localEvent);
_logs = _unit getvariable [QGVAR(allLogs), []];
_logs = _unit getVariable [QGVAR(allLogs), []];
if !(_logVarName in _logs) then {
_logs pushback _logVarName;
_unit setvariable [QGVAR(allLogs), _logs, true];
_logs pushBack _logVarName;
_unit setVariable [QGVAR(allLogs), _logs, true];
};

View File

@ -17,28 +17,28 @@
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 */
};
_log = _unit getvariable [QGVAR(triageCard), []];
_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 = _log select _forEachIndex;
_info set [1,(_info select 1) + 1];
_info set [2, ACE_gameTime];
_log set [_foreachIndex, _info];
_log set [_forEachIndex, _info];
_amount = (_info select 1);
_inList = true;
};
} foreach _log;
} forEach _log;
if (!_inList) then {
_log pushback [_newItem, 1, ACE_gameTime];
_log pushBack [_newItem, 1, ACE_gameTime];
};
_unit setvariable [QGVAR(triageCard), _log, true];
_unit setVariable [QGVAR(triageCard), _log, true];
["Medical_onItemAddedToTriageCard", [_unit, _newItem, _amount]] call EFUNC(common,localEvent);

View File

@ -17,14 +17,14 @@
private ["_accessLevel", "_return"];
params ["_caller", "_target"];
_accessLevel = _target getvariable [QGVAR(allowSharedEquipmentAccess), -1];
_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;

Some files were not shown because too many files have changed in this diff Show More