diff --git a/addons/common/functions/fnc_getMapData.sqf b/addons/common/functions/fnc_getMapData.sqf index 4771def8a2..7d7bef817f 100644 --- a/addons/common/functions/fnc_getMapData.sqf +++ b/addons/common/functions/fnc_getMapData.sqf @@ -23,6 +23,7 @@ if (_map in ["altis"]) exitWith { [40, 0] }; if (_map in ["stratis"]) exitWith { [40, 0] }; if (_map in ["abbottabad"]) exitWith { [34, 1256] }; //Abbottabad elevation 1256m (Wikipedia) +if (_map in ["abel"]) exitWith { [39, 0] }; //CWR2 Malden if (_map in ["abramia"]) exitWith { [60, 0] }; if (_map in ["af_kandahar_province"]) exitWith { [42, 0] }; if (_map in ["angel"]) exitWith { [38, 0] }; @@ -31,14 +32,18 @@ if (_map in ["australia"]) exitWith { [-25, 0] }; if (_map in ["bootcamp_acr"]) exitWith { [50, 0] }; if (_map in ["bornholm"]) exitWith { [55, 0] }; if (_map in ["bozcaada"]) exitWith { [40, 0] }; +if (_map in ["cain"]) exitWith { [40, 0] }; //CWR2 Kolgujev if (_map in ["caribou"]) exitWith { [68, 0] }; +if (_map in ["cartercity"]) exitWith { [43, 130] }; //Pecher, based on Grozny (1995 - 1996) elevation 130m (Wikipedia) if (_map in ["catalina"]) exitWith { [33, 0] }; if (_map in ["chernarus", "chernarus_summer", "chernarus_winter"]) exitWith { [50, 0] }; if (_map in ["chernobylzone", "chernobylzonea2"]) exitWith { [51, 0] }; if (_map in ["clafghan"]) exitWith { [34, 640] }; -if (_map in ["dakrong"]) exitWith { [17, 0] }; //Unsung Mod +if (_map in ["dakrong"]) exitWith { [16, 0] }; //Unsung Mod if (_map in ["desert_e"]) exitWith { [40, 800] }; +if (_map in ["desert_island"]) exitWith { [40, 0] }; //CWR2 Desert Island if (_map in ["dya"]) exitWith { [34, 110] }; //Diyala Iraq - default elevationOffset +if (_map in ["eden"]) exitWith { [45, 0] }; //CWR2 Everon if (_map in ["esseker"]) exitWith { [43, 2000] }; if (_map in ["evergreen"]) exitWith { [41, 0] }; //Burgazada, Turkey - default elevationOffset if (_map in ["fallujah"]) exitWith { [33, 0] }; @@ -53,16 +58,19 @@ if (_map in ["jacobi"]) exitWith { [34, 2000] }; //default elevationOffset if (_map in ["kapaulio"]) exitWith { [0, 0] }; if (_map in ["kerama"]) exitWith { [26, 0] }; //Kerama Islands, Japan - default elevationOffset if (_map in ["kholm"]) exitWith { [36, 0] }; +if (_map in ["kidal"]) exitWith { [18, 0] }; //Kidal, Mali - default elevationOffset if (_map in ["koplic"]) exitWith { [42, 0] }; if (_map in ["kunduz"]) exitWith { [37, 0] }; if (_map in ["lingor", "lingor3"]) exitWith { [-4, 0] }; if (_map in ["lost", "lostw"]) exitWith { [60, 0] }; -if (_map in ["mcn_aliabad"]) exitWith { [36, 0] }; if (_map in ["malvinas"]) exitWith { [-52, 0] }; -if (_map in ["namalsk"]) exitWith { [65, 0] }; +if (_map in ["mcn_aliabad"]) exitWith { [36, 0] }; if (_map in ["mef_alaska"]) exitWith { [60, 5] }; if (_map in ["mountains_acr"]) exitWith { [35, 2000] }; +if (_map in ["namalsk"]) exitWith { [65, 0] }; if (_map in ["napf", "napfwinter"]) exitWith { [47, 0] }; +if (_map in ["newyork_lumnuon"]) exitWith { [41, 5] }; //GovernerĀ“s Island, New York - default elevationOffset +if (_map in ["noe"]) exitWith { [45, 0] }; //CWR2 Nogova if (_map in ["panthera3"]) exitWith { [46, 0] }; if (_map in ["pianosa_aut"]) exitWith { [43, 0] }; //Pianosa, Italy - default elevationOffset if (_map in ["pja305"]) exitWith { [0, 0] }; //G.O.S N'Ziwasogo @@ -75,12 +83,13 @@ if (_map in ["porquerolles"]) exitWith { [43, 0] }; if (_map in ["porto"]) exitWith { [40, 0] }; if (_map in ["provinggrounds_pmc"]) exitWith { [35, 100] }; if (_map in ["reshmaan"]) exitWith { [35, 2000] }; +if (_map in ["rungsat"]) exitWith { [10, 0] }; //Unsung Mod if (_map in ["sara", "sara_dbe1"]) exitWith { [40, 0] }; if (_map in ["saralite"]) exitWith { [40, 0] }; if (_map in ["sb3"]) exitWith { [53, 25] }; //TrpUebPl Einfelde Nord (Munster North Training Area, Germany) - default elevationOffset -if (_map in ["shapur_baf"]) exitWith { [35, 100] }; if (_map in ["sfp_sturko"]) exitWith { [56, 0] }; if (_map in ["sfp_wamako"]) exitWith { [14, 0] }; +if (_map in ["shapur_baf"]) exitWith { [35, 100] }; if (_map in ["sugarlake"]) exitWith { [29, 0] }; if (_map in ["takistan"]) exitWith { [35, 2000] }; if (_map in ["thirsk"]) exitWith { [65, 0] }; diff --git a/addons/fcs/CfgWeapons.hpp b/addons/fcs/CfgWeapons.hpp index ec72bc6f44..760e39e2de 100644 --- a/addons/fcs/CfgWeapons.hpp +++ b/addons/fcs/CfgWeapons.hpp @@ -12,7 +12,7 @@ class CfgWeapons { }; class autocannon_35mm: CannonCore { canLock = 0; - ballisticsComputer = 0; + ballisticsComputer = 4; //was "4 + 2", 2 is for manual zeroing, 4 is for the lead indicator - https://community.bistudio.com/wiki/A3_Locking_Review#ballisticsComputer magazines[] += {"ACE_120Rnd_35mm_ABM_shells","ACE_120Rnd_35mm_ABM_shells_Tracer_Red","ACE_120Rnd_35mm_ABM_shells_Tracer_Green","ACE_120Rnd_35mm_ABM_shells_Tracer_Yellow"}; }; diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index 5339db893b..dcf84348a5 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -12,8 +12,8 @@ #define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD // MINIMAL required version for the Mod. Components can specify others.. -#define REQUIRED_VERSION 1.56 -#define REQUIRED_CBA_VERSION {2,4,0} +#define REQUIRED_VERSION 1.60 +#define REQUIRED_CBA_VERSION {2,4,1} #ifdef COMPONENT_BEAUTIFIED #define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED) diff --git a/addons/missileguidance/functions/fnc_seekerType_Optic.sqf b/addons/missileguidance/functions/fnc_seekerType_Optic.sqf index 8c9062fd49..c9b44b8a82 100644 --- a/addons/missileguidance/functions/fnc_seekerType_Optic.sqf +++ b/addons/missileguidance/functions/fnc_seekerType_Optic.sqf @@ -27,7 +27,7 @@ _angleOkay = [_projectile, _foundTargetPos, _angleFov] call FUNC(checkSeekerAngl _losOkay = false; if(_angleOkay) then { - _losOkay = [_projectile, _target] call FUNC(checkSeekerLos); //Note: Func does not exist? probably FUNC(checkLos)?? + _losOkay = [_projectile, _target] call FUNC(checkLos); }; TRACE_2("", _angleOkay, _losOkay); @@ -36,16 +36,17 @@ if(!_angleOkay || !_losOkay) then { _foundTargetPos = _sensorPos vectorAdd ((velocity _projectile) vectorMultiply 5); } else { TRACE_2("", _target, _foundTargetPos); - private["_projectileSpeed", "_distanceToTarget", "_eta", "_adjustVelocity"]; + private["_projectileSpeed", "_distanceToTarget", "_eta", "_adjustDistance"]; // @TODO: Configurable lead for seekers _projectileSpeed = (vectorMagnitude velocity _projectile); _distanceToTarget = (getPosASL _projectile) vectorDistance _foundTargetPos; _eta = _distanceToTarget / _projectileSpeed; - _adjustVelocity = (velocity _target) vectorMultiply _eta; - _foundTargetPos = _foundTargetPos vectorAdd _adjustVelocity; + _adjustDistance = (velocity _target) vectorMultiply _eta; + TRACE_3("leading target",_distanceToTarget,_eta,_adjustDistance); + _foundTargetPos = _foundTargetPos vectorAdd _adjustDistance; }; - +TRACE_2("return",_foundTargetPos,(aimPos _target) distance _foundTargetPos); _foundTargetPos; diff --git a/optionals/compat_r3f/CfgAmmo.hpp b/optionals/compat_r3f/CfgAmmo.hpp index 27865a0430..12db3179bf 100644 --- a/optionals/compat_r3f/CfgAmmo.hpp +++ b/optionals/compat_r3f/CfgAmmo.hpp @@ -47,7 +47,7 @@ class CfgAmmo { ACE_standardAtmosphere="ASM"; ACE_dragModel=1; ACE_muzzleVelocities[]={900}; - ACE_barrelLengths[]={736.6}; + ACE_barrelLengths[]={700}; }; class R3F_127x99_PEI: R3F_127x99_Ball { ACE_caliber=12.954; @@ -59,7 +59,7 @@ class CfgAmmo { ACE_standardAtmosphere="ASM"; ACE_dragModel=1; ACE_muzzleVelocities[]={900}; - ACE_barrelLengths[]={736.6}; + ACE_barrelLengths[]={700}; }; class R3F_127x99_Ball2: BulletBase { ACE_caliber=12.954; @@ -97,4 +97,4 @@ class CfgAmmo { ACE_muzzleVelocities[]={900}; ACE_barrelLengths[]={736.6}; }; -}; \ No newline at end of file +}; diff --git a/optionals/compat_r3f/config.cpp b/optionals/compat_r3f/config.cpp index f2254d5af1..f85ece396a 100644 --- a/optionals/compat_r3f/config.cpp +++ b/optionals/compat_r3f/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"R3F_Armes", "R3F_Acc"}; + requiredAddons[] = {"r3f_armes_c", "r3f_armes", "r3f_acc"}; author = ECSTRING(common,ACETeam); authors[] = {"Ruthberg"}; url = ECSTRING(main,URL); diff --git a/tools/cba/addons/main/script_macros_common.hpp b/tools/cba/addons/main/script_macros_common.hpp index fa24f29432..461e407256 100644 --- a/tools/cba/addons/main/script_macros_common.hpp +++ b/tools/cba/addons/main/script_macros_common.hpp @@ -632,6 +632,9 @@ Author: #define CFGSETTINGS CFGSETTINGSS(PREFIX,COMPONENT) #define PATHTO(var1) PATHTO_SYS(PREFIX,COMPONENT_F,var1) #define PATHTOF(var1) PATHTOF_SYS(PREFIX,COMPONENT,var1) +#define PATHTOEF(var1,var2) PATHTOF_SYS(PREFIX,var1,var2) +#define QPATHTOF(var1) QUOTE(PATHTOF(var1)) +#define QPATHTOEF(var1,var2) QUOTE(PATHTOEF(var1,var2)) #define COMPILE_FILE(var1) COMPILE_FILE_SYS(PREFIX,COMPONENT_F,var1) #define COMPILE_FILE_CFG(var1) COMPILE_FILE_CFG_SYS(PREFIX,COMPONENT_F,var1) @@ -674,6 +677,8 @@ Author: #define EGVAR(var1,var2) TRIPLES(PREFIX,var1,var2) #define QGVAR(var1) QUOTE(GVAR(var1)) #define QEGVAR(var1,var2) QUOTE(EGVAR(var1,var2)) +#define QQGVAR(var1) QUOTE(QGVAR(var1)) +#define QQEGVAR(var1,var2) QUOTE(QEGVAR(var1,var2)) /* ------------------------------------------- Macro: GVARMAIN() @@ -693,6 +698,7 @@ Author: ------------------------------------------- */ #define GVARMAIN(var1) GVARMAINS(PREFIX,var1) #define QGVARMAIN(var1) QUOTE(GVARMAIN(var1)) +#define QQGVARMAIN(var1) QUOTE(QGVARMAIN(var1)) // TODO: What's this? #define SETTINGS DOUBLES(PREFIX,settings) #define CREATELOGIC CREATELOGICS(PREFIX,COMPONENT) @@ -719,6 +725,14 @@ Author: #define FUNCMAIN(var1) TRIPLES(PREFIX,fnc,var1) #define FUNC_INNER(var1,var2) TRIPLES(DOUBLES(PREFIX,var1),fnc,var2) #define EFUNC(var1,var2) FUNC_INNER(var1,var2) +#define QFUNC(var1) QUOTE(FUNC(var1)) +#define QFUNCMAIN(var1) QUOTE(FUNCMAIN(var1)) +#define QFUNC_INNER(var1,var2) QUOTE(FUNC_INNER(var1,var2)) +#define QEFUNC(var1,var2) QUOTE(EFUNC(var1,var2)) +#define QQFUNC(var1) QUOTE(QFUNC(var1)) +#define QQFUNCMAIN(var1) QUOTE(QFUNCMAIN(var1)) +#define QQFUNC_INNER(var1,var2) QUOTE(QFUNC_INNER(var1,var2)) +#define QQEFUNC(var1,var2) QUOTE(QEFUNC(var1,var2)) #ifndef PRELOAD_ADDONS #define PRELOAD_ADDONS class CfgAddons \ @@ -1258,6 +1272,39 @@ Author: TEST_FAIL('(A OPERATOR B)') \ }; +/* ------------------------------------------- +Macro: TEST_DEFINED_AND_OP() + Tests that A and B are defined and (A OPERATOR B) is true. + If the test fails, an error is raised with the given MESSAGE. + +Parameters: + A - First value [Any] + OPERATOR - Binary operator to use [Operator] + B - Second value [Any] + MESSSAGE - Message to display [String] + +Example: + (begin example) + TEST_OP(_fish,>,5,"Too few fish!"); + (end) + +Author: + Killswitch, PabstMirror +------------------------------------------- */ +#define TEST_DEFINED_AND_OP(A,OPERATOR,B,MESSAGE) \ + if (isNil #A) then { \ + TEST_FAIL('(A is not defined) ' + (MESSAGE)); \ + } else { \ + if (isNil #B) then { \ + TEST_FAIL('(B is not defined) ' + (MESSAGE)); \ + } else { \ + if ((A) OPERATOR (B)) then { \ + TEST_SUCCESS('(A OPERATOR B) ' + (MESSAGE)) \ + } else { \ + TEST_FAIL('(A OPERATOR B) ' + (MESSAGE)) \ + }; }; }; + + /* ------------------------------------------- Macro: TEST_DEFINED() Tests that a VARIABLE is defined. @@ -1417,3 +1464,5 @@ Author: #define XEH_POST_INIT QUOTE(call COMPILE_FILE(XEH_PostInit_Once)) #define XEH_POST_CINIT QUOTE(call COMPILE_FILE(XEH_PostClientInit_Once)) #define XEH_POST_SINIT QUOTE(call COMPILE_FILE(XEH_PostServerInit_Once)) + +#define IS_LINUX (productVersion select 2 <= 154) diff --git a/tools/cba/addons/xeh/script_xeh.hpp b/tools/cba/addons/xeh/script_xeh.hpp index 82fb724c03..ef62f1df53 100644 --- a/tools/cba/addons/xeh/script_xeh.hpp +++ b/tools/cba/addons/xeh/script_xeh.hpp @@ -27,7 +27,9 @@ firedNear = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_fir fuel = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_cba_xeh_fuel"")"; \ gear = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_gear"")"; \ getIn = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_getIn"")"; \ +getInMan = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_getInMan"")"; \ getOut = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_getOut"")"; \ +getOutMan = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_getOutMan"")"; \ handleHeal = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_handleHeal"")"; \ hit = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_hit"")"; \ hitPart = "{_this call _x} forEach ((_this select 0 select 0) getVariable ""cba_xeh_hitPart"")"; \ @@ -42,11 +44,13 @@ respawn = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_respa put = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_put"")"; \ take = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_take"")"; \ seatSwitched = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_seatSwitched"")"; \ +seatSwitchedMan = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_seatSwitchedMan"")"; \ soundPlayed = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_soundPlayed"")"; \ weaponAssembled = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponAssembled"")"; \ weaponDisassembled = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponDisassembled"")"; \ weaponDeployed = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponDeployed"")"; \ -weaponRested = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponRested"")"; +weaponRested = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponRested"")"; \ +reloaded = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_reloaded"")"; /* @@ -73,7 +77,9 @@ firedNear = ""; \ fuel = ""; \ gear = ""; \ getIn = ""; \ +getInMan = ""; \ getOut = ""; \ +getOutMan = ""; \ handleHeal = ""; \ hit = ""; \ hitPart = ""; \ @@ -92,4 +98,5 @@ soundPlayed = ""; \ weaponAssembled = ""; \ weaponDisassembled = ""; \ weaponDeployed = ""; \ -weaponRested = ""; +weaponRested = ""; \ +reloaded = "";