mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Utilize isNotEqualTo (#7929)
* Utilize isNotEqualTo * undo changes to some files * redo some changes, fix based on @Vdauphin 's comment * fix validator issues Co-authored-by: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
parent
5a36d1a771
commit
75f7ed7532
@ -60,8 +60,8 @@ private _barrelLengthTable = getArray(_ammoConfig >> "ACE_barrelLengths");
|
|||||||
//Handle subsonic ammo that would have a huge muzzle velocity shift (when ballistic configs not explicitly defined)
|
//Handle subsonic ammo that would have a huge muzzle velocity shift (when ballistic configs not explicitly defined)
|
||||||
private _typicalSpeed = getNumber (_ammoConfig >> "typicalSpeed");
|
private _typicalSpeed = getNumber (_ammoConfig >> "typicalSpeed");
|
||||||
if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then {
|
if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then {
|
||||||
private _inheritedBarrelConfig = (!(_muzzleVelocityTable isEqualTo [])) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isEqualTo []};
|
private _inheritedBarrelConfig = (_muzzleVelocityTable isNotEqualTo []) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isEqualTo []};
|
||||||
private _inheritedTempConfig = (!(_ammoTempMuzzleVelocityShifts isEqualTo [])) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isEqualTo []};
|
private _inheritedTempConfig = (_ammoTempMuzzleVelocityShifts isNotEqualTo []) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isEqualTo []};
|
||||||
TRACE_3("subsonic",_typicalSpeed,_inheritedBarrelConfig,_inheritedTempConfig);
|
TRACE_3("subsonic",_typicalSpeed,_inheritedBarrelConfig,_inheritedTempConfig);
|
||||||
if (_inheritedBarrelConfig || _inheritedTempConfig) then {
|
if (_inheritedBarrelConfig || _inheritedTempConfig) then {
|
||||||
private _parentConfig = inheritsFrom _ammoConfig;
|
private _parentConfig = inheritsFrom _ammoConfig;
|
||||||
@ -73,7 +73,7 @@ if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then {
|
|||||||
};
|
};
|
||||||
private _linearMuliplier = _typicalSpeed / _parentSpeed;
|
private _linearMuliplier = _typicalSpeed / _parentSpeed;
|
||||||
if (_inheritedBarrelConfig) then {
|
if (_inheritedBarrelConfig) then {
|
||||||
if (!((configProperties [_parentConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isEqualTo [])) then {
|
if ((configProperties [_parentConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isNotEqualTo []) then {
|
||||||
TRACE_2("Parent Has Defined Barrel MV",_linearMuliplier,_muzzleVelocityTable);
|
TRACE_2("Parent Has Defined Barrel MV",_linearMuliplier,_muzzleVelocityTable);
|
||||||
{ _muzzleVelocityTable set [_forEachIndex, (_x * _linearMuliplier)]; } forEach _muzzleVelocityTable;
|
{ _muzzleVelocityTable set [_forEachIndex, (_x * _linearMuliplier)]; } forEach _muzzleVelocityTable;
|
||||||
} else {
|
} else {
|
||||||
@ -82,7 +82,7 @@ if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
if (_inheritedTempConfig) then {
|
if (_inheritedTempConfig) then {
|
||||||
if (!((configProperties [_parentConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isEqualTo [])) then {
|
if ((configProperties [_parentConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isNotEqualTo []) then {
|
||||||
TRACE_2("Parent Has Defined Ammo Temp Shifts",_linearMuliplier,_muzzleVelocityTable);
|
TRACE_2("Parent Has Defined Ammo Temp Shifts",_linearMuliplier,_muzzleVelocityTable);
|
||||||
{ _ammoTempMuzzleVelocityShifts set [_forEachIndex, (_x * _linearMuliplier)]; } forEach _ammoTempMuzzleVelocityShifts;
|
{ _ammoTempMuzzleVelocityShifts set [_forEachIndex, (_x * _linearMuliplier)]; } forEach _ammoTempMuzzleVelocityShifts;
|
||||||
} else {
|
} else {
|
||||||
|
@ -53,7 +53,7 @@ for "_i" from 0.05 to 1.45 step 0.1 do {
|
|||||||
if (lineIntersects [_prevTrajASL, _newTrajASL]) then { // Checks the "VIEW" LOD
|
if (lineIntersects [_prevTrajASL, _newTrajASL]) then { // Checks the "VIEW" LOD
|
||||||
_cross = 2; // 2: View LOD Block (Red)
|
_cross = 2; // 2: View LOD Block (Red)
|
||||||
} else {
|
} else {
|
||||||
if !((lineIntersectsSurfaces [_prevTrajASL, _newTrajASL, _activeThrowable, ACE_player, true, 1, "GEOM", "FIRE"]) isEqualTo []) then {
|
if ((lineIntersectsSurfaces [_prevTrajASL, _newTrajASL, _activeThrowable, ACE_player, true, 1, "GEOM", "FIRE"]) isNotEqualTo []) then {
|
||||||
_cross = 3; // 3: GEOM/FIRE LOD Block (Yellow) - pass a3 bulding glass, but blocked on some CUP glass
|
_cross = 3; // 3: GEOM/FIRE LOD Block (Yellow) - pass a3 bulding glass, but blocked on some CUP glass
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -32,9 +32,9 @@ if (_cachedItemInfo isEqualTo []) then {//Not in cache. So get info and put into
|
|||||||
//get name of DLC
|
//get name of DLC
|
||||||
private _dlcName = "";
|
private _dlcName = "";
|
||||||
private _addons = configsourceaddonlist _configPath;
|
private _addons = configsourceaddonlist _configPath;
|
||||||
if !(_addons isEqualTo []) then {
|
if (_addons isNotEqualTo []) then {
|
||||||
private _mods = configsourcemodlist (configfile >> "CfgPatches" >> _addons select 0);
|
private _mods = configsourcemodlist (configfile >> "CfgPatches" >> _addons select 0);
|
||||||
if !(_mods isEqualTo []) then {
|
if (_mods isNotEqualTo []) then {
|
||||||
_dlcName = _mods select 0;
|
_dlcName = _mods select 0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -61,11 +61,11 @@ private _fnc_addToTabs = {
|
|||||||
|
|
||||||
_finalArray = ["", _displayName, _statement, _condition];
|
_finalArray = ["", _displayName, _statement, _condition];
|
||||||
|
|
||||||
if !(_leftTabs isEqualTo []) then {
|
if (_leftTabs isNotEqualTo []) then {
|
||||||
[GVAR(sortListLeftPanel), _leftTabs, "L", 0] call _fnc_addToTabs;
|
[GVAR(sortListLeftPanel), _leftTabs, "L", 0] call _fnc_addToTabs;
|
||||||
};
|
};
|
||||||
|
|
||||||
if !(_rightTabs isEqualTo []) then {
|
if (_rightTabs isNotEqualTo []) then {
|
||||||
[GVAR(sortListRightPanel), _rightTabs, "R", 1] call _fnc_addToTabs;
|
[GVAR(sortListRightPanel), _rightTabs, "R", 1] call _fnc_addToTabs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ switch (GVAR(currentLoadoutsTab)) do {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if (GVAR(shiftState) && {is3DEN} && {!(_loadoutName isEqualTo "")} && {_cursSelRow != -1} && {!(_loadoutIndex isEqualto -1)}) exitwith {
|
if (GVAR(shiftState) && {is3DEN} && {_loadoutName isNotEqualTo ""} && {_cursSelRow != -1} && {_loadoutIndex isNotEqualTo -1}) exitwith {
|
||||||
private _defaultLoadoutsSearch = GVAR(defaultLoadoutsList) findIf {(_x select 0) == _loadoutName};
|
private _defaultLoadoutsSearch = GVAR(defaultLoadoutsList) findIf {(_x select 0) == _loadoutName};
|
||||||
if (_defaultLoadoutsSearch isEqualto -1) then {
|
if (_defaultLoadoutsSearch isEqualto -1) then {
|
||||||
GVAR(defaultLoadoutsList) pushBack [_loadoutName, _curSelLoadout];
|
GVAR(defaultLoadoutsList) pushBack [_loadoutName, _curSelLoadout];
|
||||||
|
@ -77,11 +77,11 @@ private _configEntries = "(getNumber (_x >> 'scope')) == 2" configClasses (confi
|
|||||||
|
|
||||||
_finalArray = ["", _displayName, _statement, _condition];
|
_finalArray = ["", _displayName, _statement, _condition];
|
||||||
|
|
||||||
if !(_leftTabsList isEqualTo []) then {
|
if (_leftTabsList isNotEqualTo []) then {
|
||||||
[_sortListLeftPanel, _leftTabsList, "L"] call _fnc_addToTabs;
|
[_sortListLeftPanel, _leftTabsList, "L"] call _fnc_addToTabs;
|
||||||
};
|
};
|
||||||
|
|
||||||
if !(_rightTabsList isEqualTo []) then {
|
if (_rightTabsList isNotEqualTo []) then {
|
||||||
[_sortListRightPanel, _rightTabsList, "R"] call _fnc_addToTabs;
|
[_sortListRightPanel, _rightTabsList, "R"] call _fnc_addToTabs;
|
||||||
};
|
};
|
||||||
} foreach _configEntries;
|
} foreach _configEntries;
|
||||||
|
@ -199,7 +199,7 @@ private _itemsToCheck = ((GVAR(currentItems) select [0,15]) + [GVAR(currentFace)
|
|||||||
for "_lbIndex" from 0 to (lbSize _ctrlPanel - 1) do {
|
for "_lbIndex" from 0 to (lbSize _ctrlPanel - 1) do {
|
||||||
private _currentData = _ctrlPanel lbData _lbIndex;
|
private _currentData = _ctrlPanel lbData _lbIndex;
|
||||||
|
|
||||||
if (!(_currentData isEqualTo "") && {tolower _currentData in _itemsToCheck}) exitWith {
|
if ((_currentData isNotEqualTo "") && {tolower _currentData in _itemsToCheck}) exitWith {
|
||||||
_ctrlPanel lbSetCurSel _lbIndex;
|
_ctrlPanel lbSetCurSel _lbIndex;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -282,11 +282,11 @@ switch (_ctrlIDC) do {
|
|||||||
};
|
};
|
||||||
} forEach GVAR(customRightPanelButtons);
|
} forEach GVAR(customRightPanelButtons);
|
||||||
};
|
};
|
||||||
|
|
||||||
{
|
{
|
||||||
["CfgWeapons", _x, false] call _fnc_fill_right_Container;
|
["CfgWeapons", _x, false] call _fnc_fill_right_Container;
|
||||||
} forEach ((GVAR(virtualItems) select 17) select {!((toLower _x) in _blockItems)});
|
} forEach ((GVAR(virtualItems) select 17) select {!((toLower _x) in _blockItems)});
|
||||||
|
|
||||||
{
|
{
|
||||||
["CfgWeapons", _x, false, true] call _fnc_fill_right_Container;
|
["CfgWeapons", _x, false, true] call _fnc_fill_right_Container;
|
||||||
} foreach ((GVAR(virtualItems) select 18) select {!((toLower _x) in _blockItems)});
|
} foreach ((GVAR(virtualItems) select 18) select {!((toLower _x) in _blockItems)});
|
||||||
@ -297,12 +297,12 @@ switch (_ctrlIDC) do {
|
|||||||
["CfgGlasses", _x, false, true] call _fnc_fill_right_Container;
|
["CfgGlasses", _x, false, true] call _fnc_fill_right_Container;
|
||||||
} foreach ((GVAR(virtualItems) select 24) select {!((toLower _x) in _blockItems)});
|
} foreach ((GVAR(virtualItems) select 24) select {!((toLower _x) in _blockItems)});
|
||||||
};
|
};
|
||||||
|
|
||||||
default {
|
default {
|
||||||
private _index = [RIGHT_PANEL_CUSTOM_BUTTONS] find _ctrlIDC;
|
private _index = [RIGHT_PANEL_CUSTOM_BUTTONS] find _ctrlIDC;
|
||||||
if (_index != -1) then {
|
if (_index != -1) then {
|
||||||
private _data = GVAR(customRightPanelButtons) param [_index];
|
private _data = GVAR(customRightPanelButtons) param [_index];
|
||||||
|
|
||||||
if (!isNil "_data") then {
|
if (!isNil "_data") then {
|
||||||
private _items = _data select 0;
|
private _items = _data select 0;
|
||||||
{
|
{
|
||||||
@ -366,7 +366,7 @@ private _sortRightCtrl = _display displayCtrl IDC_sortRightTab;
|
|||||||
[_sortRightCtrl] call FUNC(sortPanel);
|
[_sortRightCtrl] call FUNC(sortPanel);
|
||||||
|
|
||||||
// Select current data if not in a container
|
// Select current data if not in a container
|
||||||
if !(_itemsToCheck isEqualTo []) then {
|
if (_itemsToCheck isNotEqualTo []) then {
|
||||||
for "_lbIndex" from 0 to (lbSize _ctrlPanel - 1) do {
|
for "_lbIndex" from 0 to (lbSize _ctrlPanel - 1) do {
|
||||||
private _currentData = _ctrlPanel lbData _lbIndex;
|
private _currentData = _ctrlPanel lbData _lbIndex;
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ if (!isNil "_itemCfg") then {
|
|||||||
|
|
||||||
// Handle titles, bars and text
|
// Handle titles, bars and text
|
||||||
_statsList = _statsList select [0, 5];
|
_statsList = _statsList select [0, 5];
|
||||||
if !(_statsList isEqualTo []) then {
|
if (_statsList isNotEqualTo []) then {
|
||||||
{
|
{
|
||||||
_x params ["_ID", "_configEntry", "_title", "_bools", "_statements"];
|
_x params ["_ID", "_configEntry", "_title", "_bools", "_statements"];
|
||||||
_bools params ["_showBar", "_showText"];
|
_bools params ["_showBar", "_showText"];
|
||||||
|
@ -67,15 +67,15 @@ for "_index" from 0 to 10 do {
|
|||||||
case 0: {
|
case 0: {
|
||||||
private _array = LIST_DEFAULTS select _index;
|
private _array = LIST_DEFAULTS select _index;
|
||||||
|
|
||||||
if !((_array select 0) isEqualTo "") then {
|
if ((_array select 0) isNotEqualTo "") then {
|
||||||
((GVAR(virtualItems) select _index) select 0) pushBackUnique (_array select 0);
|
((GVAR(virtualItems) select _index) select 0) pushBackUnique (_array select 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
if !((_array select 1) isEqualTo "") then {
|
if ((_array select 1) isNotEqualTo "") then {
|
||||||
((GVAR(virtualItems) select _index) select 1) pushBackUnique (_array select 1);
|
((GVAR(virtualItems) select _index) select 1) pushBackUnique (_array select 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
if !((_array select 2) isEqualTo "") then {
|
if ((_array select 2) isNotEqualTo "") then {
|
||||||
((GVAR(virtualItems) select _index) select 2) pushBackUnique (_array select 2);
|
((GVAR(virtualItems) select _index) select 2) pushBackUnique (_array select 2);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -96,7 +96,7 @@ for "_index" from 0 to 10 do {
|
|||||||
} forEach _accsArray;
|
} forEach _accsArray;
|
||||||
|
|
||||||
{
|
{
|
||||||
if !(_x isEqualTo []) then {
|
if (_x isNotEqualTo []) then {
|
||||||
|
|
||||||
if (_x select 0 != "") then {
|
if (_x select 0 != "") then {
|
||||||
(GVAR(virtualItems) select 2) pushBackUnique (_x select 0);
|
(GVAR(virtualItems) select 2) pushBackUnique (_x select 0);
|
||||||
@ -116,8 +116,8 @@ for "_index" from 0 to 10 do {
|
|||||||
|
|
||||||
// The rest
|
// The rest
|
||||||
default {
|
default {
|
||||||
private _array = (LIST_DEFAULTS select _index) select {!(_x isEqualTo "")};
|
private _array = (LIST_DEFAULTS select _index) select {_x isNotEqualTo ""};
|
||||||
if !(_array isEqualTo []) then {
|
if (_array isNotEqualTo []) then {
|
||||||
{(GVAR(virtualItems) select _index) pushBackUnique _x} forEach _array;
|
{(GVAR(virtualItems) select _index) pushBackUnique _x} forEach _array;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -25,7 +25,7 @@ GVAR(shiftState) = _shiftState;
|
|||||||
private _return = true;
|
private _return = true;
|
||||||
private _loadoutsDisplay = findDisplay IDD_loadouts_display;
|
private _loadoutsDisplay = findDisplay IDD_loadouts_display;
|
||||||
|
|
||||||
if !(_loadoutsDisplay isEqualTo displayNull) then {
|
if (_loadoutsDisplay isNotEqualTo displayNull) then {
|
||||||
if !(GVAR(loadoutsSearchbarFocus)) then {
|
if !(GVAR(loadoutsSearchbarFocus)) then {
|
||||||
switch true do {
|
switch true do {
|
||||||
// Close button
|
// Close button
|
||||||
@ -171,7 +171,7 @@ if !(_loadoutsDisplay isEqualTo displayNull) then {
|
|||||||
case (_keyPressed == DIK_RETURN): {
|
case (_keyPressed == DIK_RETURN): {
|
||||||
if (GVAR(leftSearchbarFocus)) then {
|
if (GVAR(leftSearchbarFocus)) then {
|
||||||
[_display, _display displayCtrl IDC_leftSearchbar] call FUNC(handleSearchBar);
|
[_display, _display displayCtrl IDC_leftSearchbar] call FUNC(handleSearchBar);
|
||||||
};
|
};
|
||||||
if (GVAR(rightSearchbarFocus)) then {
|
if (GVAR(rightSearchbarFocus)) then {
|
||||||
[_display, _display displayCtrl IDC_rightSearchbar] call FUNC(handleSearchBar);
|
[_display, _display displayCtrl IDC_rightSearchbar] call FUNC(handleSearchBar);
|
||||||
};
|
};
|
||||||
|
@ -60,7 +60,7 @@ switch (GVAR(currentLeftPanel)) do {
|
|||||||
private _cfgMags = configFile >> "CfgMagazines";
|
private _cfgMags = configFile >> "CfgMagazines";
|
||||||
private _compatibleMags = ([_item, true] call CBA_fnc_compatibleMagazines) select { getNumber (_cfgMags >> _x >> "scope") == 2 };
|
private _compatibleMags = ([_item, true] call CBA_fnc_compatibleMagazines) select { getNumber (_cfgMags >> _x >> "scope") == 2 };
|
||||||
GVAR(center) addWeapon _item;
|
GVAR(center) addWeapon _item;
|
||||||
if !(_compatibleMags isEqualTo []) then {
|
if (_compatibleMags isNotEqualTo []) then {
|
||||||
GVAR(center) addWeaponItem [_item, [_compatibleMags select 0]];
|
GVAR(center) addWeaponItem [_item, [_compatibleMags select 0]];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ switch (GVAR(currentLeftPanel)) do {
|
|||||||
private _cfgMags = configFile >> "CfgMagazines";
|
private _cfgMags = configFile >> "CfgMagazines";
|
||||||
private _compatibleMags = ([_item, true] call CBA_fnc_compatibleMagazines) select { getNumber (_cfgMags >> _x >> "scope") == 2 };
|
private _compatibleMags = ([_item, true] call CBA_fnc_compatibleMagazines) select { getNumber (_cfgMags >> _x >> "scope") == 2 };
|
||||||
GVAR(center) addWeapon _item;
|
GVAR(center) addWeapon _item;
|
||||||
if !(_compatibleMags isEqualTo []) then {
|
if (_compatibleMags isNotEqualTo []) then {
|
||||||
GVAR(center) addWeaponItem [_item, [_compatibleMags select 0]];
|
GVAR(center) addWeaponItem [_item, [_compatibleMags select 0]];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -143,7 +143,7 @@ switch (GVAR(currentLeftPanel)) do {
|
|||||||
private _cfgMags = configFile >> "CfgMagazines";
|
private _cfgMags = configFile >> "CfgMagazines";
|
||||||
private _compatibleMags = ([_item, true] call CBA_fnc_compatibleMagazines) select { getNumber (_cfgMags >> _x >> "scope") == 2 };
|
private _compatibleMags = ([_item, true] call CBA_fnc_compatibleMagazines) select { getNumber (_cfgMags >> _x >> "scope") == 2 };
|
||||||
GVAR(center) addWeapon _item;
|
GVAR(center) addWeapon _item;
|
||||||
if !(_compatibleMags isEqualTo []) then {
|
if (_compatibleMags isNotEqualTo []) then {
|
||||||
GVAR(center) addWeaponItem [_item, [_compatibleMags select 0]];
|
GVAR(center) addWeaponItem [_item, [_compatibleMags select 0]];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -68,9 +68,9 @@ if (_items isEqualType true) then {
|
|||||||
|
|
||||||
private _itemCount = {
|
private _itemCount = {
|
||||||
if (_x isEqualTo (_cargo select 0) || {_x isEqualTo (_cargo select 1)}) then {
|
if (_x isEqualTo (_cargo select 0) || {_x isEqualTo (_cargo select 1)}) then {
|
||||||
!(_x isEqualTo [[],[],[]] || {_x isEqualTo [[],[],[],[]]})
|
(_x isNotEqualTo [[],[],[]] || {_x isEqualTo [[],[],[],[]]})
|
||||||
} else {
|
} else {
|
||||||
!(_x isEqualTo [])
|
(_x isNotEqualTo [])
|
||||||
};
|
};
|
||||||
} count _cargo;
|
} count _cargo;
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ _for do {
|
|||||||
if (_right) then {
|
if (_right) then {
|
||||||
_panel lnbSetText [[_i, 1], format ["%1%2", _value, _panel lnbText [_i, 1]]];
|
_panel lnbSetText [[_i, 1], format ["%1%2", _value, _panel lnbText [_i, 1]]];
|
||||||
} else {
|
} else {
|
||||||
if !(_item isEqualTo "") then {
|
if (_item isNotEqualTo "") then {
|
||||||
_panel lbSetText [_i, format ["%1%2", _value, _panel lbText _i]];
|
_panel lbSetText [_i, format ["%1%2", _value, _panel lbText _i]];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -159,7 +159,7 @@ if (_right) then {
|
|||||||
if (_data == _selected) then {_panel lbSetCurSel _i};
|
if (_data == _selected) then {_panel lbSetCurSel _i};
|
||||||
};
|
};
|
||||||
private _name = getText (_cfgClass >> _data >> "displayName");
|
private _name = getText (_cfgClass >> _data >> "displayName");
|
||||||
if !(_name isEqualTo "") then {
|
if (_name isNotEqualTo "") then {
|
||||||
_panel lbSetText [_i, _name];
|
_panel lbSetText [_i, _name];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -16,9 +16,9 @@ params ["_config"];
|
|||||||
|
|
||||||
private _dlc = "";
|
private _dlc = "";
|
||||||
private _addons = configSourceAddonList _config;
|
private _addons = configSourceAddonList _config;
|
||||||
if !(_addons isEqualTo []) then {
|
if (_addons isNotEqualTo []) then {
|
||||||
private _mods = configSourceModList (configfile >> "CfgPatches" >> _addons select 0);
|
private _mods = configSourceModList (configfile >> "CfgPatches" >> _addons select 0);
|
||||||
if !(_mods isEqualTo []) then {
|
if (_mods isNotEqualTo []) then {
|
||||||
_dlc = _mods select 0;
|
_dlc = _mods select 0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -7,7 +7,7 @@ private _fnc_showPropertyDefined = {
|
|||||||
params ["_configBase", "_configProperty"];
|
params ["_configBase", "_configProperty"];
|
||||||
|
|
||||||
private _customAll = configProperties [_configBase, 'isClass _x && {isNumber (_x >> _configProperty)}', true];
|
private _customAll = configProperties [_configBase, 'isClass _x && {isNumber (_x >> _configProperty)}', true];
|
||||||
private _customExplicit = _customAll select {!([] isEqualTo configProperties [_x, 'configName _x == _configProperty', false])};
|
private _customExplicit = _customAll select {[] isNotEqualTo configProperties [_x, 'configName _x == _configProperty', false]};
|
||||||
diag_log text format ["%1 with custom %2: %3 Explicit, %4 Total]", configName _configBase, _configProperty, count _customExplicit, count _customAll];
|
diag_log text format ["%1 with custom %2: %3 Explicit, %4 Total]", configName _configBase, _configProperty, count _customExplicit, count _customAll];
|
||||||
diag_log text format [" - Defined: %1", _customExplicit apply {configName _x}];
|
diag_log text format [" - Defined: %1", _customExplicit apply {configName _x}];
|
||||||
diag_log text format [" - Inherited: %1", _customAll apply {[configName _x, getNumber (_x >> _configProperty)]}];
|
diag_log text format [" - Inherited: %1", _customAll apply {[configName _x, getNumber (_x >> _configProperty)]}];
|
||||||
|
@ -60,7 +60,7 @@ if (_parseInput) then {
|
|||||||
_subsonicDrop = _transonicDrop max _subsonicDrop;
|
_subsonicDrop = _transonicDrop max _subsonicDrop;
|
||||||
};
|
};
|
||||||
|
|
||||||
if ((GVAR(truingDropDropData) select 0) == 0 || {!([_transonicRange, _subsonicRange] isEqualTo GVAR(truingDropRangeData))}) then {
|
if ((GVAR(truingDropDropData) select 0) == 0 || {[_transonicRange, _subsonicRange] isNotEqualTo GVAR(truingDropRangeData)}) then {
|
||||||
if (isNil QGVAR(targetSolutionInput)) then {
|
if (isNil QGVAR(targetSolutionInput)) then {
|
||||||
call FUNC(calculate_target_solution);
|
call FUNC(calculate_target_solution);
|
||||||
};
|
};
|
||||||
|
@ -74,7 +74,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
|
|||||||
_virtualPosASL = _virtualPosASL vectorAdd ((positionCameraToWorld [0.3,0,0]) vectorDiff (positionCameraToWorld [0,0,0]));
|
_virtualPosASL = _virtualPosASL vectorAdd ((positionCameraToWorld [0.3,0,0]) vectorDiff (positionCameraToWorld [0,0,0]));
|
||||||
};
|
};
|
||||||
private _virtualPos = _virtualPosASL call EFUNC(common,ASLToPosition);
|
private _virtualPos = _virtualPosASL call EFUNC(common,ASLToPosition);
|
||||||
private _lineInterection = !((lineIntersectsSurfaces [eyePos ACE_player, _virtualPosASL, ACE_player]) isEqualTo []);
|
private _lineInterection = ((lineIntersectsSurfaces [eyePos ACE_player, _virtualPosASL, ACE_player]) isNotEqualTo []);
|
||||||
|
|
||||||
//Don't allow placing in a bad position:
|
//Don't allow placing in a bad position:
|
||||||
if (_lineInterection && {GVAR(placeAction) == PLACE_APPROVE}) then {GVAR(placeAction) = PLACE_WAITING;};
|
if (_lineInterection && {GVAR(placeAction) == PLACE_APPROVE}) then {GVAR(placeAction) = PLACE_WAITING;};
|
||||||
|
@ -34,7 +34,7 @@ class EGVAR(arsenal,stats) {
|
|||||||
displayName= CSTRING(statBallisticCoef);
|
displayName= CSTRING(statBallisticCoef);
|
||||||
showText= 1;
|
showText= 1;
|
||||||
textStatement = QUOTE(params[ARR_2('_stat', '_config')]; private _ammoCfg = (configFile >> 'CfgAmmo' >> (getText (_config >> 'ammo'))); private _ballisticCoef = getArray (_ammoCfg >> _stat select 1); _ballisticCoef sort false; format [ARR_4('%1 G%2 (%3)', _ballisticCoef select 0 ,getNumber (_ammoCfg >> _stat select 0), getText (_ammoCfg >> _stat select 2))]);
|
textStatement = QUOTE(params[ARR_2('_stat', '_config')]; private _ammoCfg = (configFile >> 'CfgAmmo' >> (getText (_config >> 'ammo'))); private _ballisticCoef = getArray (_ammoCfg >> _stat select 1); _ballisticCoef sort false; format [ARR_4('%1 G%2 (%3)', _ballisticCoef select 0 ,getNumber (_ammoCfg >> _stat select 0), getText (_ammoCfg >> _stat select 2))]);
|
||||||
condition = QUOTE(params[ARR_2('_stat', '_config')]; private _ammoCfg = (configFile >> 'CfgAmmo' >> (getText (_config >> 'ammo'))); !(getArray (_ammoCfg >> _stat select 1) isEqualTo []));
|
condition = QUOTE(params[ARR_2('_stat', '_config')]; private _ammoCfg = (configFile >> 'CfgAmmo' >> (getText (_config >> 'ammo'))); (getArray (_ammoCfg >> _stat select 1) isNotEqualTo []));
|
||||||
tabs[] ={{}, {4}};
|
tabs[] ={{}, {4}};
|
||||||
};
|
};
|
||||||
class ACE_bulletMass: statBase {
|
class ACE_bulletMass: statBase {
|
||||||
|
@ -36,7 +36,7 @@ if (local _unit) then {
|
|||||||
_x params ["_xUnit", "", "", "_xTurretPath"];
|
_x params ["_xUnit", "", "", "_xTurretPath"];
|
||||||
if (_unit == _xUnit) exitWith {_turretPath = _xTurretPath};
|
if (_unit == _xUnit) exitWith {_turretPath = _xTurretPath};
|
||||||
} forEach (fullCrew (vehicle _unit));
|
} forEach (fullCrew (vehicle _unit));
|
||||||
if (!(_turretPath isEqualTo [])) then {
|
if (_turretPath isNotEqualTo []) then {
|
||||||
TRACE_1("Setting FFV Handcuffed Animation",_turretPath);
|
TRACE_1("Setting FFV Handcuffed Animation",_turretPath);
|
||||||
[_unit, "ACE_HandcuffedFFV", 2] call EFUNC(common,doAnimation);
|
[_unit, "ACE_HandcuffedFFV", 2] call EFUNC(common,doAnimation);
|
||||||
[_unit, "ACE_HandcuffedFFV", 1] call EFUNC(common,doAnimation);
|
[_unit, "ACE_HandcuffedFFV", 1] call EFUNC(common,doAnimation);
|
||||||
|
@ -253,7 +253,7 @@ enableCamShake true;
|
|||||||
//FUNC(showHud) needs to be refreshed if it was set during mission init
|
//FUNC(showHud) needs to be refreshed if it was set during mission init
|
||||||
["ace_infoDisplayChanged", {
|
["ace_infoDisplayChanged", {
|
||||||
GVAR(showHudHash) params ["", "", "_masks"];
|
GVAR(showHudHash) params ["", "", "_masks"];
|
||||||
if !(_masks isEqualTo []) then {
|
if (_masks isNotEqualTo []) then {
|
||||||
[] call FUNC(showHud);
|
[] call FUNC(showHud);
|
||||||
};
|
};
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
@ -31,7 +31,7 @@ private _aceSettings = configProperties [configFile >> "ACE_Settings", "isClass
|
|||||||
|
|
||||||
if (!isNil "_profileVar") then {
|
if (!isNil "_profileVar") then {
|
||||||
private _currentValue = [_settingName, "client"] call CBA_settings_fnc_get;
|
private _currentValue = [_settingName, "client"] call CBA_settings_fnc_get;
|
||||||
if (_isClientSettable && {!(_currentValue isEqualTo _profileVar)}) then {
|
if (_isClientSettable && {_currentValue isNotEqualTo _profileVar}) then {
|
||||||
// CBA_settings_fnc_set will do type checking for the old profile var
|
// CBA_settings_fnc_set will do type checking for the old profile var
|
||||||
private _ret = [_settingName, _profileVar, 0, "client", true] call CBA_settings_fnc_set;
|
private _ret = [_settingName, _profileVar, 0, "client", true] call CBA_settings_fnc_set;
|
||||||
INFO_3("Transfering setting [%1: %2] returned %3", _settingName, _profileVar, _ret);
|
INFO_3("Transfering setting [%1: %2] returned %3", _settingName, _profileVar, _ret);
|
||||||
|
@ -57,7 +57,7 @@ private _oldCompats = [];
|
|||||||
};
|
};
|
||||||
false
|
false
|
||||||
} count _addons;
|
} count _addons;
|
||||||
if (!(_oldCompats isEqualTo [])) then {
|
if (_oldCompats isNotEqualTo []) then {
|
||||||
[{
|
[{
|
||||||
// Lasts for ~10 seconds
|
// Lasts for ~10 seconds
|
||||||
ERROR_WITH_TITLE_1("The following ACE compatiblity PBOs are outdated", "%1", _this);
|
ERROR_WITH_TITLE_1("The following ACE compatiblity PBOs are outdated", "%1", _this);
|
||||||
@ -138,7 +138,7 @@ if (isMultiplayer) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
_addons = _addons - GVAR(ServerAddons);
|
_addons = _addons - GVAR(ServerAddons);
|
||||||
if !(_addons isEqualTo []) then {
|
if (_addons isNotEqualTo []) then {
|
||||||
private _errorMsg = format ["Client/Server Addon Mismatch. Client has extra addons: %1.",_addons];
|
private _errorMsg = format ["Client/Server Addon Mismatch. Client has extra addons: %1.",_addons];
|
||||||
|
|
||||||
ERROR(_errorMsg);
|
ERROR(_errorMsg);
|
||||||
|
@ -30,7 +30,7 @@ _target setVariable [QGVAR(owner), _unit, true];
|
|||||||
|
|
||||||
// lock target object
|
// lock target object
|
||||||
if (_lockTarget) then {
|
if (_lockTarget) then {
|
||||||
private _canBeDisassembled = !([] isEqualTo getArray (configOf _target >> "assembleInfo" >> "dissasembleTo")) && { !([false, true] select (_target getVariable [QEGVAR(csw,assemblyMode), 0])) };
|
private _canBeDisassembled = ([] isNotEqualTo getArray (configOf _target >> "assembleInfo" >> "dissasembleTo")) && { !([false, true] select (_target getVariable [QEGVAR(csw,assemblyMode), 0])) };
|
||||||
if (!isNull _unit) then {
|
if (!isNull _unit) then {
|
||||||
[QGVAR(lockVehicle), _target, _target] call CBA_fnc_targetEvent;
|
[QGVAR(lockVehicle), _target, _target] call CBA_fnc_targetEvent;
|
||||||
if (_canBeDisassembled) then {
|
if (_canBeDisassembled) then {
|
||||||
|
@ -36,7 +36,7 @@ _target setVariable [QGVAR(owner), _unit, true];
|
|||||||
|
|
||||||
// lock target object
|
// lock target object
|
||||||
if (_lockTarget) then {
|
if (_lockTarget) then {
|
||||||
private _canBeDisassembled = !([] isEqualTo getArray (configOf _target >> "assembleInfo" >> "dissasembleTo")) && { !([false, true] select (_target getVariable [QEGVAR(csw,assemblyMode), 0])) };
|
private _canBeDisassembled = ([] isNotEqualTo getArray (configOf _target >> "assembleInfo" >> "dissasembleTo")) && { !([false, true] select (_target getVariable [QEGVAR(csw,assemblyMode), 0])) };
|
||||||
if (!isNull _unit) then {
|
if (!isNull _unit) then {
|
||||||
[QGVAR(lockVehicle), _target, _target] call CBA_fnc_targetEvent;
|
[QGVAR(lockVehicle), _target, _target] call CBA_fnc_targetEvent;
|
||||||
if (_canBeDisassembled) then {
|
if (_canBeDisassembled) then {
|
||||||
|
@ -78,7 +78,7 @@ while {_rangeToCheck < _maxDistance} do {
|
|||||||
//Shoot a ray down, and make sure we hit something solid like a building or the ground:
|
//Shoot a ray down, and make sure we hit something solid like a building or the ground:
|
||||||
private _belowRoundArray = lineIntersectsSurfaces [(AGLtoASL _roundAGL) vectorAdd [0,0,0.5], (AGLtoASL _roundAGL) vectorAdd [0,0,-1]];
|
private _belowRoundArray = lineIntersectsSurfaces [(AGLtoASL _roundAGL) vectorAdd [0,0,0.5], (AGLtoASL _roundAGL) vectorAdd [0,0,-1]];
|
||||||
TRACE_4("Testing for solid",_roundDistance,_roundAngle,_roundAGL,_belowRoundArray);
|
TRACE_4("Testing for solid",_roundDistance,_roundAngle,_roundAGL,_belowRoundArray);
|
||||||
if (!(_belowRoundArray isEqualTo [])) then {
|
if (_belowRoundArray isNotEqualTo []) then {
|
||||||
private _aboveBuilding = (_belowRoundArray select 0) select 2;
|
private _aboveBuilding = (_belowRoundArray select 0) select 2;
|
||||||
//Point is above something: Terrain(null) or Building
|
//Point is above something: Terrain(null) or Building
|
||||||
if ((isNull _aboveBuilding) || {_aboveBuilding isKindOf "Building"}) then {
|
if ((isNull _aboveBuilding) || {_aboveBuilding isKindOf "Building"}) then {
|
||||||
@ -110,14 +110,14 @@ while {_rangeToCheck < _maxDistance} do {
|
|||||||
_testIntersections = [];
|
_testIntersections = [];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
if (!(_testIntersections isEqualTo [])) exitWith {
|
if (_testIntersections isNotEqualTo []) exitWith {
|
||||||
TRACE_2("collision low/high",_roundAGL,_testIntersections);
|
TRACE_2("collision low/high",_roundAGL,_testIntersections);
|
||||||
_roundPointIsValid = false;
|
_roundPointIsValid = false;
|
||||||
};
|
};
|
||||||
_point1ASL = (AGLtoASL _roundAGL) vectorAdd [_radiusOfItem * cos _angle, _radiusOfItem * sin _angle, 0.5];
|
_point1ASL = (AGLtoASL _roundAGL) vectorAdd [_radiusOfItem * cos _angle, _radiusOfItem * sin _angle, 0.5];
|
||||||
_point2ASL = (AGLtoASL _roundAGL) vectorAdd [-_radiusOfItem * cos _angle, -_radiusOfItem * sin _angle, 1];
|
_point2ASL = (AGLtoASL _roundAGL) vectorAdd [-_radiusOfItem * cos _angle, -_radiusOfItem * sin _angle, 1];
|
||||||
_testIntersections = lineIntersectsSurfaces [_point1ASL, _point2ASL];
|
_testIntersections = lineIntersectsSurfaces [_point1ASL, _point2ASL];
|
||||||
if (!(_testIntersections isEqualTo [])) exitWith {
|
if (_testIntersections isNotEqualTo []) exitWith {
|
||||||
TRACE_2("collision mid",_roundAGL,_testIntersections);
|
TRACE_2("collision mid",_roundAGL,_testIntersections);
|
||||||
_roundPointIsValid = false;
|
_roundPointIsValid = false;
|
||||||
};
|
};
|
||||||
|
@ -32,7 +32,7 @@ if (_unit == driver _vehicle) exitWith {
|
|||||||
// --- turret
|
// --- turret
|
||||||
private _turret = _unit call CBA_fnc_turretPath;
|
private _turret = _unit call CBA_fnc_turretPath;
|
||||||
|
|
||||||
if !(_turret isEqualTo []) exitWith {
|
if (_turret isNotEqualTo []) exitWith {
|
||||||
private _turretConfig = [_vehicle, _turret] call CBA_fnc_getTurret;
|
private _turretConfig = [_vehicle, _turret] call CBA_fnc_getTurret;
|
||||||
|
|
||||||
getText (configFile >> "CfgMovesBasic" >> "ManActions" >> getText (_turretConfig >> "gunnerAction")) // return
|
getText (configFile >> "CfgMovesBasic" >> "ManActions" >> getText (_turretConfig >> "gunnerAction")) // return
|
||||||
|
@ -19,7 +19,7 @@ params ["_varName"];
|
|||||||
|
|
||||||
private _variableDefinition = _varName call FUNC(getDefinedVariableInfo);
|
private _variableDefinition = _varName call FUNC(getDefinedVariableInfo);
|
||||||
|
|
||||||
if !(_variableDefinition isEqualTo []) exitWith {
|
if (_variableDefinition isNotEqualTo []) exitWith {
|
||||||
_variableDefinition select 1;
|
_variableDefinition select 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ private _lat = -1 * getNumber (configFile >> "CfgWorlds" >> _map >> "latitude");
|
|||||||
private _altitude = getNumber (configFile >> "CfgWorlds" >> _map >> "elevationOffset");
|
private _altitude = getNumber (configFile >> "CfgWorlds" >> _map >> "elevationOffset");
|
||||||
|
|
||||||
private _mapData = _map call FUNC(getMapData);
|
private _mapData = _map call FUNC(getMapData);
|
||||||
if (!(_mapData isEqualTo [])) then {
|
if (_mapData isNotEqualTo []) then {
|
||||||
_lat = _mapData select 0;
|
_lat = _mapData select 0;
|
||||||
_altitude = _mapData select 1;
|
_altitude = _mapData select 1;
|
||||||
};
|
};
|
||||||
|
@ -62,7 +62,7 @@ private _fnc_replaceItems = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Replace all items of current class in list
|
// Replace all items of current class in list
|
||||||
if !(_replacements isEqualTo []) then {
|
if (_replacements isNotEqualTo []) then {
|
||||||
TRACE_3("replace",_item,_count,_replacements);
|
TRACE_3("replace",_item,_count,_replacements);
|
||||||
_unit removeItems _item;
|
_unit removeItems _item;
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ INFO_1("ace_common_fnc_runTests starting for [%1]", _specificTest);
|
|||||||
private _testFile = getText _x;
|
private _testFile = getText _x;
|
||||||
diag_log text format ["----- Starting Testing %1 [%2] -----", _testName, _testFile];
|
diag_log text format ["----- Starting Testing %1 [%2] -----", _testName, _testFile];
|
||||||
private _return = ([nil] apply (compile preProcessFileLineNumbers _testFile)) select 0;
|
private _return = ([nil] apply (compile preProcessFileLineNumbers _testFile)) select 0;
|
||||||
if ((isNil "_return") || {!(_return isEqualTo true)}) then {
|
if ((isNil "_return") || {_return isNotEqualTo true}) then {
|
||||||
systemChat format ["Test [%1] Failed", _testName];
|
systemChat format ["Test [%1] Failed", _testName];
|
||||||
diag_log text format ["----- Finished Testing %1 [Failed] -----", _testName];
|
diag_log text format ["----- Finished Testing %1 [Failed] -----", _testName];
|
||||||
_fails pushBack _testName;
|
_fails pushBack _testName;
|
||||||
@ -43,6 +43,6 @@ INFO_1("ace_common_fnc_runTests starting for [%1]", _specificTest);
|
|||||||
|
|
||||||
INFO_1("ace_common_fnc_runTests finished in %1 ms", (1000 * (diag_tickTime - _startTime)) toFixed 1);
|
INFO_1("ace_common_fnc_runTests finished in %1 ms", (1000 * (diag_tickTime - _startTime)) toFixed 1);
|
||||||
INFO_2("[%1 / %2] Tests Passed", (_total - (count _fails)), _total);
|
INFO_2("[%1 / %2] Tests Passed", (_total - (count _fails)), _total);
|
||||||
if (!(_fails isEqualTo [])) then {
|
if (_fails isNotEqualTo []) then {
|
||||||
INFO_1("Failed: %1", _fails);
|
INFO_1("Failed: %1", _fails);
|
||||||
};
|
};
|
||||||
|
@ -46,7 +46,7 @@ TRACE_2("Starting Embargo", _varName, _delay);
|
|||||||
TRACE_4("End of embargo", _object, _varName, _value, _curValue);
|
TRACE_4("End of embargo", _object, _varName, _value, _curValue);
|
||||||
|
|
||||||
//If value at start of embargo doesn't equal current, then broadcast and start new embargo
|
//If value at start of embargo doesn't equal current, then broadcast and start new embargo
|
||||||
if (!(_value isEqualTo _curValue)) then {
|
if (_value isNotEqualTo _curValue) then {
|
||||||
_this set [2, _curValue];
|
_this set [2, _curValue];
|
||||||
_this call FUNC(setVariablePublic);
|
_this call FUNC(setVariablePublic);
|
||||||
};
|
};
|
||||||
|
@ -27,7 +27,7 @@ GVAR(statusEffect_Names) pushBack _name;
|
|||||||
GVAR(statusEffect_isGlobal) pushBack _isGlobal;
|
GVAR(statusEffect_isGlobal) pushBack _isGlobal;
|
||||||
|
|
||||||
//We add reasons at any time, but more efficenet to add all common ones at one time during init
|
//We add reasons at any time, but more efficenet to add all common ones at one time during init
|
||||||
if (isServer && {!(_commonReasonsArray isEqualTo [])}) then {
|
if (isServer && {_commonReasonsArray isNotEqualTo []}) then {
|
||||||
//Switch case to lower:
|
//Switch case to lower:
|
||||||
_commonReasonsArray = _commonReasonsArray apply { toLower _x };
|
_commonReasonsArray = _commonReasonsArray apply { toLower _x };
|
||||||
missionNamespace setVariable [(format [QGVAR(statusEffects_%1), _name]), _commonReasonsArray, true];
|
missionNamespace setVariable [(format [QGVAR(statusEffects_%1), _name]), _commonReasonsArray, true];
|
||||||
|
@ -28,7 +28,7 @@ if (local _vehicle) then {
|
|||||||
params ["_vehicle"];
|
params ["_vehicle"];
|
||||||
|
|
||||||
private _config = _vehicle call CBA_fnc_getObjectConfig;
|
private _config = _vehicle call CBA_fnc_getObjectConfig;
|
||||||
private _positions = getArray (_config >> QGVAR(cookoffSelections)) select {!((_vehicle selectionPosition _x) isEqualTo [0,0,0])};
|
private _positions = getArray (_config >> QGVAR(cookoffSelections)) select {(_vehicle selectionPosition _x) isNotEqualTo [0,0,0]};
|
||||||
|
|
||||||
if (_positions isEqualTo []) then {
|
if (_positions isEqualTo []) then {
|
||||||
WARNING_1("no valid selection for cookoff found. %1", typeOf _vehicle);
|
WARNING_1("no valid selection for cookoff found. %1", typeOf _vehicle);
|
||||||
@ -48,7 +48,7 @@ if (local _vehicle) then {
|
|||||||
{
|
{
|
||||||
private _position = [0,-2,0];
|
private _position = [0,-2,0];
|
||||||
|
|
||||||
if !(_x isEqualTo "#noselection") then {
|
if (_x isNotEqualTo "#noselection") then {
|
||||||
_position = _vehicle selectionPosition _x;
|
_position = _vehicle selectionPosition _x;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ if (local _vehicle) then {
|
|||||||
{
|
{
|
||||||
private _position = [0,-2,0];
|
private _position = [0,-2,0];
|
||||||
|
|
||||||
if !(_x isEqualTo "#noselection") then {
|
if (_x isNotEqualTo "#noselection") then {
|
||||||
_position = _vehicle selectionPosition _x;
|
_position = _vehicle selectionPosition _x;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
TRACE_4("",typeOf _staticWeapon,_carryWeaponClassname,_turretClassname,_pickupTime);
|
TRACE_4("",typeOf _staticWeapon,_carryWeaponClassname,_turretClassname,_pickupTime);
|
||||||
if (!isClass (configFile >> "CfgWeapons" >> _carryWeaponClassname)) exitWith {ERROR_1("bad weapon classname [%1]",_carryWeaponClassname);};
|
if (!isClass (configFile >> "CfgWeapons" >> _carryWeaponClassname)) exitWith {ERROR_1("bad weapon classname [%1]",_carryWeaponClassname);};
|
||||||
// Turret classname can equal nothing if the deploy bag is the "whole" weapon. e.g Kornet, Metis, other ATGMs
|
// Turret classname can equal nothing if the deploy bag is the "whole" weapon. e.g Kornet, Metis, other ATGMs
|
||||||
if (!(_turretClassname isEqualTo "") && {!isClass (configFile >> "CfgVehicles" >> _turretClassname)}) exitWith {ERROR_1("bad turret classname [%1]",_turretClassname);};
|
if ((_turretClassname isNotEqualTo "") && {!isClass (configFile >> "CfgVehicles" >> _turretClassname)}) exitWith {ERROR_1("bad turret classname [%1]",_turretClassname);};
|
||||||
|
|
||||||
private _onFinish = {
|
private _onFinish = {
|
||||||
params ["_args"];
|
params ["_args"];
|
||||||
@ -54,7 +54,7 @@
|
|||||||
};
|
};
|
||||||
} forEach (magazinesAllTurrets _staticWeapon);
|
} forEach (magazinesAllTurrets _staticWeapon);
|
||||||
|
|
||||||
if !(_turretClassname isEqualTo "") then {
|
if (_turretClassname isNotEqualTo "") then {
|
||||||
private _cswTripod = createVehicle [_turretClassname, [0, 0, 0], [], 0, "NONE"];
|
private _cswTripod = createVehicle [_turretClassname, [0, 0, 0], [], 0, "NONE"];
|
||||||
// Delay a frame so weapon has a chance to be deleted
|
// Delay a frame so weapon has a chance to be deleted
|
||||||
[{
|
[{
|
||||||
|
@ -37,7 +37,7 @@ TRACE_1("",_magsInWeapon);
|
|||||||
|
|
||||||
// Remove any empty mags from start:
|
// Remove any empty mags from start:
|
||||||
private _ammoInFirstMag = 0;
|
private _ammoInFirstMag = 0;
|
||||||
while {(!(_magsInWeapon isEqualTo [])) && {_ammoInFirstMag = _magsInWeapon deleteAt 0; (_ammoInFirstMag == 0)}} do {
|
while {(_magsInWeapon isNotEqualTo []) && {_ammoInFirstMag = _magsInWeapon deleteAt 0; (_ammoInFirstMag == 0)}} do {
|
||||||
TRACE_1("Removing empty mag",_ammoInFirstMag);
|
TRACE_1("Removing empty mag",_ammoInFirstMag);
|
||||||
_vehicle removeMagazineTurret [_vehMag, _turretPath];
|
_vehicle removeMagazineTurret [_vehMag, _turretPath];
|
||||||
};
|
};
|
||||||
|
@ -219,7 +219,7 @@ if (_holderIsEmpty) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//If we added a dummy item, remove it now
|
//If we added a dummy item, remove it now
|
||||||
if (_holderIsEmpty && {!((getItemCargo _holder) isEqualTo [[DUMMY_ITEM],[1]])}) exitWith {
|
if (_holderIsEmpty && {(getItemCargo _holder) isNotEqualTo [[DUMMY_ITEM],[1]]}) exitWith {
|
||||||
_holder setVariable [QGVAR(holderInUse), false];
|
_holder setVariable [QGVAR(holderInUse), false];
|
||||||
[_caller, _target, "Debug: Holder should only have dummy item"] call FUNC(eventTargetFinish);
|
[_caller, _target, "Debug: Holder should only have dummy item"] call FUNC(eventTargetFinish);
|
||||||
};
|
};
|
||||||
@ -237,7 +237,7 @@ if (_holderIsEmpty) then {
|
|||||||
_holder setVariable [QGVAR(holderInUse), false];
|
_holder setVariable [QGVAR(holderInUse), false];
|
||||||
[_caller, _target, "Debug: Target cannot be disarmed"] call FUNC(eventTargetFinish);
|
[_caller, _target, "Debug: Target cannot be disarmed"] call FUNC(eventTargetFinish);
|
||||||
};
|
};
|
||||||
if (_needToRemoveVest && {!((vestItems _target) isEqualTo [])}) exitWith {
|
if (_needToRemoveVest && {(vestItems _target) isNotEqualTo []}) exitWith {
|
||||||
_holder setVariable [QGVAR(holderInUse), false];
|
_holder setVariable [QGVAR(holderInUse), false];
|
||||||
[_caller, _target, "Debug: Vest Not Empty"] call FUNC(eventTargetFinish);
|
[_caller, _target, "Debug: Vest Not Empty"] call FUNC(eventTargetFinish);
|
||||||
};
|
};
|
||||||
@ -245,7 +245,7 @@ if (_holderIsEmpty) then {
|
|||||||
_holder addItemCargoGlobal [(vest _target), 1];
|
_holder addItemCargoGlobal [(vest _target), 1];
|
||||||
removeVest _target;
|
removeVest _target;
|
||||||
};
|
};
|
||||||
if (_needToRemoveUniform && {!((uniformItems _target) isEqualTo [])}) exitWith {
|
if (_needToRemoveUniform && {(uniformItems _target) isNotEqualTo []}) exitWith {
|
||||||
_holder setVariable [QGVAR(holderInUse), false];
|
_holder setVariable [QGVAR(holderInUse), false];
|
||||||
[_caller, _target, "Debug: Uniform Not Empty"] call FUNC(eventTargetFinish);
|
[_caller, _target, "Debug: Uniform Not Empty"] call FUNC(eventTargetFinish);
|
||||||
};
|
};
|
||||||
|
@ -75,7 +75,7 @@ GVAR(currentHeightChange) = 0;
|
|||||||
// prevent UAVs from firing
|
// prevent UAVs from firing
|
||||||
private _UAVCrew = _target call EFUNC(common,getVehicleUAVCrew);
|
private _UAVCrew = _target call EFUNC(common,getVehicleUAVCrew);
|
||||||
|
|
||||||
if !(_UAVCrew isEqualTo []) then {
|
if (_UAVCrew isNotEqualTo []) then {
|
||||||
{_target deleteVehicleCrew _x} count _UAVCrew;
|
{_target deleteVehicleCrew _x} count _UAVCrew;
|
||||||
_target setVariable [QGVAR(isUAV), true, true];
|
_target setVariable [QGVAR(isUAV), true, true];
|
||||||
};
|
};
|
||||||
|
@ -67,7 +67,7 @@ private _UAVCrew = _target call EFUNC(common,getVehicleUAVCrew);
|
|||||||
// fixes not being able to move when in combat pace
|
// fixes not being able to move when in combat pace
|
||||||
[_unit, "forceWalk", "ACE_dragging", true] call EFUNC(common,statusEffect_set);
|
[_unit, "forceWalk", "ACE_dragging", true] call EFUNC(common,statusEffect_set);
|
||||||
|
|
||||||
if !(_UAVCrew isEqualTo []) then {
|
if (_UAVCrew isNotEqualTo []) then {
|
||||||
{_target deleteVehicleCrew _x} count _UAVCrew;
|
{_target deleteVehicleCrew _x} count _UAVCrew;
|
||||||
_target setVariable [QGVAR(isUAV), true, true];
|
_target setVariable [QGVAR(isUAV), true, true];
|
||||||
};
|
};
|
||||||
|
@ -47,7 +47,7 @@ if (
|
|||||||
if (_playerPos distanceSqr _setPosition > 25) then {
|
if (_playerPos distanceSqr _setPosition > 25) then {
|
||||||
private _cfgAmmo = configFile >> "CfgAmmo";
|
private _cfgAmmo = configFile >> "CfgAmmo";
|
||||||
{
|
{
|
||||||
if (_x distanceSqr _player < 225 && {!(_x in _minesHelped)} && {!(getModelInfo _x select 0 isEqualTo "empty.p3d")}) then {
|
if (_x distanceSqr _player < 225 && {!(_x in _minesHelped)} && {getModelInfo _x select 0 isNotEqualTo "empty.p3d"}) then {
|
||||||
private _config = _cfgAmmo >> typeOf _x;
|
private _config = _cfgAmmo >> typeOf _x;
|
||||||
private _size = getNumber (_config >> QGVAR(size));
|
private _size = getNumber (_config >> QGVAR(size));
|
||||||
private _defuseClass = ["ACE_DefuseObject", "ACE_DefuseObject_Large"] select (_size == 1);
|
private _defuseClass = ["ACE_DefuseObject", "ACE_DefuseObject_Large"] select (_size == 1);
|
||||||
|
@ -80,7 +80,7 @@ GVAR(TweakedAngle) = 0;
|
|||||||
#ifdef DEBUG_MODE_FULL
|
#ifdef DEBUG_MODE_FULL
|
||||||
drawLine3d [(eyePos _unit) call EFUNC(common,ASLToPosition), (_testPos) call EFUNC(common,ASLToPosition), [1,0,0,1]];
|
drawLine3d [(eyePos _unit) call EFUNC(common,ASLToPosition), (_testPos) call EFUNC(common,ASLToPosition), [1,0,0,1]];
|
||||||
#endif
|
#endif
|
||||||
if !((lineIntersectsSurfaces [eyePos _unit, _testPos, _unit]) isEqualTo []) exitWith {_return = false;};
|
if ((lineIntersectsSurfaces [eyePos _unit, _testPos, _unit]) isNotEqualTo []) exitWith {_return = false;};
|
||||||
} forEach [[0,0], [-1,-1], [1,-1], [-1,1], [1,1]];
|
} forEach [[0,0], [-1,-1], [1,-1], [-1,1], [1,1]];
|
||||||
_return
|
_return
|
||||||
};
|
};
|
||||||
@ -95,7 +95,7 @@ GVAR(TweakedAngle) = 0;
|
|||||||
{
|
{
|
||||||
private _testPos = _testBase vectorAdd [0.1 * (_x select 0) * (cos _cameraAngle), 0.1 * (_x select 0) * (sin _cameraAngle), 0.1 * (_x select 1)];
|
private _testPos = _testBase vectorAdd [0.1 * (_x select 0) * (cos _cameraAngle), 0.1 * (_x select 0) * (sin _cameraAngle), 0.1 * (_x select 1)];
|
||||||
private _intersectObject = ((lineIntersectsSurfaces [eyePos _unit, _testPos, _unit]) param [0, objNull]) param [3, objNull];
|
private _intersectObject = ((lineIntersectsSurfaces [eyePos _unit, _testPos, _unit]) param [0, objNull]) param [3, objNull];
|
||||||
if !(_intersectObject isEqualTo objNull) exitWith {_attachVehicle = _intersectObject};
|
if (_intersectObject isNotEqualTo objNull) exitWith {_attachVehicle = _intersectObject};
|
||||||
} forEach [[0,0], [-1,-1], [1,-1], [-1,1], [1,1]];
|
} forEach [[0,0], [-1,-1], [1,-1], [-1,1], [1,1]];
|
||||||
if ((!isNull _attachVehicle) && {[PLACE_RANGE_MIN] call _testPositionIsValid} &&
|
if ((!isNull _attachVehicle) && {[PLACE_RANGE_MIN] call _testPositionIsValid} &&
|
||||||
{(_attachVehicle isKindOf "Car") || {_attachVehicle isKindOf "Tank"} || {_attachVehicle isKindOf "Air"} || {_attachVehicle isKindOf "Ship"}}) then {
|
{(_attachVehicle isKindOf "Car") || {_attachVehicle isKindOf "Tank"} || {_attachVehicle isKindOf "Air"} || {_attachVehicle isKindOf "Ship"}}) then {
|
||||||
|
@ -18,5 +18,5 @@ params ["_vehicle"];
|
|||||||
|
|
||||||
private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
|
private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
|
||||||
|
|
||||||
!(_deployedRopes isEqualTo []) &&
|
(_deployedRopes isNotEqualTo []) &&
|
||||||
{{(_x select 5)} count (_deployedRopes) == 0}
|
{{(_x select 5)} count (_deployedRopes) == 0}
|
||||||
|
@ -20,6 +20,6 @@ params ["_unit", "_vehicle"];
|
|||||||
private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
|
private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
|
||||||
|
|
||||||
((driver _vehicle != _unit) &&
|
((driver _vehicle != _unit) &&
|
||||||
{!(_deployedRopes isEqualTo [])} &&
|
{_deployedRopes isNotEqualTo []} &&
|
||||||
{{!(_x select 5) && !(_x select 6)} count (_deployedRopes) > 0} &&
|
{{!(_x select 5) && !(_x select 6)} count (_deployedRopes) > 0} &&
|
||||||
{getPos _vehicle select 2 > 2})
|
{getPos _vehicle select 2 > 2})
|
||||||
|
@ -25,7 +25,7 @@ private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
|
|||||||
private _attachedObjects = attachedObjects _dummy;
|
private _attachedObjects = attachedObjects _dummy;
|
||||||
//Rope is considered occupied when it's broken as well, so check if array is empty
|
//Rope is considered occupied when it's broken as well, so check if array is empty
|
||||||
//Note: ropes are not considered attached objects by Arma
|
//Note: ropes are not considered attached objects by Arma
|
||||||
if !(_attachedObjects isEqualTo []) then {
|
if (_attachedObjects isNotEqualTo []) then {
|
||||||
detach ((attachedObjects _dummy) select 0);
|
detach ((attachedObjects _dummy) select 0);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -75,7 +75,7 @@ DFUNC(deployAIRecursive) = {
|
|||||||
unassignVehicle _unit;
|
unassignVehicle _unit;
|
||||||
[_unit, _vehicle] call FUNC(fastRope);
|
[_unit, _vehicle] call FUNC(fastRope);
|
||||||
|
|
||||||
if !(_unitsToDeploy isEqualTo []) then {
|
if (_unitsToDeploy isNotEqualTo []) then {
|
||||||
[{
|
[{
|
||||||
[{
|
[{
|
||||||
params ["_vehicle"];
|
params ["_vehicle"];
|
||||||
|
@ -33,7 +33,7 @@ if (_vehicle distance2D _position > 50) then {
|
|||||||
|
|
||||||
// - Deployment ---------------------------------------------------------------
|
// - Deployment ---------------------------------------------------------------
|
||||||
[_vehicle] call FUNC(deployAI);
|
[_vehicle] call FUNC(deployAI);
|
||||||
waitUntil {!((_vehicle getVariable [QGVAR(deployedRopes), []]) isEqualTo [])};
|
waitUntil {(_vehicle getVariable [QGVAR(deployedRopes), []]) isNotEqualTo []};
|
||||||
waitUntil {(_vehicle getVariable [QGVAR(deployedRopes), []]) isEqualTo []};
|
waitUntil {(_vehicle getVariable [QGVAR(deployedRopes), []]) isEqualTo []};
|
||||||
_group setSpeedMode _speedMode;
|
_group setSpeedMode _speedMode;
|
||||||
|
|
||||||
|
@ -20,6 +20,6 @@ params ["_vehicle"];
|
|||||||
deleteVehicle (_vehicle getVariable [QGVAR(FRIES), objNull]);
|
deleteVehicle (_vehicle getVariable [QGVAR(FRIES), objNull]);
|
||||||
_vehicle setVariable [QGVAR(FRIES), nil, true];
|
_vehicle setVariable [QGVAR(FRIES), nil, true];
|
||||||
|
|
||||||
if !(_vehicle getVariable [QGVAR(deployedRopes), []] isEqualTo []) then {
|
if (_vehicle getVariable [QGVAR(deployedRopes), []] isNotEqualTo []) then {
|
||||||
[_vehicle] call FUNC(cutRopes);
|
[_vehicle] call FUNC(cutRopes);
|
||||||
};
|
};
|
||||||
|
@ -30,7 +30,7 @@ private _problemUIs = [];
|
|||||||
};
|
};
|
||||||
} forEach _weapons;
|
} forEach _weapons;
|
||||||
|
|
||||||
if (!(_weapons isEqualTo [])) then {
|
if (_weapons isNotEqualTo []) then {
|
||||||
private _fcsMsg = switch (true) do {
|
private _fcsMsg = switch (true) do {
|
||||||
// case ((!_vanillaFCS) && {!_aceFCS}): {"No FCS"};
|
// case ((!_vanillaFCS) && {!_aceFCS}): {"No FCS"};
|
||||||
// case ((_vanillaFCS) && {_aceFCS}): {"CONFLICT FCS"};
|
// case ((_vanillaFCS) && {_aceFCS}): {"CONFLICT FCS"};
|
||||||
|
@ -39,7 +39,7 @@ private _initSpeed = 0;
|
|||||||
private _zeroDistance = currentZeroing _gunner;
|
private _zeroDistance = currentZeroing _gunner;
|
||||||
if (_zeroDistance > 0) then {
|
if (_zeroDistance > 0) then {
|
||||||
private _weaponCombo = [_weapon, _magazine, _ammo, _zeroDistance];
|
private _weaponCombo = [_weapon, _magazine, _ammo, _zeroDistance];
|
||||||
if !(_weaponCombo isEqualTo (_gunner getVariable [QGVAR(lastWeaponCombo), []])) then {
|
if (_weaponCombo isNotEqualTo (_gunner getVariable [QGVAR(lastWeaponCombo), []])) then {
|
||||||
private _airFriction = getNumber (configFile >> "CfgAmmo" >> _ammo >> "airFriction");
|
private _airFriction = getNumber (configFile >> "CfgAmmo" >> _ammo >> "airFriction");
|
||||||
private _antiOffset = "ace_fcs" callExtension format ["%1,%2,%3,%4", _initSpeed, _airFriction, 0, _zeroDistance];
|
private _antiOffset = "ace_fcs" callExtension format ["%1,%2,%3,%4", _initSpeed, _airFriction, 0, _zeroDistance];
|
||||||
_antiOffset = parseNumber _antiOffset;
|
_antiOffset = parseNumber _antiOffset;
|
||||||
|
@ -32,7 +32,7 @@ GVAR(lastFPTime) = diag_tickTime;
|
|||||||
private _originASL = AGLtoASL positionCameraToWorld [0, 0, 0];
|
private _originASL = AGLtoASL positionCameraToWorld [0, 0, 0];
|
||||||
private _fingerPosASL = AGLtoASL positionCameraToWorld [0, 0, FP_DISTANCE];
|
private _fingerPosASL = AGLtoASL positionCameraToWorld [0, 0, FP_DISTANCE];
|
||||||
private _intersections = lineIntersectsSurfaces [_originASL, _fingerPosASL, ACE_player, vehicle ACE_player, true, 1];
|
private _intersections = lineIntersectsSurfaces [_originASL, _fingerPosASL, ACE_player, vehicle ACE_player, true, 1];
|
||||||
if !(_intersections isEqualTo []) then {
|
if (_intersections isNotEqualTo []) then {
|
||||||
_fingerPosASL = _intersections select 0 select 0;
|
_fingerPosASL = _intersections select 0 select 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
params ["_args", "_pfhID"];
|
params ["_args", "_pfhID"];
|
||||||
_args params ["_tracerObj", "_index"];
|
_args params ["_tracerObj", "_index"];
|
||||||
|
|
||||||
if (alive _tracerObj && {!(GVAR(traces) isEqualTo [])}) then {
|
if (alive _tracerObj && {GVAR(traces) isNotEqualTo []}) then {
|
||||||
private _data = GVAR(traces) select _index;
|
private _data = GVAR(traces) select _index;
|
||||||
private _positions = _data select 4;
|
private _positions = _data select 4;
|
||||||
_positions pushBack [getPos _tracerObj, vectorMagnitude (velocity _tracerObj)];
|
_positions pushBack [getPos _tracerObj, vectorMagnitude (velocity _tracerObj)];
|
||||||
|
@ -95,7 +95,7 @@ private _fragArcs = [];
|
|||||||
_fragArcs set [360, 0];
|
_fragArcs set [360, 0];
|
||||||
|
|
||||||
private _doRandom = true;
|
private _doRandom = true;
|
||||||
if (!(_objects isEqualTo [])) then {
|
if (_objects isNotEqualTo []) then {
|
||||||
if (GVAR(reflectionsEnabled)) then {
|
if (GVAR(reflectionsEnabled)) then {
|
||||||
[_lastPos, _shellType] call FUNC(doReflections);
|
[_lastPos, _shellType] call FUNC(doReflections);
|
||||||
};
|
};
|
||||||
|
@ -31,7 +31,7 @@ private _config = configFile >> "CfgAmmo" >> _ammo;
|
|||||||
if (local _unit) then {
|
if (local _unit) then {
|
||||||
// handle priming sound, if present
|
// handle priming sound, if present
|
||||||
private _soundConfig = getArray (configFile >> "CfgAmmo" >> _ammo >> QGVAR(pullPinSound));
|
private _soundConfig = getArray (configFile >> "CfgAmmo" >> _ammo >> QGVAR(pullPinSound));
|
||||||
if !(_soundConfig isEqualTo []) then {
|
if (_soundConfig isNotEqualTo []) then {
|
||||||
_soundConfig params ["_file", "_volume", "_pitch", "_distance"];
|
_soundConfig params ["_file", "_volume", "_pitch", "_distance"];
|
||||||
playSound3D [_file, objNull, false, getPosASL _projectile, _volume, _pitch, _distance];
|
playSound3D [_file, objNull, false, getPosASL _projectile, _volume, _pitch, _distance];
|
||||||
};
|
};
|
||||||
|
@ -16,11 +16,11 @@ PREP_RECOMPILE_END;
|
|||||||
private _newBackpack = backpackContainer _unit;
|
private _newBackpack = backpackContainer _unit;
|
||||||
private _oldBackpack = backpackContainer _corpse;
|
private _oldBackpack = backpackContainer _corpse;
|
||||||
|
|
||||||
if !(typeOf _newBackpack isEqualTo typeOf _oldBackpack) exitWith {};
|
if (typeOf _newBackpack isNotEqualTo typeOf _oldBackpack) exitWith {};
|
||||||
|
|
||||||
private _state = _oldBackpack getVariable [QGVAR(gunbagWeapon), []];
|
private _state = _oldBackpack getVariable [QGVAR(gunbagWeapon), []];
|
||||||
|
|
||||||
if !(_state isEqualTo []) then {
|
if (_state isNotEqualTo []) then {
|
||||||
_newBackpack setVariable [QGVAR(gunbagWeapon), _state, true];
|
_newBackpack setVariable [QGVAR(gunbagWeapon), _state, true];
|
||||||
};
|
};
|
||||||
}, _this] call CBA_fnc_execNextFrame;
|
}, _this] call CBA_fnc_execNextFrame;
|
||||||
|
@ -26,10 +26,10 @@ if ((_gunbag getVariable [QGVAR(gunbagWeapon), []]) isEqualTo [] && {_weapon !=
|
|||||||
_result = 0;
|
_result = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!((_gunbag getVariable [QGVAR(gunbagWeapon), []]) isEqualTo []) && {_weapon == ""}) then {
|
if ((_gunbag getVariable [QGVAR(gunbagWeapon), []] isNotEqualTo []) && {_weapon == ""}) then {
|
||||||
_result = 1;
|
_result = 1;
|
||||||
};
|
};
|
||||||
if (!((_gunbag getVariable [QGVAR(gunbagWeapon), []]) isEqualTo []) && {_weapon != ""}) then {
|
if ((_gunbag getVariable [QGVAR(gunbagWeapon), []] isNotEqualTo []) && {_weapon != ""}) then {
|
||||||
_result = 2;
|
_result = 2;
|
||||||
};
|
};
|
||||||
_result
|
_result
|
||||||
|
@ -24,7 +24,7 @@ if (ACE_player != _vehicle) then {
|
|||||||
private _turretPath = [ACE_player] call EFUNC(common,getTurretIndex);
|
private _turretPath = [ACE_player] call EFUNC(common,getTurretIndex);
|
||||||
private _effectType = getText (configOf _vehicle >> "attenuationEffectType");
|
private _effectType = getText (configOf _vehicle >> "attenuationEffectType");
|
||||||
|
|
||||||
if (!(_turretPath isEqualTo [])) then {
|
if (_turretPath isNotEqualTo []) then {
|
||||||
private _turretConfig = [(configOf _vehicle), _turretPath] call EFUNC(common,getTurretConfigPath);
|
private _turretConfig = [(configOf _vehicle), _turretPath] call EFUNC(common,getTurretConfigPath);
|
||||||
|
|
||||||
if ((getNumber (_turretConfig >> "disableSoundAttenuation")) == 1) then {
|
if ((getNumber (_turretConfig >> "disableSoundAttenuation")) == 1) then {
|
||||||
|
@ -56,7 +56,7 @@ switch (_attackStage) do {
|
|||||||
_returnTargetPos = _projectilePos getPos [100, getDir _projectile];
|
_returnTargetPos = _projectilePos getPos [100, getDir _projectile];
|
||||||
_returnTargetPos set [2, (_projectilePos select 2) + _cruiseHeight];
|
_returnTargetPos set [2, (_projectilePos select 2) + _cruiseHeight];
|
||||||
|
|
||||||
if (!(_seekerTargetPos isEqualTo [0,0,0])) then {
|
if (_seekerTargetPos isNotEqualTo [0,0,0]) then {
|
||||||
_attackProfileStateParams set [0, STAGE_ATTACK_CRUISE];
|
_attackProfileStateParams set [0, STAGE_ATTACK_CRUISE];
|
||||||
TRACE_1("New Stage: STAGE_ATTACK_CRUISE",_distanceFromLaunch2d);
|
TRACE_1("New Stage: STAGE_ATTACK_CRUISE",_distanceFromLaunch2d);
|
||||||
};
|
};
|
||||||
@ -67,7 +67,7 @@ switch (_attackStage) do {
|
|||||||
private _distToGoRatio = _distanceToTarget2d / (_launchPos distance2d _seekerTargetPos);
|
private _distToGoRatio = _distanceToTarget2d / (_launchPos distance2d _seekerTargetPos);
|
||||||
|
|
||||||
// arcing up at 7 degrees to start until 50% left, then smooth curve to a downward attack
|
// arcing up at 7 degrees to start until 50% left, then smooth curve to a downward attack
|
||||||
private _gainSlope = linearConversion [0.5, 0.1, _distToGoRatio, 7, -7, true];
|
private _gainSlope = linearConversion [0.5, 0.1, _distToGoRatio, 7, -7, true];
|
||||||
_returnTargetPos = +_seekerTargetPos;
|
_returnTargetPos = +_seekerTargetPos;
|
||||||
_returnTargetPos set [2, ((_projectilePos select 2) + (_distanceToTarget2d * sin _gainSlope)) max (_seekerTargetPos select 2)];
|
_returnTargetPos set [2, ((_projectilePos select 2) + (_distanceToTarget2d * sin _gainSlope)) max (_seekerTargetPos select 2)];
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ private _target = _object;
|
|||||||
private _player = ACE_player;
|
private _player = ACE_player;
|
||||||
|
|
||||||
// Check if the function should be modified first
|
// Check if the function should be modified first
|
||||||
if !((_origActionData select 10) isEqualTo {}) then {
|
if ((_origActionData select 10) isNotEqualTo {}) then {
|
||||||
// It should, so make a copy and pass it to the modifierFunction
|
// It should, so make a copy and pass it to the modifierFunction
|
||||||
_origActionData = +_origActionData;
|
_origActionData = +_origActionData;
|
||||||
[_target, ACE_player, _origActionData select 6, _origActionData] call (_origActionData select 10);
|
[_target, ACE_player, _origActionData select 6, _origActionData] call (_origActionData select 10);
|
||||||
@ -58,7 +58,7 @@ _fullPath pushBack _actionName;
|
|||||||
private _activeChildren = [];
|
private _activeChildren = [];
|
||||||
|
|
||||||
// If there's a statement to dynamically insert children then execute it
|
// If there's a statement to dynamically insert children then execute it
|
||||||
if !({} isEqualTo _insertChildrenCode) then {
|
if (_insertChildrenCode isNotEqualTo {}) then {
|
||||||
private _dynamicChildren = [_target, ACE_player, _customParams] call _insertChildrenCode;
|
private _dynamicChildren = [_target, ACE_player, _customParams] call _insertChildrenCode;
|
||||||
|
|
||||||
// Collect dynamic children class actions
|
// Collect dynamic children class actions
|
||||||
|
@ -24,7 +24,7 @@ if (count _shortPath > count _longPath) exitWith {false};
|
|||||||
|
|
||||||
//IGNORE_PRIVATE_WARNING ["_i"];
|
//IGNORE_PRIVATE_WARNING ["_i"];
|
||||||
for [{private _i = 0},{_i < count _shortPath},{_i = _i + 1}] do {
|
for [{private _i = 0},{_i < count _shortPath},{_i = _i + 1}] do {
|
||||||
if !((_longPath select _i) isEqualTo (_shortPath select _i)) exitWith {
|
if ((_longPath select _i) isNotEqualTo (_shortPath select _i)) exitWith {
|
||||||
_isSubPath = false;
|
_isSubPath = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -62,7 +62,7 @@ if (GVAR(openedMenuType) >= 0) then {
|
|||||||
GVAR(selectedAction) = _action select 1;
|
GVAR(selectedAction) = _action select 1;
|
||||||
GVAR(selectedTarget) = (GVAR(selectedAction)) select 2;
|
GVAR(selectedTarget) = (GVAR(selectedAction)) select 2;
|
||||||
|
|
||||||
private _misMatch = !(GVAR(lastPath) isEqualTo _hoverPath);
|
private _misMatch = (GVAR(lastPath) isNotEqualTo _hoverPath);
|
||||||
|
|
||||||
if(_misMatch && {diag_tickTime-GVAR(expandedTime) > linearConversion [0, 2, GVAR(menuAnimationSpeed), 0.25, 0.08333333]}) then {
|
if(_misMatch && {diag_tickTime-GVAR(expandedTime) > linearConversion [0, 2, GVAR(menuAnimationSpeed), 0.25, 0.08333333]}) then {
|
||||||
GVAR(startHoverTime) = diag_tickTime;
|
GVAR(startHoverTime) = diag_tickTime;
|
||||||
|
@ -36,7 +36,7 @@ private _menuInSelectedPath = true;
|
|||||||
if (_forEachIndex >= (count GVAR(menuDepthPath))) exitWith {
|
if (_forEachIndex >= (count GVAR(menuDepthPath))) exitWith {
|
||||||
_menuInSelectedPath = false;
|
_menuInSelectedPath = false;
|
||||||
};
|
};
|
||||||
if !(_x isEqualTo (GVAR(menuDepthPath) select _forEachIndex)) exitWith {
|
if (_x isNotEqualTo (GVAR(menuDepthPath) select _forEachIndex)) exitWith {
|
||||||
_menuInSelectedPath = false;
|
_menuInSelectedPath = false;
|
||||||
};
|
};
|
||||||
} forEach _path;
|
} forEach _path;
|
||||||
|
@ -3,7 +3,7 @@ class ACE_ZeusActions {
|
|||||||
class ZeusUnits {
|
class ZeusUnits {
|
||||||
displayName = "$STR_A3_RscDisplayCurator_ModeUnits_tooltip";
|
displayName = "$STR_A3_RscDisplayCurator_ModeUnits_tooltip";
|
||||||
icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeUnits_ca.paa";
|
icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeUnits_ca.paa";
|
||||||
condition = QUOTE(!([] isEqualTo (curatorSelected select 0)));
|
condition = QUOTE([] isNotEqualTo (curatorSelected select 0));
|
||||||
|
|
||||||
class stance {
|
class stance {
|
||||||
displayName = "$STR_A3_RscAttributeUnitPos_Title";
|
displayName = "$STR_A3_RscAttributeUnitPos_Title";
|
||||||
@ -49,7 +49,7 @@ class ACE_ZeusActions {
|
|||||||
class ZeusGroups {
|
class ZeusGroups {
|
||||||
displayName = "$STR_A3_RscDisplayCurator_ModeGroups_tooltip";
|
displayName = "$STR_A3_RscDisplayCurator_ModeGroups_tooltip";
|
||||||
icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeGroups_ca.paa";
|
icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeGroups_ca.paa";
|
||||||
condition = QUOTE(!([] isEqualTo (curatorSelected select 1)));
|
condition = QUOTE([] isNotEqualTo (curatorSelected select 1));
|
||||||
|
|
||||||
class behaviour {
|
class behaviour {
|
||||||
displayName = "$STR_Combat_Mode";
|
displayName = "$STR_Combat_Mode";
|
||||||
@ -157,7 +157,7 @@ class ACE_ZeusActions {
|
|||||||
class ZeusWaypoints {
|
class ZeusWaypoints {
|
||||||
displayName = "Waypoints";
|
displayName = "Waypoints";
|
||||||
icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeRecent_ca.paa";
|
icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeRecent_ca.paa";
|
||||||
condition = QUOTE(!([] isEqualTo (curatorSelected select 2)));
|
condition = QUOTE([] isNotEqualTo (curatorSelected select 2));
|
||||||
|
|
||||||
class behaviour {
|
class behaviour {
|
||||||
displayName = "$STR_Combat_Mode";
|
displayName = "$STR_Combat_Mode";
|
||||||
@ -265,6 +265,6 @@ class ACE_ZeusActions {
|
|||||||
class ZeusMarkers {
|
class ZeusMarkers {
|
||||||
displayName = "$STR_A3_RscDisplayCurator_ModeMarkers_tooltip";
|
displayName = "$STR_A3_RscDisplayCurator_ModeMarkers_tooltip";
|
||||||
icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeMarkers_ca.paa";
|
icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeMarkers_ca.paa";
|
||||||
condition = QUOTE(!([] isEqualTo (curatorSelected select 3)));
|
condition = QUOTE([] isNotEqualTo (curatorSelected select 3));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -34,7 +34,7 @@ if (
|
|||||||
|
|
||||||
((fullCrew [_vehicle, ""] select {_body == _x select 0}) select 0) params ["", "", "_cargoIndex", "_turretPath"];
|
((fullCrew [_vehicle, ""] select {_body == _x select 0}) select 0) params ["", "", "_cargoIndex", "_turretPath"];
|
||||||
|
|
||||||
private _locked = if (!(_turretPath isEqualTo [])) then {
|
private _locked = if (_turretPath isNotEqualTo []) then {
|
||||||
_vehicle lockedTurret _turretPath;
|
_vehicle lockedTurret _turretPath;
|
||||||
} else {
|
} else {
|
||||||
if (_cargoIndex > -1) then {
|
if (_cargoIndex > -1) then {
|
||||||
|
@ -37,7 +37,7 @@ TRACE_3("",_cargoIndex,_cargoNumber,_turretPath);
|
|||||||
private _preserveEngineOn = false;
|
private _preserveEngineOn = false;
|
||||||
|
|
||||||
// first get in to target seat
|
// first get in to target seat
|
||||||
if (!(_turretPath isEqualTo [])) then {
|
if (_turretPath isNotEqualTo []) then {
|
||||||
_unit action ["GetInTurret", _vehicle, _turretPath];
|
_unit action ["GetInTurret", _vehicle, _turretPath];
|
||||||
} else {
|
} else {
|
||||||
if (_cargoIndex > -1) then {
|
if (_cargoIndex > -1) then {
|
||||||
|
@ -38,7 +38,7 @@ if (!isNull _lastTarget) then {
|
|||||||
private _testPosASL = AGLtoASL (_lastTarget modelToWorld [_xOffset * - cos _relAngle, _xOffset * sin _relAngle, _yOffset]);
|
private _testPosASL = AGLtoASL (_lastTarget modelToWorld [_xOffset * - cos _relAngle, _xOffset * sin _relAngle, _yOffset]);
|
||||||
private _intersectionsToCursorTarget = lineIntersectsSurfaces [_viewASL, _testPosASL, ace_player, vehicle ace_player, true, 1];
|
private _intersectionsToCursorTarget = lineIntersectsSurfaces [_viewASL, _testPosASL, ace_player, vehicle ace_player, true, 1];
|
||||||
// drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [[0,1,1,1], [1,0,1,1]] select (count _intersectionsToCursorTarget), (ASLtoAGL _testPosASL), 0.25, 0.25, 0, "", 0.5, 0.025, "TahomaB"];
|
// drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [[0,1,1,1], [1,0,1,1]] select (count _intersectionsToCursorTarget), (ASLtoAGL _testPosASL), 0.25, 0.25, 0, "", 0.5, 0.025, "TahomaB"];
|
||||||
if (!(_intersectionsToCursorTarget isEqualTo [])) then {
|
if (_intersectionsToCursorTarget isNotEqualTo []) then {
|
||||||
(_intersectionsToCursorTarget select 0) params ["", "", "_intersectedObject"];
|
(_intersectionsToCursorTarget select 0) params ["", "", "_intersectedObject"];
|
||||||
if (_intersectedObject isKindOf "AllVehicles") then {
|
if (_intersectedObject isKindOf "AllVehicles") then {
|
||||||
_intersectedObject breakOut "main";
|
_intersectedObject breakOut "main";
|
||||||
@ -68,7 +68,7 @@ for "_xOffset" from -14 to 14 step 2 do {
|
|||||||
private _testPosASL = AGLtoASL (positionCameraToWorld [_xOffset, _yOffset, _maxRange]);
|
private _testPosASL = AGLtoASL (positionCameraToWorld [_xOffset, _yOffset, _maxRange]);
|
||||||
private _intersectionsToCursorTarget = lineIntersectsSurfaces [_viewASL, _testPosASL, ace_player, vehicle ace_player, true, 1];
|
private _intersectionsToCursorTarget = lineIntersectsSurfaces [_viewASL, _testPosASL, ace_player, vehicle ace_player, true, 1];
|
||||||
// drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [[0,1,0,1], [1,0,0,1]] select (count _intersectionsToCursorTarget), (ASLtoAGL _testPosASL), 0.25, 0.25, 0, "", 0.5, 0.025, "TahomaB"];
|
// drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [[0,1,0,1], [1,0,0,1]] select (count _intersectionsToCursorTarget), (ASLtoAGL _testPosASL), 0.25, 0.25, 0, "", 0.5, 0.025, "TahomaB"];
|
||||||
if (!(_intersectionsToCursorTarget isEqualTo [])) then {
|
if (_intersectionsToCursorTarget isNotEqualTo []) then {
|
||||||
(_intersectionsToCursorTarget select 0) params ["", "", "_intersectedObject"];
|
(_intersectionsToCursorTarget select 0) params ["", "", "_intersectedObject"];
|
||||||
if (_intersectedObject isKindOf "AllVehicles") then {
|
if (_intersectedObject isKindOf "AllVehicles") then {
|
||||||
_intersectedObject breakOut "main";
|
_intersectedObject breakOut "main";
|
||||||
|
@ -42,7 +42,7 @@ TRACE_1("params",_this);
|
|||||||
if ((alive ACE_player) && {_vehicle != ACE_player}) then {
|
if ((alive ACE_player) && {_vehicle != ACE_player}) then {
|
||||||
private _turretPath = if (ACE_player == (driver _vehicle)) then {[-1]} else {ACE_player call CBA_fnc_turretPath};
|
private _turretPath = if (ACE_player == (driver _vehicle)) then {[-1]} else {ACE_player call CBA_fnc_turretPath};
|
||||||
TRACE_1("",_turretPath);
|
TRACE_1("",_turretPath);
|
||||||
if (!(_turretPath isEqualTo [])) then {
|
if (_turretPath isNotEqualTo []) then {
|
||||||
private _currentWeapon = _vehicle currentWeaponTurret _turretPath;
|
private _currentWeapon = _vehicle currentWeaponTurret _turretPath;
|
||||||
TRACE_1("",_currentWeapon);
|
TRACE_1("",_currentWeapon);
|
||||||
if ((getNumber (configFile >> "CfgWeapons" >> _currentWeapon >> "laser")) == 1) then {
|
if ((getNumber (configFile >> "CfgWeapons" >> _currentWeapon >> "laser")) == 1) then {
|
||||||
|
@ -36,7 +36,7 @@ if (_intersects isEqualTo []) then {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!(_intersects isEqualTo [])) then {
|
if (_intersects isNotEqualTo []) then {
|
||||||
(_intersects select 0) params ["_intersectPosASL", "", "_intersectObject"];
|
(_intersects select 0) params ["_intersectPosASL", "", "_intersectObject"];
|
||||||
// Move back slightly to prevents issues with it going below terrain
|
// Move back slightly to prevents issues with it going below terrain
|
||||||
_distance = (_posASL vectorDistance _intersectPosASL) - 0.005;
|
_distance = (_posASL vectorDistance _intersectPosASL) - 0.005;
|
||||||
|
@ -47,7 +47,7 @@ GVAR(flashlights) = [] call CBA_fnc_createNamespace;
|
|||||||
private _unitLight = _player getVariable [QGVAR(flashlight), ["", objNull]];
|
private _unitLight = _player getVariable [QGVAR(flashlight), ["", objNull]];
|
||||||
_unitLight params ["_flashlight", "_glow"];
|
_unitLight params ["_flashlight", "_glow"];
|
||||||
if (_mapOn) then {
|
if (_mapOn) then {
|
||||||
if (!(_flashlight isEqualTo "") && {isNull _glow}) then {
|
if (_flashlight isNotEqualTo "" && {isNull _glow}) then {
|
||||||
[_player, _flashlight] call FUNC(flashlightGlow);
|
[_player, _flashlight] call FUNC(flashlightGlow);
|
||||||
if ([_player, _flashlight] call FUNC(needPlaySound)) then {playSound QGVAR(flashlightClick)};
|
if ([_player, _flashlight] call FUNC(needPlaySound)) then {playSound QGVAR(flashlightClick)};
|
||||||
};
|
};
|
||||||
|
@ -48,7 +48,7 @@ private _vehicle = vehicle _unit;
|
|||||||
// Do not obscure the map if the player is on a enclosed vehicle (assume internal illumination)
|
// Do not obscure the map if the player is on a enclosed vehicle (assume internal illumination)
|
||||||
if ((_vehicle != _unit) && {(!isTurnedOut _unit)} && GVAR(vehicleLightCondition) && {!((_unit call CBA_fnc_turretPath) in GVAR(vehicleExteriorTurrets))}) exitWith {
|
if ((_vehicle != _unit) && {(!isTurnedOut _unit)} && GVAR(vehicleLightCondition) && {!((_unit call CBA_fnc_turretPath) in GVAR(vehicleExteriorTurrets))}) exitWith {
|
||||||
TRACE_1("Player in a enclosed vehicle",GVAR(vehicleLightColor));
|
TRACE_1("Player in a enclosed vehicle",GVAR(vehicleLightColor));
|
||||||
[!(GVAR(vehicleLightColor) isEqualTo [1,1,1,0]), GVAR(vehicleLightColor)]
|
[GVAR(vehicleLightColor) isNotEqualTo [1,1,1,0], GVAR(vehicleLightColor)]
|
||||||
};
|
};
|
||||||
|
|
||||||
// Player is not in a vehicle
|
// Player is not in a vehicle
|
||||||
@ -64,7 +64,7 @@ TRACE_1("Player is on foot or in an open vehicle","");
|
|||||||
// Using chemlights
|
// Using chemlights
|
||||||
private _nearObjects = (_unit nearObjects ["Chemlight_base", 4]) select {alive _x};
|
private _nearObjects = (_unit nearObjects ["Chemlight_base", 4]) select {alive _x};
|
||||||
|
|
||||||
if !(_nearObjects isEqualTo []) then {
|
if (_nearObjects isNotEqualTo []) then {
|
||||||
private _nearestlight = _nearObjects select 0;
|
private _nearestlight = _nearObjects select 0;
|
||||||
private _lightLevelTemp = (1 - ((((_unit distance _nearestlight) - 2) / 2) max 0)) * 0.4;
|
private _lightLevelTemp = (1 - ((((_unit distance _nearestlight) - 2) / 2) max 0)) * 0.4;
|
||||||
if (_lightLevelTemp > _lightLevel) then {
|
if (_lightLevelTemp > _lightLevel) then {
|
||||||
|
@ -27,7 +27,7 @@ if (!isNull _glow) then {
|
|||||||
deleteVehicle _glow;
|
deleteVehicle _glow;
|
||||||
};
|
};
|
||||||
|
|
||||||
if !(_flashlightType isEqualTo "") then {
|
if (_flashlightType isNotEqualTo "") then {
|
||||||
private _color = getText (configFile >> "CfgWeapons" >> _flashlightType >> "ItemInfo" >> "FlashLight" >> "ACE_Flashlight_Colour");
|
private _color = getText (configFile >> "CfgWeapons" >> _flashlightType >> "ItemInfo" >> "FlashLight" >> "ACE_Flashlight_Colour");
|
||||||
if !(_color in ["white", "red", "green", "blue", "yellow", "orange"]) then {_color = "white"};
|
if !(_color in ["white", "red", "green", "blue", "yellow", "orange"]) then {_color = "white"};
|
||||||
private _class = format ["ACE_FlashlightProxy_%1", _color];
|
private _class = format ["ACE_FlashlightProxy_%1", _color];
|
||||||
|
@ -137,7 +137,7 @@ _theMap drawIcon ['iconStaticMG',[1,0,0,1],_posTopRight,24,24,getDir player,'1,1
|
|||||||
_theMap drawIcon ['iconStaticMG',[1,0,0,1],_posTopLeft,24,24,getDir player,'-1,1',1,0.03,'TahomaB','right'];
|
_theMap drawIcon ['iconStaticMG',[1,0,0,1],_posTopLeft,24,24,getDir player,'-1,1',1,0.03,'TahomaB','right'];
|
||||||
_theMap drawIcon ['iconStaticMG',[1,0,0,1],_posBottomLeft,24,24,getDir player,'-1,-1',1,0.03,'TahomaB','right'];
|
_theMap drawIcon ['iconStaticMG',[1,0,0,1],_posBottomLeft,24,24,getDir player,'-1,-1',1,0.03,'TahomaB','right'];
|
||||||
_theMap drawIcon ['iconStaticMG',[1,0,0,1],_posBottomRight,24,24,getDir player,'1,-1',1,0.03,'TahomaB','right'];
|
_theMap drawIcon ['iconStaticMG',[1,0,0,1],_posBottomRight,24,24,getDir player,'1,-1',1,0.03,'TahomaB','right'];
|
||||||
if !(GVAR(freeDrawingData) isEqualTo []) then {
|
if (GVAR(freeDrawingData) isNotEqualTo []) then {
|
||||||
_theMap drawIcon ['iconStaticMG',[0,0,1,1],GVAR(freeDrawingData) select 1,24,24,getDir player,'1,-1',1,0.03,'TahomaB','right'];
|
_theMap drawIcon ['iconStaticMG',[0,0,1,1],GVAR(freeDrawingData) select 1,24,24,getDir player,'1,-1',1,0.03,'TahomaB','right'];
|
||||||
_theMap drawIcon ['iconStaticMG',[0,0,1,1],GVAR(freeDrawingData) select 2,24,24,getDir player,'1,-1',1,0.03,'TahomaB','right'];
|
_theMap drawIcon ['iconStaticMG',[0,0,1,1],GVAR(freeDrawingData) select 2,24,24,getDir player,'1,-1',1,0.03,'TahomaB','right'];
|
||||||
};
|
};
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
//check if entity under mouse is a user marker
|
//check if entity under mouse is a user marker
|
||||||
if (_mouseOverType isEqualTo "marker") then {
|
if (_mouseOverType isEqualTo "marker") then {
|
||||||
if (!((_marker find "_USER_DEFINED") isEqualTo -1) && ((markerShape _marker) isEqualTo "ICON")) then {
|
if (((_marker find "_USER_DEFINED") isNotEqualTo -1) && ((markerShape _marker) isEqualTo "ICON")) then {
|
||||||
GVAR(editingMarker) = _marker;
|
GVAR(editingMarker) = _marker;
|
||||||
//hide marker which is being edited because if the user cancels editing, it will still exist unchanged
|
//hide marker which is being edited because if the user cancels editing, it will still exist unchanged
|
||||||
GVAR(editingMarker) setMarkerAlphaLocal 0;
|
GVAR(editingMarker) setMarkerAlphaLocal 0;
|
||||||
@ -71,7 +71,7 @@
|
|||||||
|
|
||||||
////////////////////
|
////////////////////
|
||||||
// Calculate center position of the marker placement ctrl
|
// Calculate center position of the marker placement ctrl
|
||||||
if !(GVAR(editingMarker) isEqualTo "") then {
|
if (GVAR(editingMarker) isNotEqualTo "") then {
|
||||||
//prevent changing the original marker position
|
//prevent changing the original marker position
|
||||||
GVAR(currentMarkerPosition) = markerPos GVAR(editingMarker);
|
GVAR(currentMarkerPosition) = markerPos GVAR(editingMarker);
|
||||||
} else {
|
} else {
|
||||||
@ -216,7 +216,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
private _selectChannel = if !(GVAR(editingMarker) isEqualTo "") then {
|
private _selectChannel = if (GVAR(editingMarker) isNotEqualTo "") then {
|
||||||
//get the channel where the marker was placed in
|
//get the channel where the marker was placed in
|
||||||
parseNumber ((GVAR(editingMarker) splitString "/") param [2, "3"])
|
parseNumber ((GVAR(editingMarker) splitString "/") param [2, "3"])
|
||||||
} else {
|
} else {
|
||||||
@ -310,7 +310,7 @@
|
|||||||
// init marker angle slider
|
// init marker angle slider
|
||||||
_aceAngleSlider sliderSetRange [-180, 180];
|
_aceAngleSlider sliderSetRange [-180, 180];
|
||||||
|
|
||||||
if !(GVAR(editingMarker) isEqualTo "") then {
|
if (GVAR(editingMarker) isNotEqualTo "") then {
|
||||||
//get the original direction
|
//get the original direction
|
||||||
GVAR(currentMarkerAngle) = markerDir GVAR(editingMarker);
|
GVAR(currentMarkerAngle) = markerDir GVAR(editingMarker);
|
||||||
};
|
};
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
params ["_ctrlMap", "_button", "_x", "_y", "_shift", "_ctrl", "_alt"];
|
params ["_ctrlMap", "_button", "_x", "_y", "_shift", "_ctrl", "_alt"];
|
||||||
|
|
||||||
if (_button != 0 || {!([_shift, _ctrl, _alt] isEqualTo [false, false, true])}) exitWith {};
|
if (_button != 0 || {[_shift, _ctrl, _alt] isNotEqualTo [false, false, true]}) exitWith {};
|
||||||
|
|
||||||
ctrlMapMouseOver _ctrlMap params [["_type", ""], "_marker"];
|
ctrlMapMouseOver _ctrlMap params [["_type", ""], "_marker"];
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
params ["_display", "_closeNum"];
|
params ["_display", "_closeNum"];
|
||||||
TRACE_2("params",_display,_closeNum);
|
TRACE_2("params",_display,_closeNum);
|
||||||
|
|
||||||
private _editingMarker = !(GVAR(editingMarker) isEqualTo "");
|
private _editingMarker = (GVAR(editingMarker) isNotEqualTo "");
|
||||||
|
|
||||||
if (_closeNum isEqualTo 1) then {
|
if (_closeNum isEqualTo 1) then {
|
||||||
if (_editingMarker) then {
|
if (_editingMarker) then {
|
||||||
@ -48,7 +48,7 @@ if (_closeNum isEqualTo 1) then {
|
|||||||
|
|
||||||
// provide hook for external scripts
|
// provide hook for external scripts
|
||||||
[QGVAR(markerPlaced),[_newestMarker, _editingMarker]] call CBA_fnc_localEvent;
|
[QGVAR(markerPlaced),[_newestMarker, _editingMarker]] call CBA_fnc_localEvent;
|
||||||
|
|
||||||
// Add to list of user placed markers, and then filter for deleted
|
// Add to list of user placed markers, and then filter for deleted
|
||||||
GVAR(userPlacedMarkers) pushBack _newestMarker;
|
GVAR(userPlacedMarkers) pushBack _newestMarker;
|
||||||
GVAR(userPlacedMarkers) = GVAR(userPlacedMarkers) select {!((getMarkerPos _x) isEqualTo [0,0,0])};
|
GVAR(userPlacedMarkers) = GVAR(userPlacedMarkers) select {!((getMarkerPos _x) isEqualTo [0,0,0])};
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
{
|
{
|
||||||
private _currentValue = missionNamespace getVariable [_x, "$"];
|
private _currentValue = missionNamespace getVariable [_x, "$"];
|
||||||
private _defaultValue = (cba_settings_default getVariable [_x, []]) param [0, "#"];
|
private _defaultValue = (cba_settings_default getVariable [_x, []]) param [0, "#"];
|
||||||
if !(_currentValue isEqualTo _defaultValue) then {
|
if (_currentValue isNotEqualTo _defaultValue) then {
|
||||||
diag_log text format ["%1: [Current %2] [Default: %3]", _x, _currentValue, _defaultValue];
|
diag_log text format ["%1: [Current %2] [Default: %3]", _x, _currentValue, _defaultValue];
|
||||||
};
|
};
|
||||||
} forEach _medicalSettings;
|
} forEach _medicalSettings;
|
||||||
|
@ -16,4 +16,4 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
private _healQueue = _this getVariable [QGVAR(healQueue), []];
|
private _healQueue = _this getVariable [QGVAR(healQueue), []];
|
||||||
!(_healQueue isEqualTo [])
|
(_healQueue isNotEqualTo [])
|
||||||
|
@ -38,7 +38,7 @@ private _classID = 0;
|
|||||||
private _causeLimping = GET_NUMBER(_entry >> "causeLimping",0) == 1;
|
private _causeLimping = GET_NUMBER(_entry >> "causeLimping",0) == 1;
|
||||||
private _causeFracture = GET_NUMBER(_entry >> "causeFracture",0) == 1;
|
private _causeFracture = GET_NUMBER(_entry >> "causeFracture",0) == 1;
|
||||||
|
|
||||||
if !(_causes isEqualTo []) then {
|
if (_causes isNotEqualTo []) then {
|
||||||
GVAR(woundClassNames) pushBack _className;
|
GVAR(woundClassNames) pushBack _className;
|
||||||
GVAR(woundsData) pushBack [_classID, _selections, _bleeding, _pain, [_minDamage, _maxDamage], _causes, _className, _causeLimping, _causeFracture];
|
GVAR(woundsData) pushBack [_classID, _selections, _bleeding, _pain, [_minDamage, _maxDamage], _causes, _className, _causeLimping, _causeFracture];
|
||||||
{
|
{
|
||||||
|
@ -18,4 +18,4 @@
|
|||||||
|
|
||||||
params ["", "_patient"];
|
params ["", "_patient"];
|
||||||
|
|
||||||
!(_patient call FUNC(getStitchableWounds) isEqualTo [])
|
(_patient call FUNC(getStitchableWounds) isNotEqualTo [])
|
||||||
|
@ -41,7 +41,7 @@ if (_maxDosage > 0) then {
|
|||||||
};
|
};
|
||||||
} forEach _incompatibleMedication;
|
} forEach _incompatibleMedication;
|
||||||
|
|
||||||
if !(_overdosedMedications isEqualTo []) then {
|
if (_overdosedMedications isNotEqualTo []) then {
|
||||||
private _medicationConfig = (configFile >> "ace_medical_treatment" >> "Medication");
|
private _medicationConfig = (configFile >> "ace_medical_treatment" >> "Medication");
|
||||||
private _onOverDose = getText (_medicationConfig >> "onOverDose");
|
private _onOverDose = getText (_medicationConfig >> "onOverDose");
|
||||||
if (isClass (_medicationConfig >> _className)) then {
|
if (isClass (_medicationConfig >> _className)) then {
|
||||||
|
@ -53,7 +53,7 @@ if (_hemorrhage != GET_HEMORRHAGE(_unit)) then {
|
|||||||
private _woundBloodLoss = GET_WOUND_BLEEDING(_unit);
|
private _woundBloodLoss = GET_WOUND_BLEEDING(_unit);
|
||||||
|
|
||||||
private _inPain = GET_PAIN_PERCEIVED(_unit) > 0;
|
private _inPain = GET_PAIN_PERCEIVED(_unit) > 0;
|
||||||
if !(_inPain isEqualTo IS_IN_PAIN(_unit)) then {
|
if (_inPain isNotEqualTo IS_IN_PAIN(_unit)) then {
|
||||||
_unit setVariable [VAR_IN_PAIN, _inPain, true];
|
_unit setVariable [VAR_IN_PAIN, _inPain, true];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ private _painSupressAdjustment = 0;
|
|||||||
private _peripheralResistanceAdjustment = 0;
|
private _peripheralResistanceAdjustment = 0;
|
||||||
private _adjustments = _unit getVariable [VAR_MEDICATIONS,[]];
|
private _adjustments = _unit getVariable [VAR_MEDICATIONS,[]];
|
||||||
|
|
||||||
if !(_adjustments isEqualTo []) then {
|
if (_adjustments isNotEqualTo []) then {
|
||||||
private _deleted = false;
|
private _deleted = false;
|
||||||
{
|
{
|
||||||
_x params ["_medication", "_timeAdded", "_timeTillMaxEffect", "_maxTimeInSystem", "_hrAdjust", "_painAdjust", "_flowAdjust"];
|
_x params ["_medication", "_timeAdded", "_timeTillMaxEffect", "_maxTimeInSystem", "_hrAdjust", "_painAdjust", "_flowAdjust"];
|
||||||
|
@ -70,7 +70,7 @@ case (APP_MODE_INFODISPLAY): {
|
|||||||
_aboveSeaLevelText = "----";
|
_aboveSeaLevelText = "----";
|
||||||
|
|
||||||
if (GVAR(currentWaypoint) == -2) then {
|
if (GVAR(currentWaypoint) == -2) then {
|
||||||
if (!(GVAR(rangeFinderPositionASL) isEqualTo [])) then {
|
if (GVAR(rangeFinderPositionASL) isNotEqualTo []) then {
|
||||||
private _targetPos = [GVAR(rangeFinderPositionASL)] call EFUNC(common,getMapGridFromPos);
|
private _targetPos = [GVAR(rangeFinderPositionASL)] call EFUNC(common,getMapGridFromPos);
|
||||||
_targetPosName = format ["[%1 %2 %3]", EGVAR(common,MGRS_data) select 1, _targetPos select 0, _targetPos select 1];
|
_targetPosName = format ["[%1 %2 %3]", EGVAR(common,MGRS_data) select 1, _targetPos select 0, _targetPos select 1];
|
||||||
_targetPosLocationASL = GVAR(rangeFinderPositionASL);
|
_targetPosLocationASL = GVAR(rangeFinderPositionASL);
|
||||||
@ -81,7 +81,7 @@ case (APP_MODE_INFODISPLAY): {
|
|||||||
_targetPosLocationASL = (_waypoints select GVAR(currentWaypoint)) select 1;
|
_targetPosLocationASL = (_waypoints select GVAR(currentWaypoint)) select 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!(_targetPosLocationASL isEqualTo [])) then {
|
if (_targetPosLocationASL isNotEqualTo []) then {
|
||||||
private _bearing = [(getPosASL ACE_player), _targetPosLocationASL] call BIS_fnc_dirTo;
|
private _bearing = [(getPosASL ACE_player), _targetPosLocationASL] call BIS_fnc_dirTo;
|
||||||
_bearingText = if (GVAR(settingUseMils)) then {
|
_bearingText = if (GVAR(settingUseMils)) then {
|
||||||
[(floor ((6400 / 360) * (_bearing))), 4, 0] call CBA_fnc_formatNumber;
|
[(floor ((6400 / 360) * (_bearing))), 4, 0] call CBA_fnc_formatNumber;
|
||||||
@ -123,7 +123,7 @@ case (APP_MODE_COMPASS): {
|
|||||||
private _targetPosLocationASL = [];
|
private _targetPosLocationASL = [];
|
||||||
|
|
||||||
if (GVAR(currentWaypoint) == -2) then {
|
if (GVAR(currentWaypoint) == -2) then {
|
||||||
if (!(GVAR(rangeFinderPositionASL) isEqualTo [])) then {
|
if (GVAR(rangeFinderPositionASL) isNotEqualTo []) then {
|
||||||
private _targetPos = [GVAR(rangeFinderPositionASL)] call EFUNC(common,getMapGridFromPos);
|
private _targetPos = [GVAR(rangeFinderPositionASL)] call EFUNC(common,getMapGridFromPos);
|
||||||
_targetPosName = format ["[%1 %2 %3]", EGVAR(common,MGRS_data) select 1, _targetPos select 0, _targetPos select 1];
|
_targetPosName = format ["[%1 %2 %3]", EGVAR(common,MGRS_data) select 1, _targetPos select 0, _targetPos select 1];
|
||||||
_targetPosLocationASL = GVAR(rangeFinderPositionASL);
|
_targetPosLocationASL = GVAR(rangeFinderPositionASL);
|
||||||
@ -137,7 +137,7 @@ case (APP_MODE_COMPASS): {
|
|||||||
_bearingText = "---";
|
_bearingText = "---";
|
||||||
_rangeText = "---";
|
_rangeText = "---";
|
||||||
|
|
||||||
if (!(_targetPosLocationASL isEqualTo [])) then {
|
if (_targetPosLocationASL isNotEqualTo []) then {
|
||||||
private _bearing = [(getPosASL ACE_player), _targetPosLocationASL] call BIS_fnc_dirTo;
|
private _bearing = [(getPosASL ACE_player), _targetPosLocationASL] call BIS_fnc_dirTo;
|
||||||
_bearingText = if (GVAR(settingUseMils)) then {
|
_bearingText = if (GVAR(settingUseMils)) then {
|
||||||
[(floor ((6400 / 360) * (_bearing))), 4, 0] call CBA_fnc_formatNumber;
|
[(floor ((6400 / 360) * (_bearing))), 4, 0] call CBA_fnc_formatNumber;
|
||||||
|
@ -17,4 +17,4 @@
|
|||||||
|
|
||||||
params ["_unit"];
|
params ["_unit"];
|
||||||
|
|
||||||
!(([currentWeapon _unit] call FUNC(getDetectorConfig)) isEqualTo []);
|
([currentWeapon _unit] call FUNC(getDetectorConfig)) isNotEqualTo [];
|
||||||
|
@ -41,7 +41,7 @@ if ((_distanceToProjectile > _seekerMaxRangeSqr) || { _wireCut }) exitWith {
|
|||||||
|
|
||||||
if (_seekerTargetPos isEqualTo [0, 0, 0] || { _distanceToProjectile < _seekerMinRangeSqr }) exitWith {
|
if (_seekerTargetPos isEqualTo [0, 0, 0] || { _distanceToProjectile < _seekerMinRangeSqr }) exitWith {
|
||||||
// cut wire if its caught on terrain
|
// cut wire if its caught on terrain
|
||||||
/*if !(lineIntersectsSurfaces [getPosASL _shooter, _projectilePos, _shooter] isEqualTo []) then {
|
/*if (lineIntersectsSurfaces [getPosASL _shooter, _projectilePos, _shooter] isNotEqualTo []) then {
|
||||||
_attackProfileStateParams set [1, true];
|
_attackProfileStateParams set [1, true];
|
||||||
};*/
|
};*/
|
||||||
// return position 50m infront of projectile
|
// return position 50m infront of projectile
|
||||||
|
@ -27,7 +27,7 @@ private _seekerFunction = getText (configFile >> QGVAR(SeekerTypes) >> _seekerTy
|
|||||||
private _seekerTargetPos = _this call (missionNamespace getVariable _seekerFunction);
|
private _seekerTargetPos = _this call (missionNamespace getVariable _seekerFunction);
|
||||||
|
|
||||||
if ((isNil "_seekerTargetPos") || {_seekerTargetPos isEqualTo [0,0,0]}) then { // A return of nil or [0,0,0] indicates the seeker has no target
|
if ((isNil "_seekerTargetPos") || {_seekerTargetPos isEqualTo [0,0,0]}) then { // A return of nil or [0,0,0] indicates the seeker has no target
|
||||||
if (_seekLastTargetPos && {!(_lastKnownPos isEqualTo [0,0,0])}) then { // if enabled for the ammo, use last known position if we have one stored
|
if (_seekLastTargetPos && {_lastKnownPos isNotEqualTo [0,0,0]}) then { // if enabled for the ammo, use last known position if we have one stored
|
||||||
TRACE_2("seeker returned bad pos - using last known",_seekLastTargetPos,_lastKnownPos);
|
TRACE_2("seeker returned bad pos - using last known",_seekLastTargetPos,_lastKnownPos);
|
||||||
_seekerTargetPos = _lastKnownPos;
|
_seekerTargetPos = _lastKnownPos;
|
||||||
#ifdef DRAW_GUIDANCE_INFO
|
#ifdef DRAW_GUIDANCE_INFO
|
||||||
|
@ -56,7 +56,7 @@ private _profileAdjustedTargetPos = [_seekerTargetPos, _args, _attackProfileStat
|
|||||||
|
|
||||||
// If we have no seeker target, then do not change anything
|
// If we have no seeker target, then do not change anything
|
||||||
// If there is no deflection on the missile, this cannot change and therefore is redundant. Avoid calculations for missiles without any deflection
|
// If there is no deflection on the missile, this cannot change and therefore is redundant. Avoid calculations for missiles without any deflection
|
||||||
if ((_minDeflection != 0 || {_maxDeflection != 0}) && {!(_profileAdjustedTargetPos isEqualTo [0,0,0])}) then {
|
if ((_minDeflection != 0 || {_maxDeflection != 0}) && {_profileAdjustedTargetPos isNotEqualTo [0,0,0]}) then {
|
||||||
|
|
||||||
private _targetVector = _projectilePos vectorFromTo _profileAdjustedTargetPos;
|
private _targetVector = _projectilePos vectorFromTo _profileAdjustedTargetPos;
|
||||||
private _adjustVector = _targetVector vectorDiff (vectorDir _projectile);
|
private _adjustVector = _targetVector vectorDiff (vectorDir _projectile);
|
||||||
|
@ -53,7 +53,7 @@ private _testDotProduct = (_lookDirection vectorDotProduct _testPointVector);
|
|||||||
|
|
||||||
private _testIntersections = lineIntersectsSurfaces [_shooterPos, _projPos, _shooter];
|
private _testIntersections = lineIntersectsSurfaces [_shooterPos, _projPos, _shooter];
|
||||||
|
|
||||||
if ((_testDotProduct < (cos _seekerAngle)) || { !(_testIntersections isEqualTo []) }) exitWith {
|
if ((_testDotProduct < (cos _seekerAngle)) || {_testIntersections isNotEqualTo []}) exitWith {
|
||||||
// out of LOS of seeker
|
// out of LOS of seeker
|
||||||
[0, 0, 0]
|
[0, 0, 0]
|
||||||
};
|
};
|
||||||
|
@ -56,7 +56,7 @@ if (isClass (configFile >> "CfgPatches" >> "acre_api")) then {
|
|||||||
[{
|
[{
|
||||||
private _oldSetting = ACE_player getVariable [QGVAR(isSpeakingInGame), false];
|
private _oldSetting = ACE_player getVariable [QGVAR(isSpeakingInGame), false];
|
||||||
private _newSetting = (!(isNull findDisplay 55));
|
private _newSetting = (!(isNull findDisplay 55));
|
||||||
if (!(_oldSetting isEqualTo _newSetting)) then {
|
if (_oldSetting isNotEqualTo _newSetting) then {
|
||||||
ACE_player setVariable [QGVAR(isSpeakingInGame), _newSetting, true];
|
ACE_player setVariable [QGVAR(isSpeakingInGame), _newSetting, true];
|
||||||
};
|
};
|
||||||
} , 0.1, []] call CBA_fnc_addPerFrameHandler;
|
} , 0.1, []] call CBA_fnc_addPerFrameHandler;
|
||||||
|
@ -113,7 +113,7 @@ if (_enabledTagsNearby) then {
|
|||||||
private _centerOffsetFactor = 1;
|
private _centerOffsetFactor = 1;
|
||||||
if (GVAR(showPlayerNames) == 5) then {
|
if (GVAR(showPlayerNames) == 5) then {
|
||||||
private _screenPos = worldToScreen (_target modelToWorld (_target selectionPosition "head"));
|
private _screenPos = worldToScreen (_target modelToWorld (_target selectionPosition "head"));
|
||||||
if !(_screenPos isEqualTo []) then {
|
if (_screenPos isNotEqualTo []) then {
|
||||||
// Distance from center / half of screen width
|
// Distance from center / half of screen width
|
||||||
_centerOffsetFactor = 1 - ((_screenPos distance2D [0.5, 0.5]) / (safezoneW / 3));
|
_centerOffsetFactor = 1 - ((_screenPos distance2D [0.5, 0.5]) / (safezoneW / 3));
|
||||||
} else {
|
} else {
|
||||||
|
@ -45,7 +45,7 @@ if (!GVAR(running)) then {
|
|||||||
// Scale Border / Hex
|
// Scale Border / Hex
|
||||||
BEGIN_COUNTER(borderScaling);
|
BEGIN_COUNTER(borderScaling);
|
||||||
private _scale = (call EFUNC(common,getZoom)) * 1.12513;
|
private _scale = (call EFUNC(common,getZoom)) * 1.12513;
|
||||||
if (!(GVAR(defaultPositionBorder) isEqualTo [])) then {
|
if (GVAR(defaultPositionBorder) isNotEqualTo []) then {
|
||||||
// Prevents issues when "zooming out" on ultra wide monitors - The square mask would be narrower than the screen
|
// Prevents issues when "zooming out" on ultra wide monitors - The square mask would be narrower than the screen
|
||||||
if ((GVAR(defaultPositionBorder) select 2) * _scale < safeZoneW) then {
|
if ((GVAR(defaultPositionBorder) select 2) * _scale < safeZoneW) then {
|
||||||
_scale = safeZoneW / (GVAR(defaultPositionBorder) select 2);
|
_scale = safeZoneW / (GVAR(defaultPositionBorder) select 2);
|
||||||
@ -57,7 +57,7 @@ if (!(GVAR(defaultPositionBorder) isEqualTo [])) then {
|
|||||||
};
|
};
|
||||||
END_COUNTER(borderScaling);
|
END_COUNTER(borderScaling);
|
||||||
|
|
||||||
if !(IS_MAGNIFIED isEqualTo GVAR(isUsingMagnification)) then {
|
if (IS_MAGNIFIED isNotEqualTo GVAR(isUsingMagnification)) then {
|
||||||
GVAR(isUsingMagnification) = IS_MAGNIFIED;
|
GVAR(isUsingMagnification) = IS_MAGNIFIED;
|
||||||
GVAR(nextEffectsUpdate) = -1;
|
GVAR(nextEffectsUpdate) = -1;
|
||||||
};
|
};
|
||||||
|
@ -24,7 +24,7 @@ _targetLaunchParams params ["", "", "_launchPos"];
|
|||||||
_firedEH params ["","","","","","","_projectile"];
|
_firedEH params ["","","","","","","_projectile"];
|
||||||
|
|
||||||
// Use seeker (if terminal)
|
// Use seeker (if terminal)
|
||||||
if (!(_seekerTargetPos isEqualTo [0,0,0])) exitWith {_seekerTargetPos};
|
if (_seekerTargetPos isNotEqualTo [0,0,0]) exitWith {_seekerTargetPos};
|
||||||
|
|
||||||
_attackProfileStateParams params ["_startTime", "_startLOS", "_yawChange", "_pitchChange"];
|
_attackProfileStateParams params ["_startTime", "_startLOS", "_yawChange", "_pitchChange"];
|
||||||
(_startLOS call CBA_fnc_vect2Polar) params ["", "_yaw", "_pitch"];
|
(_startLOS call CBA_fnc_vect2Polar) params ["", "_yaw", "_pitch"];
|
||||||
|
@ -54,7 +54,7 @@ if ((_projPos distance _launchPos) >= 20) then {
|
|||||||
|
|
||||||
// Limit scan to 5 meters directly down (shaped charge jet has a very limited range)
|
// Limit scan to 5 meters directly down (shaped charge jet has a very limited range)
|
||||||
private _res = lineIntersectsSurfaces [_virtualPos, (_virtualPos vectorAdd [0,0,-5]), _projectile];
|
private _res = lineIntersectsSurfaces [_virtualPos, (_virtualPos vectorAdd [0,0,-5]), _projectile];
|
||||||
if (!(_res isEqualTo [])) then {
|
if (_res isNotEqualTo []) then {
|
||||||
(_res select 0) params ["_targetPos", "", "_target"];
|
(_res select 0) params ["_targetPos", "", "_target"];
|
||||||
if ((_target isKindOf "Tank") || {_target isKindOf "Car"} || {_target isKindOf "Air"}) exitWith {
|
if ((_target isKindOf "Tank") || {_target isKindOf "Car"} || {_target isKindOf "Air"}) exitWith {
|
||||||
TRACE_3("Firing shaped charge down",_target,_targetPos distance _virtualPos,_frameDistance);
|
TRACE_3("Firing shaped charge down",_target,_targetPos distance _virtualPos,_frameDistance);
|
||||||
@ -74,7 +74,7 @@ if ((_projPos distance _launchPos) >= 20) then {
|
|||||||
_shapedCharage setVelocity [0,0,-300];
|
_shapedCharage setVelocity [0,0,-300];
|
||||||
|
|
||||||
_seekerStateParams set [1, true];
|
_seekerStateParams set [1, true];
|
||||||
|
|
||||||
END_COUNTER(targetScan);
|
END_COUNTER(targetScan);
|
||||||
breakOut "targetScan";
|
breakOut "targetScan";
|
||||||
};
|
};
|
||||||
|
@ -45,6 +45,6 @@ GVAR(enabled)
|
|||||||
// we have to cache subactions in args and reuse them in insertChildren code
|
// we have to cache subactions in args and reuse them in insertChildren code
|
||||||
private _subActions = _this call FUNC(addFreeSeatsActions);
|
private _subActions = _this call FUNC(addFreeSeatsActions);
|
||||||
_args set [0, _subActions];
|
_args set [0, _subActions];
|
||||||
!([] isEqualTo _subActions)
|
[] isNotEqualTo _subActions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,7 @@ if (!isNull _target &&
|
|||||||
// Seats can be locked independently of the main vehicle
|
// Seats can be locked independently of the main vehicle
|
||||||
if ((_role == "driver") && {lockedDriver _target}) exitWith {TRACE_1("lockedDriver",_x);};
|
if ((_role == "driver") && {lockedDriver _target}) exitWith {TRACE_1("lockedDriver",_x);};
|
||||||
if ((_cargoIndex >= 0) && {_target lockedCargo _cargoIndex}) exitWith {TRACE_1("lockedCargo",_x);};
|
if ((_cargoIndex >= 0) && {_target lockedCargo _cargoIndex}) exitWith {TRACE_1("lockedCargo",_x);};
|
||||||
if ((!(_turretPath isEqualTo [])) && {_target lockedTurret _turretPath}) exitWith {TRACE_1("lockedTurret",_x);};
|
if ((_turretPath isNotEqualTo []) && {_target lockedTurret _turretPath}) exitWith {TRACE_1("lockedTurret",_x);};
|
||||||
|
|
||||||
if (_effectiveRole == "turret") then {
|
if (_effectiveRole == "turret") then {
|
||||||
private _turretConfig = [_target, _turretPath] call CBA_fnc_getTurret;
|
private _turretConfig = [_target, _turretPath] call CBA_fnc_getTurret;
|
||||||
@ -95,7 +95,7 @@ if (!isNull _target &&
|
|||||||
TRACE_2("",_effectiveRole,_x);
|
TRACE_2("",_effectiveRole,_x);
|
||||||
if (_effectiveRole != _desiredRole) exitWith {};
|
if (_effectiveRole != _desiredRole) exitWith {};
|
||||||
|
|
||||||
if (!(_turretPath isEqualTo [])) then {
|
if (_turretPath isNotEqualTo []) then {
|
||||||
// Using GetInTurret seems to solve problems with incorrect GetInEH params when gunner/commander
|
// Using GetInTurret seems to solve problems with incorrect GetInEH params when gunner/commander
|
||||||
ACE_player action ["GetInTurret", _target, _turretPath];
|
ACE_player action ["GetInTurret", _target, _turretPath];
|
||||||
TRACE_3("Geting In Turret",_x,_role,_turretPath);
|
TRACE_3("Geting In Turret",_x,_role,_turretPath);
|
||||||
|
@ -49,7 +49,7 @@ if (GVAR(supply) == 2) then {
|
|||||||
private _magazineIdx = -1;
|
private _magazineIdx = -1;
|
||||||
{
|
{
|
||||||
_x params ["_magazine", "_rounds"];
|
_x params ["_magazine", "_rounds"];
|
||||||
if ((_magazine isEqualTo _magazineClass)) exitWith {
|
if (_magazine isEqualTo _magazineClass) exitWith {
|
||||||
_magazineIdx = _forEachIndex;
|
_magazineIdx = _forEachIndex;
|
||||||
};
|
};
|
||||||
} forEach _magazineSupply;
|
} forEach _magazineSupply;
|
||||||
|
@ -43,7 +43,7 @@ private _vehicleActions = [];
|
|||||||
|
|
||||||
TRACE_2("can add",_x,_magazineHelper);
|
TRACE_2("can add",_x,_magazineHelper);
|
||||||
|
|
||||||
if (!(_magazineHelper isEqualTo [])) then {
|
if (_magazineHelper isNotEqualTo []) then {
|
||||||
private _icon = getText(configOf _vehicle >> "Icon");
|
private _icon = getText(configOf _vehicle >> "Icon");
|
||||||
if !((_icon select [0, 1]) == "\") then {
|
if !((_icon select [0, 1]) == "\") then {
|
||||||
_icon = "";
|
_icon = "";
|
||||||
@ -92,7 +92,7 @@ private _vehicleActions = [];
|
|||||||
};
|
};
|
||||||
} forEach _vehicles;
|
} forEach _vehicles;
|
||||||
|
|
||||||
if (!(_cswCarryMagazines isEqualTo [])) then {
|
if (_cswCarryMagazines isNotEqualTo []) then {
|
||||||
_cswCarryMagazines = _cswCarryMagazines arrayIntersect _cswCarryMagazines;
|
_cswCarryMagazines = _cswCarryMagazines arrayIntersect _cswCarryMagazines;
|
||||||
_cswCarryMagazines = _cswCarryMagazines select {[_truck, _x] call FUNC(hasEnoughSupply)};
|
_cswCarryMagazines = _cswCarryMagazines select {[_truck, _x] call FUNC(hasEnoughSupply)};
|
||||||
private _baseAction = [QGVAR(cswTake), "CSW", "", {}, {true}] call EFUNC(interact_menu,createAction);
|
private _baseAction = [QGVAR(cswTake), "CSW", "", {}, {true}] call EFUNC(interact_menu,createAction);
|
||||||
|
@ -41,7 +41,7 @@ private _pylonConfigs = configProperties [configOf _vehicle >> "Components" >> "
|
|||||||
private _pylonMagazine = (getPylonMagazines _vehicle) select (_pylonIndex - 1);
|
private _pylonMagazine = (getPylonMagazines _vehicle) select (_pylonIndex - 1);
|
||||||
|
|
||||||
// Only care about pylons that have a magazine.
|
// Only care about pylons that have a magazine.
|
||||||
if (!(_pylonMagazine isEqualTo "")) then {
|
if (_pylonMagazine isNotEqualTo "") then {
|
||||||
|
|
||||||
private _maxRounds = getNumber (configFile >> "CfgMagazines" >> _pylonMagazine >> "count");
|
private _maxRounds = getNumber (configFile >> "CfgMagazines" >> _pylonMagazine >> "count");
|
||||||
private _currentRounds = _vehicle ammoOnPylon _pylonIndex;
|
private _currentRounds = _vehicle ammoOnPylon _pylonIndex;
|
||||||
|
@ -57,7 +57,7 @@ if (GVAR(supply) == 2) then {
|
|||||||
private _magazineIdx = -1;
|
private _magazineIdx = -1;
|
||||||
{
|
{
|
||||||
_x params ["_magazine"];
|
_x params ["_magazine"];
|
||||||
if ((_magazine isEqualTo _magazineClass)) exitWith {
|
if (_magazine isEqualTo _magazineClass) exitWith {
|
||||||
_magazineIdx = _forEachIndex;
|
_magazineIdx = _forEachIndex;
|
||||||
};
|
};
|
||||||
} forEach _magazineSupply;
|
} forEach _magazineSupply;
|
||||||
|
@ -77,7 +77,7 @@ if (!_magLoadedInWeapon) then {
|
|||||||
{
|
{
|
||||||
_x params ["_loopMagClass", "_loopAmmoCounts"];
|
_x params ["_loopMagClass", "_loopAmmoCounts"];
|
||||||
|
|
||||||
if (!(_loopMagClass isEqualTo _magazineClass)) then {
|
if (_loopMagClass isNotEqualTo _magazineClass) then {
|
||||||
{
|
{
|
||||||
_vehicle addMagazineTurret [_loopMagClass, _turretPath, _x];
|
_vehicle addMagazineTurret [_loopMagClass, _turretPath, _x];
|
||||||
} forEach _loopAmmoCounts;
|
} forEach _loopAmmoCounts;
|
||||||
|
@ -25,7 +25,7 @@ class Cfg3DEN {
|
|||||||
tooltip = CSTRING(hooks_edenDesc);
|
tooltip = CSTRING(hooks_edenDesc);
|
||||||
property = QGVAR(hooks);
|
property = QGVAR(hooks);
|
||||||
control = "EditXYZ";
|
control = "EditXYZ";
|
||||||
expression = QUOTE(if !(_value isEqualTo DEFAULT_HOOKS) then {_this setVariable [ARR_3('%s',[_value],true)]});
|
expression = QUOTE(if (_value isNotEqualTo DEFAULT_HOOKS) then {_this setVariable [ARR_3('%s',[_value],true)]});
|
||||||
defaultValue = QUOTE(DEFAULT_HOOKS);
|
defaultValue = QUOTE(DEFAULT_HOOKS);
|
||||||
condition = "(1-objectBrain)*(1-objectAgent)";
|
condition = "(1-objectBrain)*(1-objectAgent)";
|
||||||
};
|
};
|
||||||
|
@ -38,7 +38,7 @@ TRACE_2("start",_unit,_nozzle);
|
|||||||
alive _unit
|
alive _unit
|
||||||
&& {"" isEqualTo currentWeapon _unit || {_unit call EFUNC(common,isSwimming)}}
|
&& {"" isEqualTo currentWeapon _unit || {_unit call EFUNC(common,isSwimming)}}
|
||||||
&& {[_unit, objNull, [INTERACT_EXCEPTIONS, "notOnMap"]] call EFUNC(common,canInteractWith)}
|
&& {[_unit, objNull, [INTERACT_EXCEPTIONS, "notOnMap"]] call EFUNC(common,canInteractWith)}
|
||||||
&& {!("unconscious" isEqualTo toLower animationState _unit)}
|
&& {"unconscious" isNotEqualTo toLower animationState _unit}
|
||||||
&& {!(_unit getVariable ["ACE_isUnconscious", false])}
|
&& {!(_unit getVariable ["ACE_isUnconscious", false])}
|
||||||
) exitWith {
|
) exitWith {
|
||||||
TRACE_3("stop dead/weapon/interact/uncon",_unit,alive _unit,currentWeapon _unit);
|
TRACE_3("stop dead/weapon/interact/uncon",_unit,alive _unit,currentWeapon _unit);
|
||||||
@ -71,7 +71,7 @@ TRACE_2("start",_unit,_nozzle);
|
|||||||
END_PFH
|
END_PFH
|
||||||
};
|
};
|
||||||
|
|
||||||
if !(_unit == vehicle _unit && {_unit isEqualTo ACE_player}) exitWith {
|
if (_unit == vehicle _unit && {_unit isNotEqualTo ACE_player}) exitWith {
|
||||||
TRACE_2("stop vehicle/player",_unit,vehicle _unit);
|
TRACE_2("stop vehicle/player",_unit,vehicle _unit);
|
||||||
DROP_NOZZLE
|
DROP_NOZZLE
|
||||||
UNHOLSTER_WEAPON
|
UNHOLSTER_WEAPON
|
||||||
@ -107,7 +107,7 @@ TRACE_2("start",_unit,_nozzle);
|
|||||||
};
|
};
|
||||||
|
|
||||||
private _hint = [_hintLMB, _hintRMB];
|
private _hint = [_hintLMB, _hintRMB];
|
||||||
if !(_hint isEqualTo (_unit getVariable [QGVAR(hint), []])) then {
|
if (_hint isNotEqualTo (_unit getVariable [QGVAR(hint), []])) then {
|
||||||
_unit setVariable [QGVAR(hint), _hint];
|
_unit setVariable [QGVAR(hint), _hint];
|
||||||
_hint call EFUNC(interaction,showMouseHint);
|
_hint call EFUNC(interaction,showMouseHint);
|
||||||
};
|
};
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user