mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' of https://github.com/acemod/ACE3
This commit is contained in:
commit
d0c7b0035e
@ -7,7 +7,7 @@
|
|||||||
<img src="https://img.shields.io/badge/Version-3.4.0-blue.svg?style=flat-square" alt="ACE3 Version">
|
<img src="https://img.shields.io/badge/Version-3.4.0-blue.svg?style=flat-square" alt="ACE3 Version">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/acemod/ACE3/releases/download/v3.4.0/ace3_3.4.0.zip">
|
<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>
|
||||||
<a href="https://github.com/acemod/ACE3/issues">
|
<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">
|
<img src="https://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat-square&label=Issues" alt="ACE3 Issues">
|
||||||
|
@ -36,7 +36,7 @@ GVAR(Protractor) = true;
|
|||||||
if !(GVAR(Protractor) && !(weaponLowered ACE_player) && currentWeapon ACE_player == primaryWeapon ACE_player) exitWith {
|
if !(GVAR(Protractor) && !(weaponLowered ACE_player) && currentWeapon ACE_player == primaryWeapon ACE_player) exitWith {
|
||||||
GVAR(Protractor) = false;
|
GVAR(Protractor) = false;
|
||||||
1 cutText ["", "PLAIN"];
|
1 cutText ["", "PLAIN"];
|
||||||
[_idPFH] call cba_fnc_removePerFrameHandler;
|
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
1 cutRsc ["RscProtractor", "PLAIN", 1, false];
|
1 cutRsc ["RscProtractor", "PLAIN", 1, false];
|
||||||
|
@ -54,7 +54,7 @@ if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "CfgWeapons" >> _wea
|
|||||||
|
|
||||||
if (_abort || !(GVAR(extensionAvailable))) exitWith {
|
if (_abort || !(GVAR(extensionAvailable))) exitWith {
|
||||||
if (missionNamespace getVariable [QEGVAR(windDeflection,enabled), false]) then {
|
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")];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ GVAR(currentGrid) = 0;
|
|||||||
#ifdef DEBUG_MODE_FULL
|
#ifdef DEBUG_MODE_FULL
|
||||||
systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", ceil(ACE_time - _initStartTime)];
|
systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", ceil(ACE_time - _initStartTime)];
|
||||||
#endif
|
#endif
|
||||||
[_idPFH] call cba_fnc_removePerFrameHandler;
|
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
for "_i" from 1 to 50 do {
|
for "_i" from 1 to 50 do {
|
||||||
|
@ -54,7 +54,7 @@ GVAR(active) = true;
|
|||||||
|
|
||||||
GVAR(DialogPFH) = [{
|
GVAR(DialogPFH) = [{
|
||||||
if (!GVAR(active)) exitWith {
|
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))];
|
__ctrlBackground ctrlSetText format [QUOTE(PATHTOF(UI\ATRAG_%1.paa)), ["N", "D"] select (call EFUNC(common,ambientBrightness))];
|
||||||
}, 60, []] call CBA_fnc_addPerFrameHandler;
|
}, 60, []] call CBA_fnc_addPerFrameHandler;
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
uiNamespace setVariable ['ATragMX_Display', nil];
|
uiNamespace setVariable ['ATragMX_Display', nil];
|
||||||
GVAR(active) = false;
|
GVAR(active) = false;
|
||||||
[GVAR(DialogPFH)] call cba_fnc_removePerFrameHandler;
|
[GVAR(DialogPFH)] call CBA_fnc_removePerFrameHandler;
|
@ -37,7 +37,7 @@ if !(ctrlVisible 9000) then {
|
|||||||
false call FUNC(show_target_speed_assist_timer);
|
false call FUNC(show_target_speed_assist_timer);
|
||||||
true call FUNC(show_target_speed_assist);
|
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)];
|
ctrlSetText [9001, Str(Round((ACE_time - _startTime) * 10) / 10)];
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Unit (player) <OBJECT>
|
* 0: Unit (player) <OBJECT>
|
||||||
* 1: attachToVehicle <OBJECT>
|
* 1: attachToVehicle <OBJECT>
|
||||||
* 2: Item Classname (cfgWeapon/cfgMagazine) <STRING>
|
* 2: Item Classname (CfgWeapon/CfgMagazine) <STRING>
|
||||||
* 3: Light Vehicle Classname <STRING>
|
* 3: Light Vehicle Classname <STRING>
|
||||||
* 4: On Attach Text <STRING>
|
* 4: On Attach Text <STRING>
|
||||||
* 5: Starting Pos of dummy item <ARRAY>
|
* 5: Starting Pos of dummy item <ARRAY>
|
||||||
|
@ -45,7 +45,7 @@ if (_state) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (!(_unit getVariable [QGVAR(isEscorting), false])) 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);
|
[objNull, _target, false] call EFUNC(common,claim);
|
||||||
detach _target;
|
detach _target;
|
||||||
_unit removeAction _actionID;
|
_unit removeAction _actionID;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
params ["_unit","_state"];
|
params ["_unit","_state"];
|
||||||
TRACE_2("params",_unit,_state);
|
TRACE_2("params",_unit,_state);
|
||||||
|
|
||||||
if (!local _unit) exitwith {
|
if (!local _unit) exitWith {
|
||||||
ERROR("running setHandcuffed on remote unit");
|
ERROR("running setHandcuffed on remote unit");
|
||||||
};
|
};
|
||||||
if ((_unit getVariable [QGVAR(isHandcuffed), false]) isEqualTo _state) exitWith {
|
if ((_unit getVariable [QGVAR(isHandcuffed), false]) isEqualTo _state) exitWith {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
params ["_unit","_state"];
|
params ["_unit","_state"];
|
||||||
TRACE_2("params",_unit,_state);
|
TRACE_2("params",_unit,_state);
|
||||||
|
|
||||||
if (!local _unit) exitwith {
|
if (!local _unit) exitWith {
|
||||||
ERROR("running surrender on remote unit");
|
ERROR("running surrender on remote unit");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -17,4 +17,4 @@
|
|||||||
|
|
||||||
params ["_object"];
|
params ["_object"];
|
||||||
|
|
||||||
_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeof _object >> QGVAR(space))]
|
_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(space))]
|
||||||
|
@ -24,7 +24,7 @@ private ["_loaded", "_space", "_itemSize"];
|
|||||||
if !([_item, _vehicle] call FUNC(canLoadItemIn)) exitWith {false};
|
if !([_item, _vehicle] call FUNC(canLoadItemIn)) exitWith {false};
|
||||||
|
|
||||||
_loaded = _vehicle getVariable [QGVAR(loaded), []];
|
_loaded = _vehicle getVariable [QGVAR(loaded), []];
|
||||||
_loaded pushback _item;
|
_loaded pushBack _item;
|
||||||
_vehicle setVariable [QGVAR(loaded), _loaded, true];
|
_vehicle setVariable [QGVAR(loaded), _loaded, true];
|
||||||
|
|
||||||
TRACE_1("added to loaded array",_loaded);
|
TRACE_1("added to loaded array",_loaded);
|
||||||
|
@ -23,7 +23,7 @@ _vehicle = [_player] call FUNC(findNearestVehicle);
|
|||||||
if (isNull _vehicle || _vehicle isKindOf "Cargo_Base_F") then {
|
if (isNull _vehicle || _vehicle isKindOf "Cargo_Base_F") then {
|
||||||
{
|
{
|
||||||
if ([_object, _x] call FUNC(canLoadItemIn)) exitWith {_vehicle = _x};
|
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};
|
if (isNull _vehicle) exitWith {false};
|
||||||
|
@ -41,7 +41,7 @@ class GVAR(ProgressBar_Dialog) {
|
|||||||
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||||
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||||
colorFrame[] = {1,1,1,0.5};
|
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)";
|
texture = "#(argb,8,8,3)color(1,1,1,0.7)";
|
||||||
};
|
};
|
||||||
class TitleText: TitleBackground {
|
class TitleText: TitleBackground {
|
||||||
|
@ -115,18 +115,18 @@ class RscDisplayInventory {
|
|||||||
|
|
||||||
// map
|
// map
|
||||||
class RscDisplayMainMap {
|
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 {
|
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 {
|
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 {
|
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););
|
||||||
};
|
};
|
||||||
|
@ -88,7 +88,7 @@ class CfgUIGrids {
|
|||||||
// check dll
|
// check dll
|
||||||
class RscStandardDisplay;
|
class RscStandardDisplay;
|
||||||
class RscDisplayMain: 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));
|
||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -116,9 +116,9 @@ class ACE_gui_editBase
|
|||||||
};
|
};
|
||||||
colorSelection[] =
|
colorSelection[] =
|
||||||
{
|
{
|
||||||
"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])",
|
"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.3843])",
|
||||||
"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])",
|
"(profilenamespace getVariable ['GUI_BCG_RGB_G',0.7019])",
|
||||||
"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",
|
"(profilenamespace getVariable ['GUI_BCG_RGB_B',0.8862])",
|
||||||
1
|
1
|
||||||
};
|
};
|
||||||
autocomplete = "";
|
autocomplete = "";
|
||||||
@ -249,7 +249,7 @@ class ACE_gui_listBoxBase : RscListBox{
|
|||||||
colorSelect2[] = {0.95, 0.95, 0.95, 1};
|
colorSelect2[] = {0.95, 0.95, 0.95, 1};
|
||||||
colorSelectBackground[] = {0, 0, 0, 1};
|
colorSelectBackground[] = {0, 0, 0, 1};
|
||||||
colorSelectBackground2[] = {0.543, 0.5742, 0.4102, 1.0};
|
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;
|
period = 1.2;
|
||||||
rowHeight = 0.03;
|
rowHeight = 0.03;
|
||||||
colorBackground[] = {0, 0, 0, 1};
|
colorBackground[] = {0, 0, 0, 1};
|
||||||
@ -505,7 +505,7 @@ onMouseButtonDblClick = "";
|
|||||||
iconCanceled = "\A3\ui_f\data\map\mapcontrol\taskIconCanceled_CA.paa";
|
iconCanceled = "\A3\ui_f\data\map\mapcontrol\taskIconCanceled_CA.paa";
|
||||||
iconDone = "\A3\ui_f\data\map\mapcontrol\taskIconDone_CA.paa";
|
iconDone = "\A3\ui_f\data\map\mapcontrol\taskIconDone_CA.paa";
|
||||||
iconFailed = "\A3\ui_f\data\map\mapcontrol\taskIconFailed_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};
|
colorCreated[] = {1,1,1,1};
|
||||||
colorCanceled[] = {0.7,0.7,0.7,1};
|
colorCanceled[] = {0.7,0.7,0.7,1};
|
||||||
colorDone[] = {0.7,1,0.3,1};
|
colorDone[] = {0.7,1,0.3,1};
|
||||||
|
@ -32,7 +32,7 @@ if (isServer) then {
|
|||||||
|
|
||||||
private "_eventLog";
|
private "_eventLog";
|
||||||
_eventLog = _internalData select 1;
|
_eventLog = _internalData select 1;
|
||||||
_eventLog pushback [ACE_diagTime, _args, _ttl];
|
_eventLog pushBack [ACE_diagTime, _args, _ttl];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -18,6 +18,6 @@ _dlg = ctrlParent _this;
|
|||||||
|
|
||||||
_dlg displayAddEventHandler ["unload", {
|
_dlg displayAddEventHandler ["unload", {
|
||||||
if (_this select 1 == 1) then {
|
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);
|
||||||
};
|
};
|
||||||
}];
|
}];
|
||||||
|
@ -28,7 +28,7 @@ if (_show) then {
|
|||||||
GVAR(SHOW_BLUR_SCREEN_COLLECTION) pushBack _id;
|
GVAR(SHOW_BLUR_SCREEN_COLLECTION) pushBack _id;
|
||||||
|
|
||||||
// show blur
|
// 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) = ppEffectCreate ["DynamicBlur", 102];
|
||||||
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) ppEffectAdjust [0.9];
|
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) ppEffectAdjust [0.9];
|
||||||
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) ppEffectEnable true;
|
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) ppEffectEnable true;
|
||||||
|
@ -22,7 +22,7 @@ private ["_defaultLoglevel", "_defaultLogDisplayLevel"];
|
|||||||
|
|
||||||
_defaultLoglevel = [GVAR(LOGLEVEL), DEFAULT_LOGGING_LEVEL] select isNil QGVAR(LOGLEVEL);
|
_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);
|
_defaultLogDisplayLevel = [GVAR(LOGDISPLAY_LEVEL), DEFAULT_TEXT_DISPLAY] select isNil QGVAR(LOGDISPLAY_LEVEL);
|
||||||
|
|
||||||
|
@ -14,5 +14,5 @@
|
|||||||
|
|
||||||
params ["_entity"];
|
params ["_entity"];
|
||||||
|
|
||||||
GVAR(LOGDISPLAY_LEVEL) = call compile (_entity getvariable ["logDisplayLevel","4"]);
|
GVAR(LOGDISPLAY_LEVEL) = call compile (_entity getVariable ["logDisplayLevel","4"]);
|
||||||
GVAR(LOGLEVEL) = call compile (_entity getvariable ["logLevel","4"]);
|
GVAR(LOGLEVEL) = call compile (_entity getVariable ["logLevel","4"]);
|
||||||
|
@ -73,11 +73,11 @@ _refresh = {
|
|||||||
_ctrl = (findDisplay 46) ctrlCreate ["RscPicture", _forEachIndex + 19000];
|
_ctrl = (findDisplay 46) ctrlCreate ["RscPicture", _forEachIndex + 19000];
|
||||||
|
|
||||||
_position = switch (_setting) do {
|
_position = switch (_setting) do {
|
||||||
case TOP_RIGHT_DOWN: {[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_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_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]};
|
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]};
|
default {[X_POS_ICONS, Y_POS_ICONS + (_forEachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
|
||||||
};
|
};
|
||||||
|
|
||||||
_ctrl ctrlSetPosition _position;
|
_ctrl ctrlSetPosition _position;
|
||||||
@ -97,7 +97,7 @@ if (_show) then {
|
|||||||
_list pushBack [_iconId, _icon, _color, ACE_time];
|
_list pushBack [_iconId, _icon, _color, ACE_time];
|
||||||
} else {
|
} else {
|
||||||
{
|
{
|
||||||
if (_x select 0 == _iconId) exitwith {
|
if (_x select 0 == _iconId) exitWith {
|
||||||
_list set [_forEachIndex, [_iconId, _icon, _color, ACE_time]];
|
_list set [_forEachIndex, [_iconId, _icon, _color, ACE_time]];
|
||||||
};
|
};
|
||||||
} forEach _list;
|
} forEach _list;
|
||||||
|
@ -48,10 +48,10 @@ _ctrlHint ctrlSetBackgroundColor GVAR(displayTextColor);
|
|||||||
_ctrlHint ctrlSetTextColor GVAR(displayTextFontColor);
|
_ctrlHint ctrlSetTextColor GVAR(displayTextFontColor);
|
||||||
/*
|
/*
|
||||||
// This does not function at the moment. Has been disabled until it fixed.
|
// 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))];
|
_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];
|
_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))];
|
_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))];
|
_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));
|
_xPos = ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40));
|
||||||
|
@ -92,7 +92,7 @@ _bottomPosY = (_ctrlBcgCommonPos select 1) + _ctrlTextPosH + (_marginY * 2) + _b
|
|||||||
_xPos set [1, _bottomPosY];
|
_xPos set [1, _bottomPosY];
|
||||||
_x ctrlSetPosition _xPos;
|
_x ctrlSetPosition _xPos;
|
||||||
_x ctrlCommit 0;
|
_x ctrlCommit 0;
|
||||||
} foreach [
|
} forEach [
|
||||||
_ctrlBackgroundButtonOK,
|
_ctrlBackgroundButtonOK,
|
||||||
_ctrlBackgroundButtonMiddle,
|
_ctrlBackgroundButtonMiddle,
|
||||||
_ctrlBackgroundButtonCancel,
|
_ctrlBackgroundButtonCancel,
|
||||||
|
@ -20,14 +20,14 @@
|
|||||||
|
|
||||||
params ["_object", ["_category", ""]];
|
params ["_object", ["_category", ""]];
|
||||||
|
|
||||||
if (isNil QGVAR(OBJECT_VARIABLES_STORAGE)) exitwith {[]};
|
if (isNil QGVAR(OBJECT_VARIABLES_STORAGE)) exitWith {[]};
|
||||||
|
|
||||||
private ["_return", "_val"];
|
private ["_return", "_val"];
|
||||||
|
|
||||||
_return = [];
|
_return = [];
|
||||||
|
|
||||||
{
|
{
|
||||||
_val = _object getvariable (_x select 0);
|
_val = _object getVariable (_x select 0);
|
||||||
|
|
||||||
if (!isNil "_val") then {
|
if (!isNil "_val") then {
|
||||||
if (_category == "" || _category == _x select 3) then {
|
if (_category == "" || _category == _x select 3) then {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
params ["_unit", "_variable", "_defaultValue"];
|
params ["_unit", "_variable", "_defaultValue"];
|
||||||
|
|
||||||
private "_value";
|
private "_value";
|
||||||
_value = _unit getvariable _variable;
|
_value = _unit getVariable _variable;
|
||||||
|
|
||||||
if (isNil "_value") then {
|
if (isNil "_value") then {
|
||||||
if (!isNil "_defaultValue") then {
|
if (!isNil "_defaultValue") then {
|
||||||
|
@ -17,7 +17,7 @@ params ["_varName"];
|
|||||||
private "_variableDefinition";
|
private "_variableDefinition";
|
||||||
_variableDefinition = [_varName] call FUNC(getDefinedVariableInfo);
|
_variableDefinition = [_varName] call FUNC(getDefinedVariableInfo);
|
||||||
|
|
||||||
if !(_variableDefinition isEqualTo []) exitwith {
|
if !(_variableDefinition isEqualTo []) exitWith {
|
||||||
_variableDefinition select 1;
|
_variableDefinition select 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -14,4 +14,4 @@
|
|||||||
|
|
||||||
params ["_unit"];
|
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
|
||||||
|
@ -14,4 +14,4 @@
|
|||||||
|
|
||||||
params ["_modName"];
|
params ["_modName"];
|
||||||
|
|
||||||
isClass (configFile >> "cfgPatches" >> _modName) // return
|
isClass (configFile >> "CfgPatches" >> _modName) // return
|
||||||
|
@ -21,7 +21,7 @@ private ["_vehicle", "_loadcar", "_loadair", "_loadtank", "_loadboat"];
|
|||||||
|
|
||||||
_vehicle = objNull;
|
_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"];
|
_loadcar = nearestObject [_unit, "Car"];
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ private "_fnc_parseConfigForDisplayNames";
|
|||||||
_fnc_parseConfigForDisplayNames = {
|
_fnc_parseConfigForDisplayNames = {
|
||||||
params ["_optionEntry"];
|
params ["_optionEntry"];
|
||||||
|
|
||||||
if !(isClass _optionEntry) exitwith {false};
|
if !(isClass _optionEntry) exitWith {false};
|
||||||
|
|
||||||
private "_values";
|
private "_values";
|
||||||
_values = getArray (_optionEntry >> "values");
|
_values = getArray (_optionEntry >> "values");
|
||||||
|
@ -16,9 +16,9 @@ params ["_unit", "_id", "_accepted"];
|
|||||||
|
|
||||||
private ["_requestID", "_info", "_callBack", "_caller", "_replyParams", "_requestMessage", "_target"];
|
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;
|
_caller = _info select 0;
|
||||||
_target = _info select 1;
|
_target = _info select 1;
|
||||||
_requestID = _info select 2;
|
_requestID = _info select 2;
|
||||||
@ -26,16 +26,16 @@ if (!isnil "_info") then {
|
|||||||
_callBack = _info select 4;
|
_callBack = _info select 4;
|
||||||
_replyParams = [_info, _accepted];
|
_replyParams = [_info, _accepted];
|
||||||
[_replyParams, QFUNC(requestCallback), _caller, false] call FUNC(execRemoteFnc);
|
[_replyParams, QFUNC(requestCallback), _caller, false] call FUNC(execRemoteFnc);
|
||||||
_unit setvariable [_id, nil];
|
_unit setVariable [_id, nil];
|
||||||
};
|
};
|
||||||
|
|
||||||
GVAR(RECIEVE_REQUEST_ID_KEY_BINDING) = 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);
|
_unit removeAction GVAR(RECIEVE_REQUEST_ADD_ACTION_ACCEPT);
|
||||||
GVAR(RECIEVE_REQUEST_ADD_ACTION_ACCEPT) = nil;
|
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);
|
_unit removeAction GVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE);
|
||||||
GVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE) = nil;
|
GVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE) = nil;
|
||||||
};
|
};
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
//paramsArray is a normal variable not a command
|
//paramsArray is a normal variable not a command
|
||||||
private _paramsArray = missionnamespace getvariable ["paramsArray", []];
|
private _paramsArray = missionnamespace getVariable ["paramsArray", []];
|
||||||
|
|
||||||
TRACE_1("Reading missionConfigFile params",_paramsArray);
|
TRACE_1("Reading missionConfigFile params",_paramsArray);
|
||||||
|
|
||||||
@ -60,4 +60,4 @@ TRACE_1("Reading missionConfigFile params",_paramsArray);
|
|||||||
// Update the variable globaly and Force
|
// Update the variable globaly and Force
|
||||||
[_settingName, _settingValue, true, true] call FUNC(setSetting);
|
[_settingName, _settingValue, true, true] call FUNC(setSetting);
|
||||||
};
|
};
|
||||||
} foreach _paramsArray;
|
} forEach _paramsArray;
|
||||||
|
@ -53,7 +53,7 @@ GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT) = [ACE_time, _target, _requestID] spawn {
|
|||||||
private "_id";
|
private "_id";
|
||||||
_id = _target getVariable _requestID;
|
_id = _target getVariable _requestID;
|
||||||
|
|
||||||
waituntil {
|
waitUntil {
|
||||||
_id = _target getVariable _requestID;
|
_id = _target getVariable _requestID;
|
||||||
|
|
||||||
(ACE_time > _time || isNil "_id")
|
(ACE_time > _time || isNil "_id")
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
|
|
||||||
params ["_unit"];
|
params ["_unit"];
|
||||||
|
|
||||||
_unit setvariable ["ACE_isDead", nil, true];
|
_unit setVariable ["ACE_isDead", nil, true];
|
||||||
_unit setvariable ["ACE_isUnconscious", nil, true];
|
_unit setVariable ["ACE_isUnconscious", nil, true];
|
||||||
|
|
||||||
if (isPlayer _unit) then {
|
if (isPlayer _unit) then {
|
||||||
[true] call FUNC(setVolume);
|
[true] call FUNC(setVolume);
|
||||||
@ -36,7 +36,7 @@ if (isPlayer _unit) then {
|
|||||||
|
|
||||||
{
|
{
|
||||||
if !(_x select 4) 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
|
false
|
||||||
} count ([_unit] call FUNC(getAllDefinedSetVariables));
|
} count ([_unit] call FUNC(getAllDefinedSetVariables));
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Author: Glowbal
|
* Author: Glowbal
|
||||||
* Setvariable value
|
* setVariable value
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Unit <OBJECT>
|
* 0: Unit <OBJECT>
|
||||||
@ -23,7 +23,7 @@ if (isNil "_global") then {
|
|||||||
_definedVariable params ["", "", ["_global", false]];
|
_definedVariable params ["", "", ["_global", false]];
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!isNil "_value") exitwith {
|
if (!isNil "_value") exitWith {
|
||||||
_unit setVariable [_variable, _value, _global];
|
_unit setVariable [_variable, _value, _global];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -25,8 +25,8 @@ _elements = [];
|
|||||||
|
|
||||||
{
|
{
|
||||||
_theElement = toArray (_x select _elementN);
|
_theElement = toArray (_x select _elementN);
|
||||||
_indexes pushback _foreachIndex;
|
_indexes pushBack _forEachIndex;
|
||||||
_elements pushback _theElement;
|
_elements pushBack _theElement;
|
||||||
} forEach _array;
|
} forEach _array;
|
||||||
|
|
||||||
for "_i" from 1 to (count _elements) - 1 do {
|
for "_i" from 1 to (count _elements) - 1 do {
|
||||||
@ -45,7 +45,7 @@ for "_i" from 1 to (count _elements) - 1 do {
|
|||||||
_returnArray = [];
|
_returnArray = [];
|
||||||
|
|
||||||
{
|
{
|
||||||
_returnArray pushback (_array select _x);
|
_returnArray pushBack (_array select _x);
|
||||||
} forEach _indexes;
|
} forEach _indexes;
|
||||||
|
|
||||||
_returnArray
|
_returnArray
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
params [["_unit", objNull], ["_switch", false], ["_id", ""], ["_side", side _unit]];
|
params [["_unit", objNull], ["_switch", false], ["_id", ""], ["_side", side _unit]];
|
||||||
|
|
||||||
private "_previousGroupsList";
|
private "_previousGroupsList";
|
||||||
_previousGroupsList = _unit getvariable [QGVAR(previousGroupSwitchTo), []];
|
_previousGroupsList = _unit getVariable [QGVAR(previousGroupSwitchTo), []];
|
||||||
|
|
||||||
if (_switch) then {
|
if (_switch) then {
|
||||||
// go forward
|
// go forward
|
||||||
@ -27,7 +27,7 @@ if (_switch) then {
|
|||||||
_previousGroup = group _unit;
|
_previousGroup = group _unit;
|
||||||
_originalSide = side 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);
|
[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"];
|
private ["_currentGroup", "_newGroup"];
|
||||||
|
|
||||||
{
|
{
|
||||||
if (_id == (_x select 2)) exitwith {
|
if (_id == (_x select 2)) exitWith {
|
||||||
_x set [ 3, false];
|
_x set [ 3, false];
|
||||||
_previousGroupsList set [_forEachIndex, _x];
|
_previousGroupsList set [_forEachIndex, _x];
|
||||||
[format["found group with ID: %1", _id]] call FUNC(debug);
|
[format["found group with ID: %1", _id]] call FUNC(debug);
|
||||||
@ -51,7 +51,7 @@ if (_switch) then {
|
|||||||
reverse _previousGroupsList;
|
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 {
|
if !(_x select 3) then {
|
||||||
_currentGroup = group _unit;
|
_currentGroup = group _unit;
|
||||||
if (!isNull (_x select 0)) then {
|
if (!isNull (_x select 0)) then {
|
||||||
|
@ -24,7 +24,7 @@ if (_vehicle == _unit) exitWith {false};
|
|||||||
if (speed _vehicle > 1 || getPos _vehicle select 2 > 2) exitWith {false};
|
if (speed _vehicle > 1 || getPos _vehicle select 2 > 2) exitWith {false};
|
||||||
|
|
||||||
private "_emptyPos";
|
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};
|
if (count _emptyPos == 0) exitWith {false};
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ if (_vehicle isKindOf "Ship") then {
|
|||||||
|
|
||||||
TRACE_1("SHIP Ground Check",getPos _vehicle);
|
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 {
|
} else {
|
||||||
if (_vehicle isKindOf "Air") then {
|
if (_vehicle isKindOf "Air") then {
|
||||||
if (speed _vehicle > 1 || {isTouchingGround _vehicle}) then {
|
if (speed _vehicle > 1 || {isTouchingGround _vehicle}) then {
|
||||||
@ -45,18 +45,18 @@ if (_vehicle isKindOf "Ship") then {
|
|||||||
|
|
||||||
TRACE_1("Vehicle Ground Check", isTouchingGround _vehicle);
|
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);
|
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);
|
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
|
false
|
||||||
};
|
};
|
||||||
|
|
||||||
if (count _emptyPos == 0) exitwith {
|
if (count _emptyPos == 0) exitWith {
|
||||||
ACE_LOGWARNING_1("No safe empty spots to unload patient. %1",_emptyPos);
|
ACE_LOGWARNING_1("No safe empty spots to unload patient. %1",_emptyPos);
|
||||||
false
|
false
|
||||||
}; //consider displaying text saying there are no safe places to exit the vehicle
|
}; //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);
|
[_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);
|
_loaded deleteAt (_loaded find _unit);
|
||||||
|
|
||||||
_vehicle setvariable [QGVAR(loaded_persons), _loaded, true];
|
_vehicle setVariable [QGVAR(loaded_persons), _loaded, true];
|
||||||
|
|
||||||
true
|
true
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include "script_component.hpp"
|
#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 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 FUNC(dismount);
|
||||||
}, _this] call EFUNC(common,execNextFrame);
|
}, _this] call EFUNC(common,execNextFrame);
|
||||||
|
@ -57,7 +57,7 @@ if (_mode == 0) then {
|
|||||||
if (count _no > 0) exitWith {
|
if (count _no > 0) exitWith {
|
||||||
_found = true; //diag_log "found";
|
_found = true; //diag_log "found";
|
||||||
};
|
};
|
||||||
} foreach _wireCheckPosAr;
|
} forEach _wireCheckPosAr;
|
||||||
// Double coil found!
|
// Double coil found!
|
||||||
if (_found) then {
|
if (_found) then {
|
||||||
_mode = 1;
|
_mode = 1;
|
||||||
|
@ -29,7 +29,7 @@ private ["_xGrid", "_yGrid", "_dagrGrid", "_bearing", "_dagrDist", "_dagrElevati
|
|||||||
|
|
||||||
__background ctrlSetText QUOTE(PATHTOF(UI\dagr_vector.paa));
|
__background ctrlSetText QUOTE(PATHTOF(UI\dagr_vector.paa));
|
||||||
|
|
||||||
if (GVAR(noVectorData)) exitwith {};
|
if (GVAR(noVectorData)) exitWith {};
|
||||||
GVAR(LAZPOS) params ["_lazPosX", "_lazPosY", "_lazPosZ"];
|
GVAR(LAZPOS) params ["_lazPosX", "_lazPosY", "_lazPosZ"];
|
||||||
|
|
||||||
// Incase grids go neg due to 99-00 boundry
|
// Incase grids go neg due to 99-00 boundry
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
true
|
true
|
||||||
},
|
},
|
||||||
{false},
|
{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",
|
["ACE3 Equipment", QGVAR(ToggleKey), "Toggle DAGR",
|
||||||
{
|
{
|
||||||
@ -27,7 +27,7 @@
|
|||||||
true
|
true
|
||||||
},
|
},
|
||||||
{false},
|
{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:
|
//Add deviceKey entry:
|
||||||
private ["_conditonCode", "_toggleCode", "_closeCode"];
|
private ["_conditonCode", "_toggleCode", "_closeCode"];
|
||||||
|
@ -20,7 +20,7 @@ params ["_caller", "_target"];
|
|||||||
private "_display";
|
private "_display";
|
||||||
#define DEFUALTPATH "\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa"
|
#define DEFUALTPATH "\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa"
|
||||||
//Sanity Checks
|
//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 (!([_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;};
|
if (dialog) then {ERROR("Dialog open when trying to open disarm dialog"); closeDialog 0;};
|
||||||
|
|
||||||
|
@ -33,13 +33,13 @@ class GVAR(remoteInventory) {
|
|||||||
fadeout = 0;
|
fadeout = 0;
|
||||||
|
|
||||||
class Colors {
|
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};
|
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};
|
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};
|
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};
|
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};
|
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};
|
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};
|
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 {};
|
class controlsBackground {};
|
||||||
|
@ -52,7 +52,7 @@ if !([_unit] call EFUNC(common,isPlayer)) then {
|
|||||||
//don't do anything until projectile is null (exploded/max range)
|
//don't do anything until projectile is null (exploded/max range)
|
||||||
if (isNull _projectile) then {
|
if (isNull _projectile) then {
|
||||||
//Remove PFEH:
|
//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 (tube is dropped) OR (is dead) OR (is player) just exit
|
||||||
if (((secondaryWeapon _unit) != _tube) || {!alive _unit} || {([_unit] call EFUNC(common,isPlayer))}) exitWith {};
|
if (((secondaryWeapon _unit) != _tube) || {!alive _unit} || {([_unit] call EFUNC(common,isPlayer))}) exitWith {};
|
||||||
|
@ -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)
|
// 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};
|
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})}
|
||||||
|
@ -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)
|
// 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};
|
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})};
|
||||||
|
@ -22,7 +22,7 @@ params ["_unit", "_target"];
|
|||||||
private "_inBuilding";
|
private "_inBuilding";
|
||||||
_inBuilding = [_unit] call FUNC(isObjectOnObject);
|
_inBuilding = [_unit] call FUNC(isObjectOnObject);
|
||||||
|
|
||||||
if !(_unit getvariable ["ACE_isUnconscious", false]) then {
|
if !(_unit getVariable ["ACE_isUnconscious", false]) then {
|
||||||
// play release animation
|
// play release animation
|
||||||
_unit playAction "released";
|
_unit playAction "released";
|
||||||
};
|
};
|
||||||
@ -63,7 +63,7 @@ if !(_target isKindOf "CAManBase") then {
|
|||||||
["fixFloating", _target, _target] call EFUNC(common,targetEvent);
|
["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);
|
[_unit, "unconscious", 2, true] call EFUNC(common,doAnimation);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ detach _target;
|
|||||||
|
|
||||||
// fix anim when aborting carrying persons
|
// fix anim when aborting carrying persons
|
||||||
if (_target isKindOf "CAManBase" || {animationState _unit in CARRY_ANIMATIONS}) then {
|
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);
|
[_unit, "", 2, true] call EFUNC(common,doAnimation);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ _totalWeight = 0;
|
|||||||
];
|
];
|
||||||
|
|
||||||
// add Weight of create to totalWeight
|
// 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).
|
// 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
|
_totalWeight * 0.5
|
||||||
|
@ -19,9 +19,9 @@ class Rsc_ACE_CallScreen_Edit:RscEdit {
|
|||||||
colorText[] = {0,0,0,1};
|
colorText[] = {0,0,0,1};
|
||||||
colorDisabled[] = {1,1,1,0.25};
|
colorDisabled[] = {1,1,1,0.25};
|
||||||
colorSelection[] = {
|
colorSelection[] = {
|
||||||
"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])",
|
"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])",
|
||||||
"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])",
|
"(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])",
|
||||||
"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",
|
"(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])",
|
||||||
1
|
1
|
||||||
};
|
};
|
||||||
text = "";
|
text = "";
|
||||||
|
@ -43,7 +43,7 @@ GVAR(CurrentSpeedDial) = 0;
|
|||||||
GVAR(placeAction) = PLACE_CANCEL;
|
GVAR(placeAction) = PLACE_CANCEL;
|
||||||
};
|
};
|
||||||
|
|
||||||
//Show defuse actions on cfgAmmos (allMines):
|
//Show defuse actions on CfgAmmos (allMines):
|
||||||
_this call FUNC(interactEH);
|
_this call FUNC(interactEH);
|
||||||
|
|
||||||
}] call EFUNC(common,addEventHandler);
|
}] call EFUNC(common,addEventHandler);
|
||||||
|
@ -29,7 +29,7 @@ if ((_code) == "") exitWith {
|
|||||||
};
|
};
|
||||||
{
|
{
|
||||||
if ((_x select 0) == _name) exitWith {
|
if ((_x select 0) == _name) exitWith {
|
||||||
_speedDial set [_foreachindex, _this];
|
_speedDial set [_forEachIndex, _this];
|
||||||
_found = true;
|
_found = true;
|
||||||
};
|
};
|
||||||
} forEach _speedDial;
|
} forEach _speedDial;
|
||||||
|
@ -30,10 +30,10 @@ _result = true;
|
|||||||
|
|
||||||
if (!_ignoreRange && {(_unit distance (_item select 0)) > _range}) exitWith {TRACE_1("out of range",_range); false};
|
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"];
|
private ["_exp", "_previousExp"];
|
||||||
_previousExp = _item select 0;
|
_previousExp = _item select 0;
|
||||||
_exp = getText (ConfigFile >> "CfgAmmo" >> typeof (_previousExp) >> "ACE_Explosive");
|
_exp = getText (ConfigFile >> "CfgAmmo" >> typeOf (_previousExp) >> "ACE_Explosive");
|
||||||
if (_exp != "") then {
|
if (_exp != "") then {
|
||||||
_exp = createVehicle [_exp, [0,0,15001], [], 0, "NONE"];
|
_exp = createVehicle [_exp, [0,0,15001], [], 0, "NONE"];
|
||||||
_exp setDir (getDir _previousExp);
|
_exp setDir (getDir _previousExp);
|
||||||
|
@ -30,7 +30,7 @@ private "_explosive";
|
|||||||
_explosive = [_code] call FUNC(getSpeedDialExplosive);
|
_explosive = [_code] call FUNC(getSpeedDialExplosive);
|
||||||
|
|
||||||
if (_i >= (count _arr + 2)) then {
|
if (_i >= (count _arr + 2)) then {
|
||||||
[_pfID] call CALLSTACK(cba_fnc_removePerFrameHandler);
|
[_pfID] call CALLSTACK(CBA_fnc_removePerFrameHandler);
|
||||||
if ((count _explosive) > 0) then {
|
if ((count _explosive) > 0) then {
|
||||||
[_unit, -1, [_explosive select 0, _explosive select 2]] call FUNC(detonateExplosive);
|
[_unit, -1, [_explosive select 0, _explosive select 2]] call FUNC(detonateExplosive);
|
||||||
};
|
};
|
||||||
|
@ -44,9 +44,9 @@ _list = [];
|
|||||||
if (_adjustedList) then {
|
if (_adjustedList) then {
|
||||||
_clackerList = _clackerList - ["X"];
|
_clackerList = _clackerList - ["X"];
|
||||||
if (count _clackerList == 0) then {
|
if (count _clackerList == 0) then {
|
||||||
_unit SetVariable [QGVAR(Clackers), nil, true];
|
_unit setVariable [QGVAR(Clackers), nil, true];
|
||||||
} else {
|
} else {
|
||||||
_unit SetVariable [QGVAR(Clackers), _clackerList, true];
|
_unit setVariable [QGVAR(Clackers), _clackerList, true];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ _config = ConfigFile >> "CfgWeapons" >> _item;
|
|||||||
if (isClass _config && {getNumber(_config >> "ACE_Detonator") == 1}) then {
|
if (isClass _config && {getNumber(_config >> "ACE_Detonator") == 1}) then {
|
||||||
private ["_clackerItems"];
|
private ["_clackerItems"];
|
||||||
_clackerItems = _giver getVariable [QGVAR(Clackers), []];
|
_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);
|
_detonators = [_giver] call FUNC(getDetonators);
|
||||||
if (count _detonators == 0) then {
|
if (count _detonators == 0) then {
|
||||||
|
@ -62,8 +62,8 @@ if (isNumber (_magazineTrigger >> "digDistance")) then {
|
|||||||
_canDigDown = true;
|
_canDigDown = true;
|
||||||
_surfaceType = surfaceType _pos;
|
_surfaceType = surfaceType _pos;
|
||||||
if ((_surfaceType select [0,1]) == "#") then {_surfaceType = _surfaceType select [1, 99];};
|
if ((_surfaceType select [0,1]) == "#") then {_surfaceType = _surfaceType select [1, 99];};
|
||||||
if ((_surfaceType != "") || {isClass (configfile >> "CfgSurfaces" >> _surfaceType >> "soundEnviron")}) then {
|
if ((_surfaceType != "") || {isClass (configFile >> "CfgSurfaces" >> _surfaceType >> "soundEnviron")}) then {
|
||||||
_soundEnviron = getText (configfile >> "CfgSurfaces" >> _surfaceType >> "soundEnviron");
|
_soundEnviron = getText (configFile >> "CfgSurfaces" >> _surfaceType >> "soundEnviron");
|
||||||
TRACE_2("Dig Down Surface",_surfaceType,_soundEnviron);
|
TRACE_2("Dig Down Surface",_surfaceType,_soundEnviron);
|
||||||
_canDigDown = !(_soundEnviron in ["road", "tarmac", "concrete", "concrete_int", "int_concrete", "concrete_ext"]);
|
_canDigDown = !(_soundEnviron in ["road", "tarmac", "concrete", "concrete_int", "int_concrete", "concrete_ext"]);
|
||||||
};
|
};
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call FUNC(keyUp);
|
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call FUNC(keyUp);
|
||||||
false
|
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),
|
["ACE3 Vehicles", QGVAR(adjustRangeUp), localize LSTRING(AdjustRangeUp),
|
||||||
{
|
{
|
||||||
@ -42,7 +42,7 @@
|
|||||||
true
|
true
|
||||||
},
|
},
|
||||||
{false},
|
{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),
|
["ACE3 Vehicles", QGVAR(adjustRangDown), localize LSTRING(AdjustRangeDown),
|
||||||
{
|
{
|
||||||
@ -56,4 +56,4 @@
|
|||||||
true
|
true
|
||||||
},
|
},
|
||||||
{false},
|
{false},
|
||||||
[209, [false, false, false]], false] call cba_fnc_addKeybind; //PageDown Key
|
[209, [false, false, false]], false] call CBA_fnc_addKeybind; //PageDown Key
|
||||||
|
@ -19,5 +19,5 @@ GVAR(pfeh_id) = -1;
|
|||||||
_this call FUNC(keyPress);
|
_this call FUNC(keyPress);
|
||||||
},
|
},
|
||||||
{false},
|
{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);
|
}] call EFUNC(common,addEventHandler);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//fnc_doExplosions.sqf
|
//fnc_doExplosions.sqf
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_params", "_explosions", "_index", "_i", "_exp", "_refExp", "_bpos", "_hit", "_distance", "_indirectHitRange", "_depth"];
|
private ["_params", "_explosions", "_index", "_i", "_exp", "_refExp", "_bpos", "_hit", "_distance", "_indirectHitRange", "_depth"];
|
||||||
_params = _this select 0;
|
_params = _this select 0;
|
||||||
_explosions = _params select 0;
|
_explosions = _params select 0;
|
||||||
_index = _params select 1;
|
_index = _params select 1;
|
||||||
@ -20,7 +20,7 @@ for "_i" from _index to ((_index+2) min (count _explosions)) do {
|
|||||||
};
|
};
|
||||||
_index = _index + 2;
|
_index = _index + 2;
|
||||||
if(_index >= (count _explosions)) then {
|
if(_index >= (count _explosions)) then {
|
||||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
|
||||||
} else {
|
} else {
|
||||||
_params set[1, _index];
|
_params set[1, _index];
|
||||||
};
|
};
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//fnc_doReflections.sqf
|
//fnc_doReflections.sqf
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_pos", "_ammo", "_depth", "_hit", "_range", "_hitFactor", "_indirectHitRange", "_indirectHit", "_testParams"];
|
private ["_pos", "_ammo", "_depth", "_hit", "_range", "_hitFactor", "_indirectHitRange", "_indirectHit", "_testParams"];
|
||||||
|
|
||||||
_pos = _this select 0;
|
_pos = _this select 0;
|
||||||
_ammo = _this select 1;
|
_ammo = _this select 1;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//fnc_findReflections.sqf
|
//fnc_findReflections.sqf
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_split", "_radi", "_params", "_pos", "_explosiveInfo", "_los", "_nlos", "_zIndex", "_depth", "_indirectHitRange", "_indirectHit", "_distanceCount", "_lastPos", "_test", "_vec", "_testPos", "_buckets", "_excludes", "_bucketIndex", "_bucketPos", "_bucketList", "_c", "_index", "_blist", "_avgX", "_avgY", "_avgZ", "_bpos", "_distance", "_hitFactor", "_hit", "_range", "_refExp", "_rand", "_i", "_x", "_res", "_forEachIndex", "_explosions", "_can", "_dirvec", "_zAng"];
|
private ["_split", "_radi", "_params", "_pos", "_explosiveInfo", "_los", "_nlos", "_zIndex", "_depth", "_indirectHitRange", "_indirectHit", "_distanceCount", "_lastPos", "_test", "_vec", "_testPos", "_buckets", "_excludes", "_bucketIndex", "_bucketPos", "_bucketList", "_c", "_index", "_blist", "_avgX", "_avgY", "_avgZ", "_bpos", "_distance", "_hitFactor", "_hit", "_range", "_refExp", "_rand", "_i", "_x", "_res", "_forEachIndex", "_explosions", "_can", "_dirvec", "_zAng"];
|
||||||
|
|
||||||
_params = _this select 0;
|
_params = _this select 0;
|
||||||
@ -21,15 +21,15 @@ _indirectHit = _explosiveInfo select 1;
|
|||||||
_distanceCount = (floor _indirectHitRange*4) min 100;
|
_distanceCount = (floor _indirectHitRange*4) min 100;
|
||||||
|
|
||||||
if(_zIndex < 5) then {
|
if(_zIndex < 5) then {
|
||||||
_lastPos = _pos;
|
_lastPos = _pos;
|
||||||
_zAng = _zIndex*20+2;
|
_zAng = _zIndex*20+2;
|
||||||
if(_zAng > 80) then {
|
if(_zAng > 80) then {
|
||||||
_radi = 1;
|
_radi = 1;
|
||||||
_zAng = 90;
|
_zAng = 90;
|
||||||
};
|
};
|
||||||
for "_i" from 0 to _radi do {
|
for "_i" from 0 to _radi do {
|
||||||
_test = true;
|
_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 {
|
for "_x" from 1 to _distanceCount do {
|
||||||
_testPos = _pos vectorAdd (_vec vectorMultiply _x);
|
_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,"","",""];
|
// 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,"","",""];
|
||||||
@ -43,7 +43,7 @@ if(_zIndex < 5) then {
|
|||||||
// 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,"","",""];
|
// 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,"","",""];
|
||||||
// TEST_PAIRS pushBack [_pos, _lastPos, [1,0,0,1]];
|
// TEST_PAIRS pushBack [_pos, _lastPos, [1,0,0,1]];
|
||||||
|
|
||||||
};
|
};
|
||||||
// if(terrainIntersectASL [_pos, _testPos]) exitWith {};
|
// if(terrainIntersectASL [_pos, _testPos]) exitWith {};
|
||||||
_lastPos = _testPos;
|
_lastPos = _testPos;
|
||||||
};
|
};
|
||||||
@ -106,7 +106,7 @@ if(_zIndex < 5) then {
|
|||||||
_range = _range - (_range%2);
|
_range = _range - (_range%2);
|
||||||
|
|
||||||
if(_hit >= 10 && _range > 0) then {
|
if(_hit >= 10 && _range > 0) then {
|
||||||
// TEST_ICONS pushBack [_bpos, format["h: %1, r: %2, hf: %3 d: %4 ihr: %5", _hit, _range, _hitFactor, _distance, _indirectHitRange*4]];
|
// TEST_ICONS pushBack [_bpos, format["h: %1, r: %2, hf: %3 d: %4 ihr: %5", _hit, _range, _hitFactor, _distance, _indirectHitRange*4]];
|
||||||
// TEST_PAIRS pushBack [_pos, _bpos, [1,0,0,1]];
|
// TEST_PAIRS pushBack [_pos, _bpos, [1,0,0,1]];
|
||||||
_refExp = format["ace_explosion_reflection_%1_%2", _range, _hit];
|
_refExp = format["ace_explosion_reflection_%1_%2", _range, _hit];
|
||||||
// _refExp createVehicle (ASLtoATL _bpos);
|
// _refExp createVehicle (ASLtoATL _bpos);
|
||||||
@ -122,5 +122,5 @@ if(_zIndex < 5) then {
|
|||||||
// _dirvec = _dirvec vectorMultiply 100;
|
// _dirvec = _dirvec vectorMultiply 100;
|
||||||
// _can setVelocity _dirvec;
|
// _can setVelocity _dirvec;
|
||||||
[DFUNC(doExplosions), 0, [_explosions, 0]] call CBA_fnc_addPerFrameHandler;
|
[DFUNC(doExplosions), 0, [_explosions, 0]] call CBA_fnc_addPerFrameHandler;
|
||||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
if(GVAR(tracesStarted)) then {
|
if(GVAR(tracesStarted)) then {
|
||||||
GVAR(tracesStarted) = false;
|
GVAR(tracesStarted) = false;
|
||||||
[GVAR(traceID)] call cba_fnc_removePerFrameHandler;
|
[GVAR(traceID)] call CBA_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
|
@ -10,5 +10,5 @@ if (alive _tracerObj && (count GVAR(traces)) > 0) then {
|
|||||||
_positions = _data select 4;
|
_positions = _data select 4;
|
||||||
_positions set [(count _positions), [(getPos _tracerObj), vectorMagnitude (velocity _tracerObj)]];
|
_positions set [(count _positions), [(getPos _tracerObj), vectorMagnitude (velocity _tracerObj)]];
|
||||||
} else {
|
} else {
|
||||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
|
@ -26,7 +26,7 @@ GVAR(time4) = 0;
|
|||||||
["playerChanged", {
|
["playerChanged", {
|
||||||
GVAR(deafnessDV) = 0;
|
GVAR(deafnessDV) = 0;
|
||||||
GVAR(deafnessPrior) = 0;
|
GVAR(deafnessPrior) = 0;
|
||||||
ACE_player setvariable [QGVAR(deaf), false];
|
ACE_player setVariable [QGVAR(deaf), false];
|
||||||
|
|
||||||
GVAR(beep) = false;
|
GVAR(beep) = false;
|
||||||
GVAR(beep2) = false;
|
GVAR(beep2) = false;
|
||||||
|
@ -42,7 +42,7 @@ if (!_justUpdateVolume) then {
|
|||||||
GVAR(deafnessPrior) = GVAR(deafnessDV);
|
GVAR(deafnessPrior) = GVAR(deafnessDV);
|
||||||
|
|
||||||
if (GVAR(deafnessDV) > 19.75) then {
|
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 {
|
if ((!GVAR(DisableEarRinging)) && {ACE_time > GVAR(time4)}) then {
|
||||||
playSound "ACE_Combat_Deafness";
|
playSound "ACE_Combat_Deafness";
|
||||||
GVAR(beep2) = true;
|
GVAR(beep2) = true;
|
||||||
@ -50,7 +50,7 @@ if (!_justUpdateVolume) then {
|
|||||||
GVAR(time4) = ACE_time + 30;
|
GVAR(time4) = ACE_time + 30;
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
ACE_player setvariable [QGVAR(deaf), false];
|
ACE_player setVariable [QGVAR(deaf), false];
|
||||||
};
|
};
|
||||||
|
|
||||||
if (GVAR(deafnessDV) > 10) then {
|
if (GVAR(deafnessDV) > 10) then {
|
||||||
|
@ -93,7 +93,7 @@ GVAR(no_cams) sort true;
|
|||||||
GVAR(pos) = getPosVisual GVAR(huntIR);
|
GVAR(pos) = getPosVisual GVAR(huntIR);
|
||||||
|
|
||||||
if ((!dialog) || (count GVAR(no_cams) == 0) || ((GVAR(pos) select 2) <= 20)) exitWith {
|
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;
|
GVAR(stop) = true;
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ createDialog "ace_huntir_cam_dialog_off";
|
|||||||
_nearestHuntIRs = ACE_player nearEntities ["ACE_HuntIR", HUNTIR_MAX_TRANSMISSION_RANGE];
|
_nearestHuntIRs = ACE_player nearEntities ["ACE_HuntIR", HUNTIR_MAX_TRANSMISSION_RANGE];
|
||||||
|
|
||||||
if ((!dialog) || GVAR(done)) exitWith {
|
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 {
|
if (dialog && GVAR(state) == "connected") then {
|
||||||
[_nearestHuntIRs select 0] call FUNC(cam);
|
[_nearestHuntIRs select 0] call FUNC(cam);
|
||||||
|
@ -41,14 +41,14 @@ GVAR(ParsedTextCached) = [];
|
|||||||
// Statement
|
// Statement
|
||||||
[0] call FUNC(keyDown)
|
[0] call FUNC(keyDown)
|
||||||
},{[0,false] call FUNC(keyUp)},
|
},{[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)),
|
["ACE3 Common", QGVAR(SelfInteractKey), (localize LSTRING(SelfInteractKey)),
|
||||||
{
|
{
|
||||||
// Statement
|
// Statement
|
||||||
[1] call FUNC(keyDown)
|
[1] call FUNC(keyDown)
|
||||||
},{[1,false] call FUNC(keyUp)},
|
},{[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
|
// Listens for the falling unconscious event, just in case the menu needs to be closed
|
||||||
|
@ -116,7 +116,7 @@ _angle = _centerAngle - _angleSpan / 2;
|
|||||||
private ["_offset","_newPos"];
|
private ["_offset","_newPos"];
|
||||||
_newPos = if (GVAR(UseListMenu)) then {
|
_newPos = if (GVAR(UseListMenu)) then {
|
||||||
[(_sPos select 0) + _scaleX,
|
[(_sPos select 0) + _scaleX,
|
||||||
(_sPos select 1) + _scaleY * (_foreachindex - _numChildren/2 + 0.5)];
|
(_sPos select 1) + _scaleY * (_forEachIndex - _numChildren/2 + 0.5)];
|
||||||
} else {
|
} else {
|
||||||
[(_sPos select 0) - _scaleX * (cos _angle),
|
[(_sPos select 0) - _scaleX * (cos _angle),
|
||||||
(_sPos select 1) + _scaleY * (sin _angle)];
|
(_sPos select 1) + _scaleY * (sin _angle)];
|
||||||
|
@ -55,7 +55,7 @@ if (((count _weaponConfig) < 1) || {(getNumber (_weaponConfig select 0)) != 1})
|
|||||||
_fireDisabledEH = [_fireDisabledEH] call FUNC(enableFire);
|
_fireDisabledEH = [_fireDisabledEH] call FUNC(enableFire);
|
||||||
};
|
};
|
||||||
|
|
||||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
|
||||||
GVAR(pfehID) = -1;
|
GVAR(pfehID) = -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
[ACE_player] call FUNC(lockKeyUp);
|
[ACE_player] call FUNC(lockKeyUp);
|
||||||
false
|
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),
|
["ACE3 Weapons", QGVAR(cycleFireMode), localize LSTRING(CycleFireMode),
|
||||||
{ false },
|
{ false },
|
||||||
@ -27,4 +27,4 @@
|
|||||||
[ACE_player] call FUNC(cycleFireMode);
|
[ACE_player] call FUNC(cycleFireMode);
|
||||||
false
|
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
|
@ -23,7 +23,7 @@ private ["_outputData"];
|
|||||||
_outputData = [] call FUNC(generateOutputData);
|
_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];
|
} forEach [74100, 74200, 74201, 74300, 74301, 74302, 74303, 74304, 74305, 74400, 74401, 74500, 74600, 74601, 74602, 74603, 74604, 74605];
|
||||||
|
|
||||||
if (GVAR(referenceHeadingMenu) == 1) then {
|
if (GVAR(referenceHeadingMenu) == 1) then {
|
||||||
|
@ -10,7 +10,7 @@ _shooter = _args select 1;
|
|||||||
_uuid = _args select 2;
|
_uuid = _args select 2;
|
||||||
|
|
||||||
if(isNull _laserTarget || !alive _shooter) exitWith {
|
if(isNull _laserTarget || !alive _shooter) exitWith {
|
||||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
|
||||||
REM(GVAR(VanillaLasers), _laserTarget);
|
REM(GVAR(VanillaLasers), _laserTarget);
|
||||||
|
|
||||||
// Remove laseron
|
// Remove laseron
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Author: PabstMirror
|
* 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.
|
* Call is fairly expensive because of all of the string checking.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
|
@ -27,7 +27,7 @@ _unitMagCounts = [];
|
|||||||
private "_xFullMagazineCount";
|
private "_xFullMagazineCount";
|
||||||
_x params ["_xClassname", "_xCount", "_xLoaded", "_xType"];
|
_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
|
//for every partial magazine, that is either in inventory or can be moved there
|
||||||
if ((_xCount < _xFullMagazineCount) && {_xCount > 0} && {(!_xLoaded) || {_player canAdd _xClassname}}) then {
|
if ((_xCount < _xFullMagazineCount) && {_xCount > 0} && {(!_xLoaded) || {_player canAdd _xClassname}}) then {
|
||||||
|
@ -24,7 +24,7 @@ private ["_structuredOutputText", "_picture", "_fullMags", "_partialMags", "_ful
|
|||||||
params ["_args", "_elapsedTime", "_totalTime", "_errorCode"];
|
params ["_args", "_elapsedTime", "_totalTime", "_errorCode"];
|
||||||
_args params ["_magazineClassname", "_lastAmmoCount"];
|
_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:
|
//Don't show anything if player can't interact:
|
||||||
if (!([ACE_player, objNull, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith))) exitWith {};
|
if (!([ACE_player, objNull, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith))) exitWith {};
|
||||||
|
@ -24,7 +24,7 @@ private ["_magazineCfg", "_fullMagazineCount", "_isBelt", "_startingAmmoCounts",
|
|||||||
params ["_target", "_player", "_magazineClassname"];
|
params ["_target", "_player", "_magazineClassname"];
|
||||||
|
|
||||||
if (isNil "_magazineClassname" || {_magazineClassname == ""}) exitWith {ERROR("Bad Mag Classname");};
|
if (isNil "_magazineClassname" || {_magazineClassname == ""}) exitWith {ERROR("Bad Mag Classname");};
|
||||||
_magazineCfg = configfile >> "CfgMagazines" >> _magazineClassname;
|
_magazineCfg = configFile >> "CfgMagazines" >> _magazineClassname;
|
||||||
// Calculate actual ammo to transfer during repack
|
// Calculate actual ammo to transfer during repack
|
||||||
_fullMagazineCount = getNumber (_magazineCfg >> "count");
|
_fullMagazineCount = getNumber (_magazineCfg >> "count");
|
||||||
//Is linked belt magazine:
|
//Is linked belt magazine:
|
||||||
@ -57,7 +57,7 @@ _startingAmmoCounts = [];
|
|||||||
};
|
};
|
||||||
} forEach (magazinesAmmoFull _player);
|
} 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);
|
_simEvents = [_fullMagazineCount, _startingAmmoCounts, _isBelt] call FUNC(simulateRepackEvents);
|
||||||
_totalTime = (_simEvents select ((count _simEvents) - 1) select 0);
|
_totalTime = (_simEvents select ((count _simEvents) - 1) select 0);
|
||||||
|
@ -16,7 +16,7 @@ private ["_config", "_marker", "_a", "_scope", "_icon", "_rgba", "_name"];
|
|||||||
|
|
||||||
// init marker types
|
// init marker types
|
||||||
if (isNil QGVAR(MarkersCache)) then {
|
if (isNil QGVAR(MarkersCache)) then {
|
||||||
_config = configfile >> "CfgMarkers";
|
_config = configFile >> "CfgMarkers";
|
||||||
GVAR(MarkersCache) = [];
|
GVAR(MarkersCache) = [];
|
||||||
|
|
||||||
for "_a" from 0 to (count _config - 1) do {
|
for "_a" from 0 to (count _config - 1) do {
|
||||||
@ -32,7 +32,7 @@ if (isNil QGVAR(MarkersCache)) then {
|
|||||||
|
|
||||||
// init marker colors
|
// init marker colors
|
||||||
if (isNil QGVAR(MarkerColorsCache)) then {
|
if (isNil QGVAR(MarkerColorsCache)) then {
|
||||||
_config = configfile >> "CfgMarkerColors";
|
_config = configFile >> "CfgMarkerColors";
|
||||||
GVAR(MarkerColorsCache) = [];
|
GVAR(MarkerColorsCache) = [];
|
||||||
|
|
||||||
for "_a" from 0 to (count _config - 1) do {
|
for "_a" from 0 to (count _config - 1) do {
|
||||||
|
@ -25,6 +25,6 @@ _data = _ctrl lbValue _index;
|
|||||||
|
|
||||||
GVAR(curSelMarkerColor) = _index;
|
GVAR(curSelMarkerColor) = _index;
|
||||||
|
|
||||||
_config = (configfile >> "CfgMarkerColors") select _data;
|
_config = (configFile >> "CfgMarkerColors") select _data;
|
||||||
|
|
||||||
GVAR(currentMarkerColorConfigName) = (configName _config);
|
GVAR(currentMarkerColorConfigName) = (configName _config);
|
||||||
|
@ -25,6 +25,6 @@ _data = _ctrl lbValue _index;
|
|||||||
|
|
||||||
GVAR(curSelMarkerShape) = _index;
|
GVAR(curSelMarkerShape) = _index;
|
||||||
|
|
||||||
_config = (configfile >> "CfgMarkers") select _data;
|
_config = (configFile >> "CfgMarkers") select _data;
|
||||||
|
|
||||||
GVAR(currentMarkerConfigName) = (configName _config);
|
GVAR(currentMarkerConfigName) = (configName _config);
|
||||||
|
@ -29,14 +29,14 @@ TRACE_3("params",_allMapMarkers,_allMapMarkersProperties,_logic);
|
|||||||
_data = _allMapMarkersProperties select _index;
|
_data = _allMapMarkersProperties select _index;
|
||||||
_data params ["_name", "_color", "_pos", "_dir"];
|
_data params ["_name", "_color", "_pos", "_dir"];
|
||||||
|
|
||||||
_config = (configfile >> "CfgMarkers") >> _name;
|
_config = (configFile >> "CfgMarkers") >> _name;
|
||||||
if (!isClass _config) then {
|
if (!isClass _config) then {
|
||||||
WARNING("CfgMarker not found, changed to milDot");
|
WARNING("CfgMarker not found, changed to milDot");
|
||||||
_config == (configFile >> "CfgMarkers" >> "MilDot");
|
_config == (configFile >> "CfgMarkers" >> "MilDot");
|
||||||
};
|
};
|
||||||
_x setMarkerTypeLocal (configName _config);
|
_x setMarkerTypeLocal (configName _config);
|
||||||
|
|
||||||
_config = (configfile >> "CfgMarkerColors") >> _color;
|
_config = (configFile >> "CfgMarkerColors") >> _color;
|
||||||
if (!isClass _config) then {
|
if (!isClass _config) then {
|
||||||
WARNING("CfgMarkerColors not found, changed to Default");
|
WARNING("CfgMarkerColors not found, changed to Default");
|
||||||
_config == (configFile >> "CfgMarkerColors" >> "Default");
|
_config == (configFile >> "CfgMarkerColors" >> "Default");
|
||||||
|
@ -24,14 +24,14 @@ _data params ["_markerClassname", "_colorClassname", "_markerPos", "_markerDir"]
|
|||||||
TRACE_2("params",_marker,_data);
|
TRACE_2("params",_marker,_data);
|
||||||
|
|
||||||
|
|
||||||
_config = (configfile >> "CfgMarkers") >> _markerClassname;
|
_config = (configFile >> "CfgMarkers") >> _markerClassname;
|
||||||
if (!isClass _config) then {
|
if (!isClass _config) then {
|
||||||
WARNING("CfgMarker not found, changed to milDot");
|
WARNING("CfgMarker not found, changed to milDot");
|
||||||
_config == (configFile >> "CfgMarkers" >> "MilDot");
|
_config == (configFile >> "CfgMarkers" >> "MilDot");
|
||||||
};
|
};
|
||||||
_marker setMarkerTypeLocal (configName _config);
|
_marker setMarkerTypeLocal (configName _config);
|
||||||
|
|
||||||
_config = (configfile >> "CfgMarkerColors") >> _colorClassname;
|
_config = (configFile >> "CfgMarkerColors") >> _colorClassname;
|
||||||
if (!isClass _config) then {
|
if (!isClass _config) then {
|
||||||
WARNING("CfgMarkerColors not found, changed to Default");
|
WARNING("CfgMarkerColors not found, changed to Default");
|
||||||
_config == (configFile >> "CfgMarkerColors" >> "Default");
|
_config == (configFile >> "CfgMarkerColors" >> "Default");
|
||||||
|
@ -496,7 +496,7 @@ class CfgVehicles {
|
|||||||
class GVAR(loadPatient) {
|
class GVAR(loadPatient) {
|
||||||
displayName = CSTRING(LoadPatient);
|
displayName = CSTRING(LoadPatient);
|
||||||
distance = 5;
|
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));
|
statement = QUOTE([ARR_2(_player, _target)] call DFUNC(actionLoadUnit));
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 2;
|
priority = 2;
|
||||||
@ -506,7 +506,7 @@ class CfgVehicles {
|
|||||||
class GVAR(UnLoadPatient) {
|
class GVAR(UnLoadPatient) {
|
||||||
displayName = CSTRING(UnloadPatient);
|
displayName = CSTRING(UnloadPatient);
|
||||||
distance = 5;
|
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));
|
statement = QUOTE([ARR_2(_player, _target)] call DFUNC(actionUnloadUnit));
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 2;
|
priority = 2;
|
||||||
|
@ -160,7 +160,7 @@ GVAR(lastHeartBeatSound) = ACE_time;
|
|||||||
if (GVAR(level) == 1) then {
|
if (GVAR(level) == 1) then {
|
||||||
_heartRate = 60 + 40 * _pain;
|
_heartRate = 60 + 40 * _pain;
|
||||||
};
|
};
|
||||||
if (_heartRate <= 0) exitwith {};
|
if (_heartRate <= 0) exitWith {};
|
||||||
_interval = 60 / (_heartRate min 40);
|
_interval = 60 / (_heartRate min 40);
|
||||||
|
|
||||||
if ((ACE_player getVariable ["ACE_isUnconscious", false])) then {
|
if ((ACE_player getVariable ["ACE_isUnconscious", false])) then {
|
||||||
@ -175,11 +175,11 @@ GVAR(lastHeartBeatSound) = ACE_time;
|
|||||||
|
|
||||||
// Pain effect, no pain effect in zeus camera
|
// Pain effect, no pain effect in zeus camera
|
||||||
if (isNull curatorCamera) then {
|
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)]);
|
_strength = _strength * (ACE_player getVariable [QGVAR(painCoefficient), GVAR(painCoefficient)]);
|
||||||
if (GVAR(painEffectType) == 1) then {
|
if (GVAR(painEffectType) == 1) then {
|
||||||
GVAR(effectPainCC) ppEffectEnable false;
|
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;
|
_strength = _strength * 0.15;
|
||||||
GVAR(effectPainCA) ppEffectEnable true;
|
GVAR(effectPainCA) ppEffectEnable true;
|
||||||
GVAR(effectPainCA) ppEffectAdjust [_strength, _strength, false];
|
GVAR(effectPainCA) ppEffectAdjust [_strength, _strength, false];
|
||||||
@ -201,7 +201,7 @@ GVAR(lastHeartBeatSound) = ACE_time;
|
|||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
GVAR(effectPainCA) ppEffectEnable false;
|
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;
|
_strength = _strength * 0.9;
|
||||||
GVAR(effectPainCC) ppEffectEnable true;
|
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]];
|
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", {
|
["SettingsInitialized", {
|
||||||
if (GVAR(level) == 2) exitwith {
|
if (GVAR(level) == 2) exitWith {
|
||||||
[
|
[
|
||||||
{(((_this select 0) getvariable [QGVAR(bloodVolume), 100]) < 65)},
|
{(((_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(pain), 0]) - ((_this select 0) getVariable [QGVAR(painSuppress), 0])) > 0.9},
|
||||||
{(([_this select 0] call FUNC(getBloodLoss)) > 0.25)},
|
{(([_this select 0] call FUNC(getBloodLoss)) > 0.25)},
|
||||||
{((_this select 0) getvariable [QGVAR(inReviveState), false])},
|
{((_this select 0) getVariable [QGVAR(inReviveState), false])},
|
||||||
{((_this select 0) getvariable [QGVAR(inCardiacArrest), false])},
|
{((_this select 0) getVariable [QGVAR(inCardiacArrest), false])},
|
||||||
{((_this select 0) getvariable ["ACE_isDead", false])},
|
{((_this select 0) getVariable ["ACE_isDead", false])},
|
||||||
{(((_this select 0) getvariable [QGVAR(airwayStatus), 100]) < 80)}
|
{(((_this select 0) getVariable [QGVAR(airwayStatus), 100]) < 80)}
|
||||||
] call FUNC(addUnconsciousCondition);
|
] call FUNC(addUnconsciousCondition);
|
||||||
};
|
};
|
||||||
|
|
||||||
[
|
[
|
||||||
{(((_this select 0) getvariable [QGVAR(bloodVolume), 100]) < 40)},
|
{(((_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(pain), 0]) - ((_this select 0) getVariable [QGVAR(painSuppress), 0])) > 0.6},
|
||||||
{(([_this select 0] call FUNC(getBloodLoss)) > 0.1)},
|
{(([_this select 0] call FUNC(getBloodLoss)) > 0.1)},
|
||||||
{((_this select 0) getvariable [QGVAR(inReviveState), false])},
|
{((_this select 0) getVariable [QGVAR(inReviveState), false])},
|
||||||
{((_this select 0) getvariable ["ACE_isDead", false])}
|
{((_this select 0) getVariable ["ACE_isDead", false])}
|
||||||
] call FUNC(addUnconsciousCondition);
|
] call FUNC(addUnconsciousCondition);
|
||||||
}] call EFUNC(common,addEventHandler);
|
}] call EFUNC(common,addEventHandler);
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ class CfgPatches {
|
|||||||
#include "CfgFactionClasses.hpp"
|
#include "CfgFactionClasses.hpp"
|
||||||
#include "CfgVehicles.hpp"
|
#include "CfgVehicles.hpp"
|
||||||
#include "CfgWeapons.hpp"
|
#include "CfgWeapons.hpp"
|
||||||
#include "CFgSounds.hpp"
|
#include "CfgSounds.hpp"
|
||||||
#include "ACE_Medical_Treatments.hpp"
|
#include "ACE_Medical_Treatments.hpp"
|
||||||
#include "ACE_Settings.hpp"
|
#include "ACE_Settings.hpp"
|
||||||
#include "UI\RscTitles.hpp"
|
#include "UI\RscTitles.hpp"
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
private ["_heartRateOutput", "_heartRate", "_logOutPut"];
|
private ["_heartRateOutput", "_heartRate", "_logOutPut"];
|
||||||
params ["_caller", "_unit", "_selectionName"];
|
params ["_caller", "_unit", "_selectionName"];
|
||||||
|
|
||||||
_heartRate = _unit getvariable [QGVAR(heartRate), 80];
|
_heartRate = _unit getVariable [QGVAR(heartRate), 80];
|
||||||
if (!alive _unit) then {
|
if (!alive _unit) then {
|
||||||
_heartRate = 0;
|
_heartRate = 0;
|
||||||
};
|
};
|
||||||
|
@ -21,25 +21,25 @@ _genericMessages = [LSTRING(diagnoseMessage)];
|
|||||||
|
|
||||||
_genericMessages pushBack ([_target] call EFUNC(common,getName));
|
_genericMessages pushBack ([_target] call EFUNC(common,getName));
|
||||||
if (alive _target) then {
|
if (alive _target) then {
|
||||||
_genericMessages pushback LSTRING(diagnoseAlive);
|
_genericMessages pushBack LSTRING(diagnoseAlive);
|
||||||
} else {
|
} else {
|
||||||
_genericMessages pushback LSTRING(diagnoseDead);
|
_genericMessages pushBack LSTRING(diagnoseDead);
|
||||||
};
|
};
|
||||||
if (_target getvariable[QGVAR(hasLostBlood), 0] > 0) then {
|
if (_target getVariable[QGVAR(hasLostBlood), 0] > 0) then {
|
||||||
if (_target getvariable[QGVAR(hasLostBlood), 0] > 1) then {
|
if (_target getVariable[QGVAR(hasLostBlood), 0] > 1) then {
|
||||||
_genericMessages pushback LSTRING(lostBloodALot);
|
_genericMessages pushBack LSTRING(lostBloodALot);
|
||||||
} else {
|
} else {
|
||||||
_genericMessages pushback LSTRING(lostBlood);
|
_genericMessages pushBack LSTRING(lostBlood);
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
_genericMessages pushback LSTRING(noBloodloss);
|
_genericMessages pushBack LSTRING(noBloodloss);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (alive _target) then {
|
if (alive _target) then {
|
||||||
if (_target getvariable[QGVAR(hasPain), false]) then {
|
if (_target getVariable[QGVAR(hasPain), false]) then {
|
||||||
_genericMessages pushback LSTRING(inPain);
|
_genericMessages pushBack LSTRING(inPain);
|
||||||
} else {
|
} else {
|
||||||
_genericMessages pushback LSTRING(noPain);
|
_genericMessages pushBack LSTRING(noPain);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
private "_vehicle";
|
private "_vehicle";
|
||||||
params ["_caller", "_target"];
|
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);
|
["displayTextStructured", [_caller], [[LSTRING(CanNotLoaded), [_target] call EFUNC(common,getName)], 1.5, _caller]] call EFUNC(common,targetEvent);
|
||||||
};
|
};
|
||||||
if ([_target] call FUNC(isBeingCarried)) then {
|
if ([_target] call FUNC(isBeingCarried)) then {
|
||||||
|
@ -20,17 +20,17 @@ params ["_caller", "_target", "_selectionName"];
|
|||||||
|
|
||||||
// grab the required data
|
// grab the required data
|
||||||
_part = [_selectionName] call FUNC(selectionNameToNumber);
|
_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
|
// Check if there is a tourniquet on this bodypart
|
||||||
if ((_tourniquets select _part) == 0) exitwith {
|
if ((_tourniquets select _part) == 0) exitWith {
|
||||||
_output = LSTRING(noTourniquetOnBodyPart);
|
_output = LSTRING(noTourniquetOnBodyPart);
|
||||||
["displayTextStructured", [_caller], [_output, 1.5, _caller]] call EFUNC(common,targetEvent);
|
["displayTextStructured", [_caller], [_output, 1.5, _caller]] call EFUNC(common,targetEvent);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Removing the tourniquet
|
// Removing the tourniquet
|
||||||
_tourniquets set[_part, 0];
|
_tourniquets set[_part, 0];
|
||||||
_target setvariable [QGVAR(tourniquets), _tourniquets, true];
|
_target setVariable [QGVAR(tourniquets), _tourniquets, true];
|
||||||
|
|
||||||
// Adding the tourniquet item to the caller
|
// Adding the tourniquet item to the caller
|
||||||
_caller addItem "ACE_tourniquet";
|
_caller addItem "ACE_tourniquet";
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
params ["_caller", "_target", ["_drag", false]];
|
params ["_caller", "_target", ["_drag", false]];
|
||||||
|
|
||||||
// cannot unload a unit not in a vehicle.
|
// cannot unload a unit not in a vehicle.
|
||||||
if (vehicle _target == _target) exitwith {};
|
if (vehicle _target == _target) exitWith {};
|
||||||
if (([_target] call EFUNC(common,isAwake))) exitwith {};
|
if (([_target] call EFUNC(common,isAwake))) exitWith {};
|
||||||
|
|
||||||
["unloadPersonEvent", _target, [_target, vehicle _target]] call EFUNC(common,targetEvent)
|
["unloadPersonEvent", _target, [_target, vehicle _target]] call EFUNC(common,targetEvent)
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
params [["_unit", objNull, [objNull]], ["_value", 0, [0]], ["_time", 1, [0]], ["_callBack", {}, [{}]]];
|
params [["_unit", objNull, [objNull]], ["_value", 0, [0]], ["_time", 1, [0]], ["_callBack", {}, [{}]]];
|
||||||
|
|
||||||
_adjustment = _unit getvariable [QGVAR(heartRateAdjustments), []];
|
_adjustment = _unit getVariable [QGVAR(heartRateAdjustments), []];
|
||||||
_adjustment pushback [_value, _time, _callBack];
|
_adjustment pushBack [_value, _time, _callBack];
|
||||||
_unit setvariable [QGVAR(heartRateAdjustments), _adjustment ];
|
_unit setVariable [QGVAR(heartRateAdjustments), _adjustment ];
|
||||||
["Medical_onHeartRateAdjustmentAdded", [_unit, _value, _time]] call EFUNC(common,localEvent);
|
["Medical_onHeartRateAdjustmentAdded", [_unit, _value, _time]] call EFUNC(common,localEvent);
|
||||||
|
@ -17,12 +17,12 @@ params ["_unit", ["_force", false]];
|
|||||||
|
|
||||||
if ([_unit] call FUNC(hasMedicalEnabled) || _force) then {
|
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 */
|
[[_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];
|
_unit setVariable [QGVAR(addedToUnitLoop), true, true];
|
||||||
|
|
||||||
[{
|
[{
|
||||||
params ["_args", "_idPFH"];
|
params ["_args", "_idPFH"];
|
||||||
@ -34,17 +34,17 @@ if ([_unit] call FUNC(hasMedicalEnabled) || _force) then {
|
|||||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||||
if (!local _unit) then {
|
if (!local _unit) then {
|
||||||
if (GVAR(level) >= 2) then {
|
if (GVAR(level) >= 2) then {
|
||||||
_unit setvariable [QGVAR(heartRate), _unit getvariable [QGVAR(heartRate), 80], 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(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 {
|
} else {
|
||||||
[_unit, _interval] call FUNC(handleUnitVitals);
|
[_unit, _interval] call FUNC(handleUnitVitals);
|
||||||
|
|
||||||
private "_pain";
|
private "_pain";
|
||||||
_pain = _unit getvariable [QGVAR(pain), 0];
|
_pain = _unit getVariable [QGVAR(pain), 0];
|
||||||
if (_pain > (_unit getvariable [QGVAR(painSuppress), 0])) then {
|
if (_pain > (_unit getVariable [QGVAR(painSuppress), 0])) then {
|
||||||
// This introduces wierd unconscious behaviour for basic medical and possibly also advanced.
|
// This introduces wierd unconscious behaviour for basic medical and possibly also advanced.
|
||||||
// TODO This is disabled as it's considered non critical code.
|
// 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.
|
// We will need to decide if we want unconscious triggered on high pain levels or if we can get rid of this entirely.
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
private ["_moment", "_logVarName", "_log","_newLog", "_logs"];
|
private ["_moment", "_logVarName", "_log","_newLog", "_logs"];
|
||||||
params ["_unit", "_type", "_message", "_arguments"];
|
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 */
|
[_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];
|
_logVarName = format[QGVAR(logFile_%1), _type];
|
||||||
|
|
||||||
_log = _unit getvariable [_logVarName, []];
|
_log = _unit getVariable [_logVarName, []];
|
||||||
if (count _log >= 8) then {
|
if (count _log >= 8) then {
|
||||||
_newLog = [];
|
_newLog = [];
|
||||||
{
|
{
|
||||||
// ensure the first element will not be added
|
// ensure the first element will not be added
|
||||||
if (_foreachIndex > 0) then {
|
if (_forEachIndex > 0) then {
|
||||||
_newLog pushback _x;
|
_newLog pushBack _x;
|
||||||
};
|
};
|
||||||
} foreach _log;
|
} forEach _log;
|
||||||
_log = _newLog;
|
_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);
|
["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 {
|
if !(_logVarName in _logs) then {
|
||||||
_logs pushback _logVarName;
|
_logs pushBack _logVarName;
|
||||||
_unit setvariable [QGVAR(allLogs), _logs, true];
|
_unit setVariable [QGVAR(allLogs), _logs, true];
|
||||||
};
|
};
|
||||||
|
@ -17,28 +17,28 @@
|
|||||||
private ["_log", "_inList", "_amount"];
|
private ["_log", "_inList", "_amount"];
|
||||||
params ["_unit", "_newItem"];
|
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 */
|
[_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;
|
_inList = false;
|
||||||
_amount = 1;
|
_amount = 1;
|
||||||
{
|
{
|
||||||
if ((_x select 0) == _newItem) exitwith {
|
if ((_x select 0) == _newItem) exitWith {
|
||||||
private "_info";
|
private "_info";
|
||||||
_info = _log select _foreachIndex;
|
_info = _log select _forEachIndex;
|
||||||
_info set [1,(_info select 1) + 1];
|
_info set [1,(_info select 1) + 1];
|
||||||
_info set [2, ACE_gameTime];
|
_info set [2, ACE_gameTime];
|
||||||
_log set [_foreachIndex, _info];
|
_log set [_forEachIndex, _info];
|
||||||
|
|
||||||
_amount = (_info select 1);
|
_amount = (_info select 1);
|
||||||
_inList = true;
|
_inList = true;
|
||||||
};
|
};
|
||||||
} foreach _log;
|
} forEach _log;
|
||||||
|
|
||||||
if (!_inList) then {
|
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);
|
["Medical_onItemAddedToTriageCard", [_unit, _newItem, _amount]] call EFUNC(common,localEvent);
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user