mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
commit
155162b501
@ -1,4 +1,4 @@
|
||||
# ACE3 CONTRIBUTOR LIST
|
||||
# ACE3 CONTRIBUTOR LIST
|
||||
# If you contributed, but are not listed here, contact me:
|
||||
# koffeinflummi@gmail.com
|
||||
#
|
||||
@ -37,6 +37,7 @@ alef <alefor@gmail.com>
|
||||
Aleksey EpMAK Yermakov <epmak777@gmail.com>
|
||||
Alganthe <alganthe@live.fr>
|
||||
Anthariel <Contact@storm-simulation.com>
|
||||
Arkhir <wonsz666@gmail.com >
|
||||
Asgar Serran <piechottaf@web.de>
|
||||
Bamse <bamsis@gmail.com>
|
||||
Bla1337
|
||||
@ -108,6 +109,7 @@ Toaster <jonathan.pereira@gmail.com>
|
||||
Tonic
|
||||
Tourorist <tourorist@gmail.com>
|
||||
Valentin Torikian <valentin.torikian@gmail.com>
|
||||
voiper
|
||||
VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>
|
||||
Winter <simon@agius-muscat.net>
|
||||
zGuba
|
||||
|
@ -36,7 +36,7 @@ GVAR(Protractor) = true;
|
||||
if !(GVAR(Protractor) && !(weaponLowered ACE_player) && currentWeapon ACE_player == primaryWeapon ACE_player) exitWith {
|
||||
GVAR(Protractor) = false;
|
||||
1 cutText ["", "PLAIN"];
|
||||
[_idPFH] call cba_fnc_removePerFrameHandler;
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
1 cutRsc ["RscProtractor", "PLAIN", 1, false];
|
||||
|
@ -26,11 +26,9 @@ _aceTimeSecond = floor ACE_time;
|
||||
|
||||
_bulletSpeed = vectorMagnitude _bulletVelocity;
|
||||
|
||||
if (!alive _bullet || _bulletSpeed < 100) exitWith {
|
||||
GVAR(allBullets) deleteAt (_forEachIndex - _deleted);
|
||||
_deleted = _deleted + 1;
|
||||
};
|
||||
|
||||
if (!alive _bullet || _bulletSpeed < 100) then {
|
||||
GVAR(allBullets) deleteAt (GVAR(allBullets) find _x);
|
||||
} else {
|
||||
_bulletPosition = getPosASL _bullet;
|
||||
|
||||
if (_bulletTraceVisible && _bulletSpeed > 500) then {
|
||||
@ -38,7 +36,9 @@ _aceTimeSecond = floor ACE_time;
|
||||
};
|
||||
|
||||
call compile ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, _aceTimeSecond, ACE_time - _aceTimeSecond]);
|
||||
} forEach GVAR(allBullets);
|
||||
};
|
||||
nil
|
||||
} count +GVAR(allBullets);
|
||||
|
||||
if (GVAR(allBullets) isEqualTo []) then {
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
|
@ -54,7 +54,7 @@ if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "CfgWeapons" >> _wea
|
||||
|
||||
if (_abort || !(GVAR(extensionAvailable))) exitWith {
|
||||
if (missionNamespace getVariable [QEGVAR(windDeflection,enabled), false]) then {
|
||||
EGVAR(windDeflection,trackedBullets) pushBack [_bullet, getNumber(configFile >> "cfgAmmo" >> _ammo >> "airFriction")];
|
||||
EGVAR(windDeflection,trackedBullets) pushBack [_bullet, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -40,7 +40,7 @@ GVAR(currentGrid) = 0;
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", ceil(ACE_time - _initStartTime)];
|
||||
#endif
|
||||
[_idPFH] call cba_fnc_removePerFrameHandler;
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
for "_i" from 1 to 50 do {
|
||||
|
@ -20,9 +20,11 @@ _weaponConfig = (configFile >> "CfgWeapons" >> _this);
|
||||
|
||||
_barrelTwist = getNumber(_weaponConfig >> "ACE_barrelTwist");
|
||||
_twistDirection = 1;
|
||||
_twistDirection = getNumber(_weaponConfig >> "ACE_twistDirection");
|
||||
if !(_twistDirection in [-1, 0, 1]) then {
|
||||
if (isNumber (_weaponConfig >> "ACE_twistDirection")) then {
|
||||
_twistDirection = getNumber (_weaponConfig >> "ACE_twistDirection");
|
||||
if !(_twistDirection in [-1, 0, 1]) then {
|
||||
_twistDirection = 1;
|
||||
};
|
||||
};
|
||||
|
||||
_barrelLength = getNumber(_weaponConfig >> "ACE_barrelLength");
|
||||
|
@ -54,7 +54,7 @@ GVAR(active) = true;
|
||||
|
||||
GVAR(DialogPFH) = [{
|
||||
if (!GVAR(active)) exitWith {
|
||||
[_this select 1] call cba_fnc_removePerFrameHandler;
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
__ctrlBackground ctrlSetText format [QUOTE(PATHTOF(UI\ATRAG_%1.paa)), ["N", "D"] select (call EFUNC(common,ambientBrightness))];
|
||||
}, 60, []] call CBA_fnc_addPerFrameHandler;
|
||||
|
@ -2,4 +2,4 @@
|
||||
|
||||
uiNamespace setVariable ['ATragMX_Display', nil];
|
||||
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);
|
||||
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)];
|
||||
|
@ -10,7 +10,7 @@
|
||||
* Arguments:
|
||||
* 0: Unit (player) <OBJECT>
|
||||
* 1: attachToVehicle <OBJECT>
|
||||
* 2: Item Classname (cfgWeapon/cfgMagazine) <STRING>
|
||||
* 2: Item Classname (CfgWeapon/CfgMagazine) <STRING>
|
||||
* 3: Light Vehicle Classname <STRING>
|
||||
* 4: On Attach Text <STRING>
|
||||
* 5: Starting Pos of dummy item <ARRAY>
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
params ["_backpack"];
|
||||
|
||||
if (typeName _backpack == "OBJECT") then {
|
||||
if (_backpack isEqualType objNull) then {
|
||||
_backpack = typeOf _backpack;
|
||||
};
|
||||
|
||||
|
@ -192,6 +192,7 @@ class CfgVehicles {
|
||||
scope = 2;
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_settings_ca.paa));
|
||||
isGlobal = 1;
|
||||
isSingular = 1;
|
||||
class Arguments {
|
||||
class allowHandcuffOwnSide {
|
||||
displayName = CSTRING(ModuleSettings_handcuffSide_name);
|
||||
|
@ -45,7 +45,7 @@ if (_state) then {
|
||||
};
|
||||
|
||||
if (!(_unit getVariable [QGVAR(isEscorting), false])) then {
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
|
||||
[objNull, _target, false] call EFUNC(common,claim);
|
||||
detach _target;
|
||||
_unit removeAction _actionID;
|
||||
|
@ -21,10 +21,10 @@ params ["_newUnit","_oldUnit"];
|
||||
//set showHUD based on new unit status:
|
||||
if ((_newUnit getVariable [QGVAR(isHandcuffed), false]) || {_newUnit getVariable [QGVAR(isSurrendering), false]}) then {
|
||||
TRACE_1("Player Change (showHUD false)",_newUnit);
|
||||
showHUD false;
|
||||
["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
|
||||
} else {
|
||||
TRACE_1("Player Change (showHUD true)",_newUnit);
|
||||
showHUD true;
|
||||
["captive", []] call EFUNC(common,showHud); //same as showHud true;
|
||||
};
|
||||
|
||||
//If old player was escorting, stop
|
||||
|
@ -23,9 +23,9 @@ params ["_unit","_zeusIsOpen"];
|
||||
if (!_zeusIsOpen) then {
|
||||
if ((_unit getVariable [QGVAR(isHandcuffed), false]) || {_unit getVariable [QGVAR(isSurrendering), false]}) then {
|
||||
TRACE_1("Player Change (showHUD false)",_unit);
|
||||
showHUD false;
|
||||
["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
|
||||
} else {
|
||||
TRACE_1("Player Change (showHUD true)",_unit);
|
||||
showHUD true;
|
||||
["captive", []] call EFUNC(common,showHud); //same as showHud true;
|
||||
};
|
||||
};
|
||||
|
@ -19,7 +19,7 @@
|
||||
params ["_unit","_state"];
|
||||
TRACE_2("params",_unit,_state);
|
||||
|
||||
if (!local _unit) exitwith {
|
||||
if (!local _unit) exitWith {
|
||||
ERROR("running setHandcuffed on remote unit");
|
||||
};
|
||||
if ((_unit getVariable [QGVAR(isHandcuffed), false]) isEqualTo _state) exitWith {
|
||||
@ -38,7 +38,7 @@ if (_state) then {
|
||||
_unit setVariable [QGVAR(CargoIndex), ((vehicle _unit) getCargoIndex _unit), true];
|
||||
|
||||
if (_unit == ACE_player) then {
|
||||
showHUD false;
|
||||
["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
|
||||
};
|
||||
|
||||
// fix anim on mission start (should work on dedicated servers)
|
||||
@ -107,7 +107,7 @@ if (_state) then {
|
||||
};
|
||||
|
||||
if (_unit == ACE_player) then {
|
||||
showHUD true;
|
||||
["captive", []] call EFUNC(common,showHud); //same as showHud true;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
params ["_unit","_state"];
|
||||
TRACE_2("params",_unit,_state);
|
||||
|
||||
if (!local _unit) exitwith {
|
||||
if (!local _unit) exitWith {
|
||||
ERROR("running surrender on remote unit");
|
||||
};
|
||||
|
||||
@ -36,7 +36,7 @@ if (_state) then {
|
||||
[_unit, QGVAR(Surrendered), true] call EFUNC(common,setCaptivityStatus);
|
||||
|
||||
if (_unit == ACE_player) then {
|
||||
showHUD false;
|
||||
["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
|
||||
};
|
||||
|
||||
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
||||
@ -75,7 +75,7 @@ if (_state) then {
|
||||
if (_unit == ACE_player) then {
|
||||
//only re-enable HUD if not handcuffed
|
||||
if (!(_unit getVariable [QGVAR(isHandcuffed), false])) then {
|
||||
showHUD true;
|
||||
["captive", []] call EFUNC(common,showHud); //same as showHud true;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -181,11 +181,13 @@
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleHandcuffed_DisplayName">
|
||||
<English>Make Unit Handcuffed</English>
|
||||
<Polish>Skuj jednostkę</Polish>
|
||||
<Portuguese>Fazer unidade algemada</Portuguese>
|
||||
<Russian>Связать юнита</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleHandcuffed_Description">
|
||||
<English>Sync a unit to make them handcuffed.<br />Source: ace_captives</English>
|
||||
<Polish>Zsynchronizuj z jednostką, aby została skuta.<br />Źródło: ace_captives</Polish>
|
||||
<Portuguese>Sincronizar uma unidade para deixá-la algemada.<br/>Source: ace_captives</Portuguese>
|
||||
<Russian>Синхронизируйте с юнитами, чтобы сделать их связанными.<br />Источник: ace_captives</Russian>
|
||||
</Key>
|
||||
|
@ -48,6 +48,11 @@ class Extended_InitPost_EventHandlers {
|
||||
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
|
||||
};
|
||||
};
|
||||
class RoadCone_F {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
|
||||
};
|
||||
};
|
||||
class Car {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(initVehicle));
|
||||
|
@ -8,6 +8,7 @@ class CfgVehicles {
|
||||
function = QFUNC(moduleSettings);
|
||||
functionPriority = 1;
|
||||
isGlobal = 1;
|
||||
isSingular = 1;
|
||||
isTriggerActivated = 0;
|
||||
author = ECSTRING(common,ACETeam);
|
||||
|
||||
@ -236,6 +237,14 @@ class CfgVehicles {
|
||||
GVAR(size) = 6;
|
||||
};
|
||||
|
||||
// objects
|
||||
class RoadCone_F: ThingX {
|
||||
GVAR(size) = 1;
|
||||
GVAR(canLoad) = 1;
|
||||
};
|
||||
class RoadBarrier_F: RoadCone_F {
|
||||
GVAR(size) = 2;
|
||||
};
|
||||
|
||||
|
||||
class Scrapyard_base_F;
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
_unloaded = [_item, _vehicle] call FUNC(unloadItem);
|
||||
|
||||
_itemClass = if (typeName _item == "STRING") then {_item} else {typeOf _item};
|
||||
_itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
|
||||
|
||||
// Show hint as feedback
|
||||
_hint = [LSTRING(UnloadingFailed), LSTRING(UnloadedItem)] select _unloaded;
|
||||
|
@ -18,12 +18,11 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_position", "_item", "_i"];
|
||||
params ["_itemClass", "_vehicle", ["_amount", 1], ["_showHint", false, [false]] ];
|
||||
TRACE_3("params",_itemClass,_vehicle,_amount);
|
||||
|
||||
for "_i" from 1 to _amount do {
|
||||
[_item, _vehicle] call FUNC(loadItem);
|
||||
[_itemClass, _vehicle] call FUNC(loadItem);
|
||||
};
|
||||
|
||||
// Invoke listenable event
|
||||
|
@ -23,7 +23,7 @@ if (speed _vehicle > 1 || (((getPos _vehicle) select 2) > 3)) exitWith {false};
|
||||
private ["_itemSize", "_validItem"];
|
||||
_itemSize = [_item] call FUNC(getSizeItem);
|
||||
|
||||
if (typeName _item == "STRING") then {
|
||||
if (_item isEqualType "") then {
|
||||
_validItem =
|
||||
isClass (configFile >> "CfgVehicles" >> _item) &&
|
||||
{getNumber (configFile >> "CfgVehicles" >> _item >> QGVAR(canLoad)) == 1};
|
||||
|
@ -22,7 +22,7 @@ private ["_loaded", "_itemClass", "_validVehiclestate", "_emptyPos"];
|
||||
_loaded = _vehicle getVariable [QGVAR(loaded), []];
|
||||
if !(_item in _loaded) exitWith {false};
|
||||
|
||||
_itemClass = if (typeName _item == "STRING") then {_item} else {typeOf _item};
|
||||
_itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
|
||||
|
||||
_validVehiclestate = true;
|
||||
_emptyPos = [];
|
||||
|
@ -17,4 +17,4 @@
|
||||
|
||||
params ["_object"];
|
||||
|
||||
_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeof _object >> QGVAR(space))]
|
||||
_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(space))]
|
||||
|
@ -19,7 +19,7 @@ params ["_item"];
|
||||
private ["_isVirtual","_itemClass","_config"];
|
||||
scopeName "return";
|
||||
|
||||
_isVirtual = (typeName _item == "STRING");
|
||||
_isVirtual = (_item isEqualType "");
|
||||
_itemClass = if (_isVirtual) then {_item} else {typeOf _item};
|
||||
_config = (configFile >> "CfgVehicles" >> _itemClass >> QGVAR(size));
|
||||
|
||||
|
@ -24,7 +24,7 @@ if (_loaded isEqualTo []) exitWith {};
|
||||
|
||||
{
|
||||
// TODO Do we want to be able to recover destroyed equipment?
|
||||
if (typeName _x == "OBJECT") then {
|
||||
if (_x isEqualType objNull) then {
|
||||
deleteVehicle _x;
|
||||
};
|
||||
} count _loaded;
|
||||
|
@ -24,7 +24,7 @@ private ["_loaded", "_space", "_itemSize"];
|
||||
if !([_item, _vehicle] call FUNC(canLoadItemIn)) exitWith {false};
|
||||
|
||||
_loaded = _vehicle getVariable [QGVAR(loaded), []];
|
||||
_loaded pushback _item;
|
||||
_loaded pushBack _item;
|
||||
_vehicle setVariable [QGVAR(loaded), _loaded, true];
|
||||
|
||||
TRACE_1("added to loaded array",_loaded);
|
||||
@ -33,7 +33,7 @@ _space = [_vehicle] call FUNC(getCargoSpaceLeft);
|
||||
_itemSize = [_item] call FUNC(getSizeItem);
|
||||
_vehicle setVariable [QGVAR(space), _space - _itemSize, true];
|
||||
|
||||
if (typeName _item == "OBJECT") then {
|
||||
if (_item isEqualType objNull) then {
|
||||
detach _item;
|
||||
_item attachTo [_vehicle,[0,0,-100]];
|
||||
["hideObjectGlobal", [_item, true]] call EFUNC(common,serverEvent);
|
||||
|
@ -40,7 +40,7 @@ uiNamespace setVariable [QGVAR(menuDisplay), _display];
|
||||
|
||||
lbClear _ctrl;
|
||||
{
|
||||
_class = if (typeName _x == "STRING") then {_x} else {typeOf _x};
|
||||
_class = if (_x isEqualType "") then {_x} else {typeOf _x};
|
||||
_ctrl lbAdd (getText(configfile >> "CfgVehicles" >> _class >> "displayName"));
|
||||
true
|
||||
} count _loaded;
|
||||
|
@ -23,7 +23,7 @@ _vehicle = [_player] call FUNC(findNearestVehicle);
|
||||
if (isNull _vehicle || _vehicle isKindOf "Cargo_Base_F") then {
|
||||
{
|
||||
if ([_object, _x] call FUNC(canLoadItemIn)) exitWith {_vehicle = _x};
|
||||
} foreach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]);
|
||||
} forEach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]);
|
||||
};
|
||||
|
||||
if (isNull _vehicle) exitWith {false};
|
||||
|
@ -41,7 +41,7 @@ if ([_item, GVAR(interactionVehicle)] call FUNC(canUnloadItem)) then {
|
||||
|
||||
[5 * _size, [_item, GVAR(interactionVehicle)], "UnloadCargo", {}, localize LSTRING(UnloadingItem)] call EFUNC(common,progressBar);
|
||||
} else {
|
||||
_itemClass = if (typeName _item == "STRING") then {_item} else {typeOf _item};
|
||||
_itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
|
||||
_displayName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName");
|
||||
|
||||
["displayTextStructured", [[LSTRING(UnloadingFailed), _displayName], 3.0]] call EFUNC(common,localEvent);
|
||||
|
@ -23,7 +23,7 @@ if !([_item, _vehicle] call FUNC(canUnloadItem)) exitWith {
|
||||
false
|
||||
};
|
||||
|
||||
_itemClass = if (typeName _item == "STRING") then {_item} else {typeOf _item};
|
||||
_itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
|
||||
|
||||
_validVehiclestate = true;
|
||||
_emptyPos = [];
|
||||
@ -57,7 +57,7 @@ _space = [_vehicle] call FUNC(getCargoSpaceLeft);
|
||||
_itemSize = [_item] call FUNC(getSizeItem);
|
||||
_vehicle setVariable [QGVAR(space), (_space + _itemSize), true];
|
||||
|
||||
if (typeName _item == "OBJECT") then {
|
||||
if (_item isEqualType objNull) then {
|
||||
detach _item;
|
||||
_item setPosASL (_emptyPos call EFUNC(common,PositiontoASL));
|
||||
["hideObjectGlobal", [_item, false]] call EFUNC(common,serverEvent);
|
||||
|
@ -24,7 +24,7 @@ _loaded = _vehicle getVariable [QGVAR(loaded), []];
|
||||
_newLoaded = [];
|
||||
_totalSpaceOccupied = 0;
|
||||
{
|
||||
if ((typeName _x == "STRING") || {!isNull _x}) then {
|
||||
if ((_x isEqualType "") || {!isNull _x}) then {
|
||||
_newLoaded pushback _x;
|
||||
_totalSpaceOccupied = _totalSpaceOccupied + ([_x] call FUNC(getSizeItem));
|
||||
};
|
||||
|
@ -98,18 +98,22 @@
|
||||
<Key ID="STR_ACE_Cargo_LoadingItem">
|
||||
<English>Loading Cargo</English>
|
||||
<Portuguese>Carregando carga</Portuguese>
|
||||
<Polish>Ładowanie cargo</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_UnloadingItem">
|
||||
<English>Unloading Cargo</English>
|
||||
<Portuguese>Descarregando carga</Portuguese>
|
||||
<Polish>Rozładowywanie cargo</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_LoadingFailed">
|
||||
<English>%1<br/>could not be loaded</English>
|
||||
<Portuguese>%1<br/>não pode ser carregado</Portuguese>
|
||||
<Polish>%1<br/>nie mógł zostać załadowany</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_UnloadingFailed">
|
||||
<English>%1<br/>could not be unloaded</English>
|
||||
<Portuguese>%1<br/>não pode ser descarregado</Portuguese>
|
||||
<Polish>%1<br/>nie mógł zostać rozładowany</Polish>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -35,6 +35,7 @@ class CfgVehicles {
|
||||
function = QFUNC(moduleCheckPBOs);
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
isSingular = 1;
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_CheckPBO_ca.paa));
|
||||
class Arguments {
|
||||
class Action {
|
||||
|
@ -41,7 +41,7 @@ class GVAR(ProgressBar_Dialog) {
|
||||
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorFrame[] = {1,1,1,0.5};
|
||||
colorBar[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.77])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.51])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.08])","(profilenamespace getvariable ['GUI_BCG_RGB_A',0.8])"};
|
||||
colorBar[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.77])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.51])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.08])","(profilenamespace getVariable ['GUI_BCG_RGB_A',0.8])"};
|
||||
texture = "#(argb,8,8,3)color(1,1,1,0.7)";
|
||||
};
|
||||
class TitleText: TitleBackground {
|
||||
|
@ -115,18 +115,18 @@ class RscDisplayInventory {
|
||||
|
||||
// map
|
||||
class RscDisplayMainMap {
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Ingame')])] call FUNC(localEvent););
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Ingame')])] call FUNC(localEvent););
|
||||
};
|
||||
|
||||
class RscDisplayGetReady: RscDisplayMainMap {
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Briefing')])] call FUNC(localEvent););
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Briefing')])] call FUNC(localEvent););
|
||||
};
|
||||
|
||||
class RscDisplayServerGetReady: RscDisplayGetReady {
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'ServerBriefing')])] call FUNC(localEvent););
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'ServerBriefing')])] call FUNC(localEvent););
|
||||
};
|
||||
|
||||
|
||||
class RscDisplayClientGetReady: RscDisplayGetReady {
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'ClientBriefing')])] call FUNC(localEvent););
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'ClientBriefing')])] call FUNC(localEvent););
|
||||
};
|
||||
|
@ -29,16 +29,15 @@
|
||||
GVAR(nextFrameNo) = diag_frameno + 1;
|
||||
|
||||
//Handle the waitUntilAndExec array:
|
||||
private _deleted = 0;
|
||||
{
|
||||
// if condition is satisifed call statement
|
||||
if ((_x select 2) call (_x select 0)) then {
|
||||
// make sure to delete the correct handle when multiple conditions are met in one frame
|
||||
GVAR(waitUntilAndExecArray) deleteAt (_forEachIndex - _deleted);
|
||||
_deleted = _deleted + 1;
|
||||
GVAR(waitUntilAndExecArray) deleteAt (GVAR(waitUntilAndExecArray) find _x);
|
||||
(_x select 2) call (_x select 1);
|
||||
};
|
||||
} forEach GVAR(waitUntilAndExecArray);
|
||||
nil
|
||||
} count +GVAR(waitUntilAndExecArray);
|
||||
|
||||
END_COUNTER(waitAndExec);
|
||||
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
@ -98,7 +97,6 @@
|
||||
["setFuel", {(_this select 0) setFuel (_this select 1)}] call FUNC(addEventhandler);
|
||||
["setSpeaker", {(_this select 0) setSpeaker (_this select 1)}] call FUNC(addEventhandler);
|
||||
["selectLeader", {(_this select 0) selectLeader (_this select 1)}] call FUNC(addEventHandler);
|
||||
["assignTeam", {(_this select 0) assignTeam (_this select 1)}] call FUNC(addEventHandler);
|
||||
["setVelocity", {(_this select 0) setVelocity (_this select 1)}] call FUNC(addEventHandler);
|
||||
|
||||
if (isServer) then {
|
||||
@ -194,9 +192,17 @@ call FUNC(checkFiles);
|
||||
|
||||
ACE_LOGINFO("Settings received from server.");
|
||||
|
||||
if (isServer) then { //read settings from paramsArray
|
||||
[] call FUNC(readSettingsFromParamsArray);
|
||||
};
|
||||
// Event so that ACE_Modules have their settings loaded:
|
||||
["InitSettingsFromModules", []] call FUNC(localEvent);
|
||||
|
||||
if (isServer) then {
|
||||
// Publish all settings data after all configs and modules are read
|
||||
publicVariable QGVAR(settings);
|
||||
};
|
||||
|
||||
// Load user settings from profile
|
||||
if (hasInterface) then {
|
||||
call FUNC(loadSettingsFromProfile);
|
||||
|
@ -115,6 +115,7 @@ PREP(isInBuilding);
|
||||
PREP(isModLoaded);
|
||||
PREP(isPlayer);
|
||||
PREP(isTurnedOut);
|
||||
PREP(isUnderwater);
|
||||
PREP(letterToCode);
|
||||
PREP(lightIntensityFromObject);
|
||||
PREP(loadPerson);
|
||||
@ -139,6 +140,7 @@ PREP(playerSide);
|
||||
PREP(positionToASL);
|
||||
PREP(progressBar);
|
||||
PREP(readSettingFromModule);
|
||||
PREP(readSettingsFromParamsArray);
|
||||
PREP(receiveRequest);
|
||||
PREP(removeCanInteractWithCondition);
|
||||
PREP(removeSpecificMagazine);
|
||||
@ -166,6 +168,7 @@ PREP(setVariableJIP);
|
||||
PREP(setVariablePublic);
|
||||
PREP(setVolume);
|
||||
PREP(sortAlphabeticallyBy);
|
||||
PREP(showHud);
|
||||
PREP(stringCompare);
|
||||
PREP(stringToColoredText);
|
||||
PREP(stringRemoveWhiteSpace);
|
||||
@ -290,6 +293,7 @@ PREP(hashListSet);
|
||||
PREP(hashListPush);
|
||||
|
||||
GVAR(syncedEvents) = HASH_CREATE;
|
||||
GVAR(showHudHash) = [] call FUNC(hashCreate);
|
||||
|
||||
//GVARS for execNextFrame and waitAndExec and waitUntilAndExecute
|
||||
GVAR(waitAndExecArray) = [];
|
||||
|
@ -88,7 +88,7 @@ class CfgUIGrids {
|
||||
// check dll
|
||||
class RscStandardDisplay;
|
||||
class RscDisplayMain: RscStandardDisplay {
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDisplayMain"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); [ARR_5('header','tail',{0},{},_this select 0)] call COMPILE_FILE(functions\fnc_errorMessage));
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDisplayMain"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); [ARR_5('header','tail',{0},{},_this select 0)] call COMPILE_FILE(functions\fnc_errorMessage));
|
||||
};
|
||||
*/
|
||||
|
||||
|
@ -116,9 +116,9 @@ class ACE_gui_editBase
|
||||
};
|
||||
colorSelection[] =
|
||||
{
|
||||
"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])",
|
||||
"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])",
|
||||
"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",
|
||||
"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.3843])",
|
||||
"(profilenamespace getVariable ['GUI_BCG_RGB_G',0.7019])",
|
||||
"(profilenamespace getVariable ['GUI_BCG_RGB_B',0.8862])",
|
||||
1
|
||||
};
|
||||
autocomplete = "";
|
||||
@ -249,7 +249,7 @@ class ACE_gui_listBoxBase : RscListBox{
|
||||
colorSelect2[] = {0.95, 0.95, 0.95, 1};
|
||||
colorSelectBackground[] = {0, 0, 0, 1};
|
||||
colorSelectBackground2[] = {0.543, 0.5742, 0.4102, 1.0};
|
||||
colorDisabled[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", 0.25};
|
||||
colorDisabled[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", 0.25};
|
||||
period = 1.2;
|
||||
rowHeight = 0.03;
|
||||
colorBackground[] = {0, 0, 0, 1};
|
||||
@ -505,7 +505,7 @@ onMouseButtonDblClick = "";
|
||||
iconCanceled = "\A3\ui_f\data\map\mapcontrol\taskIconCanceled_CA.paa";
|
||||
iconDone = "\A3\ui_f\data\map\mapcontrol\taskIconDone_CA.paa";
|
||||
iconFailed = "\A3\ui_f\data\map\mapcontrol\taskIconFailed_CA.paa";
|
||||
color[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_A',0.8])"};
|
||||
color[] = {"(profilenamespace getVariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getVariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getVariable ['IGUI_TEXT_RGB_B',1])","(profilenamespace getVariable ['IGUI_TEXT_RGB_A',0.8])"};
|
||||
colorCreated[] = {1,1,1,1};
|
||||
colorCanceled[] = {0.7,0.7,0.7,1};
|
||||
colorDone[] = {0.7,1,0.3,1};
|
||||
|
@ -32,7 +32,7 @@ if (isServer) then {
|
||||
|
||||
private "_eventLog";
|
||||
_eventLog = _internalData select 1;
|
||||
_eventLog pushback [ACE_diagTime, _args, _ttl];
|
||||
_eventLog pushBack [ACE_diagTime, _args, _ttl];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -17,11 +17,11 @@
|
||||
|
||||
params ["_unit", "_action", "_condition", "_statement"];
|
||||
|
||||
if (typeName _condition == "STRING") then {
|
||||
if (_condition isEqualType "") then {
|
||||
_condition = compile _condition;
|
||||
};
|
||||
|
||||
if (typeName _statement == "STRING") then {
|
||||
if (_statement isEqualType "") then {
|
||||
_statement = compile _statement;
|
||||
};
|
||||
|
||||
|
@ -21,19 +21,19 @@
|
||||
|
||||
params ["_unit", "_displayName", "_action", "_condition", "_statement", "_condition2", "_statement2", ["_priority", 0]];
|
||||
|
||||
if (typeName _condition == "STRING") then {
|
||||
if (_condition isEqualType "") then {
|
||||
_condition = compile _condition;
|
||||
};
|
||||
|
||||
if (typeName _statement == "STRING") then {
|
||||
if (_statement isEqualType "") then {
|
||||
_statement = compile _statement;
|
||||
};
|
||||
|
||||
if (typeName _condition2 == "STRING") then {
|
||||
if (_condition2 isEqualType "") then {
|
||||
_condition2 = compile _condition2;
|
||||
};
|
||||
|
||||
if (typeName _statement2 == "STRING") then {
|
||||
if (_statement2 isEqualType "") then {
|
||||
_statement2 = compile _statement2;
|
||||
};
|
||||
|
||||
|
@ -18,6 +18,6 @@ _dlg = ctrlParent _this;
|
||||
|
||||
_dlg displayAddEventHandler ["unload", {
|
||||
if (_this select 1 == 1) then {
|
||||
[missionnamespace getvariable ["BIS_fnc_initCuratorAttributes_target", objNull]] call FUNC(fixCrateContent);
|
||||
[missionnamespace getVariable ["BIS_fnc_initCuratorAttributes_target", objNull]] call FUNC(fixCrateContent);
|
||||
};
|
||||
}];
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
params ["_statement"];
|
||||
|
||||
if (typeName _statement == "STRING") then {
|
||||
if (_statement isEqualType "") then {
|
||||
_statement = compile _statement;
|
||||
};
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
params ["_statement"];
|
||||
|
||||
if (typeName _statement == "STRING") then {
|
||||
if (_statement isEqualType "") then {
|
||||
_statement = compile _statement;
|
||||
};
|
||||
|
||||
|
@ -22,14 +22,14 @@
|
||||
|
||||
params ["_list", "_variable", "_setting", "_global", ["_vehicle", false]];
|
||||
|
||||
if (typeName _list == "STRING") then {
|
||||
if (_list isEqualType "") then {
|
||||
_list = [_list, true, true] call FUNC(parseList);
|
||||
TRACE_1("Parsed",_list)
|
||||
};
|
||||
|
||||
{
|
||||
if (!isNil "_x") then {
|
||||
if (typeName _x == typeName objNull) then {
|
||||
if (_x isEqualType objNull) then {
|
||||
if (local _x) then {
|
||||
if (_vehicle) then {
|
||||
(vehicle _x) setVariable [_variable, _setting, _global];
|
||||
|
@ -16,7 +16,7 @@ if (!hasInterface) exitWith {};
|
||||
|
||||
params ["_id", ["_show", false]];
|
||||
|
||||
if (typeName _show == "SCALAR") then {
|
||||
if (_show isEqualType 0) then {
|
||||
_show = _show == 1;
|
||||
};
|
||||
|
||||
@ -28,7 +28,7 @@ if (_show) then {
|
||||
GVAR(SHOW_BLUR_SCREEN_COLLECTION) pushBack _id;
|
||||
|
||||
// show blur
|
||||
if (isnil QGVAR(MENU_ppHandle_GUI_BLUR_SCREEN)) then {
|
||||
if (isNil QGVAR(MENU_ppHandle_GUI_BLUR_SCREEN)) then {
|
||||
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) = ppEffectCreate ["DynamicBlur", 102];
|
||||
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) ppEffectAdjust [0.9];
|
||||
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) ppEffectEnable true;
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
params ["_function"];
|
||||
|
||||
if (typeName _function == "STRING") exitWith {_function};
|
||||
if (_function isEqualType "") exitWith {_function};
|
||||
|
||||
_function = toArray str _function;
|
||||
_function deleteAt 0;
|
||||
|
@ -22,7 +22,7 @@ private ["_defaultLoglevel", "_defaultLogDisplayLevel"];
|
||||
|
||||
_defaultLoglevel = [GVAR(LOGLEVEL), DEFAULT_LOGGING_LEVEL] select isNil QGVAR(LOGLEVEL);
|
||||
|
||||
if (_defaultLoglevel < 0) exitwith {false};
|
||||
if (_defaultLoglevel < 0) exitWith {false};
|
||||
|
||||
_defaultLogDisplayLevel = [GVAR(LOGDISPLAY_LEVEL), DEFAULT_TEXT_DISPLAY] select isNil QGVAR(LOGDISPLAY_LEVEL);
|
||||
|
||||
|
@ -14,5 +14,5 @@
|
||||
|
||||
params ["_entity"];
|
||||
|
||||
GVAR(LOGDISPLAY_LEVEL) = call compile (_entity getvariable ["logDisplayLevel","4"]);
|
||||
GVAR(LOGLEVEL) = call compile (_entity getvariable ["logLevel","4"]);
|
||||
GVAR(LOGDISPLAY_LEVEL) = call compile (_entity getVariable ["logDisplayLevel","4"]);
|
||||
GVAR(LOGLEVEL) = call compile (_entity getVariable ["logLevel","4"]);
|
||||
|
@ -21,7 +21,7 @@ params ["_name", "_value", "_defaultGlobal", "_category", ["_code", 0], ["_persi
|
||||
|
||||
if (isNil "_defaultGlobal") exitWith {};
|
||||
|
||||
if (typeName _name != "STRING") exitwith {
|
||||
if (!(_name isEqualType "")) exitwith {
|
||||
[format ["Tried to the deinfe a variable with an invalid name: %1 Arguments: %2", _name, _this]] call FUNC(debug);
|
||||
};
|
||||
|
||||
|
@ -22,7 +22,7 @@ private ["_validIndex", "_realIndex"];
|
||||
|
||||
_validIndex = -1;
|
||||
|
||||
if (typeName _searchOffsetOrName == "STRING") then {
|
||||
if (_searchOffsetOrName isEqualType "") then {
|
||||
{
|
||||
if (_x select 0 == _searchOffsetOrName) exitWith {
|
||||
_validIndex = _forEachIndex;
|
||||
|
@ -73,11 +73,11 @@ _refresh = {
|
||||
_ctrl = (findDisplay 46) ctrlCreate ["RscPicture", _forEachIndex + 19000];
|
||||
|
||||
_position = switch (_setting) do {
|
||||
case TOP_RIGHT_DOWN: {[X_POS_ICONS, Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
|
||||
case TOP_RIGHT_LEFT: {[X_POS_ICONS_SECOND - ((_foreachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND - (ICON_WIDTH / 2), ICON_WIDTH, ICON_WIDTH]};
|
||||
case TOP_LEFT_DOWN: {[LEFT_SIDE + (0.5 * ICON_WIDTH), Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
|
||||
case TOP_LEFT_RIGHT: {[LEFT_SIDE + (0.5 * ICON_WIDTH) - ((_foreachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND, ICON_WIDTH, ICON_WIDTH]};
|
||||
default {[X_POS_ICONS, Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
|
||||
case TOP_RIGHT_DOWN: {[X_POS_ICONS, Y_POS_ICONS + (_forEachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
|
||||
case TOP_RIGHT_LEFT: {[X_POS_ICONS_SECOND - ((_forEachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND - (ICON_WIDTH / 2), ICON_WIDTH, ICON_WIDTH]};
|
||||
case TOP_LEFT_DOWN: {[LEFT_SIDE + (0.5 * ICON_WIDTH), Y_POS_ICONS + (_forEachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
|
||||
case TOP_LEFT_RIGHT: {[LEFT_SIDE + (0.5 * ICON_WIDTH) - ((_forEachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND, ICON_WIDTH, ICON_WIDTH]};
|
||||
default {[X_POS_ICONS, Y_POS_ICONS + (_forEachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
|
||||
};
|
||||
|
||||
_ctrl ctrlSetPosition _position;
|
||||
@ -97,7 +97,7 @@ if (_show) then {
|
||||
_list pushBack [_iconId, _icon, _color, ACE_time];
|
||||
} else {
|
||||
{
|
||||
if (_x select 0 == _iconId) exitwith {
|
||||
if (_x select 0 == _iconId) exitWith {
|
||||
_list set [_forEachIndex, [_iconId, _icon, _color, ACE_time]];
|
||||
};
|
||||
} forEach _list;
|
||||
|
@ -20,10 +20,10 @@ params ["_text", "_image", ["_imageColor", [1,1,1]], ["_target", ACE_player]];
|
||||
if (_target != ACE_player) exitWith {};
|
||||
|
||||
if (typeName _text != "TEXT") then {
|
||||
if (typeName _text == "ARRAY") then {
|
||||
if (_text isEqualType []) then {
|
||||
if (count _text > 0) then {
|
||||
{
|
||||
if (typeName _x == "STRING" && {isLocalized _x}) then {
|
||||
if (_x isEqualType "" && {isLocalized _x}) then {
|
||||
_text set [_forEachIndex, localize _x];
|
||||
};
|
||||
} forEach _text;
|
||||
@ -32,7 +32,7 @@ if (typeName _text != "TEXT") then {
|
||||
};
|
||||
};
|
||||
|
||||
if (typeName _text == "STRING" && {isLocalized _text}) then {
|
||||
if (_text isEqualType "" && {isLocalized _text}) then {
|
||||
_text = localize _text;
|
||||
};
|
||||
|
||||
|
@ -19,17 +19,17 @@ params ["_text", ["_size", 1.5], ["_target", ACE_player]];
|
||||
if (_target != ACE_player) exitWith {};
|
||||
|
||||
if (typeName _text != "TEXT") then {
|
||||
if (typeName _text == "ARRAY") then {
|
||||
if (_text isEqualType []) then {
|
||||
if (count _text > 0) then {
|
||||
{
|
||||
if (typeName _x == "STRING" && {isLocalized _x}) then {
|
||||
if (_x isEqualType "" && {isLocalized _x}) then {
|
||||
_text set [_foreachIndex, localize _x];
|
||||
};
|
||||
}foreach _text;
|
||||
_text = format _text;
|
||||
};
|
||||
};
|
||||
if (typeName _text == "STRING" && {isLocalized _text}) then {
|
||||
if (_text isEqualType "" && {isLocalized _text}) then {
|
||||
_text = localize _text;
|
||||
};
|
||||
_text = composeText [lineBreak, parseText format ["<t align='center'>%1</t>", _text]];
|
||||
@ -48,10 +48,10 @@ _ctrlHint ctrlSetBackgroundColor GVAR(displayTextColor);
|
||||
_ctrlHint ctrlSetTextColor GVAR(displayTextFontColor);
|
||||
/*
|
||||
// This does not function at the moment. Has been disabled until it fixed.
|
||||
_xPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_X", ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))];
|
||||
_yPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safezoneH];
|
||||
_wPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_W", (10 *(((safezoneW / safezoneH) min 1.2) / 40))];
|
||||
_hPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_H", (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))];
|
||||
_xPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_X", ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))];
|
||||
_yPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safezoneH];
|
||||
_wPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_W", (10 *(((safezoneW / safezoneH) min 1.2) / 40))];
|
||||
_hPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_H", (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))];
|
||||
*/
|
||||
|
||||
_xPos = ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40));
|
||||
|
@ -31,7 +31,7 @@ if (isNull (call BIS_fnc_displayMission)) exitWith {
|
||||
|
||||
params ["_textHeader", "_textMessage", ["_onOK", {}], ["_onCancel", {}]];
|
||||
|
||||
if (typeName _textMessage == "STRING") then {
|
||||
if (_textMessage isEqualType "") then {
|
||||
_textMessage = parseText _textMessage;
|
||||
};
|
||||
|
||||
@ -92,7 +92,7 @@ _bottomPosY = (_ctrlBcgCommonPos select 1) + _ctrlTextPosH + (_marginY * 2) + _b
|
||||
_xPos set [1, _bottomPosY];
|
||||
_x ctrlSetPosition _xPos;
|
||||
_x ctrlCommit 0;
|
||||
} foreach [
|
||||
} forEach [
|
||||
_ctrlBackgroundButtonOK,
|
||||
_ctrlBackgroundButtonMiddle,
|
||||
_ctrlBackgroundButtonCancel,
|
||||
|
@ -27,7 +27,7 @@ TRACE_3("params", _arguments, _function, _unit);
|
||||
|
||||
_function = call compile _function;
|
||||
|
||||
if (typeName _unit == "SCALAR") exitWith {
|
||||
if (_unit isEqualType 0) exitWith {
|
||||
switch (_unit) do {
|
||||
case 0 : {
|
||||
_arguments call _function;
|
||||
|
@ -18,7 +18,7 @@ params ["_target"];
|
||||
if (isNil "_x") then {
|
||||
ACE_LOGERROR_1("No arguments and function for remote function. ID: %1",_forEachIndex);
|
||||
} else {
|
||||
if (typeName _x == "ARRAY") then {
|
||||
if (_x isEqualType []) then {
|
||||
[_x select 0, _target] call (_x select 1);
|
||||
};
|
||||
};
|
||||
|
@ -41,8 +41,8 @@ _fnc_logEntries = {
|
||||
case (isClass _e1): {[_e1, _d + 1] call _fnc_logEntries; false};
|
||||
};
|
||||
|
||||
if (typeName _e2 != "BOOL") then {
|
||||
if (typeName _e2 == "ARRAY") then {
|
||||
if (!(_e2 isEqualType false)) then {
|
||||
if (_e2 isEqualType []) then {
|
||||
_e2 = toArray str _e2;
|
||||
{
|
||||
if (_x == toArray "[" select 0) then {
|
||||
|
@ -20,14 +20,14 @@
|
||||
|
||||
params ["_object", ["_category", ""]];
|
||||
|
||||
if (isNil QGVAR(OBJECT_VARIABLES_STORAGE)) exitwith {[]};
|
||||
if (isNil QGVAR(OBJECT_VARIABLES_STORAGE)) exitWith {[]};
|
||||
|
||||
private ["_return", "_val"];
|
||||
|
||||
_return = [];
|
||||
|
||||
{
|
||||
_val = _object getvariable (_x select 0);
|
||||
_val = _object getVariable (_x select 0);
|
||||
|
||||
if (!isNil "_val") then {
|
||||
if (_category == "" || _category == _x select 3) then {
|
||||
|
@ -16,7 +16,7 @@
|
||||
params ["_unit", "_variable", "_defaultValue"];
|
||||
|
||||
private "_value";
|
||||
_value = _unit getvariable _variable;
|
||||
_value = _unit getVariable _variable;
|
||||
|
||||
if (isNil "_value") then {
|
||||
if (!isNil "_defaultValue") then {
|
||||
|
@ -17,7 +17,7 @@ params ["_varName"];
|
||||
private "_variableDefinition";
|
||||
_variableDefinition = [_varName] call FUNC(getDefinedVariableInfo);
|
||||
|
||||
if !(_variableDefinition isEqualTo []) exitwith {
|
||||
if !(_variableDefinition isEqualTo []) exitWith {
|
||||
_variableDefinition select 1;
|
||||
};
|
||||
|
||||
|
@ -1,29 +1,19 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Check if unit is underwater
|
||||
* Check if unit's head is underwater
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* if unit is in the water (BOOLEAN)
|
||||
* If unit's head is underwater <BOOL>
|
||||
*
|
||||
* Public: Yes
|
||||
*
|
||||
* Deprecated
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit"];
|
||||
ACE_DEPRECATED("ace_common_fnc_inWater","3.5.0","ace_common_fnc_isUnderwater");
|
||||
|
||||
private "_return";
|
||||
_return = false;
|
||||
|
||||
if (surfaceIsWater getPosASL _unit) then {
|
||||
private "_pos";
|
||||
_pos = _unit modelToWorldVisual (_unit selectionPosition "head");
|
||||
|
||||
if (_pos select 2 < 0) then {
|
||||
_return = true;
|
||||
};
|
||||
};
|
||||
|
||||
_return
|
||||
_this call FUNC(isUnderwater)
|
||||
|
@ -14,4 +14,4 @@
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
!(_unit getvariable ["ACE_isUnconscious", false]) && alive _unit && !(_unit getvariable ["ACE_isDead", false]) // return
|
||||
!(_unit getVariable ["ACE_isUnconscious", false]) && alive _unit && !(_unit getVariable ["ACE_isDead", false]) // return
|
||||
|
@ -8,10 +8,17 @@
|
||||
* Return Value:
|
||||
* is the unit an engineer <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [player] call ace_common_fnc_isEngineer
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
_unit getVariable ["ACE_isEngineer", getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "engineer") == 1] // return
|
||||
private _isEngineer = _unit getVariable ["ACE_isEngineer", getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "engineer") == 1];
|
||||
//Handle ace_repair modules setting this to a number
|
||||
if (_isEngineer isEqualType 0) then {_isEngineer = _isEngineer > 0};
|
||||
|
||||
_isEngineer
|
||||
|
@ -14,4 +14,4 @@
|
||||
|
||||
params ["_modName"];
|
||||
|
||||
isClass (configFile >> "cfgPatches" >> _modName) // return
|
||||
isClass (configFile >> "CfgPatches" >> _modName) // return
|
||||
|
29
addons/common/functions/fnc_isUnderwater.sqf
Normal file
29
addons/common/functions/fnc_isUnderwater.sqf
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Check if unit's head is underwater
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* If unit's head is underwater <BOOL>
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
private "_return";
|
||||
_return = false;
|
||||
|
||||
if (surfaceIsWater getPosASL _unit) then {
|
||||
private "_pos";
|
||||
_pos = _unit modelToWorldVisual (_unit selectionPosition "head");
|
||||
|
||||
if (_pos select 2 < 0) then {
|
||||
_return = true;
|
||||
};
|
||||
};
|
||||
|
||||
_return
|
@ -21,7 +21,7 @@ private ["_vehicle", "_loadcar", "_loadair", "_loadtank", "_loadboat"];
|
||||
|
||||
_vehicle = objNull;
|
||||
|
||||
if (!([_caller, _unit, ["isNotDragging", "isNotCarrying"]] call FUNC(canInteractWith)) || {_caller == _unit}) exitwith {_vehicle};
|
||||
if (!([_caller, _unit, ["isNotDragging", "isNotCarrying"]] call FUNC(canInteractWith)) || {_caller == _unit}) exitWith {_vehicle};
|
||||
|
||||
_loadcar = nearestObject [_unit, "Car"];
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
// If the setting is stored on the profile
|
||||
if !(isNil "_profileValue") then {
|
||||
// If the profile variable has the correct type
|
||||
if (typeName _profileValue == typeName (missionNamespace getVariable _name)) then {
|
||||
if (_profileValue isEqualType (missionNamespace getVariable _name)) then {
|
||||
// Load the setting from the profile
|
||||
missionNamespace setVariable [_name, _profileValue];
|
||||
};
|
||||
|
@ -16,7 +16,7 @@ private "_fnc_parseConfigForDisplayNames";
|
||||
_fnc_parseConfigForDisplayNames = {
|
||||
params ["_optionEntry"];
|
||||
|
||||
if !(isClass _optionEntry) exitwith {false};
|
||||
if !(isClass _optionEntry) exitWith {false};
|
||||
|
||||
private "_values";
|
||||
_values = getArray (_optionEntry >> "values");
|
||||
@ -30,17 +30,28 @@ _fnc_parseConfigForDisplayNames = {
|
||||
private "_text";
|
||||
_text = _x;
|
||||
|
||||
if (typeName _text == "STRING" && {count _text > 1} && {_text select [0, 1] == "$"}) then {
|
||||
if (_text isEqualType "" && {count _text > 1} && {_text select [0, 1] == "$"}) then {
|
||||
_text = localize (_text select [1]); //chop off the leading $
|
||||
_values set [_forEachIndex, _text];
|
||||
};
|
||||
} forEach _values;
|
||||
|
||||
if (!(_values isEqualTo [])) then {
|
||||
if (_typeOf != "SCALAR") then {
|
||||
ACE_LOGWARNING_2("Setting [%1] has values[] but is not SCALAR (%2)", _name, _typeOf);
|
||||
} else {
|
||||
private _value = missionNamespace getVariable [_name, -1];
|
||||
if ((_value < 0) || {_value >= (count _values)}) then {
|
||||
ACE_LOGWARNING_3("Setting [%1] out of bounds %2 (values[] count is %3)(", _name, _value, count _values);
|
||||
};
|
||||
};
|
||||
};
|
||||
true
|
||||
};
|
||||
|
||||
// Iterate through settings
|
||||
{
|
||||
_x params ["_name"];
|
||||
_x params ["_name", "_typeOf"];
|
||||
|
||||
if !([configFile >> "ACE_Settings" >> _name] call _fnc_parseConfigForDisplayNames) then {
|
||||
if !([configFile >> "ACE_ServerSettings" >> _name] call _fnc_parseConfigForDisplayNames) then {
|
||||
|
@ -51,8 +51,6 @@ _fnc_parseConfigForSettings = {
|
||||
// mission side settings
|
||||
[missionConfigFile >> "ACE_Settings"] call _fnc_parseConfigForSettings;
|
||||
|
||||
// Publish all settings data
|
||||
publicVariable QGVAR(settings);
|
||||
// Publish all setting values
|
||||
{
|
||||
publicVariable (_x select 0);
|
||||
|
@ -16,9 +16,9 @@ params ["_unit", "_id", "_accepted"];
|
||||
|
||||
private ["_requestID", "_info", "_callBack", "_caller", "_replyParams", "_requestMessage", "_target"];
|
||||
|
||||
_info = _unit getvariable _id;
|
||||
_info = _unit getVariable _id;
|
||||
|
||||
if (!isnil "_info") then {
|
||||
if (!isNil "_info") then {
|
||||
_caller = _info select 0;
|
||||
_target = _info select 1;
|
||||
_requestID = _info select 2;
|
||||
@ -26,16 +26,16 @@ if (!isnil "_info") then {
|
||||
_callBack = _info select 4;
|
||||
_replyParams = [_info, _accepted];
|
||||
[_replyParams, QFUNC(requestCallback), _caller, false] call FUNC(execRemoteFnc);
|
||||
_unit setvariable [_id, nil];
|
||||
_unit setVariable [_id, nil];
|
||||
};
|
||||
|
||||
GVAR(RECIEVE_REQUEST_ID_KEY_BINDING) = nil;
|
||||
|
||||
if (!isnil QGVAR(RECIEVE_REQUEST_ADD_ACTION_ACCEPT)) then {
|
||||
if (!isNil QGVAR(RECIEVE_REQUEST_ADD_ACTION_ACCEPT)) then {
|
||||
_unit removeAction GVAR(RECIEVE_REQUEST_ADD_ACTION_ACCEPT);
|
||||
GVAR(RECIEVE_REQUEST_ADD_ACTION_ACCEPT) = nil;
|
||||
};
|
||||
if (!isnil QGVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE)) then {
|
||||
if (!isNil QGVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE)) then {
|
||||
_unit removeAction GVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE);
|
||||
GVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE) = nil;
|
||||
};
|
||||
|
@ -85,13 +85,13 @@ _fnc_perFrameFunction = {
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
|
||||
if (_errorCode == 0) then {
|
||||
if (typeName _onFinish == "STRING") then {
|
||||
if (_onFinish isEqualType "") then {
|
||||
[_onFinish, [_args, _elapsedTime, _totalTime, _errorCode]] call FUNC(localEvent);
|
||||
} else {
|
||||
[_args, _elapsedTime, _totalTime, _errorCode] call _onFinish;
|
||||
};
|
||||
} else {
|
||||
if (typeName _onFail == "STRING") then {
|
||||
if (_onFail isEqualType "") then {
|
||||
[_onFail, [_args, _elapsedTime, _totalTime, _errorCode]] call FUNC(localEvent);
|
||||
} else {
|
||||
[_args, _elapsedTime, _totalTime, _errorCode] call _onFail;
|
||||
|
63
addons/common/functions/fnc_readSettingsFromParamsArray.sqf
Normal file
63
addons/common/functions/fnc_readSettingsFromParamsArray.sqf
Normal file
@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Read settins from paramsArray that have a ACE_setting = 1.
|
||||
* Happens before modules but after all other configs (for force priority)
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [] call ace_common_fnc_readSettingsFromParamsArray
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
//paramsArray is a normal variable not a command
|
||||
private _paramsArray = missionnamespace getVariable ["paramsArray", []];
|
||||
|
||||
TRACE_1("Reading missionConfigFile params",_paramsArray);
|
||||
|
||||
{
|
||||
private _config = (missionConfigFile >> "params") select _forEachIndex;
|
||||
if ((getNumber (_config >> "ACE_setting")) > 0) then {
|
||||
private _settingName = configName _config;
|
||||
private _settingValue = _x;
|
||||
private _title = getText (_config >> "title");
|
||||
|
||||
TRACE_3("ace_setting",_title,_settingName,_settingValue);
|
||||
|
||||
// Check if the variable is already defined
|
||||
if (isNil _settingName) exitWith {
|
||||
ACE_LOGERROR_1("readSettingsFromParamsArray - param [%1] is not an ace_setting", _settingName);
|
||||
};
|
||||
|
||||
private _settingData = [_settingName] call FUNC(getSettingData);
|
||||
_settingData params ["", "_typeName", "", "", "", "", "_isForced"];
|
||||
|
||||
// Check if it's already forced and quit
|
||||
if (_isForced) exitWith {ACE_LOGWARNING_1("readSettingsFromParamsArray - param [%1] is already set and forced", _settingName);};
|
||||
|
||||
// The setting is not forced, so update the value
|
||||
// Read entry and cast it to the correct type from the existing variable
|
||||
private _validValue = false;
|
||||
switch (true) do {
|
||||
case (_typeName == "SCALAR"): {_validValue = true;};
|
||||
case (_typeName == "BOOL"): {
|
||||
_settingValue = _settingValue > 0;
|
||||
_validValue = true;
|
||||
};
|
||||
//TODO: Handle ARRAY,COLOR,STRING??? (bool/scalar covers most important settings)
|
||||
};
|
||||
|
||||
if (!_validValue) exitWith {
|
||||
ACE_LOGWARNING_3("readSettingsFromParamsArray - param [%1] type not valid [%2] - expected type [%3]", _settingName,_settingValue,_typeName);
|
||||
};
|
||||
|
||||
// Update the variable globaly and Force
|
||||
[_settingName, _settingValue, true, true] call FUNC(setSetting);
|
||||
};
|
||||
} forEach _paramsArray;
|
@ -53,7 +53,7 @@ GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT) = [ACE_time, _target, _requestID] spawn {
|
||||
private "_id";
|
||||
_id = _target getVariable _requestID;
|
||||
|
||||
waituntil {
|
||||
waitUntil {
|
||||
_id = _target getVariable _requestID;
|
||||
|
||||
(ACE_time > _time || isNil "_id")
|
||||
|
@ -14,8 +14,8 @@
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
_unit setvariable ["ACE_isDead", nil, true];
|
||||
_unit setvariable ["ACE_isUnconscious", nil, true];
|
||||
_unit setVariable ["ACE_isDead", nil, true];
|
||||
_unit setVariable ["ACE_isUnconscious", nil, true];
|
||||
|
||||
if (isPlayer _unit) then {
|
||||
[true] call FUNC(setVolume);
|
||||
@ -36,7 +36,7 @@ if (isPlayer _unit) then {
|
||||
|
||||
{
|
||||
if !(_x select 4) then {
|
||||
_unit setvariable [_x select 0, nil, _x select 3];
|
||||
_unit setVariable [_x select 0, nil, _x select 3];
|
||||
};
|
||||
false
|
||||
} count ([_unit] call FUNC(getAllDefinedSetVariables));
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Setvariable value
|
||||
* setVariable value
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
@ -23,7 +23,7 @@ if (isNil "_global") then {
|
||||
_definedVariable params ["", "", ["_global", false]];
|
||||
};
|
||||
|
||||
if (!isNil "_value") exitwith {
|
||||
if (!isNil "_value") exitWith {
|
||||
_unit setVariable [_variable, _value, _global];
|
||||
};
|
||||
|
||||
|
@ -19,7 +19,7 @@ params ["_name", "_value"];
|
||||
|
||||
// Hack to keep backward compatibility for the moment
|
||||
if (typeName (missionNamespace getVariable _name) == "BOOL") then {
|
||||
if (typeName _value == "SCALAR") then {
|
||||
if (_value isEqualType 0) then {
|
||||
_value = _value > 0;
|
||||
};
|
||||
};
|
||||
|
@ -13,27 +13,39 @@
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* ["ace_map_gestures_enabled", true, false, true] call ace_common_fnc_setSetting
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_name", "_value", ["_force", false], ["_broadcastChanges", false]];
|
||||
|
||||
private ["_settingData", "_failed"];
|
||||
|
||||
_settingData = [_name] call FUNC(getSettingData);
|
||||
private _settingData = [_name] call FUNC(getSettingData);
|
||||
|
||||
// Exit if the setting does not exist
|
||||
if (count _settingData == 0) exitWith {};
|
||||
if (_settingData isEqualTo []) exitWith {
|
||||
ACE_LOGERROR_1("SetSetting [%1] setting does not exist", _name);
|
||||
};
|
||||
|
||||
_settingData params ["", "_typeName", "_isClientSetable", "", "", "", "_isForced"];
|
||||
|
||||
// Exit if the setting is already forced
|
||||
if (_settingData select 6) exitWith {};
|
||||
if (_isForced) exitWith {
|
||||
ACE_LOGINFO_1("SetSetting [%1] Trying to set forced setting", _name);
|
||||
};
|
||||
|
||||
//This does NOT broadcast changes to GVAR(settings), so clients would not get updated force status
|
||||
if ((missionNamespace getVariable [QEGVAR(modules,serverModulesRead), false]) && {!(_isForced isEqualTo _force)}) then {
|
||||
ACE_LOGWARNING_3("SetSetting [%1] attempting to broadcast a change to force (%2 to %3)", _name, _isForced, _force);
|
||||
};
|
||||
|
||||
// If the type is not equal, try to cast it
|
||||
_failed = false;
|
||||
private _failed = false;
|
||||
if (typeName _value != _settingData select 1) then {
|
||||
_failed = true;
|
||||
if (_settingData select 1 == "BOOL" && typeName _value == "SCALAR") then {
|
||||
if ((_typeName == "BOOL") && {_value isEqualType 0}) then {
|
||||
// If value is not 0 or 1 consider it invalid and don't set anything
|
||||
if (_value isEqualTo 0) then {
|
||||
_value = false;
|
||||
@ -44,12 +56,12 @@ if (typeName _value != _settingData select 1) then {
|
||||
_failed = false;
|
||||
};
|
||||
};
|
||||
if (_settingData select 1 == "COLOR" && typeName _value == "ARRAY") then {
|
||||
if ((_typeName == "COLOR") && {_value isEqualType []}) then {
|
||||
_failed = false;
|
||||
};
|
||||
};
|
||||
|
||||
if (_failed) exitWith {};
|
||||
if (_failed) exitWith {ACE_LOGERROR_3("SetSetting [%1] bad data type expected %2 got %3", _name, _typeName, typeName _value);};
|
||||
|
||||
// Force it if it was required
|
||||
_settingData set [6, _force];
|
||||
|
@ -38,19 +38,16 @@ GVAR(setVariablePublicArray) pushBack [_object, _varName, _syncTime, _idName];
|
||||
if (isNil QGVAR(setVariablePublicPFH)) exitWith {};
|
||||
|
||||
GVAR(setVariablePublicPFH) = [{
|
||||
private "_delete";
|
||||
_delete = 0;
|
||||
|
||||
{
|
||||
_x params ["_object", "_varName", "_syncTime", "_idName"];
|
||||
if (ACE_diagTime > _syncTime) then {
|
||||
// set value public
|
||||
_object setVariable [_varName, _object getVariable _varName, true];
|
||||
GVAR(setVariablePublicArray) deleteAt _forEachIndex - _delete;
|
||||
GVAR(setVariableNames) deleteAt _forEachIndex - _delete;
|
||||
_delete = _delete + 1;
|
||||
GVAR(setVariablePublicArray) deleteAt (GVAR(setVariablePublicArray) find _x);
|
||||
GVAR(setVariableNames) deleteAt (GVAR(setVariableNames) find _x);
|
||||
};
|
||||
} forEach GVAR(setVariablePublicArray);
|
||||
nil
|
||||
} count +GVAR(setVariablePublicArray);
|
||||
|
||||
if (GVAR(setVariablePublicArray) isEqualTo []) then {
|
||||
[GVAR(setVariablePublicPFH)] call CBA_fnc_removePerFrameHandler;
|
||||
|
66
addons/common/functions/fnc_showHud.sqf
Normal file
66
addons/common/functions/fnc_showHud.sqf
Normal file
@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Allows multiple sources to not overwrite showHud command
|
||||
* Bitwise AND Logic (a single false in a mask will make it false)
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Source ID <STRING><OPTIONAL>
|
||||
* 1: Show Hud Bool Array (8 to set, empty to remove) <ARRAY><OPTIONAL>
|
||||
* - [hud, info, radar, compass, direction, menu, group, cursors]
|
||||
* - hud: Boolean - show scripted HUD (same as normal showHUD true/false)
|
||||
* - info: Boolean - show vehicle + soldier info (hides weapon info from the HUD as well)
|
||||
* - radar: Boolean - show vehicle radar
|
||||
* - compass: Boolean - show vehicle compass
|
||||
* - direction: Boolean - show tank direction indicator (not present in vanilla Arma 3)
|
||||
* - menu: Boolean - show commanding menu (hides HC related menus)
|
||||
* - group: Boolean - show group info bar (hides squad leader info bar)
|
||||
* - cursors: Boolean - show HUD weapon cursors (connected with scripted HUD)
|
||||
*
|
||||
* Return Value:
|
||||
* Resulting ShowHud Array <ARRAY>
|
||||
*
|
||||
* Example:
|
||||
* ["hideHud", [false, true, true, true, true, true, true, false]] call ace_common_fnc_showHud; //This is equivalent to the old showHud false
|
||||
* [] call ace_common_fnc_showHud; //sets `showHud` and returns the result array used
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!hasInterface) exitWith {[-1]};
|
||||
|
||||
params [["_reason", "", [""]], ["_mask", [], [[]], [0,8]]];
|
||||
|
||||
if (isArray (missionConfigFile >> "showHUD")) then {
|
||||
//(showHud = 0;) is fine - the array is the problem
|
||||
ACE_LOGWARNING("showHUD[] in Description.ext breaks the showHud command");
|
||||
};
|
||||
|
||||
if (_reason != "") then {
|
||||
_reason = toLower _reason;
|
||||
if (_mask isEqualTo []) then {
|
||||
TRACE_2("Setting", _reason, _mask);
|
||||
[GVAR(showHudHash), _reason] call FUNC(hashRem);
|
||||
} else {
|
||||
TRACE_2("Removing", _reason, _mask);
|
||||
[GVAR(showHudHash), _reason, _mask] call FUNC(hashSet);
|
||||
};
|
||||
};
|
||||
|
||||
GVAR(showHudHash) params ["_reasons", "_masks"];
|
||||
private _resultMask = [];
|
||||
|
||||
for "_index" from 0 to 7 do {
|
||||
private _set = true; //Default to true
|
||||
{
|
||||
if (!(_x select _index)) exitWith {
|
||||
_set = false; //Any false will make it false
|
||||
};
|
||||
} forEach _masks;
|
||||
_resultMask pushBack _set;
|
||||
};
|
||||
|
||||
TRACE_2("showHud", _resultMask, _reasons);
|
||||
showHud _resultMask;
|
||||
|
||||
_resultMask
|
@ -25,8 +25,8 @@ _elements = [];
|
||||
|
||||
{
|
||||
_theElement = toArray (_x select _elementN);
|
||||
_indexes pushback _foreachIndex;
|
||||
_elements pushback _theElement;
|
||||
_indexes pushBack _forEachIndex;
|
||||
_elements pushBack _theElement;
|
||||
} forEach _array;
|
||||
|
||||
for "_i" from 1 to (count _elements) - 1 do {
|
||||
@ -45,7 +45,7 @@ for "_i" from 1 to (count _elements) - 1 do {
|
||||
_returnArray = [];
|
||||
|
||||
{
|
||||
_returnArray pushback (_array select _x);
|
||||
_returnArray pushBack (_array select _x);
|
||||
} forEach _indexes;
|
||||
|
||||
_returnArray
|
||||
|
@ -18,7 +18,7 @@
|
||||
params [["_unit", objNull], ["_switch", false], ["_id", ""], ["_side", side _unit]];
|
||||
|
||||
private "_previousGroupsList";
|
||||
_previousGroupsList = _unit getvariable [QGVAR(previousGroupSwitchTo), []];
|
||||
_previousGroupsList = _unit getVariable [QGVAR(previousGroupSwitchTo), []];
|
||||
|
||||
if (_switch) then {
|
||||
// go forward
|
||||
@ -27,7 +27,7 @@ if (_switch) then {
|
||||
_previousGroup = group _unit;
|
||||
_originalSide = side group _unit;
|
||||
|
||||
if (count units _previousGroup == 1 && _originalSide == _side) exitwith {
|
||||
if (count units _previousGroup == 1 && _originalSide == _side) exitWith {
|
||||
[format ["Current group has only 1 member and is of same side as switch. Not switching unit %1", _id]] call FUNC(debug);
|
||||
};
|
||||
|
||||
@ -41,7 +41,7 @@ if (_switch) then {
|
||||
private ["_currentGroup", "_newGroup"];
|
||||
|
||||
{
|
||||
if (_id == (_x select 2)) exitwith {
|
||||
if (_id == (_x select 2)) exitWith {
|
||||
_x set [ 3, false];
|
||||
_previousGroupsList set [_forEachIndex, _x];
|
||||
[format["found group with ID: %1", _id]] call FUNC(debug);
|
||||
@ -51,7 +51,7 @@ if (_switch) then {
|
||||
reverse _previousGroupsList;
|
||||
|
||||
{
|
||||
if (_x select 3) exitwith {}; // stop at first id set to true
|
||||
if (_x select 3) exitWith {}; // stop at first id set to true
|
||||
if !(_x select 3) then {
|
||||
_currentGroup = group _unit;
|
||||
if (!isNull (_x select 0)) then {
|
||||
|
@ -35,7 +35,7 @@ if (!isServer) exitWith {false};
|
||||
_eventEntry = _x;
|
||||
_ttlReturn = true;
|
||||
|
||||
if (typeName _globalEventTTL == "CODE") then {
|
||||
if (_globalEventTTL isEqualType {}) then {
|
||||
_ttlReturn = [_eventTime, _eventEntry] call _globalEventTTL;
|
||||
} else {
|
||||
_ttlReturn = call {_globalEventTTL < 1 || {ACE_diagTime < (_eventEntry select 0) + _globalEventTTL}};
|
||||
@ -45,7 +45,7 @@ if (!isServer) exitWith {false};
|
||||
// Do event based TTL check
|
||||
_eventEntry params ["_time", "", "_eventTTL"];
|
||||
|
||||
if (typeName _eventTTL == "CODE") then {
|
||||
if (_eventTTL isEqualType {}) then {
|
||||
_ttlReturn = [_eventTime, _eventEntry] call _eventTTL;
|
||||
} else {
|
||||
_ttlReturn = call {_eventTTL < 1 || {ACE_diagTime < _time + _eventTTL}};
|
||||
|
@ -17,6 +17,6 @@
|
||||
|
||||
params ["_value"];
|
||||
|
||||
if (typeName _value == "SCALAR") exitWith {_value};
|
||||
if (_value isEqualType 0) exitWith {_value};
|
||||
|
||||
parseNumber _value // return
|
||||
|
@ -24,7 +24,7 @@ if (_vehicle == _unit) exitWith {false};
|
||||
if (speed _vehicle > 1 || getPos _vehicle select 2 > 2) exitWith {false};
|
||||
|
||||
private "_emptyPos";
|
||||
_emptyPos = (getPos _vehicle) findEmptyPosition [0, 10, typeof _unit]; // @todo to small?
|
||||
_emptyPos = (getPos _vehicle) findEmptyPosition [0, 10, typeOf _unit]; // @todo to small?
|
||||
|
||||
if (count _emptyPos == 0) exitWith {false};
|
||||
|
||||
|
@ -27,7 +27,7 @@ if (_vehicle isKindOf "Ship") then {
|
||||
|
||||
TRACE_1("SHIP Ground Check",getPos _vehicle);
|
||||
|
||||
_emptyPos = (ASLToAGL getPosASL _vehicle) findEmptyPosition [0, 13, typeof _unit]; // TODO: if spot is underwater pick another spot.
|
||||
_emptyPos = (ASLToAGL getPosASL _vehicle) findEmptyPosition [0, 13, typeOf _unit]; // TODO: if spot is underwater pick another spot.
|
||||
} else {
|
||||
if (_vehicle isKindOf "Air") then {
|
||||
if (speed _vehicle > 1 || {isTouchingGround _vehicle}) then {
|
||||
@ -45,18 +45,18 @@ if (_vehicle isKindOf "Ship") then {
|
||||
|
||||
TRACE_1("Vehicle Ground Check", isTouchingGround _vehicle);
|
||||
|
||||
_emptyPos = (ASLToAGL getPosASL _vehicle) findEmptyPosition [0, 13, typeof _unit];
|
||||
_emptyPos = (ASLToAGL getPosASL _vehicle) findEmptyPosition [0, 13, typeOf _unit];
|
||||
};
|
||||
};
|
||||
|
||||
TRACE_1("getPosASL Vehicle Check", getPosASL _vehicle);
|
||||
|
||||
if !(_validVehiclestate) exitwith {
|
||||
if !(_validVehiclestate) exitWith {
|
||||
ACE_LOGWARNING_4("Unable to unload patient because invalid (%1) vehicle state. Either moving or Not close enough on the ground. position: %2 isTouchingGround: %3 Speed: %4",_vehicle,getPos _vehicle,isTouchingGround _vehicle,speed _vehicle);
|
||||
false
|
||||
};
|
||||
|
||||
if (count _emptyPos == 0) exitwith {
|
||||
if (count _emptyPos == 0) exitWith {
|
||||
ACE_LOGWARNING_1("No safe empty spots to unload patient. %1",_emptyPos);
|
||||
false
|
||||
}; //consider displaying text saying there are no safe places to exit the vehicle
|
||||
@ -95,9 +95,9 @@ _unit action ["Eject", vehicle _unit];
|
||||
|
||||
[_unit, false, GROUP_SWITCH_ID, side group _unit] call FUNC(switchToGroupSide);
|
||||
|
||||
_loaded = _vehicle getvariable [QGVAR(loaded_persons),[]];
|
||||
_loaded = _vehicle getVariable [QGVAR(loaded_persons),[]];
|
||||
_loaded deleteAt (_loaded find _unit);
|
||||
|
||||
_vehicle setvariable [QGVAR(loaded_persons), _loaded, true];
|
||||
_vehicle setVariable [QGVAR(loaded_persons), _loaded, true];
|
||||
|
||||
true
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
// If the cursorMenu is open, the loading bar will fail. If we execute the function one frame later, it will work fine
|
||||
if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exitwith {
|
||||
if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exitWith {
|
||||
[{
|
||||
_this call FUNC(dismount);
|
||||
}, _this] call EFUNC(common,execNextFrame);
|
||||
|
@ -57,7 +57,7 @@ if (_mode == 0) then {
|
||||
if (count _no > 0) exitWith {
|
||||
_found = true; //diag_log "found";
|
||||
};
|
||||
} foreach _wireCheckPosAr;
|
||||
} forEach _wireCheckPosAr;
|
||||
// Double coil found!
|
||||
if (_found) then {
|
||||
_mode = 1;
|
||||
|
@ -29,7 +29,7 @@ private ["_xGrid", "_yGrid", "_dagrGrid", "_bearing", "_dagrDist", "_dagrElevati
|
||||
|
||||
__background ctrlSetText QUOTE(PATHTOF(UI\dagr_vector.paa));
|
||||
|
||||
if (GVAR(noVectorData)) exitwith {};
|
||||
if (GVAR(noVectorData)) exitWith {};
|
||||
GVAR(LAZPOS) params ["_lazPosX", "_lazPosY", "_lazPosZ"];
|
||||
|
||||
// Incase grids go neg due to 99-00 boundry
|
||||
|
@ -14,7 +14,7 @@
|
||||
true
|
||||
},
|
||||
{false},
|
||||
[0, [false, true, false]], false] call cba_fnc_addKeybind; // (empty default key)
|
||||
[0, [false, true, false]], false] call CBA_fnc_addKeybind; // (empty default key)
|
||||
|
||||
["ACE3 Equipment", QGVAR(ToggleKey), "Toggle DAGR",
|
||||
{
|
||||
@ -27,7 +27,7 @@
|
||||
true
|
||||
},
|
||||
{false},
|
||||
[0, [false, false, false]], false] call cba_fnc_addKeybind; // (empty default key)
|
||||
[0, [false, false, false]], false] call CBA_fnc_addKeybind; // (empty default key)
|
||||
|
||||
//Add deviceKey entry:
|
||||
private ["_conditonCode", "_toggleCode", "_closeCode"];
|
||||
|
@ -20,7 +20,7 @@ params ["_caller", "_target"];
|
||||
private "_display";
|
||||
#define DEFUALTPATH "\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa"
|
||||
//Sanity Checks
|
||||
if (_caller != ACE_player) exitwith {ERROR("Player isn't caller?");};
|
||||
if (_caller != ACE_player) exitWith {ERROR("Player isn't caller?");};
|
||||
if (!([_player, _target] call FUNC(canPlayerDisarmUnit))) exitWith {ERROR("Can't Disarm Unit");};
|
||||
if (dialog) then {ERROR("Dialog open when trying to open disarm dialog"); closeDialog 0;};
|
||||
|
||||
|
@ -33,13 +33,13 @@ class GVAR(remoteInventory) {
|
||||
fadeout = 0;
|
||||
|
||||
class Colors {
|
||||
dragValidBgr[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])",0.5};
|
||||
dragInvalidBgr[] = {"(profilenamespace getvariable ['IGUI_ERROR_RGB_R',0.8])","(profilenamespace getvariable ['IGUI_ERROR_RGB_G',0.0])","(profilenamespace getvariable ['IGUI_ERROR_RGB_B',0.0])",0.5};
|
||||
dragValidBar[] = {"(profilenamespace getvariable ['IGUI_WARNING_RGB_R',0.8])","(profilenamespace getvariable ['IGUI_WARNING_RGB_G',0.5])","(profilenamespace getvariable ['IGUI_WARNING_RGB_B',0.0])",0.5};
|
||||
dragInvalidBar[] = {"(profilenamespace getvariable ['IGUI_ERROR_RGB_R',0.8])","(profilenamespace getvariable ['IGUI_ERROR_RGB_G',0.0])","(profilenamespace getvariable ['IGUI_ERROR_RGB_B',0.0])",0.5};
|
||||
progressBar[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])",1};
|
||||
progressBarBgr[] = {"(profilenamespace getvariable ['IGUI_BCG_RGB_R',0])","(profilenamespace getvariable ['IGUI_BCG_RGB_G',1])","(profilenamespace getvariable ['IGUI_BCG_RGB_B',1])",0.75};
|
||||
highlight[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])",0.5};
|
||||
dragValidBgr[] = {"(profilenamespace getVariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getVariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getVariable ['IGUI_TEXT_RGB_B',1])",0.5};
|
||||
dragInvalidBgr[] = {"(profilenamespace getVariable ['IGUI_ERROR_RGB_R',0.8])","(profilenamespace getVariable ['IGUI_ERROR_RGB_G',0.0])","(profilenamespace getVariable ['IGUI_ERROR_RGB_B',0.0])",0.5};
|
||||
dragValidBar[] = {"(profilenamespace getVariable ['IGUI_WARNING_RGB_R',0.8])","(profilenamespace getVariable ['IGUI_WARNING_RGB_G',0.5])","(profilenamespace getVariable ['IGUI_WARNING_RGB_B',0.0])",0.5};
|
||||
dragInvalidBar[] = {"(profilenamespace getVariable ['IGUI_ERROR_RGB_R',0.8])","(profilenamespace getVariable ['IGUI_ERROR_RGB_G',0.0])","(profilenamespace getVariable ['IGUI_ERROR_RGB_B',0.0])",0.5};
|
||||
progressBar[] = {"(profilenamespace getVariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getVariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getVariable ['IGUI_TEXT_RGB_B',1])",1};
|
||||
progressBarBgr[] = {"(profilenamespace getVariable ['IGUI_BCG_RGB_R',0])","(profilenamespace getVariable ['IGUI_BCG_RGB_G',1])","(profilenamespace getVariable ['IGUI_BCG_RGB_B',1])",0.75};
|
||||
highlight[] = {"(profilenamespace getVariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getVariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getVariable ['IGUI_TEXT_RGB_B',1])",0.5};
|
||||
};
|
||||
|
||||
class controlsBackground {};
|
||||
|
@ -52,7 +52,7 @@ if !([_unit] call EFUNC(common,isPlayer)) then {
|
||||
//don't do anything until projectile is null (exploded/max range)
|
||||
if (isNull _projectile) then {
|
||||
//Remove PFEH:
|
||||
[_idPFH] call cba_fnc_removePerFrameHandler;
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
|
||||
//If (tube is dropped) OR (is dead) OR (is player) just exit
|
||||
if (((secondaryWeapon _unit) != _tube) || {!alive _unit} || {([_unit] call EFUNC(common,isPlayer))}) exitWith {};
|
||||
|
@ -84,6 +84,22 @@ class CfgVehicles {
|
||||
GVAR(canDrag) = 0;
|
||||
};
|
||||
|
||||
// Barrier
|
||||
class RoadCone_F: thingX {
|
||||
XEH_ENABLED;
|
||||
GVAR(canCarry) = 1;
|
||||
GVAR(carryPosition[]) = {0,1,1};
|
||||
GVAR(carryDirection) = 0;
|
||||
|
||||
GVAR(canDrag) = 1;
|
||||
GVAR(dragPosition[]) = {0,1.2,0};
|
||||
GVAR(dragDirection) = 0;
|
||||
};
|
||||
|
||||
class RoadBarrier_F: RoadCone_F {
|
||||
GVAR(carryPosition[]) = {0,1,0.300671};
|
||||
};
|
||||
|
||||
class ACE_RepairItem_Base: ThingX {};
|
||||
|
||||
class ACE_Track: ACE_RepairItem_Base {
|
||||
|
@ -21,4 +21,4 @@ if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// a static weapon has to be empty for dragging (ignore UAV AI)
|
||||
if (((typeOf _target) isKindOf "StaticWeapon") && {{(getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false};
|
||||
|
||||
alive _target && {vehicle _target == _target} && {_target getVariable [QGVAR(canCarry), false]} && {animationState _target in ["", "unconscious"] || (_target getvariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})}
|
||||
alive _target && {vehicle _target == _target} && {_target getVariable [QGVAR(canCarry), false]} && {animationState _target in ["", "unconscious"] || (_target getVariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})}
|
||||
|
@ -24,4 +24,4 @@ if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// a static weapon has to be empty for dragging (ignore UAV AI)
|
||||
if ((typeOf _target) isKindOf "StaticWeapon" && {{(getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false};
|
||||
|
||||
alive _target && {vehicle _target == _target} && {_target getVariable [QGVAR(canDrag), false]} && {animationState _target in ["", "unconscious"] || (_target getvariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})};
|
||||
alive _target && {vehicle _target == _target} && {_target getVariable [QGVAR(canDrag), false]} && {animationState _target in ["", "unconscious"] || (_target getVariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})};
|
||||
|
@ -22,7 +22,7 @@ params ["_unit", "_target"];
|
||||
private "_inBuilding";
|
||||
_inBuilding = [_unit] call FUNC(isObjectOnObject);
|
||||
|
||||
if !(_unit getvariable ["ACE_isUnconscious", false]) then {
|
||||
if !(_unit getVariable ["ACE_isUnconscious", false]) then {
|
||||
// play release animation
|
||||
_unit playAction "released";
|
||||
};
|
||||
@ -63,7 +63,7 @@ if !(_target isKindOf "CAManBase") then {
|
||||
["fixFloating", _target, _target] call EFUNC(common,targetEvent);
|
||||
};
|
||||
|
||||
if (_unit getvariable ["ACE_isUnconscious", false]) then {
|
||||
if (_unit getVariable ["ACE_isUnconscious", false]) then {
|
||||
[_unit, "unconscious", 2, true] call EFUNC(common,doAnimation);
|
||||
};
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user