From ce873ad50182e33c50c41bb46d35f45917ca64df Mon Sep 17 00:00:00 2001 From: Hexo <130893962+Alfred-Neuman@users.noreply.github.com> Date: Fri, 30 Aug 2024 18:16:22 +0200 Subject: [PATCH 01/95] Update French (#10274) --- addons/fieldmanual/stringtable.xml | 1 + addons/interaction/stringtable.xml | 5 +++++ addons/maverick/stringtable.xml | 7 +++++++ addons/missileguidance/stringtable.xml | 3 +++ addons/ui/stringtable.xml | 1 + 5 files changed, 17 insertions(+) diff --git a/addons/fieldmanual/stringtable.xml b/addons/fieldmanual/stringtable.xml index af748b91eb4..9cf2290de2d 100644 --- a/addons/fieldmanual/stringtable.xml +++ b/addons/fieldmanual/stringtable.xml @@ -169,6 +169,7 @@ %3IV 輸液%4は失われた血液を回復します。血液、血漿、生理食塩水は機能的には同じです。<br/><br/>%3使用方法:%4<br/>%2[%3%13%4] または [%3%14%4] を使って四肢を選択します。<br/>%2希望の%3IV 輸液%4の種類を選択して、血液量を復元します。 %%3Внутривенные жидкости%4восстанавливают потерянный объем крови. Кровь, плазма и физраствор функционально идентичны.<br/><br/>%3 Использование:%4<br/>%2 Используйте [%3%13%4] или [%3%14%4] и выберите добавку.<br/>%2 Восстановите объем крови выбрав желаемый %4тип %3жидкости Los %3Fluidos IV%4 restauran el volumen de sangre. Sangre, Plasma, y Salino funcionan de manera similar.<br/><br/>%3Uso:%4<br/>%2Uso [%3%13%4] o [%3%14%4] y seleccionar una extremidad.<br/>%2Restaura el volumen de sangre seleccionando el tipo de %3Fluido IV%4 elegido. + %3IV fluides%4 restaurer le volume sanguin perdu. Sang, Plasma, and Saline fonctionnent de la même manière.<br/><br/>%3Utilisation:%4<br/>%2Utiliser [%3%13%4] ou [%3%14%4] et sélectionner un appendice.<br/>%2Restaurer le volume sanguin en sélectionnant le volume désiré %3IV Fluide%4 type. Increase Heart Rate | Wake Up Faster diff --git a/addons/interaction/stringtable.xml b/addons/interaction/stringtable.xml index 89a263f651a..4fa6a8b36f2 100644 --- a/addons/interaction/stringtable.xml +++ b/addons/interaction/stringtable.xml @@ -584,9 +584,11 @@ Remote Squad Management + Gestion à distance de l'escouade Allow dropping and changing team colors of any unit in player's squad + Permettre d'abandonner et de changer les couleurs de n'importe quelle unité de l'escouade du joueur Squad @@ -1367,14 +1369,17 @@ Interact With Enemy Crew 敵乗員がいる状態でのインタラクト + Interagir avec l'équipage ennemi Limit some interactions on vehicles crewed by enemy factions. 敵性力の乗員が乗っている車両へのインタラクションを一部制限します。 + Limiter certaines interactions sur les véhicules dont l'équipage appartient à des factions ennemies. Allow for Static Weapons 固定火器への許可 + Autoriser les armes statiques diff --git a/addons/maverick/stringtable.xml b/addons/maverick/stringtable.xml index 60af8c830f8..394ba64f5d4 100644 --- a/addons/maverick/stringtable.xml +++ b/addons/maverick/stringtable.xml @@ -113,24 +113,31 @@ AGM-65 Maverick D + AGM-65 Maverick D AGM-65 Maverick G + AGM-65 Maverick G AGM-65 Maverick D [ACE] + AGM-65 Maverick D [ACE] 3x AGM-65 Maverick D [ACE] + 3x AGM-65 Maverick D [ACE] AGM-65 Maverick G [ACE] + AGM-65 Maverick G [ACE] 2x AGM-65 Maverick G [ACE] + 2x AGM-65 Maverick G [ACE] 3x AGM-65 Maverick G [ACE] + 3x AGM-65 Maverick G [ACE] diff --git a/addons/missileguidance/stringtable.xml b/addons/missileguidance/stringtable.xml index 0f224f2e04a..384caf332c9 100644 --- a/addons/missileguidance/stringtable.xml +++ b/addons/missileguidance/stringtable.xml @@ -207,12 +207,15 @@ 6x DAGR [ACE] + 6x DAGR [ACE] 12x DAGR [ACE] + 12x DAGR [ACE] 24x DAGR [ACE] + 24x DAGR [ACE] diff --git a/addons/ui/stringtable.xml b/addons/ui/stringtable.xml index b50bdd5340d..b1ffce9c1c1 100644 --- a/addons/ui/stringtable.xml +++ b/addons/ui/stringtable.xml @@ -725,6 +725,7 @@ Hide all UI 全てのUIを隠す + Cacher toute l'interface utilisateur. From b32b545fef55e222712c37a60990caa5fb9f55f0 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Fri, 30 Aug 2024 21:30:56 +0200 Subject: [PATCH 02/95] Mk6 Mortar - Improve and correct string table entries (#10278) Improve and correct string table entries for mortar --- addons/mk6mortar/stringtable.xml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/addons/mk6mortar/stringtable.xml b/addons/mk6mortar/stringtable.xml index c6f29a037d8..186cd926849 100644 --- a/addons/mk6mortar/stringtable.xml +++ b/addons/mk6mortar/stringtable.xml @@ -120,10 +120,10 @@ Hava Direnci - For Player Shots, Model Air Resistance and Wind Effects + Simulates air resistance and wind effects for player shots. Modeluj opór powietrza oraz wpływ wiatru na tor lotu pocisku dla strzałów z moździerza Mk6 przez graczy Para disparos del jugador, modelo de resistencia al aire y efectos de viento - Für Spielerschüsse, Luftwiderstand und Windeffekte + Simuliert Luftwiderstand und Windeffekte für Spielerschüsse. Pro hráčovu střelbu, Model odporu vzduchu a povětrných podmínek Para disparos do jogador, modelo de resistência de ar e efeitos de vento Pour les tirs des joueurs, simule la résistance de l'air et les effets du vent. @@ -233,19 +233,19 @@ Používat ruční manipulaci s municí - Removes mortar magazines, requiring individual rounds to be loaded by the gunner or loader. Does not affect AI mortars. - Enfernt das Magzin des Mörsers. Es ist nun erforderlich, die einzelnen Patronen manuell zu laden. Dies beeinflusst nicht die KI-Truppen. - Elimina los cargadores del mortero, requiriendo al artillero o cargador la carga manual de cada rondas. No afecta morteros controlados por IA. - Usuwa magazynki moździerza, wymagając ładowania pojedynczych pocisków przez strzelca lub ładowniczego. Nie dotyczy moździerzy AI. - Enlève les chargeurs de mortier, ce qui oblige le tireur ou le servant à charger les obus manuellement. N'affecte pas les mortiers IA. - Rimuove i caricatori di colpi dal mortaio. Un operatore dovrà caricare proiettili singoli prima di poter fare fuoco. Non viene applicato su operatori IA. - Elimina os carregadores do morteiro, requerendo que o atirador ou carregador utilize de forma individual a munição. Não afeta os morteiros controlados pela IA. - Удаляет артиллерийские магазины, требует загрузку отдельных снарядов стрелком или заряжающим. Не влияет на артиллерию ИИ. - 迫撃砲から弾倉を除去します。一発ずつ射手か装填手によって装填される必要があります。AIの迫撃砲には影響を与えません。 - 박격포 탄창을 제거합니다, 사수나 장전수가 개별적으로 탄환을 넣어줘야 합니다. 인공지능은 영향을 받지 않습니다. - 开启此功能时。迫击炮的弹药需由炮手与装填手共同合作来进行装填。此功能并不影响由 AI 射击的迫击炮 - 開啟此功能時。迫擊砲的彈藥需由砲手與裝填手共同合作來進行裝填。此功能並不影響由AI射擊的迫擊砲 - Odstraní z minometu zásobník a vynucuje nabíjení po každém výstřelu buď mířičem nebo nabíječem. Tato možnost neovlivňuje AI posádky. + Removes mortar magazines, requiring individual rounds to be loaded by the gunner or loader. + Enfernt das Magzin des Mörsers. Es ist nun erforderlich, die einzelnen Patronen manuell zu laden. + Elimina los cargadores del mortero, requiriendo al artillero o cargador la carga manual de cada rondas. + Usuwa magazynki moździerza, wymagając ładowania pojedynczych pocisków przez strzelca lub ładowniczego. + Enlève les chargeurs de mortier, ce qui oblige le tireur ou le servant à charger les obus manuellement. + Rimuove i caricatori di colpi dal mortaio. Un operatore dovrà caricare proiettili singoli prima di poter fare fuoco. + Elimina os carregadores do morteiro, requerendo que o atirador ou carregador utilize de forma individual a munição. + Удаляет артиллерийские магазины, требует загрузку отдельных снарядов стрелком или заряжающим. + 迫撃砲から弾倉を除去します。一発ずつ射手か装填手によって装填される必要があります。 + 박격포 탄창을 제거합니다, 사수나 장전수가 개별적으로 탄환을 넣어줘야 합니다. + 开启此功能时。迫击炮的弹药需由炮手与装填手共同合作来进行装填 + 開啟此功能時。迫擊砲的彈藥需由砲手與裝填手共同合作來進行裝填 + Odstraní z minometu zásobník a vynucuje nabíjení po každém výstřelu buď mířičem nebo nabíječem. Remove Round From f0ae2c5904a7fb77e141608807b7a0e6c488193c Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Fri, 30 Aug 2024 21:31:36 +0200 Subject: [PATCH 03/95] CSW - Handle turret locality safer (#10272) * Handle turret locality in CSW safer * Revert changes, to avoid merge conflicts * Update addons/csw/functions/fnc_proxyWeapon.sqf Co-authored-by: PabstMirror * Update fnc_proxyWeapon.sqf --------- Co-authored-by: PabstMirror --- addons/common/XEH_postInit.sqf | 1 + addons/csw/functions/fnc_proxyWeapon.sqf | 5 +++++ .../functions/fnc_staticWeaponInit_unloadExtraMags.sqf | 8 +++++--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 44197df81af..748d6fa41cc 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -215,6 +215,7 @@ if (isServer) then { [QGVAR(switchMove), {(_this select 0) switchMove (_this select 1)}] call CBA_fnc_addEventHandler; [QGVAR(setVectorDirAndUp), {(_this select 0) setVectorDirAndUp (_this select 1)}] call CBA_fnc_addEventHandler; [QGVAR(addWeaponItem), {(_this select 0) addWeaponItem [(_this select 1), (_this select 2)]}] call CBA_fnc_addEventHandler; +[QGVAR(addMagazineTurret), {(_this select 0) addMagazineTurret (_this select 1)}] call CBA_fnc_addEventHandler; [QGVAR(removeMagazinesTurret), {(_this select 0) removeMagazinesTurret [_this select 1, _this select 2]}] call CBA_fnc_addEventHandler; [QGVAR(triggerAmmo), {triggerAmmo _this}] call CBA_fnc_addEventHandler; diff --git a/addons/csw/functions/fnc_proxyWeapon.sqf b/addons/csw/functions/fnc_proxyWeapon.sqf index 42773dc7ecd..47897c43c22 100644 --- a/addons/csw/functions/fnc_proxyWeapon.sqf +++ b/addons/csw/functions/fnc_proxyWeapon.sqf @@ -21,6 +21,11 @@ params ["_vehicle", "_turret", "_needed", "_emptyWeapon"]; TRACE_4("proxyWeapon",_vehicle,_turret,_needed,_emptyWeapon); +// addWeaponTurret/removeWeaponTurret need to be executed where turret is local +if !(_vehicle turretLocal _turret) exitWith { + WARNING_2("[%1]'s turret [%2] isn't local, skipping proxy weapon change",_vehicle,_turret); +}; + if (_vehicle getVariable [format [QGVAR(proxyHandled_%1), _turret], false]) exitWith { TRACE_1("already handled",typeOf _vehicle); }; private _proxyWeapon = getText (configOf _vehicle >> QUOTE(ADDON) >> "proxyWeapon"); diff --git a/addons/csw/functions/fnc_staticWeaponInit_unloadExtraMags.sqf b/addons/csw/functions/fnc_staticWeaponInit_unloadExtraMags.sqf index 1c27a494d51..5b5210e2cfe 100644 --- a/addons/csw/functions/fnc_staticWeaponInit_unloadExtraMags.sqf +++ b/addons/csw/functions/fnc_staticWeaponInit_unloadExtraMags.sqf @@ -62,10 +62,12 @@ private _containerMagazineCount = []; TRACE_1("Remove all loaded magazines",_magsToRemove); { - _vehicle removeMagazinesTurret _x; + [QEGVAR(common,removeMagazinesTurret), [_vehicle, _x select 0, _x select 1], _vehicle, _x select 1] call CBA_fnc_turretEvent; + if ((_loadedMagazineInfo select [0,2]) isEqualTo _x) then { TRACE_1("Re-add the starting mag",_loadedMagazineInfo); - _vehicle addMagazineTurret _loadedMagazineInfo; + + [QEGVAR(common,addMagazineTurret), [_vehicle, _loadedMagazineInfo], _vehicle, _x select 1] call CBA_fnc_turretEvent; }; } forEach _magsToRemove; @@ -83,7 +85,7 @@ if (_secondaryWeaponMagazines isNotEqualTo []) then { // If the magazine can be added to the static weapon, do it now if (_vehicleMag in _compatibleMagazinesTurret) then { - _vehicle addMagazineTurret [_vehicleMag, _turret, _x select 1]; + [QEGVAR(common,addMagazineTurret), [_vehicle, [_vehicleMag, _turret, _x select 1]], _vehicle, _turret] call CBA_fnc_turretEvent; } else { // Find a suitable container to place items in if necessary if (isNull _container) then { From f1b07033859229bbfd42a3cd6d7051ea24a3f697 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Fri, 30 Aug 2024 21:32:17 +0200 Subject: [PATCH 04/95] Mk6 Mortar - Remove unnecessary restart notifications (#10277) Remove unnecessary restart notification --- addons/mk6mortar/initSettings.inc.sqf | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/addons/mk6mortar/initSettings.inc.sqf b/addons/mk6mortar/initSettings.inc.sqf index fc900295626..15047dee296 100644 --- a/addons/mk6mortar/initSettings.inc.sqf +++ b/addons/mk6mortar/initSettings.inc.sqf @@ -3,41 +3,41 @@ private _category = [format ["ACE %1", localize "str_a3_cfgmarkers_nato_art"], localize LSTRING(DisplayName)]; [ - QGVAR(airResistanceEnabled), "CHECKBOX", + QGVAR(airResistanceEnabled), + "CHECKBOX", [LSTRING(airResistanceEnabled_DisplayName), LSTRING(airResistanceEnabled_Description)], _category, false, // default value - true, // isGlobal + 1, // isGlobal {[QGVAR(airResistanceEnabled), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart ] call CBA_fnc_addSetting; [ - QGVAR(allowComputerRangefinder), "CHECKBOX", + QGVAR(allowComputerRangefinder), + "CHECKBOX", [LSTRING(allowComputerRangefinder_DisplayName), LSTRING(allowComputerRangefinder_Description)], _category, true, // default value - true, // isGlobal - {[QGVAR(allowComputerRangefinder), _this] call EFUNC(common,cbaSettings_settingChanged)}, - true // Needs mission restart + 1 // isGlobal ] call CBA_fnc_addSetting; [ - QGVAR(allowCompass), "CHECKBOX", + QGVAR(allowCompass), + "CHECKBOX", [LSTRING(allowCompass_DisplayName), LSTRING(allowCompass_Description)], _category, true, // default value - true, // isGlobal - {[QGVAR(allowCompass), _this] call EFUNC(common,cbaSettings_settingChanged)}, - true // Needs mission restart + 1 // isGlobal ] call CBA_fnc_addSetting; [ - QGVAR(useAmmoHandling), "CHECKBOX", + QGVAR(useAmmoHandling), + "CHECKBOX", [LSTRING(useAmmoHandling_DisplayName), LSTRING(useAmmoHandling_Description)], _category, false, // default value - true, // isGlobal + 1, // isGlobal {[QGVAR(useAmmoHandling), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart ] call CBA_fnc_addSetting; From c80d623d2d3b05d027b488931e2a9d1ad8a05e3f Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Fri, 30 Aug 2024 22:25:45 +0200 Subject: [PATCH 05/95] CSW - Improve "disableWeaponAssembly" status effect usage (#10273) Improve disableWeaponAssembly status effect usage in CSW --- .../functions/fnc_assemble_deployTripod.sqf | 5 +-- .../functions/fnc_assemble_deployWeapon.sqf | 6 +-- addons/csw/functions/fnc_initVehicle.sqf | 43 ++++++++++--------- .../fnc_staticWeaponInit_unloadExtraMags.sqf | 8 ++-- 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/addons/csw/functions/fnc_assemble_deployTripod.sqf b/addons/csw/functions/fnc_assemble_deployTripod.sqf index c69d618066e..e0a058a1af0 100644 --- a/addons/csw/functions/fnc_assemble_deployTripod.sqf +++ b/addons/csw/functions/fnc_assemble_deployTripod.sqf @@ -58,9 +58,8 @@ _cswTripod setVariable [QGVAR(secondaryWeaponMagazines), _secondaryWeaponMagazines, true]; }; - if (!GVAR(defaultAssemblyMode)) then { - [_cswTripod, "disableWeaponAssembly", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); - }; + // Disable vanilla assembly until FUNC(initVehicle) runs and sets the definite value + [_cswTripod, "disableWeaponAssembly", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); private _posATL = _player getRelPos [2, 0]; _posATL set [2, ((getPosATL _player) select 2) + 0.5]; diff --git a/addons/csw/functions/fnc_assemble_deployWeapon.sqf b/addons/csw/functions/fnc_assemble_deployWeapon.sqf index a0e0acdd282..22ad49aef29 100644 --- a/addons/csw/functions/fnc_assemble_deployWeapon.sqf +++ b/addons/csw/functions/fnc_assemble_deployWeapon.sqf @@ -76,9 +76,9 @@ _csw setVariable [QGVAR(secondaryWeaponMagazines), _secondaryWeaponMagazines, true]; }; - if (!GVAR(defaultAssemblyMode)) then { - [_csw, "disableWeaponAssembly", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); - }; + // Disable vanilla assembly until FUNC(initVehicle) runs and sets the definite value + [_csw, "disableWeaponAssembly", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); + _csw setDir _tripodDir; _csw setPosATL _tripodPos; if ((_tripodPos select 2) < 0.5) then { diff --git a/addons/csw/functions/fnc_initVehicle.sqf b/addons/csw/functions/fnc_initVehicle.sqf index 80ff071f107..bde31b41d06 100644 --- a/addons/csw/functions/fnc_initVehicle.sqf +++ b/addons/csw/functions/fnc_initVehicle.sqf @@ -34,30 +34,33 @@ if (_configEnabled && {GVAR(ammoHandling) == 2}) then { }; TRACE_2("",local _vehicle,_vehicle turretLocal [0]); -if (_configEnabled && {_vehicle turretLocal [0]}) then { // if turret is local to us, then handle mags/weapon - [{ - params ["_vehicle"]; - if (!alive _vehicle) exitWith { TRACE_1("dead/deleted",_vehicle); }; - // Assembly mode: [0=disabled, 1=enabled, 2=enabled&unload, 3=default] - private _assemblyModeIndex = _vehicle getVariable [QGVAR(assemblyMode), 3]; + +if (_vehicle turretLocal [0]) then { + // Assembly mode: [0=disabled, 1=enabled, 2=enabled&unload, 3=default] + private _assemblyModeIndex = _vehicle getVariable [QGVAR(assemblyMode), 3]; + private _assemblyMode = [false, true, true, GVAR(defaultAssemblyMode)] select _assemblyModeIndex; + + TRACE_2("turretLocal",_vehicle,_assemblyMode); + + // If turret is local, handle unloading mags and proxy weapons + if (_configEnabled) then { + TRACE_2("config enabled",_vehicle,_assemblyMode); + private _emptyWeapon = _assemblyModeIndex isEqualTo 2; - private _assemblyMode = [false, true, true, GVAR(defaultAssemblyMode)] select _assemblyModeIndex; - TRACE_2("turretLocal",_vehicle,_assemblyMode); + [_vehicle, [0], _assemblyMode, _emptyWeapon] call FUNC(proxyWeapon); - [_vehicle, _assemblyMode, _emptyWeapon] call FUNC(staticWeaponInit_unloadExtraMags); - }, [_vehicle]] call CBA_fnc_execNextFrame; // need to wait a frame to allow setting object vars during assembly -}; -if (_assemblyConfig) then { - [{ - params ["_vehicle"]; - if (!alive _vehicle) exitWith { TRACE_1("dead/deleted",_vehicle); }; - private _assemblyMode = [false, true, true, GVAR(defaultAssemblyMode)] select (_vehicle getVariable [QGVAR(assemblyMode), 3]); + if (!_assemblyMode) exitWith {}; + + [_vehicle, _emptyWeapon] call FUNC(staticWeaponInit_unloadExtraMags); + }; + + if (_assemblyConfig) then { TRACE_2("assemblyConfig present",_vehicle,_assemblyMode); - if (_assemblyMode) then { // Disable vanilla assembly if assemblyMode enabled - [_vehicle, "disableWeaponAssembly", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); - }; - }, [_vehicle]] call CBA_fnc_execNextFrame; // need to wait a frame to allow setting object vars during assembly + // Disable vanilla assembly if assemblyMode enabled + // Need to wait to allow setting object vars during assembly, but since this function runs 1 second after vehicle init, it can run immediately + [_vehicle, "disableWeaponAssembly", QUOTE(ADDON), _assemblyMode] call EFUNC(common,statusEffect_set); + }; }; // Add interactions for players diff --git a/addons/csw/functions/fnc_staticWeaponInit_unloadExtraMags.sqf b/addons/csw/functions/fnc_staticWeaponInit_unloadExtraMags.sqf index 5b5210e2cfe..975d5dbb9c2 100644 --- a/addons/csw/functions/fnc_staticWeaponInit_unloadExtraMags.sqf +++ b/addons/csw/functions/fnc_staticWeaponInit_unloadExtraMags.sqf @@ -5,8 +5,7 @@ * * Arguments: * 0: CSW - * 1: Using advanced assembly - * 2: Empty weapon + * 1: Empty weapon * * Return Value: * None @@ -17,9 +16,8 @@ * Public: No */ -params ["_vehicle", "_assemblyMode", "_emptyWeapon"]; -TRACE_3("staticWeaponInit_unloadExtraMags",_vehicle,_assemblyMode,_emptyWeapon); -if (!_assemblyMode) exitWith {}; +params ["_vehicle", "_emptyWeapon"]; +TRACE_2("staticWeaponInit_unloadExtraMags",_vehicle,_emptyWeapon); private _desiredAmmo = getNumber (configOf _vehicle >> QUOTE(ADDON) >> "desiredAmmo"); private _storeExtraMagazines = GVAR(handleExtraMagazines); From d2b463037681c1cd775d552a718120cd0ff827ae Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Sat, 31 Aug 2024 10:01:35 +0200 Subject: [PATCH 06/95] Overpressure - Minor cleanup (#10279) Cleanup --- addons/overpressure/functions/fnc_firedEHBB.sqf | 8 ++++---- addons/overpressure/functions/fnc_firedEHOP.sqf | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/overpressure/functions/fnc_firedEHBB.sqf b/addons/overpressure/functions/fnc_firedEHBB.sqf index 05a761bf068..98147fc7df3 100644 --- a/addons/overpressure/functions/fnc_firedEHBB.sqf +++ b/addons/overpressure/functions/fnc_firedEHBB.sqf @@ -15,8 +15,8 @@ * Public: No */ -//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; -TRACE_10("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_vehicle,_gunner,_turret); +//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"]; +TRACE_8("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_gunner); // Retrieve backblast values private _bbValues = [_weapon, _ammo, _magazine] call FUNC(getOverPressureValues); @@ -28,8 +28,8 @@ TRACE_4("cache",_backblastAngle,_backblastRange,_backblastDamage,_offset); if (_backblastDamage <= 0) exitWith {}; -private _direction = [0, 0, 0] vectorDiff (vectorDir _projectile); -private _position = ((getPosASL _projectile) vectorAdd (_direction vectorMultiply _offset)); +private _direction = (vectorDir _projectile) vectorMultiply -1; +private _position = (getPosASL _projectile) vectorAdd (_direction vectorMultiply _offset); // Damage to others private _affected = (ASLtoAGL _position) nearEntities ["CAManBase", _backblastRange]; diff --git a/addons/overpressure/functions/fnc_firedEHOP.sqf b/addons/overpressure/functions/fnc_firedEHOP.sqf index e011098b59e..b4b7763eae6 100644 --- a/addons/overpressure/functions/fnc_firedEHOP.sqf +++ b/addons/overpressure/functions/fnc_firedEHOP.sqf @@ -15,8 +15,8 @@ * Public: No */ -//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; -TRACE_10("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_vehicle,_gunner,_turret); +//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"]; +TRACE_8("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_gunner); // Retrieve overpressure values private _opValues = [_weapon, _ammo, _magazine] call FUNC(getOverPressureValues); From 337222aa40bcfcd9e1565018cf61ac6c59ae2fc8 Mon Sep 17 00:00:00 2001 From: V1nsyara Date: Sun, 1 Sep 2024 00:43:58 +0300 Subject: [PATCH 07/95] Translate - Improve Russian [31.08] (#10281) Update Russian --- addons/aircraft/stringtable.xml | 2 ++ addons/interaction/stringtable.xml | 5 +++++ addons/maverick/stringtable.xml | 7 +++++++ addons/missileguidance/stringtable.xml | 3 +++ addons/ui/stringtable.xml | 1 + addons/vehicle_damage/stringtable.xml | 1 + 6 files changed, 19 insertions(+) diff --git a/addons/aircraft/stringtable.xml b/addons/aircraft/stringtable.xml index bcec121106e..a3abe94a810 100644 --- a/addons/aircraft/stringtable.xml +++ b/addons/aircraft/stringtable.xml @@ -184,6 +184,7 @@ 따라가는 거리 Distance de suivi 追跡距離 + Расстояние отслеживания Following unit within %1m @@ -192,6 +193,7 @@ %1m 이내로 유닛을 따라갑니다 Suivre l'unité jusqu'à %1m %1m 間隔で 目標を追跡します + Отслеживание в пределах %1m diff --git a/addons/interaction/stringtable.xml b/addons/interaction/stringtable.xml index 4fa6a8b36f2..8dc3f006284 100644 --- a/addons/interaction/stringtable.xml +++ b/addons/interaction/stringtable.xml @@ -585,10 +585,12 @@ Remote Squad Management Gestion à distance de l'escouade + Дистанционное управление отрядом Allow dropping and changing team colors of any unit in player's squad Permettre d'abandonner et de changer les couleurs de n'importe quelle unité de l'escouade du joueur + Позволяет сбрасывать и менять командные цвета любого подразделения в отряде игрока Squad @@ -1370,16 +1372,19 @@ Interact With Enemy Crew 敵乗員がいる状態でのインタラクト Interagir avec l'équipage ennemi + Взаимодействие с вражеским экипажем Limit some interactions on vehicles crewed by enemy factions. 敵性力の乗員が乗っている車両へのインタラクションを一部制限します。 Limiter certaines interactions sur les véhicules dont l'équipage appartient à des factions ennemies. + Ограничьте некоторые взаимодействия на транспортных средствах, управляемых вражеской стороной. Allow for Static Weapons 固定火器への許可 Autoriser les armes statiques + Разрешить использование статического оружия diff --git a/addons/maverick/stringtable.xml b/addons/maverick/stringtable.xml index 394ba64f5d4..591111f9a85 100644 --- a/addons/maverick/stringtable.xml +++ b/addons/maverick/stringtable.xml @@ -114,30 +114,37 @@ AGM-65 Maverick D AGM-65 Maverick D + AGM-65 Maverick D AGM-65 Maverick G AGM-65 Maverick G + AGM-65 Maverick G AGM-65 Maverick D [ACE] AGM-65 Maverick D [ACE] + AGM-65 Maverick D [ACE] 3x AGM-65 Maverick D [ACE] 3x AGM-65 Maverick D [ACE] + 3x AGM-65 Maverick D [ACE] AGM-65 Maverick G [ACE] AGM-65 Maverick G [ACE] + AGM-65 Maverick G [ACE] 2x AGM-65 Maverick G [ACE] 2x AGM-65 Maverick G [ACE] + 2x AGM-65 Maverick G [ACE] 3x AGM-65 Maverick G [ACE] 3x AGM-65 Maverick G [ACE] + 3x AGM-65 Maverick G [ACE] diff --git a/addons/missileguidance/stringtable.xml b/addons/missileguidance/stringtable.xml index 384caf332c9..ecc119988de 100644 --- a/addons/missileguidance/stringtable.xml +++ b/addons/missileguidance/stringtable.xml @@ -208,14 +208,17 @@ 6x DAGR [ACE] 6x DAGR [ACE] + 6x DAGR [ACE] 12x DAGR [ACE] 12x DAGR [ACE] + 12x DAGR [ACE] 24x DAGR [ACE] 24x DAGR [ACE] + 24x DAGR [ACE] diff --git a/addons/ui/stringtable.xml b/addons/ui/stringtable.xml index b1ffce9c1c1..f0a0768b367 100644 --- a/addons/ui/stringtable.xml +++ b/addons/ui/stringtable.xml @@ -726,6 +726,7 @@ Hide all UI 全てのUIを隠す Cacher toute l'interface utilisateur. + Скрыть весь интерфейс diff --git a/addons/vehicle_damage/stringtable.xml b/addons/vehicle_damage/stringtable.xml index 7053cc6d3c2..3bb2872e0e7 100644 --- a/addons/vehicle_damage/stringtable.xml +++ b/addons/vehicle_damage/stringtable.xml @@ -34,6 +34,7 @@ Habilitar daño avanzado de coche Habilitar dano avançado para carros 高度な車ダメージを有効化 + Включить продвинутое повреждение автомобиля Enable advanced car damage (Experimental) From eb57fa49c404e662abcd18c7e52c1f7c4b67a9b0 Mon Sep 17 00:00:00 2001 From: BrettMayson Date: Mon, 2 Sep 2024 17:50:15 -0600 Subject: [PATCH 08/95] HEMTT - Update for 1.13 (#10283) * hemtt: update for 1.13 * spe might as well match the others * fix ignore --- .hemtt/launch.toml | 31 +++++++++++++++++++++++++++++++ .hemtt/lints.toml | 5 +++++ .hemtt/project.toml | 32 -------------------------------- 3 files changed, 36 insertions(+), 32 deletions(-) create mode 100644 .hemtt/launch.toml create mode 100644 .hemtt/lints.toml diff --git a/.hemtt/launch.toml b/.hemtt/launch.toml new file mode 100644 index 00000000000..d0726cbdded --- /dev/null +++ b/.hemtt/launch.toml @@ -0,0 +1,31 @@ +[default] +workshop = [ + "450814997", # CBA_A3 +] + +[spe] +extends = "default" +dlc = [ + "Spearhead 1944" +] + +[vn] +extends = "default" +dlc = [ + "S.O.G. Prairie Fire", +] + +[ws] +extends = "default" +dlc = [ + "Western Sahara", +] + +[rhs] +extends = "default" +workshop = [ + "843425103", # RHS AFRF Workshop ID + "843577117", # RHS USAF Workshop ID + "843593391", # RHS GREF Workshop ID + "843632231", # RHS SAF Workshop ID +] diff --git a/.hemtt/lints.toml b/.hemtt/lints.toml new file mode 100644 index 00000000000..eac28147c00 --- /dev/null +++ b/.hemtt/lints.toml @@ -0,0 +1,5 @@ +[sqf.banned_commands] +options.ignore = [ + "addPublicVariableEventHandler", # Alt syntax is broken, we are using main syntax + "createSoundSource", # Greatly attenuated when in first person and in a vehicle +] diff --git a/.hemtt/project.toml b/.hemtt/project.toml index a9535dd2baa..6ab1c3a1afc 100644 --- a/.hemtt/project.toml +++ b/.hemtt/project.toml @@ -27,35 +27,3 @@ exclude = [ "common/functions/fnc_dummy.sqf", "zeus/functions/fnc_zeusAttributes.sqf", ] - -[hemtt.launch.default] -workshop = [ - "450814997", # CBA_A3 -] - -[hemtt.launch.spe] -extends = "default" -dlc = [ - "spe" -] - -[hemtt.launch.vn] -extends = "default" -dlc = [ - "S.O.G. Prairie Fire", -] - -[hemtt.launch.ws] -extends = "default" -dlc = [ - "Western Sahara", -] - -[hemtt.launch.rhs] -extends = "default" -workshop = [ - "843425103", # RHS AFRF Workshop ID - "843577117", # RHS USAF Workshop ID - "843593391", # RHS GREF Workshop ID - "843632231", # RHS SAF Workshop ID -] From f090c7112627ae0d8aaaa18244dc34590d9c2175 Mon Sep 17 00:00:00 2001 From: BrettMayson Date: Tue, 3 Sep 2024 10:52:33 -0600 Subject: [PATCH 09/95] General - Fix Command Case (#10286) * run 'hemtt utils sqf case' * fix config as well * fix event casing * Update addons/towing/functions/fnc_attachRopePFH.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/rearm/functions/fnc_takeSuccess.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/rearm/functions/fnc_grabAmmo.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/medical_treatment/initSettings.inc.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/captives/functions/fnc_setSurrendered.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/captives/functions/fnc_handleZeusDisplayChanged.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/captives/functions/fnc_handlePlayerChanged.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/captives/functions/fnc_handlePlayerChanged.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/arsenal/functions/fnc_onArsenalOpen.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/arsenal/functions/fnc_onArsenalClose.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/spectator/functions/fnc_ui.sqf * Update addons/ui/XEH_clientInit.sqf * Update addons/ui/functions/fnc_setElements.sqf * Update addons/fcs/functions/fnc_getAngle.sqf * Update addons/fcs/functions/fnc_getAngle.sqf * Update addons/fcs/functions/fnc_getAngle.sqf * Update addons/captives/functions/fnc_handleZeusDisplayChanged.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/captives/functions/fnc_setHandcuffed.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/captives/functions/fnc_setHandcuffed.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/captives/functions/fnc_setSurrendered.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/common/functions/fnc_displayTextStructured.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/medical_treatment/initSettings.inc.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/medical_treatment/initSettings.inc.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/medical_treatment/initSettings.inc.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> --------- Co-authored-by: PabstMirror Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> --- .../functions/fnc_displayProtractor.sqf | 2 +- addons/advanced_fatigue/Dialog.hpp | 12 +- addons/advanced_fatigue/XEH_preInit.sqf | 2 +- .../advanced_throwing/functions/fnc_throw.sqf | 2 +- .../fnc_drawCuratorGarrisonPathing.sqf | 8 +- addons/ai/functions/fnc_garrison.sqf | 28 +- addons/ai/functions/fnc_garrisonMove.sqf | 14 +- addons/ai/functions/fnc_unGarrison.sqf | 6 +- addons/arsenal/defines.hpp | 26 +- .../arsenal/functions/fnc_baseAttachment.sqf | 2 +- addons/arsenal/functions/fnc_baseWeapon.sqf | 2 +- addons/arsenal/functions/fnc_handleStats.sqf | 10 +- addons/arsenal/functions/fnc_itemInfo.sqf | 8 +- .../arsenal/functions/fnc_onArsenalOpen.sqf | 4 +- .../functions/fnc_onSelChangedLeft.sqf | 2 +- .../functions/fnc_onSelChangedRight.sqf | 2 +- addons/arsenal/functions/fnc_scanConfig.sqf | 4 +- .../functions/fnc_statTextStatement_load.sqf | 2 +- addons/arsenal/ui/RscAttributes.hpp | 194 +++--- addons/arsenal/ui/RscCommon.hpp | 6 +- addons/arsenal/ui/RscCustomArsenalButton.hpp | 8 +- addons/artillerytables/RscRangeTable.hpp | 30 +- addons/artillerytables/RscTitles.hpp | 20 +- .../artillerytables/dev/showShotInfo.inc.sqf | 2 +- .../functions/fnc_turretPFEH.sqf | 8 +- addons/atragmx/RscTitles.hpp | 644 +++++++++--------- .../functions/fnc_calculate_solution.sqf | 8 +- .../fnc_calculate_target_range_assist.sqf | 6 +- .../fnc_calculate_target_speed_assist.sqf | 2 +- .../functions/fnc_calculate_truing_drop.sqf | 16 +- addons/atragmx/functions/fnc_parse_input.sqf | 8 +- .../functions/fnc_show_range_card_setup.sqf | 6 +- .../fnc_show_target_range_assist.sqf | 4 +- .../fnc_show_target_speed_assist.sqf | 2 +- .../functions/fnc_show_truing_drop.sqf | 4 +- .../fnc_target_speed_assist_timer.sqf | 4 +- .../functions/fnc_toggle_range_card_setup.sqf | 6 +- .../fnc_toggle_target_range_assist.sqf | 8 +- .../fnc_toggle_target_speed_assist.sqf | 4 +- .../fnc_true_c1_ballistic_coefficient.sqf | 2 +- .../functions/fnc_true_muzzle_velocity.sqf | 2 +- .../functions/fnc_update_atmo_env_data.sqf | 14 +- .../functions/fnc_update_atmosphere.sqf | 14 +- ...c_update_c1_ballistic_coefficient_data.sqf | 6 +- addons/atragmx/functions/fnc_update_gun.sqf | 22 +- .../functions/fnc_update_gun_ammo_data.sqf | 28 +- .../fnc_update_inclination_angle.sqf | 4 +- .../fnc_update_muzzle_velocity_data.sqf | 8 +- .../functions/fnc_update_range_card.sqf | 22 +- .../atragmx/functions/fnc_update_result.sqf | 30 +- .../functions/fnc_update_scope_unit.sqf | 2 +- .../atragmx/functions/fnc_update_target.sqf | 22 +- .../functions/fnc_update_target_data.sqf | 26 +- .../functions/fnc_update_truing_drop_data.sqf | 32 +- addons/attach/functions/fnc_canDetach.sqf | 2 +- addons/attach/functions/fnc_detach.sqf | 4 +- addons/attach/functions/fnc_placeApprove.sqf | 4 +- addons/cargo/XEH_postInit.sqf | 2 +- .../cargo/functions/fnc_handleScrollWheel.sqf | 2 +- addons/cargo/functions/fnc_paradropItem.sqf | 2 +- addons/cargo/functions/fnc_setSpace.sqf | 2 +- addons/cargo/functions/fnc_unloadItem.sqf | 2 +- addons/cargo/menu.hpp | 60 +- addons/cargo/renameMenu.hpp | 48 +- addons/casings/functions/fnc_createCasing.sqf | 2 +- addons/common/CfgUIGrids.hpp | 12 +- addons/common/CompassControl.hpp | 2 +- addons/common/DisableMouseDialog.hpp | 8 +- addons/common/HintConfig.hpp | 10 +- addons/common/ProgressScreen.hpp | 26 +- addons/common/RscInfoType.hpp | 18 +- addons/common/XEH_postInit.sqf | 8 +- addons/common/XEH_preStart.sqf | 2 +- addons/common/define.hpp | 32 +- addons/common/dev/test_mapConfigs.sqf | 2 +- addons/common/functions/fnc_ASLToPosition.sqf | 2 +- .../functions/fnc_addLineToDebugDraw.sqf | 4 +- .../functions/fnc_checkFiles_diagnoseACE.sqf | 2 +- .../common/functions/fnc_defineVariable.sqf | 2 +- .../functions/fnc_deprecateComponent.sqf | 4 +- addons/common/functions/fnc_displayIcon.sqf | 8 +- .../functions/fnc_displayTextStructured.sqf | 16 +- .../functions/fnc_findUnloadPosition.sqf | 18 +- addons/common/functions/fnc_getAddon.sqf | 2 +- .../common/functions/fnc_getMapGridData.sqf | 2 +- .../common/functions/fnc_getVehicleIcon.sqf | 4 +- addons/common/functions/fnc_positionToASL.sqf | 2 +- addons/common/functions/fnc_progressBar.sqf | 2 +- .../fnc_readSettingsFromParamsArray.sqf | 2 +- addons/common/functions/fnc_runTests.sqf | 2 +- .../common/functions/fnc_setPlayerOwner.sqf | 2 +- addons/common/functions/fnc_showHud.sqf | 2 +- .../functions/fnc_switchAttachmentMode.sqf | 2 +- .../functions/fnc_switchPersistentLaser.sqf | 2 +- .../functions/fnc_unloadPersonLocal.sqf | 2 +- .../concertina_wire/functions/fnc_deploy.sqf | 2 +- .../functions/fnc_dismountSuccess.sqf | 2 +- .../functions/fnc_assemble_deployWeapon.sqf | 2 +- addons/dagr/functions/fnc_menuInit.sqf | 2 +- addons/dagr/functions/fnc_outputData.sqf | 4 +- addons/dagr/functions/fnc_outputVector.sqf | 24 +- addons/dagr/functions/fnc_outputWP.sqf | 18 +- .../functions/fnc_disarmDropItems.sqf | 10 +- .../functions/fnc_openDisarmDialog.sqf | 2 +- addons/disarming/gui_disarm.hpp | 18 +- .../functions/fnc_handleScrollWheel.sqf | 2 +- .../functions/fnc_attackProfile_DRAGON.sqf | 2 +- addons/explosives/ExplosivesUI.hpp | 164 ++--- .../explosives/functions/fnc_addClacker.sqf | 2 +- .../functions/fnc_addDetonateActions.sqf | 6 +- .../functions/fnc_addTransmitterActions.sqf | 2 +- .../functions/fnc_addTriggerActions.sqf | 2 +- .../functions/fnc_defuseExplosive.sqf | 2 +- .../functions/fnc_getPlacedExplosives.sqf | 4 +- .../functions/fnc_onInventoryChanged.sqf | 2 +- .../functions/fnc_placeExplosive.sqf | 6 +- .../functions/fnc_selectTrigger.sqf | 2 +- .../functions/fnc_setupExplosive.sqf | 4 +- .../explosives/functions/fnc_startDefuse.sqf | 6 +- .../explosives/functions/fnc_triggerType.sqf | 4 +- addons/fastroping/XEH_postInit.sqf | 2 +- .../fastroping/functions/fnc_deployRopes.sqf | 2 +- addons/fcs/CfgOptics.hpp | 2 +- addons/fcs/functions/fnc_getAngle.sqf | 6 +- addons/finger/functions/fnc_keyPress.sqf | 4 +- addons/finger/functions/fnc_perFrameEH.sqf | 2 +- addons/fortify/functions/fnc_addActions.sqf | 2 +- .../functions/fnc_buildLocationModule.sqf | 2 +- .../fortify/functions/fnc_getPlaceableSet.sqf | 2 +- addons/frag/functions/fnc_addPfhRound.sqf | 2 +- addons/frag/functions/fnc_doExplosions.sqf | 2 +- addons/frag/functions/fnc_frago.sqf | 2 +- addons/frag/functions/fnc_pfhRound.sqf | 2 +- addons/goggles/define.hpp | 8 +- .../functions/fnc_applyRotorWashEffect.sqf | 2 +- .../functions/fnc_flashbangExplosionEH.sqf | 6 +- addons/gunbag/functions/fnc_calculateMass.sqf | 2 +- .../hellfire/functions/fnc_attackProfile.sqf | 14 +- .../fnc_getAttackProfileSettings.sqf | 2 +- addons/huntir/functions/fnc_cam.sqf | 26 +- addons/huntir/functions/fnc_huntir.sqf | 6 +- addons/interact_menu/CursorMenus.hpp | 8 +- .../functions/fnc_addActionToClass.sqf | 2 +- .../interact_menu/functions/fnc_keyDown.sqf | 10 +- addons/interact_menu/functions/fnc_render.sqf | 2 +- .../functions/fnc_renderActionPoints.sqf | 8 +- .../functions/fnc_renderBaseMenu.sqf | 4 +- .../functions/fnc_renderIcon.sqf | 8 +- .../functions/fnc_renderSelector.sqf | 8 +- addons/interaction/RscTitles.hpp | 4 +- addons/interaction/XEH_postInit.sqf | 2 +- .../dev/initReplaceTerrainCursorObject.sqf | 2 +- .../functions/fnc_modifyJoinGroupAction.sqf | 2 +- addons/interaction/functions/fnc_openDoor.sqf | 4 +- .../functions/fnc_passMagazine.sqf | 2 +- .../interaction/functions/fnc_renameGroup.sqf | 4 +- .../functions/fnc_renameGroupUI.sqf | 2 +- addons/interaction/groupRename_GUI.hpp | 2 +- addons/inventory/RscDisplayInventory.hpp | 12 +- addons/javelin/functions/fnc_getTarget.sqf | 6 +- .../javelin/functions/fnc_mapHelperDraw.sqf | 4 +- addons/javelin/functions/fnc_onOpticDraw.sqf | 4 +- addons/javelin/script_component.hpp | 2 +- addons/kestrel4500/RscTitles.hpp | 22 +- .../functions/fnc_generateOutputData.sqf | 126 ++-- addons/killtracker/XEH_postInit.sqf | 4 +- addons/laser/RscTitles.hpp | 28 +- .../fnc_dev_drawVisibleLaserTargets.sqf | 14 +- .../fnc_handleLaserTargetCreation.sqf | 4 +- .../functions/fnc_seekerFindLaserSpot.sqf | 6 +- addons/laser/functions/fnc_shootRay.sqf | 4 +- addons/laser/functions/fnc_showVehicleHud.sqf | 2 +- addons/map/config.cpp | 8 +- .../functions/fnc_addGroupColorMapping.sqf | 2 +- .../functions/fnc_drawMapGestures.sqf | 2 +- .../functions/fnc_initDisplaySpectator.sqf | 4 +- .../functions/fnc_drawLinesOnRoamer.sqf | 16 +- addons/marker_flags/XEH_preStart.sqf | 2 +- addons/markers/XEH_preInit.sqf | 4 +- .../functions/fnc_initInsertMarker.sqf | 32 +- .../functions/fnc_mapDisplayInitEH.sqf | 4 +- addons/markers/functions/fnc_placeMarker.sqf | 2 +- addons/markers/functions/fnc_setMarkerJIP.sqf | 4 +- .../functions/fnc_setMarkerNetwork.sqf | 4 +- addons/medical_ai/XEH_preStart.sqf | 2 +- .../fnc_addHealingCommandActions.sqf | 4 +- .../functions/fnc_debug_explosiveTest.sqf | 2 +- .../functions/fnc_handleDamage.sqf | 2 +- addons/medical_treatment/XEH_postInit.sqf | 2 +- .../functions/fnc_ivBagLocal.sqf | 2 +- .../functions/fnc_medicationLocal.sqf | 2 +- .../functions/fnc_placeBodyBagInGrave.sqf | 2 +- .../functions/fnc_placeInGrave.sqf | 2 +- .../functions/fnc_splintLocal.sqf | 2 +- .../functions/fnc_tourniquetLocal.sqf | 2 +- .../functions/fnc_tourniquetRemove.sqf | 2 +- addons/microdagr/CfgUIGrids.hpp | 2 +- .../microdagr/functions/fnc_updateDisplay.sqf | 4 +- addons/microdagr/gui.hpp | 4 +- addons/minedetector/XEH_postInit.sqf | 4 +- .../functions/fnc_attackProfile_LIN.sqf | 2 +- .../functions/fnc_attackProfile_LOFT.sqf | 2 +- .../functions/fnc_attackProfile_WIRE.sqf | 2 +- .../functions/fnc_dev_ProjectileCamera.sqf | 2 +- .../functions/fnc_doAttackProfile.sqf | 4 +- .../functions/fnc_doSeekerSearch.sqf | 4 +- .../functions/fnc_guidancePFH.sqf | 8 +- .../functions/fnc_seekerType_MWR.sqf | 8 +- .../functions/fnc_moduleAmbianceSound.sqf | 4 +- addons/movement/functions/fnc_handleClimb.sqf | 4 +- addons/nametags/functions/fnc_onDraw3d.sqf | 4 +- addons/nightvision/RscTitles.hpp | 6 +- .../functions/fnc_refreshGoggleType.sqf | 4 +- addons/nlaw/XEH_postInit.sqf | 6 +- addons/nlaw/functions/fnc_attackProfile.sqf | 12 +- addons/nlaw/functions/fnc_navigation.sqf | 4 +- addons/nlaw/functions/fnc_onFired.sqf | 2 +- addons/nlaw/functions/fnc_seeker.sqf | 4 +- .../functions/fnc_debugDumpToClipboard.sqf | 4 +- addons/optionsmenu/gui/mainMenu.hpp | 2 +- .../functions/fnc_getWeaponData.sqf | 2 +- .../overpressure/functions/fnc_firedEHBB.sqf | 2 +- .../overpressure/functions/fnc_firedEHOP.sqf | 2 +- .../functions/fnc_overpressureDamage.sqf | 2 +- addons/parachute/RscTitles.hpp | 32 +- .../parachute/functions/fnc_cutParachute.sqf | 2 +- addons/pylons/XEH_postInit.sqf | 2 +- addons/pylons/functions/fnc_showDialog.sqf | 10 +- addons/pylons/menu.hpp | 136 ++-- .../functions/fnc_addFreeSeatsActions.sqf | 8 +- addons/rangecard/RscTitles.hpp | 50 +- .../functions/fnc_calculateRangeCard.sqf | 12 +- .../functions/fnc_updateRangeCard.sqf | 2 +- addons/rearm/functions/fnc_canRearm.sqf | 2 +- addons/rearm/functions/fnc_rearm.sqf | 2 +- .../rearm/functions/fnc_rearmSuccessLocal.sqf | 4 +- addons/rearm/functions/fnc_storeAmmo.sqf | 2 +- .../dev/exportTerrainRefuelPositions.sqf | 2 +- .../functions/fnc_connectNozzleAction.sqf | 2 +- addons/reload/functions/fnc_displayAmmo.sqf | 2 +- addons/repair/functions/fnc_canRepair.sqf | 2 +- addons/repair/functions/fnc_repair.sqf | 2 +- .../repair/functions/fnc_repair_failure.sqf | 2 +- .../repair/functions/fnc_repair_success.sqf | 2 +- addons/repair/functions/fnc_useItems.sqf | 4 +- .../functions/fnc_updateRallypoint.sqf | 2 +- addons/sandbag/functions/fnc_pickup.sqf | 2 +- addons/scopes/RscTitles.hpp | 24 +- addons/sitting/functions/fnc_sit.sqf | 2 +- .../functions/fnc_cam_setVisionMode.sqf | 4 +- .../functions/fnc_setCameraAttributes.sqf | 2 +- .../functions/fnc_ui_handleKeyDown.sqf | 4 +- .../functions/fnc_ui_handleListClick.sqf | 2 +- .../spectator/functions/fnc_ui_updateHelp.sqf | 16 +- .../functions/fnc_ui_updateIconsToDraw.sqf | 2 +- .../functions/fnc_ui_updateListEntities.sqf | 2 +- addons/spectator/script_component.hpp | 6 +- addons/spectator/ui.hpp | 12 +- addons/spottingscope/script_component.hpp | 4 +- addons/tagging/functions/fnc_createTag.sqf | 2 +- .../functions/fnc_towStateMachinePFH.sqf | 6 +- .../functions/fnc_continueDiggingTrench.sqf | 2 +- .../trenches/functions/fnc_placeConfirm.sqf | 2 +- addons/trenches/functions/fnc_placeTrench.sqf | 2 +- addons/ui/CfgInGameUI.hpp | 2 +- addons/vector/RscInGameUI.hpp | 60 +- addons/viewports/dev/debugPoints.sqf | 10 +- addons/viewports/functions/fnc_eachFrame.sqf | 6 +- addons/viewports/functions/fnc_viewCreate.sqf | 12 +- .../functions/fnc_updateTemperature.sqf | 2 +- .../functions/fnc_ballistics_calculator.sqf | 2 +- addons/xm157/functions/fnc_keyPress.sqf | 2 +- .../xm157/functions/fnc_weaponInfo_onLoad.sqf | 2 +- .../functions/fnc_acquireTarget.sqf | 2 +- .../zeus/functions/fnc_bi_moduleArsenal.sqf | 12 +- .../zeus/functions/fnc_bi_moduleCurator.sqf | 194 +++--- addons/zeus/functions/fnc_bi_moduleMine.sqf | 18 +- .../functions/fnc_bi_moduleProjectile.sqf | 82 +-- .../functions/fnc_bi_moduleRemoteControl.sqf | 148 ++-- .../functions/fnc_getModuleDestination.sqf | 2 +- addons/zeus/functions/fnc_moduleCaptive.sqf | 2 +- .../functions/fnc_moduleCargoParadrop.sqf | 2 +- addons/zeus/functions/fnc_moduleSetMedic.sqf | 2 +- .../functions/fnc_moduleSuppressiveFire.sqf | 2 +- .../fnc_moduleSuppressiveFireLocal.sqf | 2 +- addons/zeus/functions/fnc_moduleSurrender.sqf | 2 +- .../zeus/functions/fnc_moduleUnconscious.sqf | 2 +- .../zeus/functions/fnc_ui_globalSetSkill.sqf | 4 +- addons/zeus/functions/fnc_ui_groupSide.sqf | 6 +- addons/zeus/functions/fnc_ui_setEngineer.sqf | 2 +- addons/zeus/functions/fnc_ui_spectator.sqf | 2 +- .../zeus/functions/fnc_ui_suicideBomber.sqf | 2 +- .../zeus/functions/fnc_ui_teleportPlayers.sqf | 6 +- include/a3/ui_f/hpp/defineCommonGrids.inc | 180 ++--- .../ui/displays/RscDisplayAttributes.sqf | 130 ++-- 295 files changed, 1949 insertions(+), 1949 deletions(-) diff --git a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf index ceaef17badf..a426f6ba99a 100644 --- a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf +++ b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf @@ -50,7 +50,7 @@ GVAR(Protractor) = true; __ctrl1 ctrlSetTextColor [1, 1, 1, 1]; __ctrl2 ctrlSetScale 1; - __ctrl2 ctrlSetPosition [SafeZoneX + 0.001, SafeZoneY - 0.001 - 0.1074 * (-0.86 max ((ACE_player weaponDirection currentWeapon ACE_player) select 2) min 0.86), 0.2, 0.2 * 4/3]; + __ctrl2 ctrlSetPosition [safeZoneX + 0.001, safeZoneY - 0.001 - 0.1074 * (-0.86 max ((ACE_player weaponDirection currentWeapon ACE_player) select 2) min 0.86), 0.2, 0.2 * 4/3]; __ctrl2 ctrlCommit 0; __ctrl2 ctrlSetText QPATHTOF(UI\protractor_marker.paa); __ctrl2 ctrlSetTextColor [1, 1, 1, 1]; diff --git a/addons/advanced_fatigue/Dialog.hpp b/addons/advanced_fatigue/Dialog.hpp index df019f3800c..7b57e00ced9 100644 --- a/addons/advanced_fatigue/Dialog.hpp +++ b/addons/advanced_fatigue/Dialog.hpp @@ -2,18 +2,18 @@ class RscControlsGroupNoScrollbars; class RscPicture; class GVAR(StaminaBarContainer): RscControlsGroupNoScrollbars { - x = "(profilenamespace getvariable [""IGUI_GRID_STAMINA_X"", ((safezoneX + safezoneW) - (10 * (((safezoneW / safezoneH) min 1.2) / 40)) - 4.3 * (((safezoneW / safezoneH) min 1.2) / 40))])"; - y = "(profilenamespace getvariable [""IGUI_GRID_STAMINA_Y"", (safezoneY + 4.05 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])"; - w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "0.15 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "(profilenamespace getvariable [""IGUI_GRID_STAMINA_X"", ((safeZoneX + safeZoneW) - (10 * (((safeZoneW / safeZoneH) min 1.2) / 40)) - 4.3 * (((safeZoneW / safeZoneH) min 1.2) / 40))])"; + y = "(profilenamespace getvariable [""IGUI_GRID_STAMINA_Y"", (safeZoneY + 4.05 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25))])"; + w = "10 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "0.15 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; class Controls { class StaminaBar: RscPicture { idc = 10; x = 0; y = 0; - w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "0.15 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + w = "10 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "0.15 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; text = "\A3\Ui_f\data\IGUI\RscIngameUI\RscUnitInfo\stamina_ca.paa"; }; }; diff --git a/addons/advanced_fatigue/XEH_preInit.sqf b/addons/advanced_fatigue/XEH_preInit.sqf index 643b7b0be00..ed1bd966229 100644 --- a/addons/advanced_fatigue/XEH_preInit.sqf +++ b/addons/advanced_fatigue/XEH_preInit.sqf @@ -8,7 +8,7 @@ PREP_RECOMPILE_END; #include "initSettings.inc.sqf" -GVAR(staminaBarWidth) = 10 * (((safezoneW / safezoneH) min 1.2) / 40); +GVAR(staminaBarWidth) = 10 * (((safeZoneW / safeZoneH) min 1.2) / 40); GVAR(dutyList) = createHashMap; GVAR(setAnimExclusions) = []; GVAR(inertia) = 0; diff --git a/addons/advanced_throwing/functions/fnc_throw.sqf b/addons/advanced_throwing/functions/fnc_throw.sqf index d6b38a6a0c7..d1773373411 100644 --- a/addons/advanced_throwing/functions/fnc_throw.sqf +++ b/addons/advanced_throwing/functions/fnc_throw.sqf @@ -89,7 +89,7 @@ GVAR(flightPath) = []; GVAR(flightRotation) = []; (_unit getVariable QGVAR(activeThrowable)) spawn { while {!isNull _this && {(getPosATL _this) select 2 > 0.05}} do { - GVAR(flightPath) pushBack [ASLtoAGL (getPosASL _this), vectorUp _this]; + GVAR(flightPath) pushBack [ASLToAGL (getPosASL _this), vectorUp _this]; sleep 0.05; }; }; diff --git a/addons/ai/functions/fnc_drawCuratorGarrisonPathing.sqf b/addons/ai/functions/fnc_drawCuratorGarrisonPathing.sqf index 561c8748a65..739e6510d9c 100644 --- a/addons/ai/functions/fnc_drawCuratorGarrisonPathing.sqf +++ b/addons/ai/functions/fnc_drawCuratorGarrisonPathing.sqf @@ -19,7 +19,7 @@ if (isNull findDisplay 312) exitWith { removeMissionEventHandler ["Draw3D", _thisEventHandler]; }; -private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []]; +private _unitMoveList = missionNamespace getVariable [QGVAR(garrison_unitMoveList), []]; { _x params ["_unit", "_pos"]; @@ -27,9 +27,9 @@ private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveLis switch (true) do { case (surfaceIsWater (getPos _unit) && {surfaceIsWater _pos}) : { for "_i" from 0 to 3 do { - drawLine3D [_unit modelToWorldVisualWorld [0,0,1], (AGLtoASL _pos), [1,0,0,1]]; + drawLine3D [_unit modelToWorldVisualWorld [0,0,1], (AGLToASL _pos), [1,0,0,1]]; }; - drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLtoASL _pos), 0.75, 0.75, 0.75]; + drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLToASL _pos), 0.75, 0.75, 0.75]; }; case (!surfaceIsWater (getPos _unit) && {!surfaceIsWater _pos}) : { @@ -43,7 +43,7 @@ private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveLis for "_i" from 0 to 3 do { drawLine3D [_unit modelToWorldVisual [0,0,1], (AGLToASL _pos), [1,0,0,1]]; }; - drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLtoASL _pos), 0.75, 0.75, 0.75]; + drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLToASL _pos), 0.75, 0.75, 0.75]; }; case (surfaceIsWater (getPos _unit) && {!surfaceIsWater _pos}) : { diff --git a/addons/ai/functions/fnc_garrison.sqf b/addons/ai/functions/fnc_garrison.sqf index 4b8f84fce63..042c4fde3cb 100644 --- a/addons/ai/functions/fnc_garrison.sqf +++ b/addons/ai/functions/fnc_garrison.sqf @@ -26,7 +26,7 @@ params [["_startingPos",[0,0,0], [[]], 3], ["_buildingTypes", ["Building"], [[]] TRACE_6("fnc_garrison: Start",_startingPos,_buldingTypes,count _unitsArray,_fillingRadius,_fillingTYpe,_topDownFilling); _unitsArray = _unitsArray select {alive _x && {!isPlayer _x}}; -private _currentUnitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []]; +private _currentUnitMoveList = missionNamespace getVariable [QGVAR(garrison_unitMoveList), []]; if (_startingPos isEqualTo [0,0,0]) exitWith { TRACE_1("fnc_garrison: StartingPos error",_startingPos); @@ -57,38 +57,38 @@ if (_topDownFilling) then { // Those reverse are necessary, as dumb as it is there's no better way to sort those subarrays in sqf { reverse _x; - } foreach _buildingPos; + } forEach _buildingPos; _buildingPos sort false; { reverse _x; - } foreach _buildingPos; + } forEach _buildingPos; _buildingsIndex pushBack _buildingPos; - } foreach _buildings; + } forEach _buildings; } else { { _buildingsIndex pushBack (_x buildingPos -1); - } foreach _buildings; + } forEach _buildings; }; // Remove buildings without positions { _buildingsIndex deleteAt (_buildingsIndex find _x); -} foreach (_buildingsIndex select {count _x == 0}); +} forEach (_buildingsIndex select {count _x == 0}); //Remove positions units are already pathing to _buildingsIndex = _buildingsIndex apply { _x select { private _testedPos = _x; - ({(_x select 1) isEqualTo _testedPos} count (missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []])) == 0 + ({(_x select 1) isEqualTo _testedPos} count (missionNamespace getVariable [QGVAR(garrison_unitMoveList), []])) == 0 } }; // Warn the user that there's not enough positions to place all units private _count = 0; -{_count = _count + count _x} foreach _buildingsIndex; +{_count = _count + count _x} forEach _buildingsIndex; if ( (count _unitsArray) - _count > 0) then { TRACE_4("fnc_garrison: Not enough spots to place all units",_unitsArray,count _unitsArray,_count,((count _unitsArray) - _count > 0)); [LSTRING(GarrisonNotEnoughPos)] call EFUNC(common,displayTextStructured); @@ -104,7 +104,7 @@ private _fnc_comparePos = { params ["_nearestUnits", "_pos"]; ({ if (surfaceIsWater getPos _x) then { - floor ((getPosASL _x) select 2) == floor ((AGLtoASL _pos) select 2) + floor ((getPosASL _x) select 2) == floor ((AGLToASL _pos) select 2) } else { floor ((getPosATL _x) select 2) == floor (_pos select 2) }; @@ -141,7 +141,7 @@ switch (_fillingType) do { if (_teleport) then { doStop _unit; if (_posSurface) then { - _unit setPosASL (AGLtoASL _pos); + _unit setPosASL (AGLToASL _pos); } else { _unit setPosATL _pos; }; @@ -190,7 +190,7 @@ switch (_fillingType) do { if (_teleport) then { doStop _unit; if (_posSurface) then { - _unit setPosASL (AGLtoASL _pos); + _unit setPosASL (AGLToASL _pos); } else { _unit setPosATL _pos; }; @@ -237,7 +237,7 @@ switch (_fillingType) do { if (_teleport) then { doStop _unit; if (_posSurface) then { - _unit setPosASL (AGLtoASL _pos); + _unit setPosASL (AGLToASL _pos); } else { _unit setPosATL _pos; }; @@ -261,7 +261,7 @@ switch (_fillingType) do { TRACE_1(format [ARR_2("fnc_garrison: while loop ended | %1 units ready to be treated by PFH",count _unitMoveList)],_teleport); // Update the unit list and remove duplicate positions and units -private _garrison_unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []]; +private _garrison_unitMoveList = missionNamespace getVariable [QGVAR(garrison_unitMoveList), []]; _garrison_unitMoveList = _garrison_unitMoveList select { _x params ["_testedUnit", "_testedPos"]; @@ -270,7 +270,7 @@ _garrison_unitMoveList = _garrison_unitMoveList select { _garrison_unitMoveList append _unitMoveList; -missionNameSpace setVariable [QGVAR(garrison_unitMoveList), _garrison_unitMoveList, true]; +missionNamespace setVariable [QGVAR(garrison_unitMoveList), _garrison_unitMoveList, true]; if (_teleport) then { [QGVAR(AISection), [_placedUnits, ["PATH"], false], _placedUnits] call CBA_fnc_targetEvent; diff --git a/addons/ai/functions/fnc_garrisonMove.sqf b/addons/ai/functions/fnc_garrisonMove.sqf index 4d1c471a0ea..46313f12e38 100644 --- a/addons/ai/functions/fnc_garrisonMove.sqf +++ b/addons/ai/functions/fnc_garrisonMove.sqf @@ -31,21 +31,21 @@ private _unitMoveListUnits = (_unitMoveList apply {_x select 0}); { _x setVariable [QGVAR(garrisonMove_failSafe), nil, true]; _x setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true]; -} foreach _unitMoveListUnits; +} forEach _unitMoveListUnits; // Avoid duplicate PFHs if (isNil QGVAR(garrison_moveUnitPFH)) then { - missionNameSpace setVariable [QGVAR(garrison_moveUnitPFH), true, true]; + missionNamespace setVariable [QGVAR(garrison_moveUnitPFH), true, true]; // PFH checking if the units have reached their destination [{ params ["_args", "_pfhID"]; - private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []]; + private _unitMoveList = missionNamespace getVariable [QGVAR(garrison_unitMoveList), []]; // End PFH if all units are placed / unable to reach position if (_unitMoveList isEqualTo []) then { - missionNameSpace setVariable [QGVAR(garrison_moveUnitPFH), nil, true]; + missionNamespace setVariable [QGVAR(garrison_moveUnitPFH), nil, true]; LOG("garrisonMove PFH: PFH finished it's job | deleting PFH"); _pfhID call CBA_fnc_removePerFrameHandler; @@ -91,7 +91,7 @@ if (isNil QGVAR(garrison_moveUnitPFH)) then { } else { private _unitPos = getPos _unit; - if (surfaceisWater _unitPos) then { + if (surfaceIsWater _unitPos) then { _unitPos = getPosASL _unit; } else { _unitPos = getPosATL _unit; @@ -131,9 +131,9 @@ if (isNil QGVAR(garrison_moveUnitPFH)) then { }; }; }; - } foreach _unitMoveList; + } forEach _unitMoveList; - missionNameSpace setVariable [QGVAR(garrison_unitMoveList), _unitMoveList, true]; + missionNamespace setVariable [QGVAR(garrison_unitMoveList), _unitMoveList, true]; }; }, 0.5, []] call CBA_fnc_addPerFrameHandler; }; diff --git a/addons/ai/functions/fnc_unGarrison.sqf b/addons/ai/functions/fnc_unGarrison.sqf index 09ebc3e63da..f17d9aa4ab7 100644 --- a/addons/ai/functions/fnc_unGarrison.sqf +++ b/addons/ai/functions/fnc_unGarrison.sqf @@ -32,7 +32,7 @@ _units = _units select {local _x}; _unit setVariable [QGVAR(garrisonned), false, true]; - private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []]; + private _unitMoveList = missionNamespace getVariable [QGVAR(garrison_unitMoveList), []]; _unitMoveList deleteAt (_unitMoveList findIf {_x select 0 == _unit}); if (_leader != _unit) then { @@ -43,9 +43,9 @@ _units = _units select {local _x}; _unit doMove ((nearestBuilding (getPos _unit)) buildingExit 0); }; - if ((units _unit) findif {(_x getVariable [QGVAR(garrisonned), false]) && !isPlayer _x} == -1) then { + if ((units _unit) findIf {(_x getVariable [QGVAR(garrisonned), false]) && !isPlayer _x} == -1) then { LOG("fnc_ungarrison: enableAttack true"); (group _unit) enableAttack true; }; }; -} foreach _units; +} forEach _units; diff --git a/addons/arsenal/defines.hpp b/addons/arsenal/defines.hpp index cd6d937426a..6967c3f0401 100644 --- a/addons/arsenal/defines.hpp +++ b/addons/arsenal/defines.hpp @@ -3,7 +3,7 @@ #define GRID_W (pixelW * pixelGridNoUIScale * pixelScale) #define GRID_H (pixelH * pixelGridNoUIScale * pixelScale) -#define WIDTH_TOTAL (safezoneW - 2 * (93 * GRID_W)) +#define WIDTH_TOTAL (safeZoneW - 2 * (93 * GRID_W)) #define WIDTH_GAP (WIDTH_TOTAL / 100) #define WIDTH_SINGLE ((WIDTH_TOTAL - 7 * WIDTH_GAP) / 6) @@ -360,10 +360,10 @@ _buttonCurrentMag2Ctrl ctrlCommit FADE_DELAY;\ {\ _x = _display displayCtrl _x;\ _x ctrlSetPosition [\ - safezoneX + safezoneW - 93 * GRID_W,\ - safezoneY + 14 * GRID_H,\ + safeZoneX + safeZoneW - 93 * GRID_W,\ + safeZoneY + 14 * GRID_H,\ 80 * GRID_W,\ - safezoneH - 28 * GRID_H\ + safeZoneH - 28 * GRID_H\ ];\ _x ctrlCommit 0;\ } forEach [\ @@ -406,10 +406,10 @@ _buttonCurrentMag2Ctrl ctrlCommit FADE_DELAY;\ {\ _x = _display displayCtrl _x;\ _x ctrlSetPosition [\ - safezoneX + safezoneW - 93 * GRID_W,\ - safezoneY + 14 * GRID_H,\ + safeZoneX + safeZoneW - 93 * GRID_W,\ + safeZoneY + 14 * GRID_H,\ 80 * GRID_W,\ - safezoneH - 34 * GRID_H\ + safeZoneH - 34 * GRID_H\ ];\ _x ctrlCommit 0;\ } forEach [\ @@ -426,16 +426,16 @@ if (!isNil QGVAR(customRightPanelButtons)) then {\ if (isNull (_display displayCtrl (60 + _plusId))) then {\ private _ctrl = _display ctrlCreate [QGVAR(customArsenalButton_Background), 60 + _plusId];\ _ctrl ctrlSetPosition [\ - safezoneW + safezoneX - 13 * GRID_W,\ - safezoneY + (88 + (10 * _forEachIndex)) * GRID_H\ + safeZoneW + safeZoneX - 13 * GRID_W,\ + safeZoneY + (88 + (10 * _forEachIndex)) * GRID_H\ ];\ _ctrl ctrlCommit 0;\ };\ if (isNull (_display displayCtrl (61 + _plusId))) then {\ _ctrl = _display ctrlCreate [QGVAR(customArsenalButton_Button), 61 + _plusId];\ _ctrl ctrlSetPosition [\ - safezoneW + safezoneX - 10 * GRID_W,\ - safezoneY + (88 + (10 * _forEachIndex)) * GRID_H\ + safeZoneW + safeZoneX - 10 * GRID_W,\ + safeZoneY + (88 + (10 * _forEachIndex)) * GRID_H\ ];\ _ctrl ctrlSetText _picture;\ _ctrl ctrlSetTooltip _tooltip;\ @@ -446,8 +446,8 @@ if (!isNil QGVAR(customRightPanelButtons)) then {\ {\ _x = _display displayCtrl _x;\ _x ctrlSetPosition [\ - safezoneW + safezoneX - (10 + (3 * _forEachIndex)) * GRID_W,\ - safezoneY + (88 + (10 * _miscOffset)) * GRID_H\ + safeZoneW + safeZoneX - (10 + (3 * _forEachIndex)) * GRID_W,\ + safeZoneY + (88 + (10 * _miscOffset)) * GRID_H\ ];\ _x ctrlCommit 0;\ } forEach [IDC_buttonMisc, IDC_iconBackgroundMisc];\ diff --git a/addons/arsenal/functions/fnc_baseAttachment.sqf b/addons/arsenal/functions/fnc_baseAttachment.sqf index 968fd05d9b8..1d6155c9ee2 100644 --- a/addons/arsenal/functions/fnc_baseAttachment.sqf +++ b/addons/arsenal/functions/fnc_baseAttachment.sqf @@ -22,7 +22,7 @@ TRACE_1("looking up base attachment",_item); private _switchableClasses = []; -private _cfgWeapons = configfile >> "CfgWeapons"; +private _cfgWeapons = configFile >> "CfgWeapons"; private _config = _cfgWeapons >> _item; _item = configName _config; diff --git a/addons/arsenal/functions/fnc_baseWeapon.sqf b/addons/arsenal/functions/fnc_baseWeapon.sqf index abeb0e0ab9b..2b1b219e65c 100644 --- a/addons/arsenal/functions/fnc_baseWeapon.sqf +++ b/addons/arsenal/functions/fnc_baseWeapon.sqf @@ -20,7 +20,7 @@ params [["_weapon", "", [""]]]; // Check if item is cached (uiNamespace getVariable QGVAR(baseWeaponNameCache)) getOrDefaultCall [toLowerANSI _weapon, { - private _cfgWeapons = configfile >> "CfgWeapons"; + private _cfgWeapons = configFile >> "CfgWeapons"; private _config = _cfgWeapons >> _weapon; // If class doesn't exist, exit diff --git a/addons/arsenal/functions/fnc_handleStats.sqf b/addons/arsenal/functions/fnc_handleStats.sqf index b5d435a101e..3fd92d64f0f 100644 --- a/addons/arsenal/functions/fnc_handleStats.sqf +++ b/addons/arsenal/functions/fnc_handleStats.sqf @@ -53,7 +53,7 @@ private _fnc_hideEverything = { // Hide the stats box _statsBoxCtrl ctrlSetPosition [ (0.5 - WIDTH_TOTAL / 2) + WIDTH_GAP, - safezoneY + 1.8 * GRID_H, + safeZoneY + 1.8 * GRID_H, 0, 0 ]; @@ -62,7 +62,7 @@ private _fnc_hideEverything = { // Move action display private _ctrl = _display displayCtrl IDC_actionsBox; private _pos = ctrlPosition _ctrl; - _pos set [1, safezoneY + 1.8 * GRID_H]; + _pos set [1, safeZoneY + 1.8 * GRID_H]; _ctrl ctrlSetPosition _pos; _ctrl ctrlCommit 0; @@ -141,7 +141,7 @@ private _fnc_handleStats = { if (_showText) then { _textStatementResult = [_configEntry, _itemCfg] call _textStatement; - if !(_textStatementResult isEqualtype "") then { + if !(_textStatementResult isEqualType "") then { _textStatementResult = str _textStatementResult; }; @@ -168,7 +168,7 @@ private _fnc_handleStats = { private _height = 10 * _statsCount + 5; _statsBoxCtrl ctrlSetPosition [ (0.5 - WIDTH_TOTAL / 2) + WIDTH_GAP, - safezoneY + 1.8 * GRID_H, + safeZoneY + 1.8 * GRID_H, 47 * GRID_W, _height * GRID_H ]; @@ -177,7 +177,7 @@ private _fnc_handleStats = { // Move the actions box private _ctrl = _display displayCtrl IDC_actionsBox; private _pos = ctrlPosition _ctrl; - _pos set [1, safezoneY + (_height + 3.6) * GRID_H]; + _pos set [1, safeZoneY + (_height + 3.6) * GRID_H]; _ctrl ctrlSetPosition _pos; _ctrl ctrlCommit 0; diff --git a/addons/arsenal/functions/fnc_itemInfo.sqf b/addons/arsenal/functions/fnc_itemInfo.sqf index 676783a8b54..2662600aaee 100644 --- a/addons/arsenal/functions/fnc_itemInfo.sqf +++ b/addons/arsenal/functions/fnc_itemInfo.sqf @@ -32,11 +32,11 @@ if (isClass _itemCfg) then { (_display displayCtrl IDC_infoName) ctrlSetText ([_control lbText _curSel, _control lnbText [_curSel, 1]] select (ctrlType _control == CT_LISTNBOX)); private _itemAuthor = getText (_itemCfg >> "author"); - (_display displayctrl IDC_infoAuthor) ctrlSetText ([localize "STR_AUTHOR_UNKNOWN", format [localize "STR_FORMAT_AUTHOR_SCRIPTED", _itemAuthor]] select (_itemAuthor != "")); + (_display displayCtrl IDC_infoAuthor) ctrlSetText ([localize "STR_AUTHOR_UNKNOWN", format [localize "STR_FORMAT_AUTHOR_SCRIPTED", _itemAuthor]] select (_itemAuthor != "")); // DLC / mod icon - private _ctrlDLC = _display displayctrl IDC_DLCIcon; - private _ctrlDLCBackground = _display displayctrl IDC_DLCBackground; + private _ctrlDLC = _display displayCtrl IDC_DLCIcon; + private _ctrlDLCBackground = _display displayCtrl IDC_DLCBackground; private _dlc = _itemCfg call EFUNC(common,getAddon); if (_dlc != "") then { @@ -48,7 +48,7 @@ if (isClass _itemCfg) then { _ctrlDLC ctrlSetFade 0; // If an item is from a DLC, set it so when you press the icon on the bottom right it opens the DLC page - if ((getNumber (configfile >> "CfgMods" >> _dlc >> "appId")) > 0) then { + if ((getNumber (configFile >> "CfgMods" >> _dlc >> "appId")) > 0) then { _ctrlDLC ctrlSetEventHandler ["MouseExit", format ["(_this select 0) ctrlSetText '%1';", _logo]]; _ctrlDLC ctrlSetEventHandler ["MouseEnter", format ["(_this select 0) ctrlSetText '%1';", _logoOver]]; _ctrlDLC ctrlSetEventHandler [ diff --git a/addons/arsenal/functions/fnc_onArsenalOpen.sqf b/addons/arsenal/functions/fnc_onArsenalOpen.sqf index ea05cf1769f..2a2d8716c84 100644 --- a/addons/arsenal/functions/fnc_onArsenalOpen.sqf +++ b/addons/arsenal/functions/fnc_onArsenalOpen.sqf @@ -121,7 +121,7 @@ _mouseBlockCtrl ctrlEnable false; private _statsBoxCtrl = _display displayCtrl IDC_statsBox; _statsBoxCtrl ctrlSetPosition [ (0.5 - WIDTH_TOTAL / 2) + WIDTH_GAP, - safezoneY + 1.8 * GRID_H, + safeZoneY + 1.8 * GRID_H, 47 * GRID_W, 11 * GRID_H ]; @@ -132,7 +132,7 @@ _statsBoxCtrl ctrlCommit 0; private _actionsBoxCtrl = _display displayCtrl IDC_actionsBox; _actionsBoxCtrl ctrlSetPosition [ (0.5 - WIDTH_TOTAL / 2) + WIDTH_GAP, - safezoneY + 58.6 * GRID_H, + safeZoneY + 58.6 * GRID_H, 47 * GRID_W, 11 * GRID_H ]; diff --git a/addons/arsenal/functions/fnc_onSelChangedLeft.sqf b/addons/arsenal/functions/fnc_onSelChangedLeft.sqf index e25016b303d..2a5d4204345 100644 --- a/addons/arsenal/functions/fnc_onSelChangedLeft.sqf +++ b/addons/arsenal/functions/fnc_onSelChangedLeft.sqf @@ -17,7 +17,7 @@ params ["_control", "_curSel"]; -if (_curSel < 0) exitwith {}; +if (_curSel < 0) exitWith {}; private _display = ctrlParent _control; private _item = [_control lbData _curSel, _control lnbData [_curSel, 0]] select (ctrlType _control == CT_LISTNBOX); diff --git a/addons/arsenal/functions/fnc_onSelChangedRight.sqf b/addons/arsenal/functions/fnc_onSelChangedRight.sqf index abec68ceeef..66315f7dc79 100644 --- a/addons/arsenal/functions/fnc_onSelChangedRight.sqf +++ b/addons/arsenal/functions/fnc_onSelChangedRight.sqf @@ -16,7 +16,7 @@ params ["_control", "_curSel"]; -if (_curSel < 0) exitwith {}; +if (_curSel < 0) exitWith {}; private _display = ctrlParent _control; private _item = _control lbData _curSel; diff --git a/addons/arsenal/functions/fnc_scanConfig.sqf b/addons/arsenal/functions/fnc_scanConfig.sqf index fef97e8bd85..b5c6627cc7a 100644 --- a/addons/arsenal/functions/fnc_scanConfig.sqf +++ b/addons/arsenal/functions/fnc_scanConfig.sqf @@ -228,10 +228,10 @@ private _faceCategory = ""; _faceCache set [configName _x, [getText (_x >> "displayName"), _modPicture, _faceCategory]]; }; } forEach ("true" configClasses _x); -} forEach ("true" configClasses (configfile >> "CfgFaces")); +} forEach ("true" configClasses (configFile >> "CfgFaces")); // Get all voices -private _voiceCache = (configProperties [configFile >> "CfgVoice", "isClass _x && {getNumber (_x >> 'scope') == 2}", true]) - [configfile >> "CfgVoice" >> "NoVoice"]; +private _voiceCache = (configProperties [configFile >> "CfgVoice", "isClass _x && {getNumber (_x >> 'scope') == 2}", true]) - [configFile >> "CfgVoice" >> "NoVoice"]; _voiceCache = _voiceCache apply {configName _x}; // Get all insignia diff --git a/addons/arsenal/functions/fnc_statTextStatement_load.sqf b/addons/arsenal/functions/fnc_statTextStatement_load.sqf index 032019f5825..a7a132b1844 100644 --- a/addons/arsenal/functions/fnc_statTextStatement_load.sqf +++ b/addons/arsenal/functions/fnc_statTextStatement_load.sqf @@ -17,7 +17,7 @@ params ["_stats", "_config"]; TRACE_2("statTextStatement_load",_stats,_config); if (!isNull (_config >> "ItemInfo" >> "containerClass")) then { // Uniform/Vest - _config = configfile >> "CfgVehicles" >> getText (_config >> "ItemInfo" >> "containerClass"); + _config = configFile >> "CfgVehicles" >> getText (_config >> "ItemInfo" >> "containerClass"); }; private _load = getNumber (_config >> (_stats # 0)); diff --git a/addons/arsenal/ui/RscAttributes.hpp b/addons/arsenal/ui/RscAttributes.hpp index dc70caa0c27..6ec69223355 100644 --- a/addons/arsenal/ui/RscAttributes.hpp +++ b/addons/arsenal/ui/RscAttributes.hpp @@ -15,14 +15,14 @@ class GVAR(display) { class ControlsBackground { class blackLeft: ctrlStatic { colorBackground[] = {0,0,0,1}; - x = QUOTE(safezoneXAbs); - y = QUOTE(safezoneY); - w = QUOTE(safezoneXAbs - safezoneX); - h = QUOTE(safezoneH); + x = QUOTE(safeZoneXAbs); + y = QUOTE(safeZoneY); + w = QUOTE(safeZoneXAbs - safeZoneX); + h = QUOTE(safeZoneH); }; class blackRight: blackLeft { - x = QUOTE(safezoneX + safezoneW); + x = QUOTE(safeZoneX + safeZoneW); }; class mouseArea: ctrlStatic { @@ -31,10 +31,10 @@ class GVAR(display) { onMouseMoving = QUOTE([ARR_3('onMouseMoving',_this,GVAR(display))] call FUNC(handleMouse)); onMouseHolding = QUOTE([ARR_3('onMouseHolding',_this,GVAR(display))] call FUNC(handleMouse)); onMouseZChanged = QUOTE([ARR_3('onMouseZChanged',_this,GVAR(display))] call FUNC(handleScrollWheel)); - x = QUOTE(safezoneX); - y = QUOTE(safezoneY); - w = QUOTE(safezoneW); - h = QUOTE(safezoneH); + x = QUOTE(safeZoneX); + y = QUOTE(safeZoneY); + w = QUOTE(safeZoneW); + h = QUOTE(safeZoneH); }; }; class controls { @@ -58,34 +58,34 @@ class GVAR(display) { }; class blockLeftFrame: RscFrame { idc = IDC_blockLeftFrame; - x = QUOTE(safezoneX + 13 * GRID_W); - y = QUOTE(safezoneY + 14 * GRID_H); + x = QUOTE(safeZoneX + 13 * GRID_W); + y = QUOTE(safeZoneY + 14 * GRID_H); w = QUOTE(80 * GRID_W); - h = QUOTE(safezoneH - 24 * GRID_H); + h = QUOTE(safeZoneH - 24 * GRID_H); colorText[] = {0,0,0,1}; }; class blockLeftBackground: ctrlStaticBackground { idc = IDC_blockLeftBackground; - x = QUOTE(safezoneX + 13 * GRID_W); - y = QUOTE(safezoneY + 14 * GRID_H); + x = QUOTE(safeZoneX + 13 * GRID_W); + y = QUOTE(safeZoneY + 14 * GRID_H); w = QUOTE(80 * GRID_W); - h = QUOTE(safezoneH - 24 * GRID_H); + h = QUOTE(safeZoneH - 24 * GRID_H); colorBackground[] = {0,0,0,0.5}; }; class blockRightFrame: blockLeftFrame { idc = IDC_blockRightFrame; - x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); - h = QUOTE(safezoneH - 34 * GRID_H); + x = QUOTE(safeZoneX + safeZoneW - 93 * GRID_W); + h = QUOTE(safeZoneH - 34 * GRID_H); }; class blockRighttBackground: blockLeftBackground { idc = IDC_blockRighttBackground; - x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); - h = QUOTE(safezoneH - 34 * GRID_H); + x = QUOTE(safeZoneX + safeZoneW - 93 * GRID_W); + h = QUOTE(safeZoneH - 34 * GRID_H); }; class loadIndicator: RscControlsGroupNoScrollbars { idc = IDC_loadIndicator; - x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); - y = QUOTE(safeZoneH + safezoneY - 20 * GRID_H); + x = QUOTE(safeZoneX + safeZoneW - 93 * GRID_W); + y = QUOTE(safeZoneH + safeZoneY - 20 * GRID_H); w = QUOTE(80 * GRID_W); h = QUOTE(6 * GRID_H); class controls { @@ -112,8 +112,8 @@ class GVAR(display) { }; class totalWeight: RscControlsGroupNoScrollbars { idc = IDC_totalWeight; - x = QUOTE(safezoneX + 13 * GRID_W); - y = QUOTE(safeZoneH + safezoneY - 10 * GRID_H); + x = QUOTE(safeZoneX + 13 * GRID_W); + y = QUOTE(safeZoneH + safeZoneY - 10 * GRID_H); w = QUOTE(80 * GRID_W); h = QUOTE(8 * GRID_H); class controls { @@ -154,7 +154,7 @@ class GVAR(display) { colorBackground[] = {0,0,0,0.69999999}; text = ""; x = QUOTE(0.5 - WIDTH_TOTAL / 2); - y = QUOTE(safeZoneH + safezoneY - 25 * GRID_H); + y = QUOTE(safeZoneH + safeZoneY - 25 * GRID_H); w = QUOTE(WIDTH_TOTAL); h = QUOTE(10 * GRID_H); sizeEx = QUOTE(5 * GRID_H); @@ -162,7 +162,7 @@ class GVAR(display) { class menuBar: RscControlsGroupNoScrollbars { idc = IDC_menuBar; x = QUOTE(0.5 - WIDTH_TOTAL / 2); - y = QUOTE(safezoneH + safezoneY - 9 * GRID_H); + y = QUOTE(safeZoneH + safeZoneY - 9 * GRID_H); w = QUOTE(WIDTH_TOTAL); h = QUOTE(7 * GRID_H); class controls { @@ -223,8 +223,8 @@ class GVAR(display) { class infoBox: RscControlsGroupNoScrollbars { idc = IDC_infoBox; fade = 1; - x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); - y = QUOTE(safeZoneH + safezoneY - 14 * GRID_H); + x = QUOTE(safeZoneX + safeZoneW - 93 * GRID_W); + y = QUOTE(safeZoneH + safeZoneY - 14 * GRID_H); w = QUOTE(92 * GRID_W); h = QUOTE(12 * GRID_H); class controls { @@ -278,7 +278,7 @@ class GVAR(display) { class statsBox: RscControlsGroupNoScrollbars { idc = IDC_statsBox; x = QUOTE((0.5 - WIDTH_TOTAL / 2) + WIDTH_GAP); - y = QUOTE(safezoneY + 1.8 * GRID_H); + y = QUOTE(safeZoneY + 1.8 * GRID_H); w = QUOTE(47 * GRID_W); h = QUOTE(55 * GRID_H); class controls { @@ -419,7 +419,7 @@ class GVAR(display) { colorBackgroundDisabled[] = {0,0,0,0}; onButtonClick = QUOTE([ARR_2(QQGVAR(statsChangePage),[ARR_3(ctrlParent (_this select 0),_this select 0,false)])] call CBA_fnc_localEvent); x = QUOTE((0.5 - WIDTH_TOTAL / 2) + WIDTH_GAP); - y = QUOTE(safezoneY + 1.8 * GRID_H); + y = QUOTE(safeZoneY + 1.8 * GRID_H); w = QUOTE(5 * GRID_W); h = QUOTE(5 * GRID_H); sizeEx = QUOTE(5.5 * GRID_H); @@ -434,7 +434,7 @@ class GVAR(display) { idc = IDC_statsCurrentPage; style = ST_CENTER; x = QUOTE((0.5 - WIDTH_TOTAL / 2) + WIDTH_GAP + 5 * GRID_W); - y = QUOTE(safezoneY + 1.8 * GRID_H); + y = QUOTE(safeZoneY + 1.8 * GRID_H); w = QUOTE(37 * GRID_W); h = QUOTE(5 * GRID_H); colorBackground[] = {0,0,0,0}; @@ -445,7 +445,7 @@ class GVAR(display) { class actionsBox: RscControlsGroupNoScrollbars { idc = IDC_actionsBox; x = QUOTE((0.5 - WIDTH_TOTAL / 2) + WIDTH_GAP); - y = QUOTE(safezoneY + 58.6 * GRID_H); + y = QUOTE(safeZoneY + 58.6 * GRID_H); w = QUOTE(47 * GRID_W); h = QUOTE(55 * GRID_H); class controls { @@ -550,10 +550,10 @@ class GVAR(display) { class mouseBlock: RscText { idc = IDC_mouseBlock; style = 16; - x = QUOTE(safezoneX); - y = QUOTE(safezoneY); - w = QUOTE(safezoneW); - h = QUOTE(safezoneH); + x = QUOTE(safeZoneX); + y = QUOTE(safeZoneY); + w = QUOTE(safeZoneW); + h = QUOTE(safeZoneH); }; class leftTabContent: RscListBox { idc = IDC_leftTabContent; @@ -569,10 +569,10 @@ class GVAR(display) { onLBDblClick = QUOTE(_this call FUNC(onPanelDblClick)); onSetFocus = QUOTE(GVAR(leftTabFocus) = true); onKillFocus = QUOTE(GVAR(leftTabFocus) = false); - x = QUOTE(safezoneX + 13 * GRID_W); - y = QUOTE(safezoneY + 14 * GRID_H); + x = QUOTE(safeZoneX + 13 * GRID_W); + y = QUOTE(safeZoneY + 14 * GRID_H); w = QUOTE(80 * GRID_W); - h = QUOTE(safezoneH - 24.5 * GRID_H); + h = QUOTE(safeZoneH - 24.5 * GRID_H); sizeEx = QUOTE(7 * GRID_H); }; class rightTabContent: leftTabContent { @@ -583,8 +583,8 @@ class GVAR(display) { onLBDblClick = QUOTE(_this call FUNC(onPanelDblClick)); onSetFocus = QUOTE(GVAR(rightTabFocus) = true); onKillFocus = QUOTE(GVAR(rightTabFocus) = false); - x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); - h = QUOTE(safezoneH - 28 * GRID_H); + x = QUOTE(safeZoneX + safeZoneW - 93 * GRID_W); + h = QUOTE(safeZoneH - 28 * GRID_H); }; class rightTabContentListnBox: RscListNBox { idc = IDC_rightTabContentListnBox; @@ -605,16 +605,16 @@ class GVAR(display) { onLBDblClick = QUOTE(_this call FUNC(onPanelDblClick)); onSetFocus = QUOTE(GVAR(rightTabLnBFocus) = true); onKillFocus = QUOTE(GVAR(rightTabLnBFocus) = false); - x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); - y = QUOTE(safezoneY + 14 * GRID_H); + x = QUOTE(safeZoneX + safeZoneW - 93 * GRID_W); + y = QUOTE(safeZoneY + 14 * GRID_H); w = QUOTE(80 * GRID_W); - h = QUOTE(safezoneH - 34 * GRID_H); + h = QUOTE(safeZoneH - 34 * GRID_H); sizeEx = QUOTE(7 * GRID_H); }; class sortLeftTab: RscCombo { idc = IDC_sortLeftTab; - x = QUOTE(safezoneX + 13 * GRID_W); - y = QUOTE(safezoneY + 8 * GRID_H); + x = QUOTE(safeZoneX + 13 * GRID_W); + y = QUOTE(safeZoneY + 8 * GRID_H); w = QUOTE(40 * GRID_W); h = QUOTE(6 * GRID_H); onLBSelChanged = QUOTE(_this call FUNC(sortPanel)); @@ -622,16 +622,16 @@ class GVAR(display) { }; class sortLeftTabDirection: sortLeftTab { idc = IDC_sortLeftTabDirection; - x = QUOTE(safezoneX + 53 * GRID_W); + x = QUOTE(safeZoneX + 53 * GRID_W); w = QUOTE(40 * GRID_W); }; class sortRightTab: sortLeftTab { idc = IDC_sortRightTab; - x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); + x = QUOTE(safeZoneX + safeZoneW - 93 * GRID_W); }; class sortRightTabDirection: sortLeftTabDirection { idc = IDC_sortRightTabDirection; - x = QUOTE(safezoneX + safezoneW - 53 * GRID_W); + x = QUOTE(safeZoneX + safeZoneW - 53 * GRID_W); }; class leftSearchbar: ctrlEdit { idc = IDC_leftSearchbar; @@ -639,8 +639,8 @@ class GVAR(display) { onKillFocus = QUOTE(GVAR(leftSearchbarFocus) = false); onMouseButtonClick = QUOTE([ARR_3(ctrlParent (_this select 0),_this select 0,_this select 1)] call FUNC(clearSearchbar)); onEditChanged = QUOTE(call FUNC(handleSearchInputChanged)); - x = QUOTE(safezoneX + 13 * GRID_W); - y = QUOTE(safezoneY + 1.8 * GRID_H); + x = QUOTE(safeZoneX + 13 * GRID_W); + y = QUOTE(safeZoneY + 1.8 * GRID_H); w = QUOTE(74 * GRID_W); h = QUOTE(6 * GRID_H); sizeEx = QUOTE(6 * GRID_H); @@ -652,8 +652,8 @@ class GVAR(display) { colorBackground[] = {0,0,0,0.5}; onButtonClick = QUOTE([ARR_2(ctrlParent (_this select 0),ctrlParent (_this select 0) displayCtrl IDC_leftSearchbar)] call FUNC(handleSearchbar)); onMouseButtonDown = QUOTE(call FUNC(handleSearchModeToggle)); - x = QUOTE(safezoneX + 87 * GRID_W); - y = QUOTE(safezoneY + 1.8 * GRID_H); + x = QUOTE(safeZoneX + 87 * GRID_W); + y = QUOTE(safeZoneY + 1.8 * GRID_H); w = QUOTE(6 * GRID_W); h = QUOTE(6 * GRID_H); }; @@ -661,17 +661,17 @@ class GVAR(display) { idc = IDC_rightSearchbar; onSetFocus = QUOTE(GVAR(rightSearchbarFocus) = true); onKillFocus = QUOTE(GVAR(rightSearchbarFocus) = false); - x = QUOTE(safezoneX + safezoneW - 87 * GRID_W); + x = QUOTE(safeZoneX + safeZoneW - 87 * GRID_W); }; class rightSearchbarButton: leftSearchbarButton { idc = IDC_rightSearchbarButton; onButtonClick = QUOTE([ARR_2(ctrlParent (_this select 0),ctrlParent (_this select 0) displayCtrl IDC_rightSearchbar)] call FUNC(handleSearchbar)); - x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); + x = QUOTE(safeZoneX + safeZoneW - 93 * GRID_W); }; class tabLeft: RscControlsGroupNoScrollbars { idc = IDC_tabLeft; - x = QUOTE(safezoneX + 1 * GRID_W); - y = QUOTE(safezoneY + 8 * GRID_H); + x = QUOTE(safeZoneX + 1 * GRID_W); + y = QUOTE(safeZoneY + 8 * GRID_H); w = QUOTE(12 * GRID_W); h = QUOTE(200 * GRID_H); class controls { @@ -873,8 +873,8 @@ class GVAR(display) { colorBackground[] = {0,0,0,1}; fade = 1; enable = 0; - x = QUOTE(safezoneW + safezoneX - 13 * GRID_W); - y = QUOTE(safezoneY + 8 * GRID_H); + x = QUOTE(safeZoneW + safeZoneX - 13 * GRID_W); + y = QUOTE(safeZoneY + 8 * GRID_H); w = QUOTE(12 * GRID_W); h = QUOTE(9 * GRID_H); }; @@ -884,110 +884,110 @@ class GVAR(display) { text = "\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\ItemOptic_ca.paa"; onButtonClick = QUOTE([ARR_2(ctrlParent (_this select 0),_this select 0)] call FUNC(fillRightPanel)); colorBackground[] = {0,0,0,0.5}; - x = QUOTE(safezoneW + safezoneX - 10 * GRID_W); - y = QUOTE(safezoneY + 8 * GRID_H); + x = QUOTE(safeZoneW + safeZoneX - 10 * GRID_W); + y = QUOTE(safeZoneY + 8 * GRID_H); w = QUOTE(9 * GRID_W); h = QUOTE(9 * GRID_H); }; class iconBackgroundItemAcc: iconBackgroundOptic { idc = IDC_iconBackgroundItemAcc; - y = QUOTE(safezoneY + 18 * GRID_H); + y = QUOTE(safeZoneY + 18 * GRID_H); }; class buttonItemAcc: buttonOptic { idc = IDC_buttonItemAcc; text = "\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\ItemAcc_ca.paa"; tooltip = "$STR_A3_RscDisplayArsenal_tab_ItemAcc"; - y = QUOTE(safezoneY + 18 * GRID_H); + y = QUOTE(safeZoneY + 18 * GRID_H); }; class iconBackgroundMuzzle: iconBackgroundOptic { idc = IDC_iconBackgroundMuzzle; - y = QUOTE(safezoneY + 28 * GRID_H); + y = QUOTE(safeZoneY + 28 * GRID_H); }; class buttonMuzzle: buttonOptic { idc = IDC_buttonMuzzle; text = "\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\ItemMuzzle_ca.paa"; tooltip = "$STR_A3_RscDisplayArsenal_tab_ItemMuzzle"; - y = QUOTE(safezoneY + 28 * GRID_H); + y = QUOTE(safeZoneY + 28 * GRID_H); }; class iconBackgroundBipod: iconBackgroundOptic { idc = IDC_iconBackgroundBipod; - y = QUOTE(safezoneY + 38 * GRID_H); + y = QUOTE(safeZoneY + 38 * GRID_H); }; class buttonBipod: buttonOptic { idc = IDC_buttonBipod; text = "\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\ItemBipod_ca.paa"; tooltip = "$STR_A3_RscDisplayArsenal_tab_ItemBipod"; - y = QUOTE(safezoneY + 38 * GRID_H); + y = QUOTE(safeZoneY + 38 * GRID_H); }; class iconBackgroundCurrentMag: iconBackgroundOptic { idc = IDC_iconBackgroundCurrentMag; - y = QUOTE(safezoneY + 48 * GRID_H); + y = QUOTE(safeZoneY + 48 * GRID_H); }; class buttonCurrentMag: buttonOptic { idc = IDC_buttonCurrentMag; text = "\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoMag_ca.paa"; tooltip = CSTRING(buttonCurrentMagTooltip); - y = QUOTE(safezoneY + 48 * GRID_H); + y = QUOTE(safeZoneY + 48 * GRID_H); }; class iconBackgroundCurrentMag2: iconBackgroundOptic { idc = IDC_iconBackgroundCurrentMag2; - y = QUOTE(safezoneY + 58 * GRID_H); + y = QUOTE(safeZoneY + 58 * GRID_H); }; class buttonCurrentMag2: buttonOptic { idc = IDC_buttonCurrentMag2; text = QPATHTOF(data\iconSecondaryMuzzle); tooltip = CSTRING(buttonCurrentMag2Tooltip); - y = QUOTE(safezoneY + 58 * GRID_H); + y = QUOTE(safeZoneY + 58 * GRID_H); }; class iconBackgroundMag: iconBackgroundOptic { idc = IDC_iconBackgroundMag; - y = QUOTE(safezoneY + 48 * GRID_H); + y = QUOTE(safeZoneY + 48 * GRID_H); }; class buttonMag: buttonOptic { idc = IDC_buttonMag; text = "\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoMag_ca.paa"; tooltip = "$STR_A3_RscDisplayArsenal_tab_CargoMag"; - y = QUOTE(safezoneY + 48 * GRID_H); + y = QUOTE(safeZoneY + 48 * GRID_H); }; class iconBackgroundMagALL: iconBackgroundOptic { idc = IDC_iconBackgroundMagALL; - y = QUOTE(safezoneY + 58 * GRID_H); + y = QUOTE(safeZoneY + 58 * GRID_H); }; class buttonMagALL: buttonOptic { idc = IDC_buttonMagALL; text = "\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoMagAll_ca.paa"; tooltip = "$STR_A3_RscDisplayArsenal_tab_CargoMagAll"; - y = QUOTE(safezoneY + 58 * GRID_H); + y = QUOTE(safeZoneY + 58 * GRID_H); }; class iconBackgroundThrow: iconBackgroundOptic { idc = IDC_iconBackgroundThrow; - y = QUOTE(safezoneY + 68 * GRID_H); + y = QUOTE(safeZoneY + 68 * GRID_H); }; class buttonThrow: buttonOptic { idc = IDC_buttonThrow; text = "\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoThrow_ca.paa"; tooltip = "$STR_A3_RscDisplayArsenal_tab_CargoThrow"; - y = QUOTE(safezoneY + 68 * GRID_H); + y = QUOTE(safeZoneY + 68 * GRID_H); }; class iconBackgroundPut: iconBackgroundOptic { idc = IDC_iconBackgroundPut; - y = QUOTE(safezoneY + 78 * GRID_H); + y = QUOTE(safeZoneY + 78 * GRID_H); }; class buttonPut: buttonOptic { idc = IDC_buttonPut; text = "\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoPut_ca.paa"; tooltip = "$STR_A3_RscDisplayArsenal_tab_CargoPut"; - y = QUOTE(safezoneY + 78 * GRID_H); + y = QUOTE(safeZoneY + 78 * GRID_H); }; class iconBackgroundMisc: iconBackgroundOptic { idc = IDC_iconBackgroundMisc; - y = QUOTE(safezoneY + 88 * GRID_H); + y = QUOTE(safeZoneY + 88 * GRID_H); }; class buttonMisc: buttonOptic { idc = IDC_buttonMisc; text = "\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoMisc_ca.paa"; tooltip = "$STR_A3_RscDisplayArsenal_tab_CargoMisc"; - y = QUOTE(safezoneY + 88 * GRID_H); + y = QUOTE(safeZoneY + 88 * GRID_H); }; class buttonRemoveAll: ctrlButtonPicture { @@ -998,8 +998,8 @@ class GVAR(display) { onButtonClick = QUOTE(ctrlParent (_this select 0) call FUNC(buttonClearAll)); fade = 1; enable = 0; - x = QUOTE(safezoneW + safezoneX - 11 * GRID_W); - y = QUOTE(safeZoneH + safezoneY - 29 * GRID_H); + x = QUOTE(safeZoneW + safeZoneX - 11 * GRID_W); + y = QUOTE(safeZoneH + safeZoneY - 29 * GRID_H); w = QUOTE(9 * GRID_W); h = QUOTE(9 * GRID_H); }; @@ -1013,17 +1013,17 @@ class GVAR(loadoutsDisplay) { class controls { class centerBox: ctrlControlsGroupNoScrollbars { idc = IDC_centerBox; - x = QUOTE(safezoneW + safezoneX - (180 * GRID_W)); - y = QUOTE(safezoneY + (5 * GRID_H)); + x = QUOTE(safeZoneW + safeZoneX - (180 * GRID_W)); + y = QUOTE(safeZoneY + (5 * GRID_H)); w = QUOTE(160 * GRID_W); - h = QUOTE(safezoneH - (34 * GRID_H)); + h = QUOTE(safeZoneH - (34 * GRID_H)); class controls { class centerFrame: RscFrame { idc = -1; x = QUOTE(0 * GRID_W); y = QUOTE(0 * GRID_H); w = QUOTE(160 * GRID_W); - h = QUOTE(safezoneH - (45 * GRID_H)); + h = QUOTE(safeZoneH - (45 * GRID_H)); colorText[] = {0,0,0,1}; }; class centerBackground: ctrlStaticBackground { @@ -1031,7 +1031,7 @@ class GVAR(loadoutsDisplay) { x = QUOTE(0); y = QUOTE(0); w = QUOTE(160 * GRID_W); - h = QUOTE(safezoneH - (45 * GRID_H)); + h = QUOTE(safeZoneH - (45 * GRID_H)); colorBackground[] = {0.13,0.13,0.13,0.9}; }; class centerTitle: ctrlStaticTitle { @@ -1056,14 +1056,14 @@ class GVAR(loadoutsDisplay) { x = QUOTE(0); y = QUOTE(5 * GRID_H); w = QUOTE(160 * GRID_W); - h = QUOTE(safezoneH - (57 * GRID_H)); + h = QUOTE(safeZoneH - (57 * GRID_H)); sizeEx = QUOTE(7 * GRID_H); }; class textTitle: RscText { idc = -1; text = "$STR_DISP_GAME_NAME"; x = QUOTE(0 * GRID_W); - y = QUOTE(safezoneH - (51 * GRID_H)); + y = QUOTE(safeZoneH - (51 * GRID_H)); w = QUOTE(15 * GRID_W); h = QUOTE(5 * GRID_H); sizeEx = QUOTE(5 * GRID_H); @@ -1072,7 +1072,7 @@ class GVAR(loadoutsDisplay) { class textEditBox: ctrlEdit { idc = IDC_textEditBox; x = QUOTE(15 * GRID_W); - y = QUOTE(safezoneH - (51 * GRID_H)); + y = QUOTE(safeZoneH - (51 * GRID_H)); w = QUOTE(65 * GRID_W); h = QUOTE(5 * GRID_H); sizeEx = QUOTE(6 * GRID_H); @@ -1083,7 +1083,7 @@ class GVAR(loadoutsDisplay) { onKillFocus = QUOTE(GVAR(loadoutsSearchbarFocus) = false); onMouseButtonClick = QUOTE([ARR_3(ctrlParent (_this select 0),_this select 0,_this select 1)] call FUNC(clearSearchbar)); x = QUOTE(83 * GRID_W); - y = QUOTE(safezoneH - (51 * GRID_H)); + y = QUOTE(safeZoneH - (51 * GRID_H)); w = QUOTE(72 * GRID_W); h = QUOTE(5 * GRID_H); sizeEx = QUOTE(6 * GRID_H); @@ -1094,14 +1094,14 @@ class GVAR(loadoutsDisplay) { colorBackground[] = {0,0,0,0.5}; onButtonClick = QUOTE([ARR_2(ctrlParent (_this select 0),ctrlParent (_this select 0) displayCtrl IDC_loadoutsSearchbar)] call FUNC(handleLoadoutsSearchbar)); x = QUOTE(155 * GRID_W); - y = QUOTE(safezoneH - (51 * GRID_H)); + y = QUOTE(safeZoneH - (51 * GRID_H)); w = QUOTE(5 * GRID_W); h = QUOTE(5 * GRID_H); }; class buttonSave: ctrlButton { idc = IDC_buttonSave; x = QUOTE(0 * GRID_W); - y = QUOTE(safezoneH - (44 * GRID_H)); + y = QUOTE(safeZoneH - (44 * GRID_H)); w = QUOTE(30 * GRID_W); h = QUOTE(10 * GRID_H); text = CSTRING(buttonSaveText); @@ -1143,8 +1143,8 @@ class GVAR(loadoutsDisplay) { }; class buttonClose: ctrlButton { idc = -1; - x = QUOTE(safezoneW + safezoneX - 32 * GRID_W); - y = QUOTE(safezoneH + safezoneY - 9 * GRID_H); + x = QUOTE(safeZoneW + safeZoneX - 32 * GRID_W); + y = QUOTE(safeZoneH + safeZoneY - 9 * GRID_H); w = QUOTE(30 * GRID_W); h = QUOTE(7 * GRID_H); sizeEx = QUOTE(5 * GRID_H); @@ -1154,8 +1154,8 @@ class GVAR(loadoutsDisplay) { }; class buttonBar: ctrlControlsGroupNoScrollbars { idc = -1; - x = QUOTE((safezoneW * 0.5) + safezoneX - (80.5 * GRID_W)); - y = QUOTE(safezoneH + safezoneY - 9 * GRID_H); + x = QUOTE((safeZoneW * 0.5) + safeZoneX - (80.5 * GRID_W)); + y = QUOTE(safeZoneH + safeZoneY - 9 * GRID_H); w = QUOTE(161 * GRID_W); h = QUOTE(7 * GRID_H); class controls { diff --git a/addons/arsenal/ui/RscCommon.hpp b/addons/arsenal/ui/RscCommon.hpp index f74326bcfb7..cb36a67aed3 100644 --- a/addons/arsenal/ui/RscCommon.hpp +++ b/addons/arsenal/ui/RscCommon.hpp @@ -86,12 +86,12 @@ #define TR_AUTOCOLLAPSE 2 // Default grid -#define GUI_GRID_WAbs ((safezoneW / safezoneH) min 1.2) +#define GUI_GRID_WAbs ((safeZoneW / safeZoneH) min 1.2) #define GUI_GRID_HAbs (GUI_GRID_WAbs / 1.2) #define GUI_GRID_W (GUI_GRID_WAbs / 40) #define GUI_GRID_H (GUI_GRID_HAbs / 25) -#define GUI_GRID_X (safezoneX) -#define GUI_GRID_Y (safezoneY + safezoneH - GUI_GRID_HAbs) +#define GUI_GRID_X (safeZoneX) +#define GUI_GRID_Y (safeZoneY + safeZoneH - GUI_GRID_HAbs) // Default text sizes #define GUI_TEXT_SIZE_SMALL (GUI_GRID_H * 0.8) diff --git a/addons/arsenal/ui/RscCustomArsenalButton.hpp b/addons/arsenal/ui/RscCustomArsenalButton.hpp index 0aa077f424c..e745203e7ea 100644 --- a/addons/arsenal/ui/RscCustomArsenalButton.hpp +++ b/addons/arsenal/ui/RscCustomArsenalButton.hpp @@ -1,6 +1,6 @@ class GVAR(customArsenalButton_Button): RscButtonArsenal { - x = QUOTE(safezoneW + safezoneX - 10 * GRID_W); - y = QUOTE(safezoneY + 88 * GRID_H); + x = QUOTE(safeZoneW + safeZoneX - 10 * GRID_W); + y = QUOTE(safeZoneY + 88 * GRID_H); w = QUOTE(9 * GRID_W); h = QUOTE(9 * GRID_H); @@ -11,8 +11,8 @@ class GVAR(customArsenalButton_Button): RscButtonArsenal { }; class GVAR(customArsenalButton_Background): ctrlStaticBackground { - x = QUOTE(safezoneW + safezoneX - 13 * GRID_W); - y = QUOTE(safezoneY + 88 * GRID_H); + x = QUOTE(safeZoneW + safeZoneX - 13 * GRID_W); + y = QUOTE(safeZoneY + 88 * GRID_H); w = QUOTE(12 * GRID_W); h = QUOTE(9 * GRID_H); diff --git a/addons/artillerytables/RscRangeTable.hpp b/addons/artillerytables/RscRangeTable.hpp index ef11d7eac82..a24aa503cb5 100644 --- a/addons/artillerytables/RscRangeTable.hpp +++ b/addons/artillerytables/RscRangeTable.hpp @@ -8,16 +8,16 @@ class GVAR(rangeTableDialog) { class TableBackground: RscPicture { idc = -1; text = QPATHTOF(UI\RangeTable_background.paa); - x = "18 *(safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH) / 2)"; - y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2)) / 2)"; + x = "18 *(safeZoneH / 40) + (safeZoneX + (safeZoneW - safeZoneH) / 2)"; + y = "1 * ((safeZoneH / 1.2) / 25) + (safeZoneY + (safeZoneH - (safeZoneH / 1.2)) / 2)"; w = "16.2634559672906 * (safeZoneH / 40)"; h = "23 * ((safeZoneH / 1.2) / 25)"; colorBackground[] = {1,1,1,1}; }; class LeftSideBackground: RscText { idc = -1; - x = "13 *(safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH) / 2)"; - y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2)) / 2)"; + x = "13 *(safeZoneH / 40) + (safeZoneX + (safeZoneW - safeZoneH) / 2)"; + y = "1 * ((safeZoneH / 1.2) / 25) + (safeZoneY + (safeZoneH - (safeZoneH / 1.2)) / 2)"; w = "5 * (safeZoneH / 40)"; h = "23 * ((safeZoneH / 1.2) / 25)"; colorBackground[] = {0,0,0,0.8}; @@ -26,8 +26,8 @@ class GVAR(rangeTableDialog) { class controls { class TheTable: RscListNBox { idc = IDC_TABLE; - x = "18 *(safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH) / 2)"; - y = "3.76 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2)) / 2)"; + x = "18 *(safeZoneH / 40) + (safeZoneX + (safeZoneW - safeZoneH) / 2)"; + y = "3.76 * ((safeZoneH / 1.2) / 25) + (safeZoneY + (safeZoneH - (safeZoneH / 1.2)) / 2)"; w = "16.2634559672906 * (safeZoneH / 40)"; h = "20.24 * ((safeZoneH / 1.2) / 25)"; columns[] = {"10/867", "86/867", "171/867", "238/867", "320/867", "405/867", "485/867", "546/867", "607/867", "668/867", "729/867", "790/867"}; @@ -48,8 +48,8 @@ class GVAR(rangeTableDialog) { }; class ChargeListBox: RscListBox { idc = IDC_CHARGELIST; - x = "13 *(safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH) / 2)"; - y = "2 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2)) / 2)"; + x = "13 *(safeZoneH / 40) + (safeZoneX + (safeZoneW - safeZoneH) / 2)"; + y = "2 * ((safeZoneH / 1.2) / 25) + (safeZoneY + (safeZoneH - (safeZoneH / 1.2)) / 2)"; w = "5 * (safeZoneH / 40)"; h = "22 * ((safeZoneH / 1.2) / 25)"; onLBSelChanged = QUOTE([] call FUNC(rangeTableUpdate)); @@ -58,8 +58,8 @@ class GVAR(rangeTableDialog) { idc = IDC_BUTTON_ELEV_HIGH; text = "High"; onButtonClick = QUOTE([true] call FUNC(rangeTableUpdate)); - x = "13.1 *(safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH) / 2)"; - y = "1.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2)) / 2)"; + x = "13.1 *(safeZoneH / 40) + (safeZoneX + (safeZoneW - safeZoneH) / 2)"; + y = "1.1 * ((safeZoneH / 1.2) / 25) + (safeZoneY + (safeZoneH - (safeZoneH / 1.2)) / 2)"; w = "2.3 * (safeZoneH / 40)"; h = "0.8 * ((safeZoneH / 1.2) / 25)"; }; @@ -67,12 +67,12 @@ class GVAR(rangeTableDialog) { idc = IDC_BUTTON_ELEV_LOW; text = "Low"; onButtonClick = QUOTE([false] call FUNC(rangeTableUpdate)); - x = "15.6 *(safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH) / 2)"; + x = "15.6 *(safeZoneH / 40) + (safeZoneX + (safeZoneW - safeZoneH) / 2)"; }; class CloseBackground: RscText { idc = -1; - x = "33.7634559672906 *(safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH) / 2)"; - y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2)) / 2)"; + x = "33.7634559672906 *(safeZoneH / 40) + (safeZoneX + (safeZoneW - safeZoneH) / 2)"; + y = "1 * ((safeZoneH / 1.2) / 25) + (safeZoneY + (safeZoneH - (safeZoneH / 1.2)) / 2)"; w = "0.5 * (safeZoneH / 40)"; h = "0.5 * ((safeZoneH / 1.2) / 25)"; colorBackground[] = {0,0,0,0.5}; @@ -82,8 +82,8 @@ class GVAR(rangeTableDialog) { style = 48; color[] = {1,1,1,0.7}; text = "A3\Ui_f\data\GUI\Rsc\RscDisplayArcadeMap\icon_exit_cross_ca.paa"; - x = "33.7634559672906 *(safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH) / 2)"; - y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2)) / 2)"; + x = "33.7634559672906 *(safeZoneH / 40) + (safeZoneX + (safeZoneW - safeZoneH) / 2)"; + y = "1 * ((safeZoneH / 1.2) / 25) + (safeZoneY + (safeZoneH - (safeZoneH / 1.2)) / 2)"; w = "0.5 * (safeZoneH / 40)"; h = "0.5 * ((safeZoneH / 1.2) / 25)"; colorText[] = {1,1,1,0.7}; diff --git a/addons/artillerytables/RscTitles.hpp b/addons/artillerytables/RscTitles.hpp index c26f302a00f..e0c4cc34495 100644 --- a/addons/artillerytables/RscTitles.hpp +++ b/addons/artillerytables/RscTitles.hpp @@ -9,10 +9,10 @@ class RscTitles { class controls { class ModeControlGroup: RscControlsGroupNoScrollbars { idc = IDC_MODECONTROLGROUP; - x = "3.8 * (((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable ['IGUI_GRID_WEAPON_X',((safezoneX + safezoneW) - (10 * (((safezoneW / safezoneH) min 1.2) / 40)) - 4.3 * (((safezoneW / safezoneH) min 1.2) / 40))])"; - y = "2.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getVariable ['IGUI_GRID_WEAPON_Y', (safezoneY + 0.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])"; - w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "3.8 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (profilenamespace getvariable ['IGUI_GRID_WEAPON_X',((safeZoneX + safeZoneW) - (10 * (((safeZoneW / safeZoneH) min 1.2) / 40)) - 4.3 * (((safeZoneW / safeZoneH) min 1.2) / 40))])"; + y = "2.5 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (profilenamespace getVariable ['IGUI_GRID_WEAPON_Y', (safeZoneY + 0.5 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25))])"; + w = "10 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; class controls { class Charge: RscText { @@ -21,18 +21,18 @@ class RscTitles { colorBackground[] = {0, 0, 0, 0}; x = "0"; y = "0"; - w = "(2) * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - sizeEx = "0.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + w = "(2) * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + sizeEx = "0.8 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; }; class Azimuth: Charge { idc = IDC_AZIMUTH; - x = "(2) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - w = "(3) * (((safezoneW / safezoneH) min 1.2) / 40)"; + x = "(2) * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + w = "(3) * (((safeZoneW / safeZoneH) min 1.2) / 40)"; }; class Elevation: Azimuth { idc = IDC_ELEVATION; - x = "(5) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "(5) * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; }; }; }; diff --git a/addons/artillerytables/dev/showShotInfo.inc.sqf b/addons/artillerytables/dev/showShotInfo.inc.sqf index ac99acbdc16..6945e95ba0b 100644 --- a/addons/artillerytables/dev/showShotInfo.inc.sqf +++ b/addons/artillerytables/dev/showShotInfo.inc.sqf @@ -35,7 +35,7 @@ INFO("showing shot info"); private _diff = _lastPos vectorDiff _shootPos; _mkrB setMarkerText format ["%1", _diff apply {round _x}]; - private _dist2d = _shootPos distance2d _lastPos; + private _dist2d = _shootPos distance2D _lastPos; private _dir = _shootPos getDir _lastPos; private _height = (_lastPos select 2) - (_shootPos select 2); _mkrB setMarkerText format ["Dist: %1m Az: %2[%3] Height:%4", _dist2d toFixed 0, _dir toFixed 2, ((6400 / 360) * _dir) toFixed 0, _height toFixed 0]; diff --git a/addons/artillerytables/functions/fnc_turretPFEH.sqf b/addons/artillerytables/functions/fnc_turretPFEH.sqf index e1964f7e41a..5e4e6c94657 100644 --- a/addons/artillerytables/functions/fnc_turretPFEH.sqf +++ b/addons/artillerytables/functions/fnc_turretPFEH.sqf @@ -43,7 +43,7 @@ BEGIN_COUNTER(pfeh); private _currentFireMode = (weaponState [_vehicle, _turret]) select 2; private _currentChargeMode = _fireModes find _currentFireMode; -private _lookVector = (AGLtoASL (positionCameraToWorld [0,0,0])) vectorFromTo (AGLtoASL (positionCameraToWorld [0,0,1])); +private _lookVector = (AGLToASL (positionCameraToWorld [0,0,0])) vectorFromTo (AGLToASL (positionCameraToWorld [0,0,1])); private _weaponDir = _vehicle weaponDirection (currentWeapon _vehicle); // Calc real azimuth/elevation @@ -51,7 +51,7 @@ private _weaponDir = _vehicle weaponDirection (currentWeapon _vehicle); private _display = uiNamespace getVariable ["ACE_dlgArtillery", displayNull]; private _useRealWeaponDir = if ((isNull (_display displayCtrl 173)) || {(_vehicle ammo (currentWeapon _vehicle)) == 0}) then { // With no ammo, distance display will be empty, but gun will still fire at wonky angle if aimed at ground - private _testSeekerPosASL = AGLtoASL (positionCameraToWorld [0,0,0]); + private _testSeekerPosASL = AGLToASL (positionCameraToWorld [0,0,0]); private _testPoint = _testSeekerPosASL vectorAdd (_lookVector vectorMultiply viewDistance); !((terrainIntersectASL [_testSeekerPosASL, _testPoint]) || {lineIntersects [_testSeekerPosASL, _testPoint, _vehicle]}); } else { @@ -84,8 +84,8 @@ private _ctrlCharge = (uiNamespace getVariable [QGVAR(display), displayNull]) di private _ctrlAzimuth = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl IDC_AZIMUTH; private _ctrlElevation = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl IDC_ELEVATION; -_ctrlAzimuth ctrlSetText Format ["AZ: %1", [DEGTOMILS * _realAzimuth, 4, 0] call CBA_fnc_formatNumber]; -_ctrlElevation ctrlSetText Format ["EL: %1", [DEGTOMILS * _realElevation, 4, 0] call CBA_fnc_formatNumber]; +_ctrlAzimuth ctrlSetText format ["AZ: %1", [DEGTOMILS * _realAzimuth, 4, 0] call CBA_fnc_formatNumber]; +_ctrlElevation ctrlSetText format ["EL: %1", [DEGTOMILS * _realElevation, 4, 0] call CBA_fnc_formatNumber]; _ctrlCharge ctrlSetText format ["CH: %1", _currentChargeMode]; // avalible for other addons (mk6) diff --git a/addons/atragmx/RscTitles.hpp b/addons/atragmx/RscTitles.hpp index 6196346c575..33b8c8036a0 100644 --- a/addons/atragmx/RscTitles.hpp +++ b/addons/atragmx/RscTitles.hpp @@ -157,8 +157,8 @@ class ATragMX_Display { SizeEX="0.025"; idc=720000; style=48; - x="0.55*safezoneW+safezoneX-0.256"; - y="0.265*safezoneH+safezoneY-0.1"; + x="0.55*safeZoneW+safeZoneX-0.256"; + y="0.265*safeZoneH+safeZoneY-0.1"; w="1.024"; h="1.024*4/3"; colorBackground[]={1,1,1,1}; @@ -167,8 +167,8 @@ class ATragMX_Display { }; class POWER: ATragMX_RscButton { idc=-1; - x="0.55*safezoneW+safezoneX+0.145"; - y="0.265*safezoneH+safezoneY+0.94"; + x="0.55*safeZoneW+safeZoneX+0.145"; + y="0.265*safeZoneH+safeZoneY+0.94"; w="0.045"; h="0.045*4/3"; colorBackground[]={0,0,0,0.0}; @@ -177,26 +177,26 @@ class ATragMX_Display { class BACK: POWER { idc=-1; w="0.06"; - x="0.55*safezoneW+safezoneX+0.3122"; + x="0.55*safeZoneW+safeZoneX+0.3122"; action=QUOTE(call FUNC(init); call FUNC(update_target_selection)); }; class WINDOWS: ATragMX_RscButton { idc=-1; - x="0.55*safezoneW+safezoneX+0.130"; - y="0.265*safezoneH+safezoneY+0.88"; + x="0.55*safeZoneW+safeZoneX+0.130"; + y="0.265*safeZoneH+safeZoneY+0.88"; w="0.035"; h="0.035*4/3"; colorBackground[]={0,0,0,0.0}; }; class OK: WINDOWS { idc=-1; - x="0.55*safezoneW+safezoneX+0.347"; - y="0.265*safezoneH+safezoneY+0.878"; + x="0.55*safeZoneW+safeZoneX+0.347"; + y="0.265*safeZoneH+safeZoneY+0.878"; }; class TOP: ATragMX_RscButton { idc=-1; - x="0.55*safezoneW+safezoneX+0.242"; - y="0.265*safezoneH+safezoneY+0.85"; + x="0.55*safeZoneW+safeZoneX+0.242"; + y="0.265*safeZoneH+safeZoneY+0.85"; w="0.03"; h="0.03"; colorBackground[]={0,0,0,0.0}; @@ -204,13 +204,13 @@ class ATragMX_Display { }; class BOTTOM: TOP { idc=-1; - y="0.265*safezoneH+safezoneY+0.955"; + y="0.265*safeZoneH+safeZoneY+0.955"; action=QUOTE(+1 call FUNC(cycle_gun_list)); }; class LEFT: ATragMX_RscButton { idc=-1; - x="0.55*safezoneW+safezoneX+0.1925"; - y="0.265*safezoneH+safezoneY+0.9"; + x="0.55*safeZoneW+safeZoneX+0.1925"; + y="0.265*safeZoneH+safeZoneY+0.9"; w="0.05"; h="0.03"; colorBackground[]={0,0,0,0}; @@ -218,50 +218,50 @@ class ATragMX_Display { }; class RIGHT: LEFT { idc=-1; - x="0.55*safezoneW+safezoneX+0.2725"; + x="0.55*safeZoneW+safeZoneX+0.2725"; action=QUOTE(((4 + GVAR(currentTarget) + 1) % 4) call FUNC(change_target_slot)); }; class TOP_LEFT: ATragMX_RscButton { idc=-1; - x="0.55*safezoneW+safezoneX+0.162"; - y="0.265*safezoneH+safezoneY+0.82"; + x="0.55*safeZoneW+safeZoneX+0.162"; + y="0.265*safeZoneH+safeZoneY+0.82"; w="0.031"; h="0.031*4/3"; colorBackground[]={0,0,0,0.0}; }; class TOP_RIGHT: TOP_LEFT { idc=-1; - x="0.55*safezoneW+safezoneX+0.315"; + x="0.55*safeZoneW+safeZoneX+0.315"; }; class TEXT_GUN_FRAME: ATragMX_RscText { idc=1001; style=64; - x="0.550*safezoneW+safezoneX+0.11"; - y="0.265*safezoneH+safezoneY+0.25"; + x="0.550*safeZoneW+safeZoneX+0.11"; + y="0.265*safeZoneH+safeZoneY+0.25"; w="0.0925"; h="0.205"; text=""; }; class TEXT_ATMOSPHERE_FRAME: TEXT_GUN_FRAME { idc=1002; - x="0.550*safezoneW+safezoneX+0.205"; + x="0.550*safeZoneW+safeZoneX+0.205"; }; class TEXT_TARGET_FRAME: TEXT_GUN_FRAME { idc=1003; - x="0.550*safezoneW+safezoneX+0.3"; + x="0.550*safeZoneW+safeZoneX+0.3"; }; class TEXT_RESULT_FRAME: TEXT_GUN_FRAME { idc=1004; - x="0.550*safezoneW+safezoneX+0.11"; - y="0.265*safezoneH+safezoneY+0.46"; + x="0.550*safeZoneW+safeZoneX+0.11"; + y="0.265*safeZoneH+safeZoneY+0.46"; w="0.2825"; h="0.15"; }; class TEXT_GUN_PROFILE: ATragMX_RscText { idc=1000; - x="0.550*safezoneW+safezoneX+0.11"; - y="0.265*safezoneH+safezoneY+0.20"; + x="0.550*safeZoneW+safeZoneX+0.11"; + y="0.265*safeZoneH+safeZoneY+0.20"; w="0.18"; h="0.03"; style=ST_LEFT; @@ -271,8 +271,8 @@ class ATragMX_Display { class TEXT_D: ATragMX_RscButton { idc=600; w="0.0231"; - x="0.550*safezoneW+safezoneX+0.29"; - y="0.265*safezoneH+safezoneY+0.20"; + x="0.550*safeZoneW+safeZoneX+0.29"; + y="0.265*safeZoneH+safeZoneY+0.20"; colorText[]={0,0,0,1}; colorDisabled[]={0.8,0.8,0.8,1}; colorBackgroundDisabled[]={0,0,0,1}; @@ -282,20 +282,20 @@ class ATragMX_Display { }; class TEXT_E: TEXT_D { idc=601; - x="0.550*safezoneW+safezoneX+0.3131"; + x="0.550*safeZoneW+safeZoneX+0.3131"; text="E"; action=QUOTE(GVAR(currentUnit)=1; call FUNC(update_unit_selection)); }; class TEXT_M: TEXT_E { idc=602; - x="0.550*safezoneW+safezoneX+0.3362"; + x="0.550*safeZoneW+safeZoneX+0.3362"; text="M"; action=QUOTE(GVAR(currentUnit)=2; call FUNC(update_unit_selection)); }; class TEXT_RANGE_CARD: TEXT_D { idc=603; w="0.03"; - x="0.550*safezoneW+safezoneX+0.36"; + x="0.550*safeZoneW+safeZoneX+0.36"; colorBackground[]={0.15,0.21,0.23,0.3}; colorFocused[]={0.15,0.21,0.23,0.2}; text="RC"; @@ -305,8 +305,8 @@ class ATragMX_Display { class TEXT_GUN: ATragMX_RscButton { idc=4000; w="0.0925"; - x="0.550*safezoneW+safezoneX+0.11"; - y="0.265*safezoneH+safezoneY+0.25"; + x="0.550*safeZoneW+safeZoneX+0.11"; + y="0.265*safeZoneH+safeZoneY+0.25"; colorBackground[]={0.15,0.21,0.23,0.3}; colorFocused[]={0.15,0.21,0.23,0.2}; text="Gun"; @@ -315,41 +315,41 @@ class ATragMX_Display { class TEXT_BORE_HEIGHT: TEXT_GUN_PROFILE { idc=10; style=ST_LEFT; - y="0.265*safezoneH+safezoneY+0.285"; + y="0.265*safeZoneH+safeZoneY+0.285"; text="BH"; }; class TEXT_BORE_HEIGHT_OUTPUT: TEXT_BORE_HEIGHT { idc=100; style=ST_RIGHT; w="0.058"; - x="0.550*safezoneW+safezoneX+0.145"; - y="0.265*safezoneH+safezoneY+0.285"; + x="0.550*safeZoneW+safeZoneX+0.145"; + y="0.265*safeZoneH+safeZoneY+0.285"; }; class TEXT_BULLET_MASS: TEXT_BORE_HEIGHT { idc=11; style=ST_LEFT; - y="0.265*safezoneH+safezoneY+0.320"; + y="0.265*safeZoneH+safeZoneY+0.320"; text="BW"; }; class TEXT_BULLET_MASS_OUTPUT: TEXT_BORE_HEIGHT_OUTPUT { idc=110; - y="0.265*safezoneH+safezoneY+0.320"; + y="0.265*safeZoneH+safeZoneY+0.320"; }; class TEXT_AIR_FRICTION: TEXT_BORE_HEIGHT { idc=12; - y="0.265*safezoneH+safezoneY+0.355"; + y="0.265*safeZoneH+safeZoneY+0.355"; text="C1"; }; class TEXT_AIR_FRICTION_OUTPUT: TEXT_BORE_HEIGHT_OUTPUT { idc=120; - y="0.265*safezoneH+safezoneY+0.355"; + y="0.265*safeZoneH+safeZoneY+0.355"; }; class TEXT_MUZZLE_VELOCITY: ATragMX_RscButton { idc=13; style=0; w="0.03"; - x="0.550*safezoneW+safezoneX+0.11"; - y="0.265*safezoneH+safezoneY+0.390"; + x="0.550*safeZoneW+safeZoneX+0.11"; + y="0.265*safeZoneH+safeZoneY+0.390"; colorBackground[]={0.15,0.21,0.23,0.3}; colorFocused[]={0.15,0.21,0.23,0.2}; text="MV"; @@ -357,69 +357,69 @@ class ATragMX_Display { }; class TEXT_MUZZLE_VELOCITY_OUTPUT: TEXT_BORE_HEIGHT_OUTPUT { idc=130; - y="0.265*safezoneH+safezoneY+0.390"; + y="0.265*safeZoneH+safeZoneY+0.390"; }; class TEXT_ZERO_RANGE: TEXT_BORE_HEIGHT { idc=14; - y="0.265*safezoneH+safezoneY+0.425"; + y="0.265*safeZoneH+safeZoneY+0.425"; text="ZR"; }; class TEXT_ZERO_RANGE_OUTPUT: TEXT_BORE_HEIGHT_OUTPUT { idc=140; - y="0.265*safezoneH+safezoneY+0.425"; + y="0.265*safeZoneH+safeZoneY+0.425"; }; class TEXT_ATMOSPHERE: TEXT_GUN { idc=4001; - x="0.550*safezoneW+safezoneX+0.205"; + x="0.550*safeZoneW+safeZoneX+0.205"; text="Atmsphr"; action=QUOTE(0 call FUNC(toggle_atmo_env_data)); }; class TEXT_TEMPERATURE: TEXT_BULLET_MASS { idc=20; - x="0.550*safezoneW+safezoneX+0.20"; + x="0.550*safeZoneW+safeZoneX+0.20"; text="Tmp"; }; class TEXT_TEMPERATURE_OUTPUT: TEXT_TEMPERATURE { idc=200; style=ST_RIGHT; w="0.050"; - x="0.550*safezoneW+safezoneX+0.245"; - y="0.265*safezoneH+safezoneY+0.320"; + x="0.550*safeZoneW+safeZoneX+0.245"; + y="0.265*safeZoneH+safeZoneY+0.320"; text=""; }; class TEXT_BAROMETRIC_PRESSURE: TEXT_TEMPERATURE { idc=21; - x="0.550*safezoneW+safezoneX+0.20"; - y="0.265*safezoneH+safezoneY+0.355"; + x="0.550*safeZoneW+safeZoneX+0.20"; + y="0.265*safeZoneH+safeZoneY+0.355"; text="BP"; }; class TEXT_BAROMETRIC_PRESSURE_OUTPUT: TEXT_TEMPERATURE_OUTPUT { idc=210; - y="0.265*safezoneH+safezoneY+0.355"; + y="0.265*safeZoneH+safeZoneY+0.355"; }; class TEXT_RELATIVE_HUMIDITY: TEXT_BAROMETRIC_PRESSURE { idc=22; - y="0.265*safezoneH+safezoneY+0.390"; + y="0.265*safeZoneH+safeZoneY+0.390"; text="RH"; }; class TEXT_RELATIVE_HUMIDITY_OUTPUT: TEXT_TEMPERATURE_OUTPUT { idc=220; - y="0.265*safezoneH+safezoneY+0.390"; + y="0.265*safeZoneH+safeZoneY+0.390"; }; class TEXT_ALTITUDE: TEXT_BORE_HEIGHT { idc=23; - x="0.550*safezoneW+safezoneX+0.20"; + x="0.550*safeZoneW+safeZoneX+0.20"; text="Alt"; }; class TEXT_ALTITUDE_OUTPUT: TEXT_TEMPERATURE_OUTPUT { idc=230; - y="0.265*safezoneH+safezoneY+0.285"; + y="0.265*safeZoneH+safeZoneY+0.285"; }; class TEXT_TARGET_A: ATragMX_RscButton { idc=500; w="0.0231"; - x="0.550*safezoneW+safezoneX+0.205"; - y="0.265*safezoneH+safezoneY+0.425"; + x="0.550*safeZoneW+safeZoneX+0.205"; + y="0.265*safeZoneH+safeZoneY+0.425"; colorText[]={0,0,0,1}; colorDisabled[]={0.8,0.8,0.8,1}; colorBackgroundDisabled[]={0,0,0,1}; @@ -429,103 +429,103 @@ class ATragMX_Display { }; class TEXT_TARGET_B: TEXT_TARGET_A { idc=501; - x="0.550*safezoneW+safezoneX+0.2281"; + x="0.550*safeZoneW+safeZoneX+0.2281"; text="B"; action=QUOTE(1 call FUNC(change_target_slot)); }; class TEXT_TARGET_C: TEXT_TARGET_A { idc=502; - x="0.550*safezoneW+safezoneX+0.2512"; + x="0.550*safeZoneW+safeZoneX+0.2512"; text="C"; action=QUOTE(2 call FUNC(change_target_slot)); }; class TEXT_TARGET_D: TEXT_TARGET_A { idc=503; - x="0.550*safezoneW+safezoneX+0.2743"; + x="0.550*safeZoneW+safeZoneX+0.2743"; text="D"; action=QUOTE(3 call FUNC(change_target_slot)); }; class TEXT_TARGET: TEXT_GUN { idc=4002; - x="0.550*safezoneW+safezoneX+0.3"; + x="0.550*safeZoneW+safeZoneX+0.3"; text="Target"; action=QUOTE(0 call FUNC(toggle_target_data)); }; class TEXT_WIND_SPEED: TEXT_BORE_HEIGHT { idc=30; - x="0.550*safezoneW+safezoneX+0.3"; + x="0.550*safeZoneW+safeZoneX+0.3"; text="WS"; }; class TEXT_WIND_SPEED_OUTPUT: TEXT_BORE_HEIGHT_OUTPUT { idc=300; w="0.058"; - x="0.550*safezoneW+safezoneX+0.335"; - y="0.265*safezoneH+safezoneY+0.285"; + x="0.550*safeZoneW+safeZoneX+0.335"; + y="0.265*safeZoneH+safeZoneY+0.285"; text="0"; }; class TEXT_WIND_DIRECTION: TEXT_BULLET_MASS { idc=31; - x="0.550*safezoneW+safezoneX+0.3"; + x="0.550*safeZoneW+safeZoneX+0.3"; text="WD"; }; class TEXT_WIND_DIRECTION_OUTPUT: TEXT_WIND_SPEED_OUTPUT { idc=310; - y="0.265*safezoneH+safezoneY+0.32"; + y="0.265*safeZoneH+safeZoneY+0.32"; }; class TEXT_INCLINATION_ANGLE: TEXT_AIR_FRICTION { idc=32; - x="0.550*safezoneW+safezoneX+0.3"; + x="0.550*safeZoneW+safeZoneX+0.3"; text="IA"; }; class TEXT_INCLINATION_ANGLE_OUTPUT: TEXT_WIND_SPEED_OUTPUT { idc=320; - y="0.265*safezoneH+safezoneY+0.355"; + y="0.265*safeZoneH+safeZoneY+0.355"; }; class TEXT_TARGET_SPEED: TEXT_MUZZLE_VELOCITY { idc=33; - x="0.550*safezoneW+safezoneX+0.3"; + x="0.550*safeZoneW+safeZoneX+0.3"; text="TS"; action=QUOTE(0 call FUNC(toggle_target_speed_assist)); }; class TEXT_TARGET_SPEED_OUTPUT: TEXT_WIND_SPEED_OUTPUT { idc=330; - y="0.265*safezoneH+safezoneY+0.39"; + y="0.265*safeZoneH+safeZoneY+0.39"; }; class TEXT_TARGET_RANGE: TEXT_TARGET_SPEED { idc=34; - y="0.265*safezoneH+safezoneY+0.425"; + y="0.265*safeZoneH+safeZoneY+0.425"; text="TR"; action=QUOTE(0 call FUNC(toggle_target_range_assist)); }; class TEXT_TARGET_RANGE_INPUT: TEXT_WIND_SPEED_OUTPUT { idc=340; - y="0.265*safezoneH+safezoneY+0.425"; + y="0.265*safeZoneH+safeZoneY+0.425"; }; class TEXT_ELEVATION: TEXT_GUN_PROFILE { idc=40; w="0.05"; - x="0.550*safezoneW+safezoneX+0.115"; - y="0.265*safezoneH+safezoneY+0.50"; + x="0.550*safeZoneW+safeZoneX+0.115"; + y="0.265*safeZoneH+safeZoneY+0.50"; text="Elev"; }; class TEXT_ABSOLUTE: TEXT_GUN_PROFILE { idc=4003; w="0.07"; style=ST_CENTER; - x="0.550*safezoneW+safezoneX+0.17"; - y="0.265*safezoneH+safezoneY+0.47"; + x="0.550*safeZoneW+safeZoneX+0.17"; + y="0.265*safeZoneH+safeZoneY+0.47"; text="Abs"; }; class TEXT_RELATIVE: TEXT_ABSOLUTE { idc=4004; - x="0.550*safezoneW+safezoneX+0.245"; + x="0.550*safeZoneW+safeZoneX+0.245"; text="Rel"; }; class TEXT_CURRENT: TEXT_ABSOLUTE { idc=4005; - x="0.550*safezoneW+safezoneX+0.32"; + x="0.550*safeZoneW+safeZoneX+0.32"; text="Cur"; }; class TEXT_ELEVATION_OUTPUT_ABSOLUTE: ATragMX_RscText { @@ -534,67 +534,67 @@ class ATragMX_Display { sizeEx="0.025"; w="0.065"; h="0.032"; - x="0.550*safezoneW+safezoneX+0.17"; - y="0.265*safezoneH+safezoneY+0.50"; + x="0.550*safeZoneW+safeZoneX+0.17"; + y="0.265*safeZoneH+safeZoneY+0.50"; text=""; }; class TEXT_ELEVATION_OUTPUT_RELATIVE: TEXT_ELEVATION_OUTPUT_ABSOLUTE { idc=401; - x="0.550*safezoneW+safezoneX+0.2465"; + x="0.550*safeZoneW+safeZoneX+0.2465"; }; class TEXT_ELEVATION_INPUT_CURRENT: TEXT_ELEVATION_OUTPUT_ABSOLUTE { idc=402; - x="0.550*safezoneW+safezoneX+0.323"; + x="0.550*safeZoneW+safeZoneX+0.323"; }; class TEXT_WINDAGE: TEXT_ELEVATION { idc=41; - y="0.265*safezoneH+safezoneY+0.535"; + y="0.265*safeZoneH+safeZoneY+0.535"; text="Wind"; }; class TEXT_WINDAGE_OUTPUT_ABSOLUTE: TEXT_ELEVATION_OUTPUT_ABSOLUTE { idc=410; - y="0.265*safezoneH+safezoneY+0.535"; + y="0.265*safeZoneH+safeZoneY+0.535"; }; class TEXT_WINDAGE_OUTPUT_RELATIVE: TEXT_WINDAGE_OUTPUT_ABSOLUTE { idc=411; - x="0.550*safezoneW+safezoneX+0.2465"; + x="0.550*safeZoneW+safeZoneX+0.2465"; }; class TEXT_WINDAGE_INPUT_CURRENT: TEXT_WINDAGE_OUTPUT_ABSOLUTE { idc=412; - x="0.550*safezoneW+safezoneX+0.323"; + x="0.550*safeZoneW+safeZoneX+0.323"; }; class TEXT_LEAD: TEXT_GUN { idc=42; w="0.05"; - x="0.550*safezoneW+safezoneX+0.115"; - y="0.265*safezoneH+safezoneY+0.57"; + x="0.550*safeZoneW+safeZoneX+0.115"; + y="0.265*safeZoneH+safeZoneY+0.57"; text="Lead"; action=QUOTE(GVAR(showWind2) = !GVAR(showWind2); call FUNC(update_result); call FUNC(update_target)); }; class TEXT_LEAD_OUTPUT: TEXT_ELEVATION_OUTPUT_ABSOLUTE { idc=420; - y="0.265*safezoneH+safezoneY+0.57"; + y="0.265*safeZoneH+safeZoneY+0.57"; }; class TEXT_RESET_SCOPE_ZERO: TEXT_GUN { idc=4006; w="0.07"; style=ST_CENTER; colorBackground[]={0,0,0,0}; - x="0.550*safezoneW+safezoneX+0.2465"; - y="0.265*safezoneH+safezoneY+0.57"; + x="0.550*safeZoneW+safeZoneX+0.2465"; + y="0.265*safeZoneH+safeZoneY+0.57"; text="Reset"; action=QUOTE(call FUNC(reset_relative_click_memory)); }; class TEXT_UPDATE_SCOPE_ZERO: TEXT_RESET_SCOPE_ZERO { idc=4007; - x="0.550*safezoneW+safezoneX+0.323"; + x="0.550*safeZoneW+safeZoneX+0.323"; text="Update"; action=QUOTE(call FUNC(update_relative_click_memory)); }; class TEXT_GUN_LIST: TEXT_GUN { idc=4008; style=ST_LEFT; - y="0.265*safezoneH+safezoneY+0.65"; + y="0.265*safeZoneH+safeZoneY+0.65"; text="GunList"; action=QUOTE(call FUNC(toggle_gun_list)); }; @@ -602,7 +602,7 @@ class ATragMX_Display { idc=2000; style=ST_CENTER; w="0.06"; - x="0.550*safezoneW+safezoneX+0.205"; + x="0.550*safeZoneW+safeZoneX+0.205"; colorBackground[]={0,0,0,0}; text="TMOA"; action=QUOTE(call FUNC(cycle_scope_unit)); @@ -611,14 +611,14 @@ class ATragMX_Display { idc=2001; style=ST_CENTER; w="0.025"; - x="0.550*safezoneW+safezoneX+0.27"; + x="0.550*safeZoneW+safeZoneX+0.27"; text="4"; action=QUOTE(call FUNC(toggle_solution_setup)); }; class TEXT_OPTIONS: TEXT_GUN_LIST { idc=3000; style=ST_RIGHT; - x="0.550*safezoneW+safezoneX+0.3"; + x="0.550*safeZoneW+safeZoneX+0.3"; text="Options"; action=QUOTE(false call FUNC(toggle_option_menu)); }; @@ -627,8 +627,8 @@ class ATragMX_Display { colorBackground[]={0.15,0.21,0.23,0.2}; colorBackgroundActive[]={0.15,0.21,0.23,0.2}; colorFocused[]={0.15,0.21,0.23,0.2}; - x="0.550*safezoneW+safezoneX+0.105"; - y="0.265*safezoneH+safezoneY+0.17"; + x="0.550*safeZoneW+safeZoneX+0.105"; + y="0.265*safeZoneH+safeZoneY+0.17"; w="0.3"; h="0.535"; offsetPressedX="0.0"; @@ -640,8 +640,8 @@ class ATragMX_Display { style=0; w="0.17"; h="0.28"; - x="0.550*safezoneW+safezoneX+0.225"; - y="0.265*safezoneH+safezoneY+0.355"; + x="0.550*safeZoneW+safeZoneX+0.225"; + y="0.265*safeZoneH+safeZoneY+0.355"; sizeEx="0.025"; onMouseButtonClick=QUOTE(true call FUNC(toggle_option_menu)); }; @@ -653,8 +653,8 @@ class ATragMX_Display { class TEXT_RANGE_CARD_SETUP: ATragMX_RscButton { idc=5001; w="0.055675"; - x="0.550*safezoneW+safezoneX+0.28"; - y="0.265*safezoneH+safezoneY+0.20"; + x="0.550*safeZoneW+safeZoneX+0.28"; + y="0.265*safeZoneH+safeZoneY+0.20"; colorBackground[]={0.15,0.21,0.23,0.3}; colorFocused[]={0.15,0.21,0.23,0.2}; text="Setup"; @@ -662,7 +662,7 @@ class ATragMX_Display { }; class TEXT_RANGE_CARD_DONE: TEXT_RANGE_CARD_SETUP { idc=5002; - x="0.550*safezoneW+safezoneX+0.3362"; + x="0.550*safeZoneW+safeZoneX+0.3362"; text="Done"; action=QUOTE(call FUNC(toggle_range_card)); }; @@ -670,24 +670,24 @@ class ATragMX_Display { idc=5003; style=ST_LEFT; w="0.07"; - x="0.550*safezoneW+safezoneX+0.11"; - y="0.265*safezoneH+safezoneY+0.24"; + x="0.550*safeZoneW+safeZoneX+0.11"; + y="0.265*safeZoneH+safeZoneY+0.24"; colorBackground[]={0.15,0.21,0.23,0.3}; text="Meters"; }; class TEXT_RANGE_CARD_COLUMN_2_CAPTION: TEXT_RANGE_CARD_COLUMN_1_CAPTION { idc=5004; - x="0.550*safezoneW+safezoneX+0.180625"; + x="0.550*safeZoneW+safeZoneX+0.180625"; text="Elev"; }; class TEXT_RANGE_CARD_COLUMN_3_CAPTION: TEXT_RANGE_CARD_COLUMN_1_CAPTION { idc=5005; - x="0.550*safezoneW+safezoneX+0.25125"; + x="0.550*safeZoneW+safeZoneX+0.25125"; text="Wind"; }; class TEXT_RANGE_CARD_COLUMN_4_CAPTION: TEXT_RANGE_CARD_COLUMN_1_CAPTION { idc=5006; - x="0.550*safezoneW+safezoneX+0.321875"; + x="0.550*safeZoneW+safeZoneX+0.321875"; text="TmFlt"; action=QUOTE(call FUNC(cycle_range_card_columns)); }; @@ -698,8 +698,8 @@ class ATragMX_Display { idcRight=50062; w="0.285"; h="0.42"; - x="0.550*safezoneW+safezoneX+0.11"; - y="0.265*safezoneH+safezoneY+0.27"; + x="0.550*safeZoneW+safeZoneX+0.11"; + y="0.265*safeZoneH+safeZoneY+0.27"; }; class TEXT_GUN_LIST_OUTPUT: ATragMX_RscListNBox { @@ -707,8 +707,8 @@ class ATragMX_Display { columns[]={-0.05}; w="0.16"; h="0.45"; - x="0.550*safezoneW+safezoneX+0.11"; - y="0.265*safezoneH+safezoneY+0.24"; + x="0.550*safeZoneW+safeZoneX+0.11"; + y="0.265*safeZoneH+safeZoneY+0.24"; sizeEx="0.018"; colorSelectBackground[]={0.15,0.21,0.23,0.3}; colorSelectBackground2[]={0.15,0.21,0.23,0.3}; @@ -724,8 +724,8 @@ class ATragMX_Display { idc=6002; style=ST_RIGHT; w="0.115"; - x="0.550*safezoneW+safezoneX+0.28"; - y="0.265*safezoneH+safezoneY+0.20"; + x="0.550*safeZoneW+safeZoneX+0.28"; + y="0.265*safeZoneH+safeZoneY+0.20"; colorBackground[]={0.15,0.21,0.23,0.3}; colorFocused[]={0.15,0.21,0.23,0.2}; sizeEx="0.024"; @@ -734,30 +734,30 @@ class ATragMX_Display { }; class TEXT_GUN_LIST_SAVE_GUN: TEXT_GUN_LIST_OPEN_GUN { idc=6003; - y="0.265*safezoneH+safezoneY+0.24"; + y="0.265*safeZoneH+safeZoneY+0.24"; text="Save Gun"; action=QUOTE(call FUNC(save_gun)); }; class TEXT_GUN_LIST_ADD_NEW_GUN: TEXT_GUN_LIST_OPEN_GUN { idc=6004; - y="0.265*safezoneH+safezoneY+0.28"; + y="0.265*safeZoneH+safeZoneY+0.28"; text="Add New Gun"; action=QUOTE(false call FUNC(show_gun_list); true call FUNC(show_add_new_gun)); }; class TEXT_GUN_LIST_DELETE_GUN: TEXT_GUN_LIST_OPEN_GUN { idc=6005; - y="0.265*safezoneH+safezoneY+0.34"; + y="0.265*safeZoneH+safeZoneY+0.34"; text="Delete Gun"; action=QUOTE(call FUNC(delete_gun)); }; class TEXT_GUN_LIST_NOTE: TEXT_GUN_LIST_OPEN_GUN { idc=6006; - y="0.265*safezoneH+safezoneY+0.40"; + y="0.265*safeZoneH+safeZoneY+0.40"; text="Note"; }; class TEXT_GUN_LIST_DONE: TEXT_GUN_LIST_OPEN_GUN { idc=6007; - y="0.265*safezoneH+safezoneY+0.65"; + y="0.265*safeZoneH+safeZoneY+0.65"; text="Done"; action=QUOTE(false call FUNC(toggle_gun_list)); }; @@ -766,8 +766,8 @@ class ATragMX_Display { idc=7000; style="16+0x200"; lineSpacing=1.0; - x="0.550*safezoneW+safezoneX+0.11"; - y="0.265*safezoneH+safezoneY+0.24"; + x="0.550*safeZoneW+safeZoneX+0.11"; + y="0.265*safeZoneH+safeZoneY+0.24"; w="0.29"; h="0.10"; sizeEx="0.022"; @@ -776,8 +776,8 @@ class ATragMX_Display { class TEXT_TARGET_RANGE_ASSIST_MEASUREMENT_METHOD: TEXT_TARGET_RANGE_ASSIST_CAPTION { idc=7001; style=ST_LEFT; - x="0.550*safezoneW+safezoneX+0.115"; - y="0.265*safezoneH+safezoneY+0.35"; + x="0.550*safeZoneW+safeZoneX+0.115"; + y="0.265*safeZoneH+safeZoneY+0.35"; w="0.12"; h="0.03"; sizeEx="0.027"; @@ -786,8 +786,8 @@ class ATragMX_Display { class TEXT_TARGET_RANGE_ASSIST_WIDTH_HEIGHT: ATragMX_RscToolbox { idc=7002; w="0.14"; - x="0.550*safezoneW+safezoneX+0.24"; - y="0.265*safezoneH+safezoneY+0.35"; + x="0.550*safeZoneW+safeZoneX+0.24"; + y="0.265*safeZoneH+safeZoneY+0.35"; strings[]={"Height","Width"}; values[]={1,0}; onToolBoxSelChanged=QUOTE(GVAR(rangeAssistUseTargetHeight) = ((_this select 1) == 0)); @@ -795,73 +795,73 @@ class ATragMX_Display { class TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE: TEXT_TARGET_RANGE_ASSIST_MEASUREMENT_METHOD { idc=7003; style=ST_RIGHT; - x="0.550*safezoneW+safezoneX+0.092"; - y="0.265*safezoneH+safezoneY+0.4"; + x="0.550*safeZoneW+safeZoneX+0.092"; + y="0.265*safeZoneH+safeZoneY+0.4"; w="0.128"; text="Target Size"; }; class TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE { idc=7004; - y="0.265*safezoneH+safezoneY+0.45"; + y="0.265*safeZoneH+safeZoneY+0.45"; text="Image Size"; }; class TEXT_TARGET_RANGE_ASSIST_ANGLE: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE { idc=7005; - y="0.265*safezoneH+safezoneY+0.5"; + y="0.265*safeZoneH+safeZoneY+0.5"; text="Angle"; }; class TEXT_TARGET_RANGE_ASSIST_ESTIMATED_RANGE: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE { idc=7006; - y="0.265*safezoneH+safezoneY+0.55"; + y="0.265*safeZoneH+safeZoneY+0.55"; text="Est Range"; }; class TEXT_TARGET_RANGE_ASSIST_CALC_1: TEXT_MUZZLE_VELOCITY { idc=7007; w="0.0231"; - x="0.550*safezoneW+safezoneX+0.22"; - y="0.265*safezoneH+safezoneY+0.4"; + x="0.550*safeZoneW+safeZoneX+0.22"; + y="0.265*safeZoneH+safeZoneY+0.4"; sizeEx="0.03"; text="!"; action=QUOTE(0 call FUNC(calculate_target_range_assist)); }; class TEXT_TARGET_RANGE_ASSIST_CALC_2: TEXT_TARGET_RANGE_ASSIST_CALC_1 { idc=7008; - y="0.265*safezoneH+safezoneY+0.45"; + y="0.265*safeZoneH+safeZoneY+0.45"; action=QUOTE(1 call FUNC(calculate_target_range_assist)); }; class TEXT_TARGET_RANGE_ASSIST_CALC_3: TEXT_TARGET_RANGE_ASSIST_CALC_1 { idc=7009; - y="0.265*safezoneH+safezoneY+0.55"; + y="0.265*safeZoneH+safeZoneY+0.55"; action=QUOTE(2 call FUNC(calculate_target_range_assist)); }; class TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_INPUT: ATragMX_RscEdit { idc=7010; w="0.065"; - x="0.550*safezoneW+safezoneX+0.2475"; - y="0.265*safezoneH+safezoneY+0.4"; + x="0.550*safeZoneW+safeZoneX+0.2475"; + y="0.265*safeZoneH+safeZoneY+0.4"; }; class TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE_INPUT: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_INPUT { idc=7011; - y="0.265*safezoneH+safezoneY+0.45"; + y="0.265*safeZoneH+safeZoneY+0.45"; }; class TEXT_TARGET_RANGE_ASSIST_ANGLE_INPUT: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_INPUT { idc=7012; - y="0.265*safezoneH+safezoneY+0.5"; + y="0.265*safeZoneH+safeZoneY+0.5"; }; class TEXT_TARGET_RANGE_ASSIST_ESTIMATED_RANGE_INPUT: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_INPUT { idc=7013; - y="0.265*safezoneH+safezoneY+0.55"; + y="0.265*safeZoneH+safeZoneY+0.55"; }; class TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_UNIT: TEXT_TARGET_RANGE_ASSIST_CALC_1 { idc=7014; w="0.07"; - x="0.550*safezoneW+safezoneX+0.32"; + x="0.550*safeZoneW+safeZoneX+0.32"; text="cm"; action=QUOTE(call FUNC(cycle_target_size_units)); }; class TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE_UNIT: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_UNIT { idc=7015; - y="0.265*safezoneH+safezoneY+0.45"; + y="0.265*safeZoneH+safeZoneY+0.45"; text="MIL"; action=QUOTE(call FUNC(cycle_image_size_units)); }; @@ -869,15 +869,15 @@ class ATragMX_Display { idc=7016; style=ST_LEFT; w="0.07"; - x="0.550*safezoneW+safezoneX+0.32"; + x="0.550*safeZoneW+safeZoneX+0.32"; text="Meters"; }; class TEXT_TARGET_RANGE_ASSIST_DONE: ATragMX_RscButton { idc=7017; style=ST_CENTER; w="0.07"; - x="0.550*safezoneW+safezoneX+0.11"; - y="0.265*safezoneH+safezoneY+0.60"; + x="0.550*safeZoneW+safeZoneX+0.11"; + y="0.265*safeZoneH+safeZoneY+0.60"; colorBackground[]={0.15,0.21,0.23,0.3}; colorFocused[]={0.15,0.21,0.23,0.2}; text="Done"; @@ -885,41 +885,41 @@ class ATragMX_Display { }; class TEXT_TARGET_RANGE_ASSIST_CANCEL: TEXT_TARGET_RANGE_ASSIST_DONE { idc=7018; - x="0.550*safezoneW+safezoneX+0.180625"; + x="0.550*safeZoneW+safeZoneX+0.180625"; text="Cancel"; action=QUOTE(0 call FUNC(toggle_target_range_assist)); }; class TEXT_TARGET_RANGE_ASSIST_PREV: TEXT_TARGET_RANGE_ASSIST_DONE { idc=7019; - x="0.550*safezoneW+safezoneX+0.25125"; + x="0.550*safeZoneW+safeZoneX+0.25125"; text="Prev"; action=""; }; class TEXT_TARGET_RANGE_ASSIST_NEXT: TEXT_TARGET_RANGE_ASSIST_DONE { idc=7020; - x="0.550*safezoneW+safezoneX+0.321875"; + x="0.550*safeZoneW+safeZoneX+0.321875"; text="Next"; action=""; }; class TEXT_TARGET_SPEED_ASSIST_TARGET_RANGE: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE { idc=8000; - x="0.550*safezoneW+safezoneX+0.12"; + x="0.550*safeZoneW+safeZoneX+0.12"; text="Target Range"; }; class TEXT_TARGET_SPEED_ASSIST_NUM_TICKS: TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE { idc=8001; - x="0.550*safezoneW+safezoneX+0.12"; + x="0.550*safeZoneW+safeZoneX+0.12"; text="Num Ticks"; }; class TEXT_TARGET_SPEED_ASSIST_TIME: TEXT_TARGET_RANGE_ASSIST_ANGLE { idc=8002; - x="0.550*safezoneW+safezoneX+0.12"; + x="0.550*safeZoneW+safeZoneX+0.12"; text="Time (secs)"; }; class TEXT_TARGET_SPEED_ASSIST_TARGET_ESTIMATED_SPEED: TEXT_TARGET_RANGE_ASSIST_ESTIMATED_RANGE { idc=8003; - x="0.550*safezoneW+safezoneX+0.12"; + x="0.550*safeZoneW+safeZoneX+0.12"; text="Est Speed"; }; class TEXT_TARGET_SPEED_ASSIST_TARGET_RANGE_INPUT: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_INPUT { @@ -937,14 +937,14 @@ class ATragMX_Display { class TEXT_TARGET_SPEED_ASSIST_TARGET_ESTIMATED_SPEED_OUTPUT: TEXT_TARGET_RANGE_ASSIST_ESTIMATED_RANGE { idc=8007; w="0.065"; - x="0.550*safezoneW+safezoneX+0.2475"; - y="0.265*safezoneH+safezoneY+0.55"; + x="0.550*safeZoneW+safeZoneX+0.2475"; + y="0.265*safeZoneH+safeZoneY+0.55"; colorBackground[]={0.15,0.21,0.23,0.3}; text="0"; }; class TEXT_TARGET_SPEED_ASSIST_TARGET_RANGE_UNIT: TEXT_TARGET_RANGE_ASSIST_ESTIMATED_RANGE_UNIT { idc=8008; - y="0.265*safezoneH+safezoneY+0.4"; + y="0.265*safeZoneH+safeZoneY+0.4"; text="Meters"; }; class TEXT_TARGET_SPEED_ASSIST_NUM_TICKS_UNIT: TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE_UNIT { @@ -954,7 +954,7 @@ class ATragMX_Display { }; class TEXT_TARGET_SPEED_ASSIST_TIMER_START: TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE_UNIT { idc=8010; - y="0.265*safezoneH+safezoneY+0.5"; + y="0.265*safeZoneH+safeZoneY+0.5"; text="Start"; action=QUOTE(call FUNC(target_speed_assist_timer)); }; @@ -981,16 +981,16 @@ class ATragMX_Display { idc=9000; w="0.285"; h="0.49"; - x="0.550*safezoneW+safezoneX+0.11"; - y="0.265*safezoneH+safezoneY+0.2"; + x="0.550*safeZoneW+safeZoneX+0.11"; + y="0.265*safeZoneH+safeZoneY+0.2"; colorBackground[]={0,0,0,0}; colorBackgroundActive[]={0,0,0,0}; action=QUOTE(GVAR(speedAssistTimer)=false); }; class TEXT_TARGET_SPEED_ASSIST_TIME_OUTPUT: ATragMX_RscText { idc=9001; - x="0.550*safezoneW+safezoneX+0.22"; - y="0.265*safezoneH+safezoneY+0.51"; + x="0.550*safeZoneW+safeZoneX+0.22"; + y="0.265*safeZoneH+safeZoneY+0.51"; w="0.08"; h="0.09"; style=ST_CENTER; @@ -1002,8 +1002,8 @@ class ATragMX_Display { style=ST_CENTER; w="0.07"; h="0.04"; - x="0.550*safezoneW+safezoneX+0.225"; - y="0.265*safezoneH+safezoneY+0.60"; + x="0.550*safeZoneW+safeZoneX+0.225"; + y="0.265*safeZoneH+safeZoneY+0.60"; colorBackground[]={0.15,0.21,0.23,0.3}; colorFocused[]={0.15,0.21,0.23,0.2}; text="Stop"; @@ -1012,17 +1012,17 @@ class ATragMX_Display { class TEXT_RANGE_CARD_SETUP_START_RANGE: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE { idc=10000; - x="0.550*safezoneW+safezoneX+0.12"; + x="0.550*safeZoneW+safeZoneX+0.12"; text="Start Range"; }; class TEXT_RANGE_CARD_SETUP_END_RANGE: TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE { idc=10001; - x="0.550*safezoneW+safezoneX+0.12"; + x="0.550*safeZoneW+safeZoneX+0.12"; text="End Range"; }; class TEXT_RANGE_CARD_SETUP_INCREMENT: TEXT_TARGET_RANGE_ASSIST_ANGLE { idc=10002; - x="0.550*safezoneW+safezoneX+0.12"; + x="0.550*safeZoneW+safeZoneX+0.12"; text="Increment"; }; class TEXT_RANGE_CARD_SETUP_START_RANGE_INPUT: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_INPUT { @@ -1057,8 +1057,8 @@ class ATragMX_Display { style=ST_LEFT; w="0.25"; h="0.04"; - x="0.550*safezoneW+safezoneX+0.12"; - y="0.265*safezoneH+safezoneY+0.24"; + x="0.550*safeZoneW+safeZoneX+0.12"; + y="0.265*safeZoneH+safeZoneY+0.24"; sizeEx="0.025"; text="New Gun Name"; }; @@ -1067,8 +1067,8 @@ class ATragMX_Display { style=ST_LEFT; w="0.225"; h="0.04"; - x="0.550*safezoneW+safezoneX+0.12"; - y="0.265*safezoneH+safezoneY+0.28"; + x="0.550*safeZoneW+safeZoneX+0.12"; + y="0.265*safeZoneH+safeZoneY+0.28"; text=""; onKeyDown=QUOTE(call FUNC(trim_gun_name)); onKeyUp=QUOTE(call FUNC(trim_gun_name)); @@ -1078,8 +1078,8 @@ class ATragMX_Display { style=ST_CENTER; w="0.1"; h="0.04"; - x="0.550*safezoneW+safezoneX+0.12"; - y="0.265*safezoneH+safezoneY+0.33"; + x="0.550*safeZoneW+safeZoneX+0.12"; + y="0.265*safeZoneH+safeZoneY+0.33"; colorBackground[]={0.15,0.21,0.23,0.3}; colorFocused[]={0.15,0.21,0.23,0.2}; text="OK"; @@ -1087,7 +1087,7 @@ class ATragMX_Display { }; class TEXT_ADD_NEW_GUN_CANCEL: TEXT_ADD_NEW_GUN_OK { idc=11003; - x="0.550*safezoneW+safezoneX+0.245"; + x="0.550*safeZoneW+safeZoneX+0.245"; text="Cancel"; action=QUOTE(false call FUNC(show_add_new_gun); true call FUNC(show_gun_list)); }; @@ -1095,74 +1095,74 @@ class ATragMX_Display { class TEXT_GUN_AMMO_DATA_BORE_HEIGHT: TEXT_BORE_HEIGHT { idc=12000; w="0.22"; - y="0.265*safezoneH+safezoneY+0.28"; + y="0.265*safeZoneH+safeZoneY+0.28"; text="Bore (cm)"; }; class TEXT_GUN_AMMO_DATA_BORE_HEIGHT_INPUT: ATragMX_RscEdit { idc=120000; w="0.06"; - x="0.550*safezoneW+safezoneX+0.335"; - y="0.265*safezoneH+safezoneY+0.28"; + x="0.550*safeZoneW+safeZoneX+0.335"; + y="0.265*safeZoneH+safeZoneY+0.28"; }; class TEXT_GUN_AMMO_DATA_BULLET_MASS: TEXT_GUN_AMMO_DATA_BORE_HEIGHT { idc=12001; - y="0.265*safezoneH+safezoneY+0.320"; + y="0.265*safeZoneH+safeZoneY+0.320"; text="Bullet Weight (grams)"; }; class TEXT_GUN_AMMO_DATA_BULLET_MASS_INPUT: TEXT_GUN_AMMO_DATA_BORE_HEIGHT_INPUT { idc=120010; - y="0.265*safezoneH+safezoneY+0.320"; + y="0.265*safeZoneH+safeZoneY+0.320"; }; class TEXT_GUN_AMMO_DATA_BULLET_DIAMETER: TEXT_GUN_AMMO_DATA_BORE_HEIGHT { idc=12002; - y="0.265*safezoneH+safezoneY+0.360"; + y="0.265*safeZoneH+safeZoneY+0.360"; text="Bullet Diam (cm)"; }; class TEXT_GUN_AMMO_DATA_BULLET_DIAMETER_INPUT: TEXT_GUN_AMMO_DATA_BORE_HEIGHT_INPUT { idc=120020; - y="0.265*safezoneH+safezoneY+0.360"; + y="0.265*safeZoneH+safeZoneY+0.360"; }; class TEXT_GUN_AMMO_DATA_AIR_FRICTION: TEXT_GUN_AMMO_DATA_BORE_HEIGHT { idc=12003; - y="0.265*safezoneH+safezoneY+0.400"; + y="0.265*safeZoneH+safeZoneY+0.400"; text="C1 Coefficient"; }; class TEXT_GUN_AMMO_DATA_AIR_FRICTION_INPUT: TEXT_GUN_AMMO_DATA_BORE_HEIGHT_INPUT { idc=120030; - y="0.265*safezoneH+safezoneY+0.400"; + y="0.265*safeZoneH+safeZoneY+0.400"; }; class TEXT_GUN_AMMO_DATA_RIFLE_TWIST: TEXT_GUN_AMMO_DATA_BORE_HEIGHT { idc=12004; - y="0.265*safezoneH+safezoneY+0.440"; + y="0.265*safeZoneH+safeZoneY+0.440"; text="Rifle Twist (cm/trn)"; }; class TEXT_GUN_AMMO_DATA_RIFLE_TWIST_INPUT: TEXT_GUN_AMMO_DATA_BORE_HEIGHT_INPUT { idc=120040; - y="0.265*safezoneH+safezoneY+0.440"; + y="0.265*safeZoneH+safeZoneY+0.440"; }; class TEXT_GUN_AMMO_DATA_MUZZLE_VELOCITY: TEXT_GUN_AMMO_DATA_BORE_HEIGHT { idc=12005; - y="0.265*safezoneH+safezoneY+0.480"; + y="0.265*safeZoneH+safeZoneY+0.480"; text="Muzzle Velocity (m/s)"; }; class TEXT_GUN_AMMO_DATA_MUZZLE_VELOCITY_INPUT: TEXT_GUN_AMMO_DATA_BORE_HEIGHT_INPUT { idc=120050; - y="0.265*safezoneH+safezoneY+0.480"; + y="0.265*safeZoneH+safeZoneY+0.480"; }; class TEXT_GUN_AMMO_DATA_ZERO_RANGE: TEXT_GUN_AMMO_DATA_BORE_HEIGHT { idc=12006; - y="0.265*safezoneH+safezoneY+0.520"; + y="0.265*safeZoneH+safeZoneY+0.520"; text="Zero Range (meters)"; }; class TEXT_GUN_AMMO_DATA_ZERO_RANGE_INPUT: TEXT_GUN_AMMO_DATA_BORE_HEIGHT_INPUT { idc=120060; - y="0.265*safezoneH+safezoneY+0.520"; + y="0.265*safeZoneH+safeZoneY+0.520"; }; class TEXT_GUN_AMMO_DATA_ZERO_RANGE_METER_INDICATOR: TEXT_GUN_AMMO_DATA_BORE_HEIGHT { idc=120061; w="0.05"; - x="0.550*safezoneW+safezoneX+0.315"; - y="0.265*safezoneH+safezoneY+0.520"; + x="0.550*safeZoneW+safeZoneX+0.315"; + y="0.265*safeZoneH+safeZoneY+0.520"; text=""; }; class TEXT_GUN_AMMO_DATA_DONE: TEXT_TARGET_SPEED_ASSIST_DONE { @@ -1183,62 +1183,62 @@ class ATragMX_Display { class TEXT_ATMO_ENV_DATA_DEFAULT: TEXT_LEAD { idc=13000; w="0.08"; - x="0.550*safezoneW+safezoneX+0.15"; - y="0.265*safezoneH+safezoneY+0.320"; + x="0.550*safeZoneW+safeZoneX+0.15"; + y="0.265*safeZoneH+safeZoneY+0.320"; text="Default"; action=QUOTE(call FUNC(restore_atmo_default)); }; class TEXT_ATMO_ENV_DATA_AT: TEXT_TARGET_A { idc=13001; w="0.04"; - x="0.550*safezoneW+safezoneX+0.24"; - y="0.265*safezoneH+safezoneY+0.320"; + x="0.550*safeZoneW+safeZoneX+0.24"; + y="0.265*safeZoneH+safeZoneY+0.320"; text="AT"; action=QUOTE(GVAR(atmosphereModeTBH) = false; call FUNC(update_atmo_selection)); }; class TEXT_ATMO_ENV_DATA_TBH: TEXT_ATMO_ENV_DATA_AT { idc=13002; - x="0.550*safezoneW+safezoneX+0.28"; + x="0.550*safeZoneW+safeZoneX+0.28"; text="TBH"; action=QUOTE(GVAR(atmosphereModeTBH) = true; call FUNC(update_atmo_selection)); }; class TEXT_ATMO_ENV_DATA_ALTITUDE: TEXT_GUN_AMMO_DATA_BORE_HEIGHT { idc=13003; - x="0.550*safezoneW+safezoneX+0.115"; - y="0.265*safezoneH+safezoneY+0.400"; + x="0.550*safeZoneW+safeZoneX+0.115"; + y="0.265*safeZoneH+safeZoneY+0.400"; text="Altitude (ft)"; }; class TEXT_ATMO_ENV_DATA_ALTITUDE_INPUT: TEXT_GUN_AMMO_DATA_BORE_HEIGHT_INPUT { idc=130030; - x="0.550*safezoneW+safezoneX+0.330"; - y="0.265*safezoneH+safezoneY+0.400"; + x="0.550*safeZoneW+safeZoneX+0.330"; + y="0.265*safeZoneH+safeZoneY+0.400"; }; class TEXT_ATMO_ENV_DATA_TEMPERATURE: TEXT_ATMO_ENV_DATA_ALTITUDE { idc=13004; - y="0.265*safezoneH+safezoneY+0.440"; + y="0.265*safeZoneH+safeZoneY+0.440"; text="temperature (F)"; }; class TEXT_ATMO_ENV_DATA_TEMPERATURE_INPUT: TEXT_ATMO_ENV_DATA_ALTITUDE_INPUT { idc=130040; - y="0.265*safezoneH+safezoneY+0.440"; + y="0.265*safeZoneH+safeZoneY+0.440"; }; class TEXT_ATMO_ENV_DATA_BAROMETRIC_PRESSURE: TEXT_ATMO_ENV_DATA_ALTITUDE { idc=13005; - y="0.265*safezoneH+safezoneY+0.480"; + y="0.265*safeZoneH+safeZoneY+0.480"; text="Barom Pres (in.merc.)"; }; class TEXT_ATMO_ENV_DATA_BAROMETRIC_PRESSURE_INPUT: TEXT_ATMO_ENV_DATA_ALTITUDE_INPUT { idc=130050; - y="0.265*safezoneH+safezoneY+0.480"; + y="0.265*safeZoneH+safeZoneY+0.480"; }; class TEXT_ATMO_ENV_DATA_RELATIVE_HUMIDITY: TEXT_ATMO_ENV_DATA_ALTITUDE { idc=13006; - y="0.265*safezoneH+safezoneY+0.520"; + y="0.265*safeZoneH+safeZoneY+0.520"; text="Relative Humidity (%)"; }; class TEXT_ATMO_ENV_DATA_RELATIVE_HUMIDITY_INPUT: TEXT_ATMO_ENV_DATA_ALTITUDE_INPUT { idc=130060; - y="0.265*safezoneH+safezoneY+0.520"; + y="0.265*safeZoneH+safeZoneY+0.520"; }; class TEXT_ATMO_ENV_DATA_DONE: TEXT_TARGET_SPEED_ASSIST_DONE { idc=13007; @@ -1259,36 +1259,36 @@ class ATragMX_Display { style=64; w="0.14"; h="0.07"; - x="0.550*safezoneW+safezoneX+0.235"; - y="0.265*safezoneH+safezoneY+0.29"; + x="0.550*safeZoneW+safeZoneX+0.235"; + y="0.265*safeZoneH+safeZoneY+0.29"; text="Calc Method"; }; class TEXT_TARGET_DATA_LATITUDE: TEXT_BORE_HEIGHT { idc=14000; w="0.22"; - y="0.265*safezoneH+safezoneY+0.28"; + y="0.265*safeZoneH+safeZoneY+0.28"; text="Latitude"; }; class TEXT_TARGET_DATA_LATITUDE_INPUT: ATragMX_RscEdit { idc=140000; w="0.06"; - x="0.550*safezoneW+safezoneX+0.335"; - y="0.265*safezoneH+safezoneY+0.28"; + x="0.550*safeZoneW+safeZoneX+0.335"; + y="0.265*safeZoneH+safeZoneY+0.28"; }; class TEXT_TARGET_DATA_DIR_OF_FIRE: TEXT_TARGET_DATA_LATITUDE { idc=14001; - y="0.265*safezoneH+safezoneY+0.320"; + y="0.265*safeZoneH+safeZoneY+0.320"; text="Dir of Fire (deg from N)"; }; class TEXT_TARGET_DATA_DIR_OF_FIRE_INPUT: TEXT_TARGET_DATA_LATITUDE_INPUT { idc=140010; - y="0.265*safezoneH+safezoneY+0.320"; + y="0.265*safeZoneH+safeZoneY+0.320"; }; class TEXT_TARGET_DATA_WIND_SPEED: TEXT_TARGET_DATA_LATITUDE { idc=14002; w="1.2"; - y="0.265*safezoneH+safezoneY+0.360"; + y="0.265*safeZoneH+safeZoneY+0.360"; text="Wind Speed (m/s)"; }; class TEXT_TARGET_DATA_WIND_SPEED_1: TEXT_TARGET_DATA_LATITUDE { @@ -1297,40 +1297,40 @@ class ATragMX_Display { w="0.05"; h="0.03"; sizeEx="0.025"; - x="0.550*safezoneW+safezoneX+0.270"; - y="0.265*safezoneH+safezoneY+0.357"; + x="0.550*safeZoneW+safeZoneX+0.270"; + y="0.265*safeZoneH+safeZoneY+0.357"; text="1"; }; class TEXT_TARGET_DATA_WIND_SPEED_INPUT_1: TEXT_TARGET_DATA_LATITUDE_INPUT { idc=140020; w="0.045"; - x="0.550*safezoneW+safezoneX+0.290"; - y="0.265*safezoneH+safezoneY+0.360"; + x="0.550*safeZoneW+safeZoneX+0.290"; + y="0.265*safeZoneH+safeZoneY+0.360"; }; class TEXT_TARGET_DATA_WIND_SPEED_2: TEXT_TARGET_DATA_WIND_SPEED_1 { idc=141021; - x="0.550*safezoneW+safezoneX+0.330"; + x="0.550*safeZoneW+safeZoneX+0.330"; text="2"; }; class TEXT_TARGET_DATA_WIND_SPEED_INPUT_2: TEXT_TARGET_DATA_LATITUDE_INPUT { idc=140021; w="0.045"; - x="0.550*safezoneW+safezoneX+0.350"; - y="0.265*safezoneH+safezoneY+0.360"; + x="0.550*safeZoneW+safeZoneX+0.350"; + y="0.265*safeZoneH+safeZoneY+0.360"; }; class TEXT_TARGET_DATA_WIND_DIRECTION: TEXT_TARGET_DATA_LATITUDE { idc=14003; - y="0.265*safezoneH+safezoneY+0.400"; + y="0.265*safeZoneH+safeZoneY+0.400"; text="Wind Direction (clock)"; }; class TEXT_TARGET_DATA_WIND_DIRECTION_INPUT: TEXT_TARGET_DATA_LATITUDE_INPUT { idc=140030; - y="0.265*safezoneH+safezoneY+0.400"; + y="0.265*safeZoneH+safeZoneY+0.400"; }; class TEXT_TARGET_DATA_INCLINATION_ANGLE: TEXT_TARGET_DATA_LATITUDE { idc=14004; w="1.2"; - y="0.265*safezoneH+safezoneY+0.440"; + y="0.265*safeZoneH+safeZoneY+0.440"; text="Inclination Angle"; }; class TEXT_TARGET_DATA_INCLINATION_ANGLE_COSINE: TEXT_TARGET_DATA_LATITUDE { @@ -1339,62 +1339,62 @@ class ATragMX_Display { w="0.05"; h="0.03"; sizeEx="0.025"; - x="0.550*safezoneW+safezoneX+0.270"; - y="0.265*safezoneH+safezoneY+0.437"; + x="0.550*safeZoneW+safeZoneX+0.270"; + y="0.265*safeZoneH+safeZoneY+0.437"; text="c"; }; class TEXT_TARGET_DATA_INCLINATION_ANGLE_INPUT_COSINE: TEXT_TARGET_DATA_LATITUDE_INPUT { idc=140041; w="0.045"; - x="0.550*safezoneW+safezoneX+0.290"; - y="0.265*safezoneH+safezoneY+0.440"; + x="0.550*safeZoneW+safeZoneX+0.290"; + y="0.265*safeZoneH+safeZoneY+0.440"; onKeyUp=QUOTE(if (_this select 1 == 28) then {0 call FUNC(update_inclination_angle)}); }; class TEXT_TARGET_DATA_INCLINATION_ANGLE_DEGREE: TEXT_TARGET_DATA_INCLINATION_ANGLE_COSINE { idc=141040; - x="0.550*safezoneW+safezoneX+0.330"; + x="0.550*safeZoneW+safeZoneX+0.330"; text="d"; }; class TEXT_TARGET_DATA_INCLINATION_ANGLE_INPUT_DEGREE: TEXT_TARGET_DATA_LATITUDE_INPUT { idc=140040; w="0.045"; - x="0.550*safezoneW+safezoneX+0.350"; - y="0.265*safezoneH+safezoneY+0.440"; + x="0.550*safeZoneW+safeZoneX+0.350"; + y="0.265*safeZoneH+safeZoneY+0.440"; onKeyUp=QUOTE(if (_this select 1 == 28) then {1 call FUNC(update_inclination_angle)}); }; class TEXT_TARGET_DATA_TARGET_SPEED: TEXT_TARGET_DATA_LATITUDE { idc=14005; - y="0.265*safezoneH+safezoneY+0.480"; + y="0.265*safeZoneH+safeZoneY+0.480"; text="Target Speed (m/s)"; }; class TEXT_TARGET_DATA_TARGET_SPEED_INPUT: TEXT_TARGET_DATA_LATITUDE_INPUT { idc=140050; - y="0.265*safezoneH+safezoneY+0.480"; + y="0.265*safeZoneH+safeZoneY+0.480"; }; class TEXT_TARGET_DATA_TARGET_SPEED_DIRECTION: ATragMX_RscButton { idc=140051; colorBackground[]={0.15,0.21,0.23,0.3}; colorFocused[]={0.15,0.21,0.23,0.2}; w="0.0231"; - x="0.550*safezoneW+safezoneX+0.305"; - y="0.265*safezoneH+safezoneY+0.480"; + x="0.550*safeZoneW+safeZoneX+0.305"; + y="0.265*safeZoneH+safeZoneY+0.480"; text=">"; action=QUOTE(call FUNC(cycle_target_speed_direction)); }; class TEXT_TARGET_DATA_TARGET_RANGE: TEXT_TARGET_DATA_LATITUDE { idc=14006; - y="0.265*safezoneH+safezoneY+0.520"; + y="0.265*safeZoneH+safeZoneY+0.520"; text="Target Range (meters)"; }; class TEXT_TARGET_DATA_TARGET_RANGE_INPUT: TEXT_TARGET_DATA_LATITUDE_INPUT { idc=140060; - y="0.265*safezoneH+safezoneY+0.520"; + y="0.265*safeZoneH+safeZoneY+0.520"; }; class TEXT_TARGET_DATA_TARGET_RANGE_METER_INDICATOR: TEXT_TARGET_DATA_LATITUDE { idc=140061; w="0.05"; - x="0.550*safezoneW+safezoneX+0.315"; - y="0.265*safezoneH+safezoneY+0.520"; + x="0.550*safeZoneW+safeZoneX+0.315"; + y="0.265*safeZoneH+safeZoneY+0.520"; text=""; }; class TEXT_TARGET_DATA_DONE: TEXT_TARGET_SPEED_ASSIST_DONE { @@ -1417,45 +1417,45 @@ class ATragMX_Display { style=64; w="0.25"; h="0.07"; - x="0.550*safezoneW+safezoneX+0.13"; - y="0.265*safezoneH+safezoneY+0.32"; + x="0.550*safeZoneW+safeZoneX+0.13"; + y="0.265*safeZoneH+safeZoneY+0.32"; text="Show result in"; }; class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1: TEXT_TARGET_A { idc=15001; w="0.04"; - x="0.550*safezoneW+safezoneX+0.14"; - y="0.265*safezoneH+safezoneY+0.35"; + x="0.550*safeZoneW+safeZoneX+0.14"; + y="0.265*safeZoneH+safeZoneY+0.35"; text="1"; action=QUOTE(GVAR(currentScopeClickNumberTemp) = 1; call FUNC(update_solution_setup)); }; class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_2: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 { idc=15002; - x="0.550*safezoneW+safezoneX+0.18"; + x="0.550*safeZoneW+safeZoneX+0.18"; text="2"; action=QUOTE(GVAR(currentScopeClickNumberTemp) = 2; call FUNC(update_solution_setup)); }; class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_3: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 { idc=15003; - x="0.550*safezoneW+safezoneX+0.22"; + x="0.550*safeZoneW+safeZoneX+0.22"; text="3"; action=QUOTE(GVAR(currentScopeClickNumberTemp) = 3; call FUNC(update_solution_setup)); }; class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_4: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 { idc=15004; - x="0.550*safezoneW+safezoneX+0.26"; + x="0.550*safeZoneW+safeZoneX+0.26"; text="4"; action=QUOTE(GVAR(currentScopeClickNumberTemp) = 4; call FUNC(update_solution_setup)); }; class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_8: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 { idc=15005; - x="0.550*safezoneW+safezoneX+0.30"; + x="0.550*safeZoneW+safeZoneX+0.30"; text="8"; action=QUOTE(GVAR(currentScopeClickNumberTemp) = 8; call FUNC(update_solution_setup)); }; class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_10: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 { idc=15006; - x="0.550*safezoneW+safezoneX+0.34"; + x="0.550*safeZoneW+safeZoneX+0.34"; text="10"; action=QUOTE(GVAR(currentScopeClickNumberTemp) = 10; call FUNC(update_solution_setup)); }; @@ -1464,53 +1464,53 @@ class ATragMX_Display { style=64; w="0.25"; h="0.07"; - x="0.550*safezoneW+safezoneX+0.13"; - y="0.265*safezoneH+safezoneY+0.42"; + x="0.550*safeZoneW+safeZoneX+0.13"; + y="0.265*safeZoneH+safeZoneY+0.42"; text="Clicks per"; }; class TEXT_SOLUTION_SETUP_CLICKS_PER_TMOA: TEXT_TARGET_A { idc=15008; w="0.05"; - x="0.550*safezoneW+safezoneX+0.15"; - y="0.265*safezoneH+safezoneY+0.45"; + x="0.550*safeZoneW+safeZoneX+0.15"; + y="0.265*safeZoneH+safeZoneY+0.45"; text="TMOA"; action=QUOTE(GVAR(currentScopeClickUnitTemp) = 0; call FUNC(update_solution_setup)); }; class TEXT_SOLUTION_SETUP_CLICKS_PER_SMOA: TEXT_SOLUTION_SETUP_CLICKS_PER_TMOA { idc=15009; - x="0.550*safezoneW+safezoneX+0.23"; + x="0.550*safeZoneW+safeZoneX+0.23"; text="SMOA"; action=QUOTE(GVAR(currentScopeClickUnitTemp) = 1; call FUNC(update_solution_setup)); }; class TEXT_SOLUTION_SETUP_CLICKS_PER_MILS: TEXT_SOLUTION_SETUP_CLICKS_PER_TMOA { idc=15010; - x="0.550*safezoneW+safezoneX+0.31"; + x="0.550*safeZoneW+safeZoneX+0.31"; text="MILS"; action=QUOTE(GVAR(currentScopeClickUnitTemp) = 2; call FUNC(update_solution_setup)); }; class TEXT_SOLUTION_SETUP_DONE: TEXT_TARGET_SPEED_ASSIST_DONE { idc=15011; - x="0.550*safezoneW+safezoneX+0.18"; - y="0.265*safezoneH+safezoneY+0.55"; + x="0.550*safeZoneW+safeZoneX+0.18"; + y="0.265*safeZoneH+safeZoneY+0.55"; action=QUOTE(1 call FUNC(toggle_solution_setup)); }; class TEXT_SOLUTION_SETUP_CANCEL: TEXT_TARGET_SPEED_ASSIST_CANCEL { idc=15012; - x="0.550*safezoneW+safezoneX+0.26"; - y="0.265*safezoneH+safezoneY+0.55"; + x="0.550*safeZoneW+safeZoneX+0.26"; + y="0.265*safeZoneH+safeZoneY+0.55"; action=QUOTE(0 call FUNC(toggle_solution_setup)); }; class TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE: TEXT_BORE_HEIGHT { idc=16000; w="0.22"; - y="0.265*safezoneH+safezoneY+0.25"; + y="0.265*safeZoneH+safeZoneY+0.25"; sizeEx="0.022"; text="Temperature"; }; class TEXT_MUZZLE_VELOCITY_DATA_MUZZLE_VELOCITY: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE { idc=16001; - x="0.550*safezoneW+safezoneX+0.215"; + x="0.550*safeZoneW+safeZoneX+0.215"; sizeEx="0.022"; text="Muzzle velocity"; }; @@ -1518,73 +1518,73 @@ class ATragMX_Display { idc=160021; w="0.082"; h="0.035"; - x="0.550*safezoneW+safezoneX+0.128"; - y="0.265*safezoneH+safezoneY+0.29"; + x="0.550*safeZoneW+safeZoneX+0.128"; + y="0.265*safeZoneH+safeZoneY+0.29"; text="0"; }; class TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_2: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_1 { idc=160022; - y="0.265*safezoneH+safezoneY+0.325"; + y="0.265*safeZoneH+safeZoneY+0.325"; }; class TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_3: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_1 { idc=160023; - y="0.265*safezoneH+safezoneY+0.360"; + y="0.265*safeZoneH+safeZoneY+0.360"; }; class TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_4: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_1 { idc=160024; - y="0.265*safezoneH+safezoneY+0.395"; + y="0.265*safeZoneH+safeZoneY+0.395"; }; class TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_5: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_1 { idc=160025; - y="0.265*safezoneH+safezoneY+0.430"; + y="0.265*safeZoneH+safeZoneY+0.430"; }; class TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_6: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_1 { idc=160026; - y="0.265*safezoneH+safezoneY+0.465"; + y="0.265*safeZoneH+safeZoneY+0.465"; }; class TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_7: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_1 { idc=160027; - y="0.265*safezoneH+safezoneY+0.500"; + y="0.265*safeZoneH+safeZoneY+0.500"; }; class TEXT_MUZZLE_VELOCITY_DATA_MUZZLE_VELOCITY_INPUT_1: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_1 { idc=160031; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_MUZZLE_VELOCITY_DATA_MUZZLE_VELOCITY_INPUT_2: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_2 { idc=160032; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_MUZZLE_VELOCITY_DATA_MUZZLE_VELOCITY_INPUT_3: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_3 { idc=160033; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_MUZZLE_VELOCITY_DATA_MUZZLE_VELOCITY_INPUT_4: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_4 { idc=160034; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_MUZZLE_VELOCITY_DATA_MUZZLE_VELOCITY_INPUT_5: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_5 { idc=160035; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_MUZZLE_VELOCITY_DATA_MUZZLE_VELOCITY_INPUT_6: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_6 { idc=160036; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_MUZZLE_VELOCITY_DATA_MUZZLE_VELOCITY_INPUT_7: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_7 { idc=160037; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_MUZZLE_VELOCITY_DATA_CLEAR: TEXT_TARGET_DATA_NEXT { idc=16004; style=ST_CENTER; h="0.035"; - y="0.265*safezoneH+safezoneY+0.3625"; + y="0.265*safeZoneH+safeZoneY+0.3625"; text="Clear"; action=QUOTE(call FUNC(clear_muzzle_velocity_data)); }; class TEXT_MUZZLE_VELOCITY_DATA_QUESTIONMARK: TEXT_MUZZLE_VELOCITY_DATA_CLEAR { idc=16005; - y="0.265*safezoneH+safezoneY+0.430"; + y="0.265*safeZoneH+safeZoneY+0.430"; text="?"; action=""; }; @@ -1606,14 +1606,14 @@ class ATragMX_Display { class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE: TEXT_BORE_HEIGHT { idc=17000; w="0.22"; - x="0.550*safezoneW+safezoneX+0.15"; - y="0.265*safezoneH+safezoneY+0.25"; + x="0.550*safeZoneW+safeZoneX+0.15"; + y="0.265*safeZoneH+safeZoneY+0.25"; sizeEx="0.022"; text="Meters"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_C1_BALLISTIC_COEFFICIENT: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE { idc=17001; - x="0.550*safezoneW+safezoneX+0.235"; + x="0.550*safeZoneW+safeZoneX+0.235"; sizeEx="0.022"; text="BC-Coef"; }; @@ -1621,75 +1621,75 @@ class ATragMX_Display { idc=170021; w="0.082"; h="0.035"; - x="0.550*safezoneW+safezoneX+0.128"; - y="0.265*safezoneH+safezoneY+0.29"; + x="0.550*safeZoneW+safeZoneX+0.128"; + y="0.265*safeZoneH+safeZoneY+0.29"; text="0"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_2: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_1 { idc=170022; - y="0.265*safezoneH+safezoneY+0.325"; + y="0.265*safeZoneH+safeZoneY+0.325"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_3: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_1 { idc=170023; - y="0.265*safezoneH+safezoneY+0.360"; + y="0.265*safeZoneH+safeZoneY+0.360"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_4: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_1 { idc=170024; - y="0.265*safezoneH+safezoneY+0.395"; + y="0.265*safeZoneH+safeZoneY+0.395"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_5: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_1 { idc=170025; - y="0.265*safezoneH+safezoneY+0.430"; + y="0.265*safeZoneH+safeZoneY+0.430"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_6: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_1 { idc=170026; - y="0.265*safezoneH+safezoneY+0.465"; + y="0.265*safeZoneH+safeZoneY+0.465"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_7: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_1 { idc=170027; - y="0.265*safezoneH+safezoneY+0.500"; + y="0.265*safeZoneH+safeZoneY+0.500"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_C1_BALLISTIC_COEFFICIENT_INPUT_1: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_1 { idc=170031; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_C1_BALLISTIC_COEFFICIENT_INPUT_2: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_2 { idc=170032; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_C1_BALLISTIC_COEFFICIENT_INPUT_3: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_3 { idc=170033; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_C1_BALLISTIC_COEFFICIENT_INPUT_4: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_4 { idc=170034; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_C1_BALLISTIC_COEFFICIENT_INPUT_5: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_5 { idc=170035; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_C1_BALLISTIC_COEFFICIENT_INPUT_6: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_6 { idc=170036; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_C1_BALLISTIC_COEFFICIENT_INPUT_7: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_7 { idc=170037; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_QUESTIONMARK: TEXT_TARGET_DATA_NEXT { idc=17004; style=ST_CENTER; w="0.04"; h="0.035"; - y="0.265*safezoneH+safezoneY+0.35"; + y="0.265*safeZoneH+safeZoneY+0.35"; text="?"; action=""; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_CLEAR: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_QUESTIONMARK { idc=17005; w="0.07"; - y="0.265*safezoneH+safezoneY+0.4175"; + y="0.265*safeZoneH+safeZoneY+0.4175"; text="Clear"; action=QUOTE(call FUNC(clear_c1_ballistic_coefficient_data)); }; @@ -1711,8 +1711,8 @@ class ATragMX_Display { class TEXT_TRUING_DROP_ZERO_RANGE: ATragMX_RscText { idc=18000; style=ST_LEFT; - x="0.550*safezoneW+safezoneX+0.115"; - y="0.265*safezoneH+safezoneY+0.220"; + x="0.550*safeZoneW+safeZoneX+0.115"; + y="0.265*safeZoneH+safeZoneY+0.220"; w="0.135"; h="0.03"; sizeEx="0.025"; @@ -1721,29 +1721,29 @@ class ATragMX_Display { class TEXT_TRUING_DROP_DROP_UNIT: TEXT_TRUING_DROP_ZERO_RANGE { idc=18001; style=ST_LEFT; - x="0.550*safezoneW+safezoneX+0.25"; + x="0.550*safeZoneW+safeZoneX+0.25"; text="Drop=mil"; }; class TEXT_TRUING_DROP_TARGET_RANGE: TEXT_TRUING_DROP_ZERO_RANGE { idc=18002; - y="0.265*safezoneH+safezoneY+0.35"; + y="0.265*safeZoneH+safeZoneY+0.35"; sizeEx="0.027"; text="Target Range"; }; class TEXT_TRUING_DROP_DROP: TEXT_TRUING_DROP_TARGET_RANGE { idc=18003; w="0.07"; - y="0.265*safezoneH+safezoneY+0.40"; + y="0.265*safeZoneH+safeZoneY+0.40"; text="Drop"; }; class TEXT_TRUING_DROP_MUZZLE_VELOCITY: TEXT_TRUING_DROP_DROP { idc=18004; - y="0.265*safezoneH+safezoneY+0.50"; + y="0.265*safeZoneH+safeZoneY+0.50"; text="MV"; }; class TEXT_TRUING_DROP_C1_BALLISTIC_COEFFICIENT: TEXT_TRUING_DROP_DROP { idc=18005; - y="0.265*safezoneH+safezoneY+0.55"; + y="0.265*safeZoneH+safeZoneY+0.55"; text="C1"; }; class TEXT_TRUING_DROP_DROP_OUTPUT: ATragMX_RscEdit { @@ -1752,31 +1752,31 @@ class ATragMX_Display { colorBackground[]={0.15,0.21,0.23,0.3}; colorDisabled[]={0,0,0,1}; w="0.06"; - y="0.265*safezoneH+safezoneY+0.40"; - x="0.550*safezoneW+safezoneX+0.17"; + y="0.265*safeZoneH+safeZoneY+0.40"; + x="0.550*safeZoneW+safeZoneX+0.17"; text=""; }; class TEXT_TRUING_DROP_MUZZLE_VELOCITY_OUTPUT: TEXT_TRUING_DROP_DROP_OUTPUT { idc=18007; - y="0.265*safezoneH+safezoneY+0.50"; + y="0.265*safeZoneH+safeZoneY+0.50"; text=""; }; class TEXT_TRUING_DROP_C1_BALLISTIC_COEFFICIENT_OUTPUT: TEXT_TRUING_DROP_DROP_OUTPUT { idc=18008; - y="0.265*safezoneH+safezoneY+0.55"; + y="0.265*safeZoneH+safeZoneY+0.55"; text=""; }; class TEXT_TRUING_DROP_SUPER: TEXT_TARGET_A { idc=18009; w="0.06"; - x="0.550*safezoneW+safezoneX+0.25"; - y="0.265*safezoneH+safezoneY+0.30"; + x="0.550*safeZoneW+safeZoneX+0.25"; + y="0.265*safeZoneH+safeZoneY+0.30"; text="SUPER"; action=QUOTE(GVAR(truingDropMode) = 0; call FUNC(update_truing_drop_selection)); }; class TEXT_TRUING_DROP_SUB: TEXT_TRUING_DROP_SUPER { idc=18010; - x="0.550*safezoneW+safezoneX+0.32"; + x="0.550*safeZoneW+safeZoneX+0.32"; text="SUB"; action=QUOTE(GVAR(truingDropMode) = 1; call FUNC(update_truing_drop_selection)); }; @@ -1785,56 +1785,56 @@ class ATragMX_Display { style=QUOTE(ST_WITH_RECT+ST_RIGHT); colorDisabled[]={0,0,0,0.6}; w="0.06"; - x="0.550*safezoneW+safezoneX+0.25"; - y="0.265*safezoneH+safezoneY+0.35"; + x="0.550*safeZoneW+safeZoneX+0.25"; + y="0.265*safeZoneH+safeZoneY+0.35"; }; class TEXT_TRUING_DROP_TARGET_RANGE_SUB_INPUT: TEXT_TRUING_DROP_TARGET_RANGE_SUPER_INPUT { idc=18012; - x="0.550*safezoneW+safezoneX+0.32"; + x="0.550*safeZoneW+safeZoneX+0.32"; }; class TEXT_TRUING_DROP_DROP_SUPER_INPUT: TEXT_TRUING_DROP_TARGET_RANGE_SUPER_INPUT { idc=18013; - y="0.265*safezoneH+safezoneY+0.40"; + y="0.265*safeZoneH+safeZoneY+0.40"; }; class TEXT_TRUING_DROP_DROP_SUB_INPUT: TEXT_TRUING_DROP_TARGET_RANGE_SUB_INPUT { idc=18014; - y="0.265*safezoneH+safezoneY+0.40"; + y="0.265*safeZoneH+safeZoneY+0.40"; }; class TEXT_TRUING_DROP_CALC: TEXT_GUN_LIST { idc=18015; style=ST_CENTER; w="0.11"; - x="0.550*safezoneW+safezoneX+0.26"; - y="0.265*safezoneH+safezoneY+0.45"; + x="0.550*safeZoneW+safeZoneX+0.26"; + y="0.265*safeZoneH+safeZoneY+0.45"; text="Calc"; action=QUOTE(true call FUNC(calculate_truing_drop)); }; class TEXT_TRUING_DROP_MV_INPUT: TEXT_TRUING_DROP_TARGET_RANGE_SUPER_INPUT { idc=18016; - y="0.265*safezoneH+safezoneY+0.50"; + y="0.265*safeZoneH+safeZoneY+0.50"; }; class TEXT_TRUING_DROP_C1_BALLISTIC_COEFFICIENT_INPUT: TEXT_TRUING_DROP_TARGET_RANGE_SUB_INPUT { idc=18017; - y="0.265*safezoneH+safezoneY+0.55"; + y="0.265*safeZoneH+safeZoneY+0.55"; }; class TEXT_TRUING_DROP_ACCEPT: TEXT_GUN_LIST { idc=18018; w="0.085"; h="0.04"; - x="0.550*safezoneW+safezoneX+0.125"; - y="0.265*safezoneH+safezoneY+0.60"; + x="0.550*safeZoneW+safeZoneX+0.125"; + y="0.265*safeZoneH+safeZoneY+0.60"; text="Accept"; action=QUOTE(1 call FUNC(toggle_truing_drop)); }; class TEXT_TRUING_DROP_CANCEL: TEXT_TRUING_DROP_ACCEPT { idc=18019; - x="0.550*safezoneW+safezoneX+0.210"; + x="0.550*safeZoneW+safeZoneX+0.210"; text="Cancel"; action=QUOTE(0 call FUNC(toggle_truing_drop)); }; class TEXT_TRUING_DROP_RESTORE: TEXT_TRUING_DROP_CANCEL { idc=18020; - x="0.550*safezoneW+safezoneX+0.29525"; + x="0.550*safeZoneW+safeZoneX+0.29525"; text="Restore"; action=QUOTE(true call FUNC(restore_truing_drop)); }; diff --git a/addons/atragmx/functions/fnc_calculate_solution.sqf b/addons/atragmx/functions/fnc_calculate_solution.sqf index 5f09fb35b1b..7b56217799d 100644 --- a/addons/atragmx/functions/fnc_calculate_solution.sqf +++ b/addons/atragmx/functions/fnc_calculate_solution.sqf @@ -110,8 +110,8 @@ _bulletPos set [1, 0]; _bulletPos set [2, -(_boreHeight / 100)]; _bulletVelocity set [0, 0]; -_bulletVelocity set [1, Cos(_scopeBaseAngle) * _muzzleVelocity]; -_bulletVelocity set [2, Sin(_scopeBaseAngle) * _muzzleVelocity]; +_bulletVelocity set [1, cos(_scopeBaseAngle) * _muzzleVelocity]; +_bulletVelocity set [2, sin(_scopeBaseAngle) * _muzzleVelocity]; while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do { _bulletSpeed = vectorMagnitude _bulletVelocity; @@ -153,7 +153,7 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do { _windage1 = - atan(_tx / _trueRange); _windDrift = (_wind2 select 0) * (_TOF - _trueRange / _muzzleVelocity); _windage2 = - atan(_windDrift / _trueRange); - _lead = (_targetSpeed * _TOF) / (Tan(MRAD_TO_DEG(1)) * _trueRange); + _lead = (_targetSpeed * _TOF) / (tan(MRAD_TO_DEG(1)) * _trueRange); }; _kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2)); _kineticEnergy = _kineticEnergy * 0.737562149; @@ -188,7 +188,7 @@ if (_targetRange != 0) then { _windage1 = - atan(_tx / _targetRange); _windDrift = (_wind2 select 0) * (_TOF - _targetRange / _muzzleVelocity); _windage2 = - atan(_windDrift / _targetRange); - _lead = (_targetSpeed * _TOF) / (Tan(MRAD_TO_DEG(1)) * _targetRange); + _lead = (_targetSpeed * _TOF) / (tan(MRAD_TO_DEG(1)) * _targetRange); }; _kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2)); diff --git a/addons/atragmx/functions/fnc_calculate_target_range_assist.sqf b/addons/atragmx/functions/fnc_calculate_target_range_assist.sqf index dc9c62c3fc5..5ad543ccc94 100644 --- a/addons/atragmx/functions/fnc_calculate_target_range_assist.sqf +++ b/addons/atragmx/functions/fnc_calculate_target_range_assist.sqf @@ -68,7 +68,7 @@ switch (_this) do { }; }; - ctrlSetText [7010, Str(Round(_targetSize * 100) / 100)]; + ctrlSetText [7010, str(round(_targetSize * 100) / 100)]; }; case 1: { if (_estRange > 0) then { @@ -87,13 +87,13 @@ switch (_this) do { }; }; - ctrlSetText [7011, Str(Round(_imageSize * 100) / 100)]; + ctrlSetText [7011, str(round(_imageSize * 100) / 100)]; }; case 2: { if (tan(_imageSize) != 0) then { _estRange = _targetSize / tan(_imageSize); }; - ctrlSetText [7013, Str(Round(_estRange))]; + ctrlSetText [7013, str(round(_estRange))]; }; }; diff --git a/addons/atragmx/functions/fnc_calculate_target_speed_assist.sqf b/addons/atragmx/functions/fnc_calculate_target_speed_assist.sqf index 69af9eba165..25106c794e9 100644 --- a/addons/atragmx/functions/fnc_calculate_target_speed_assist.sqf +++ b/addons/atragmx/functions/fnc_calculate_target_speed_assist.sqf @@ -44,4 +44,4 @@ if (GVAR(currentUnit) != 2) then { _estSpeed = _estSpeed * 2.23693629; }; -ctrlSetText [8007, Str(Round(_estSpeed * 10) / 10)]; +ctrlSetText [8007, str(round(_estSpeed * 10) / 10)]; diff --git a/addons/atragmx/functions/fnc_calculate_truing_drop.sqf b/addons/atragmx/functions/fnc_calculate_truing_drop.sqf index 5191848d050..5f7adee2838 100644 --- a/addons/atragmx/functions/fnc_calculate_truing_drop.sqf +++ b/addons/atragmx/functions/fnc_calculate_truing_drop.sqf @@ -29,8 +29,8 @@ if (_parseInput) then { _transonicRange = _transonicRange * 0.9144; _subsonicRange = _subsonicRange * 0.9144; }; - _transonicRange = Round(_transonicRange); - _subsonicRange = Round(_subsonicRange); + _transonicRange = round(_transonicRange); + _subsonicRange = round(_subsonicRange); _subsonicRange = _transonicRange max _subsonicRange; @@ -54,8 +54,8 @@ if (_parseInput) then { _subsonicDrop = _subsonicDrop / 1.047; }; }; - _transonicDrop = Round(_transonicDrop * 100) / 100; - _subsonicDrop = Round(_subsonicDrop * 100) / 100; + _transonicDrop = round(_transonicDrop * 100) / 100; + _subsonicDrop = round(_subsonicDrop * 100) / 100; _subsonicDrop = _transonicDrop max _subsonicDrop; }; @@ -67,11 +67,11 @@ if ((GVAR(truingDropDropData) select 0) == 0 || {[_transonicRange, _subsonicRang private _solutionInput = +GVAR(targetSolutionInput); if (_transonicRange == 0) then { - _transonicRange = Round(403 call FUNC(calculate_distance_at_velocity)); + _transonicRange = round(403 call FUNC(calculate_distance_at_velocity)); }; _solutionInput set [13, _transonicRange]; private _result1 = _solutionInput call FUNC(calculate_solution); - _transonicDrop = Round((_result1 select 0) * 100) / 100; + _transonicDrop = round((_result1 select 0) * 100) / 100; GVAR(truingDropRangeData) set [0, _transonicRange]; GVAR(truingDropDropData) set [1, _transonicDrop]; GVAR(truingDropReferenceDropData) set [0, _transonicDrop]; @@ -84,11 +84,11 @@ if ((GVAR(truingDropDropData) select 0) == 0 || {[_transonicRange, _subsonicRang } else { _subsonicRange = _subsonicRange + 200 * 1.0936133; }; - _subsonicRange = Round(_subsonicRange); + _subsonicRange = round(_subsonicRange); }; _solutionInput set [13, _subsonicRange]; private _result2 = _solutionInput call FUNC(calculate_solution); - _subsonicDrop = Round((_result2 select 0) * 100) / 100; + _subsonicDrop = round((_result2 select 0) * 100) / 100; GVAR(truingDropRangeData) set [1, _subsonicRange]; GVAR(truingDropDropData) set [2, _subsonicDrop]; GVAR(truingDropReferenceDropData) set [1, _subsonicDrop]; diff --git a/addons/atragmx/functions/fnc_parse_input.sqf b/addons/atragmx/functions/fnc_parse_input.sqf index 1c3ea3398a5..4f62f301160 100644 --- a/addons/atragmx/functions/fnc_parse_input.sqf +++ b/addons/atragmx/functions/fnc_parse_input.sqf @@ -100,11 +100,11 @@ if (GVAR(currentUnit) == 1) then { _targetRange = 25 max _targetRange min 3700; }; GVAR(targetRangeDirtyFlag) = GVAR(targetRangeDirtyFlag) || {_targetRange != GVAR(targetRange) select GVAR(currentTarget)}; -GVAR(latitude) set [GVAR(currentTarget), -90 max Round(parseNumber(ctrlText 140000)) min 90]; -GVAR(directionOfFire) set [GVAR(currentTarget), 0 max abs(Round(parseNumber(ctrlText 140010))) min 359]; +GVAR(latitude) set [GVAR(currentTarget), -90 max round(parseNumber(ctrlText 140000)) min 90]; +GVAR(directionOfFire) set [GVAR(currentTarget), 0 max abs(round(parseNumber(ctrlText 140010))) min 359]; GVAR(windSpeed1) set [GVAR(currentTarget), _windSpeed1]; GVAR(windSpeed2) set [GVAR(currentTarget), _windSpeed2]; -GVAR(windDirection) set [GVAR(currentTarget), 1 max Round(parseNumber(ctrlText 140030)) min 12]; +GVAR(windDirection) set [GVAR(currentTarget), 1 max round(parseNumber(ctrlText 140030)) min 12]; GVAR(targetSpeed) set [GVAR(currentTarget), _targetSpeed]; GVAR(targetRange) set [GVAR(currentTarget), _targetRange]; private _inclinationAngleCosine = 0.5 max parseNumber(ctrlText 140041) min 1; @@ -112,7 +112,7 @@ private _inclinationAngleDegree = -60 max round(parseNumber(ctrlText 140040)) mi if (_inclinationAngleDegree != GVAR(inclinationAngle) select GVAR(currentTarget)) then { GVAR(inclinationAngle) set [GVAR(currentTarget), _inclinationAngleDegree]; } else { - if (_inclinationAngleCosine != Round(cos(GVAR(inclinationAngle) select GVAR(currentTarget)) * 100) / 100) then { + if (_inclinationAngleCosine != round(cos(GVAR(inclinationAngle) select GVAR(currentTarget)) * 100) / 100) then { GVAR(inclinationAngle) set [GVAR(currentTarget), round(acos(_inclinationAngleCosine))]; }; }; diff --git a/addons/atragmx/functions/fnc_show_range_card_setup.sqf b/addons/atragmx/functions/fnc_show_range_card_setup.sqf index 15558ceb983..a4301f5b761 100644 --- a/addons/atragmx/functions/fnc_show_range_card_setup.sqf +++ b/addons/atragmx/functions/fnc_show_range_card_setup.sqf @@ -22,7 +22,7 @@ GVAR(showRangeCardSetup) = _this; if (_this) then { ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 10006); - ctrlSetText [10003, Str(Round(GVAR(rangeCardStartRange)))]; - ctrlSetText [10004, Str(Round(GVAR(rangeCardEndRange)))]; - ctrlSetText [10005, Str(Round(GVAR(rangeCardIncrement)))]; + ctrlSetText [10003, str(round(GVAR(rangeCardStartRange)))]; + ctrlSetText [10004, str(round(GVAR(rangeCardEndRange)))]; + ctrlSetText [10005, str(round(GVAR(rangeCardIncrement)))]; }; diff --git a/addons/atragmx/functions/fnc_show_target_range_assist.sqf b/addons/atragmx/functions/fnc_show_target_range_assist.sqf index 83516ef5c6a..b13352d22f9 100644 --- a/addons/atragmx/functions/fnc_show_target_range_assist.sqf +++ b/addons/atragmx/functions/fnc_show_target_range_assist.sqf @@ -21,8 +21,8 @@ GVAR(showTargetRangeAssist) = _this; if (_this) then { ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 7018); - ctrlSetText [7012, Str(parseNumber(ctrlText 320))]; - ctrlSetText [7013, Str(parseNumber(ctrlText 340))]; + ctrlSetText [7012, str(parseNumber(ctrlText 320))]; + ctrlSetText [7013, str(parseNumber(ctrlText 340))]; if (GVAR(currentUnit) == 1) then { ctrlSetText [7016, "Yards"]; diff --git a/addons/atragmx/functions/fnc_show_target_speed_assist.sqf b/addons/atragmx/functions/fnc_show_target_speed_assist.sqf index 3efa6ed6d43..c2b34bd9081 100644 --- a/addons/atragmx/functions/fnc_show_target_speed_assist.sqf +++ b/addons/atragmx/functions/fnc_show_target_speed_assist.sqf @@ -22,7 +22,7 @@ GVAR(showTargetSpeedAssist) = _this; if (_this) then { ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 8012); - ctrlSetText [8004, Str(Round((GVAR(targetRange) select GVAR(currentTarget))))]; + ctrlSetText [8004, str(round((GVAR(targetRange) select GVAR(currentTarget))))]; if (GVAR(currentUnit) == 1) then { ctrlSetText [8008, "Yards"]; diff --git a/addons/atragmx/functions/fnc_show_truing_drop.sqf b/addons/atragmx/functions/fnc_show_truing_drop.sqf index 5e7f60f4d4e..f75d3f7758c 100644 --- a/addons/atragmx/functions/fnc_show_truing_drop.sqf +++ b/addons/atragmx/functions/fnc_show_truing_drop.sqf @@ -21,9 +21,9 @@ GVAR(showTruingDrop) = _this; if (_this) then { if (GVAR(currentUnit) == 2) then { - ctrlSetText [18000, format["ZR=%1meters", Round(GVAR(workingMemory) select 2)]]; + ctrlSetText [18000, format["ZR=%1meters", round(GVAR(workingMemory) select 2)]]; } else { - ctrlSetText [18000, format["ZR=%1yards", Round((GVAR(workingMemory) select 2) * 1.0936133)]]; + ctrlSetText [18000, format["ZR=%1yards", round((GVAR(workingMemory) select 2) * 1.0936133)]]; }; private _dropUnit = GVAR(currentScopeUnit); if (_dropUnit == 3) then { diff --git a/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf b/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf index 5408edee3af..40c0ac7cd8f 100644 --- a/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf +++ b/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf @@ -29,7 +29,7 @@ if !(ctrlVisible 9000) then { if !(GVAR(speedAssistTimer)) exitWith { GVAR(speedAssistTimer) = true; - ctrlSetText [8006, Str(Round((CBA_missionTime - _startTime) * 10) / 10)]; + ctrlSetText [8006, str(round((CBA_missionTime - _startTime) * 10) / 10)]; [] call FUNC(calculate_target_speed_assist); @@ -39,7 +39,7 @@ if !(ctrlVisible 9000) then { [_this select 1] call CBA_fnc_removePerFrameHandler; }; - ctrlSetText [9001, Str(Round((CBA_missionTime - _startTime) * 10) / 10)]; + ctrlSetText [9001, str(round((CBA_missionTime - _startTime) * 10) / 10)]; }, 0.1, [CBA_missionTime]] call CBA_fnc_addPerFrameHandler; }; diff --git a/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf b/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf index 5c499b8b826..29c856013b4 100644 --- a/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf +++ b/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf @@ -20,9 +20,9 @@ if (ctrlVisible 10000) then { true call FUNC(show_range_card); if (_this == 1) then { - GVAR(rangeCardStartRange) = 0 max Round(parseNumber(ctrlText 10003)) min 3000; - GVAR(rangeCardEndRange) = 0 max Round(parseNumber(ctrlText 10004)) min 3000; - GVAR(rangeCardIncrement) = 1 max Round(parseNumber(ctrlText 10005)) min 3000; + GVAR(rangeCardStartRange) = 0 max round(parseNumber(ctrlText 10003)) min 3000; + GVAR(rangeCardEndRange) = 0 max round(parseNumber(ctrlText 10004)) min 3000; + GVAR(rangeCardIncrement) = 1 max round(parseNumber(ctrlText 10005)) min 3000; [] call FUNC(calculate_range_card); [] call FUNC(update_range_card); diff --git a/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf b/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf index 1e6c485e995..dd14f2ddcd0 100644 --- a/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf +++ b/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf @@ -20,10 +20,10 @@ if (ctrlVisible 7000) then { true call FUNC(show_main_page); if (_this == 1) then { - ctrlSetText [320, Str(parseNumber(ctrlText 7012))]; - ctrlSetText [140040, Str(parseNumber(ctrlText 7012))]; - ctrlSetText [340, Str(parseNumber(ctrlText 7013))]; - ctrlSetText [140060, Str(parseNumber(ctrlText 7013))]; + ctrlSetText [320, str(parseNumber(ctrlText 7012))]; + ctrlSetText [140040, str(parseNumber(ctrlText 7012))]; + ctrlSetText [340, str(parseNumber(ctrlText 7013))]; + ctrlSetText [140060, str(parseNumber(ctrlText 7013))]; [] call FUNC(calculate_target_solution); }; } else { diff --git a/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf b/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf index 009074105e8..fec9e528e57 100644 --- a/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf +++ b/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf @@ -23,8 +23,8 @@ if (ctrlVisible 8000) then { [] call FUNC(calculate_target_speed_assist); private _targetSpeed = parseNumber(ctrlText 8007); if (_targetSpeed != 0) then { - ctrlSetText [330, Str(_targetSpeed)]; - ctrlSetText [140050, Str(_targetSpeed)]; + ctrlSetText [330, str(_targetSpeed)]; + ctrlSetText [140050, str(_targetSpeed)]; [] call FUNC(calculate_target_solution); }; }; diff --git a/addons/atragmx/functions/fnc_true_c1_ballistic_coefficient.sqf b/addons/atragmx/functions/fnc_true_c1_ballistic_coefficient.sqf index 84371ca8527..06824cc7a20 100644 --- a/addons/atragmx/functions/fnc_true_c1_ballistic_coefficient.sqf +++ b/addons/atragmx/functions/fnc_true_c1_ballistic_coefficient.sqf @@ -18,7 +18,7 @@ private _referenceDrop = GVAR(truingDropDropData) select 0; private _actualDrop = GVAR(truingDropDropData) select 2; -if (Round(_actualDrop * 10) / 10 == Round(_referenceDrop * 10) / 10) exitWith {}; +if (round(_actualDrop * 10) / 10 == round(_referenceDrop * 10) / 10) exitWith {}; private _step = 0.01; if (_actualDrop > _referenceDrop) then { diff --git a/addons/atragmx/functions/fnc_true_muzzle_velocity.sqf b/addons/atragmx/functions/fnc_true_muzzle_velocity.sqf index f8fb9e621c4..75e1fbdc78d 100644 --- a/addons/atragmx/functions/fnc_true_muzzle_velocity.sqf +++ b/addons/atragmx/functions/fnc_true_muzzle_velocity.sqf @@ -18,7 +18,7 @@ private _referenceDrop = GVAR(truingDropDropData) select 0; private _actualDrop = GVAR(truingDropDropData) select 1; -if (Round(_actualDrop * 10) / 10 == Round(_referenceDrop * 10) / 10) exitWith {}; +if (round(_actualDrop * 10) / 10 == round(_referenceDrop * 10) / 10) exitWith {}; private _step = 10; if (_actualDrop > _referenceDrop) then { diff --git a/addons/atragmx/functions/fnc_update_atmo_env_data.sqf b/addons/atragmx/functions/fnc_update_atmo_env_data.sqf index 340924b5aa7..3118bee2233 100644 --- a/addons/atragmx/functions/fnc_update_atmo_env_data.sqf +++ b/addons/atragmx/functions/fnc_update_atmo_env_data.sqf @@ -18,20 +18,20 @@ ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 13007); if (GVAR(currentUnit) == 2) then { - ctrlSetText [130040, Str(Round(GVAR(temperature) * 10) / 10)]; + ctrlSetText [130040, str(round(GVAR(temperature) * 10) / 10)]; } else { - ctrlSetText [130040, Str(Round((GVAR(temperature) * 1.8 + 32) * 10) / 10)]; + ctrlSetText [130040, str(round((GVAR(temperature) * 1.8 + 32) * 10) / 10)]; }; if (GVAR(currentUnit) == 2) then { - ctrlSetText [130050, Str(Round(GVAR(barometricPressure)))]; + ctrlSetText [130050, str(round(GVAR(barometricPressure)))]; } else { - ctrlSetText [130050, Str(Round(GVAR(barometricPressure) / 33.8638866667 * 100) / 100)]; + ctrlSetText [130050, str(round(GVAR(barometricPressure) / 33.8638866667 * 100) / 100)]; }; -ctrlSetText [130060, Str(Round(GVAR(relativeHumidity) * 100 * 10) / 10)]; +ctrlSetText [130060, str(round(GVAR(relativeHumidity) * 100 * 10) / 10)]; if (GVAR(currentUnit) == 2) then { - ctrlSetText [130030, Str(Round(GVAR(altitude)))]; + ctrlSetText [130030, str(round(GVAR(altitude)))]; } else { - ctrlSetText [130030, Str(Round(GVAR(altitude) * 3.2808399))]; + ctrlSetText [130030, str(round(GVAR(altitude) * 3.2808399))]; }; if (GVAR(currentUnit) == 2) then { diff --git a/addons/atragmx/functions/fnc_update_atmosphere.sqf b/addons/atragmx/functions/fnc_update_atmosphere.sqf index 7d523158925..ac04d19ba9a 100644 --- a/addons/atragmx/functions/fnc_update_atmosphere.sqf +++ b/addons/atragmx/functions/fnc_update_atmosphere.sqf @@ -16,18 +16,18 @@ */ if (GVAR(currentUnit) == 2) then { - ctrlSetText [200, Str(Round(GVAR(temperature) * 10) / 10)]; + ctrlSetText [200, str(round(GVAR(temperature) * 10) / 10)]; } else { - ctrlSetText [200, Str(Round((GVAR(temperature) * 1.8 + 32) * 10) / 10)]; + ctrlSetText [200, str(round((GVAR(temperature) * 1.8 + 32) * 10) / 10)]; }; if (GVAR(currentUnit) == 2) then { - ctrlSetText [210, Str(Round(GVAR(barometricPressure)))]; + ctrlSetText [210, str(round(GVAR(barometricPressure)))]; } else { - ctrlSetText [210, Str(Round(GVAR(barometricPressure) / 33.8638866667 * 100) / 100)]; + ctrlSetText [210, str(round(GVAR(barometricPressure) / 33.8638866667 * 100) / 100)]; }; -ctrlSetText [220, Str(Round(GVAR(relativeHumidity) * 100 * 10) / 10)]; +ctrlSetText [220, str(round(GVAR(relativeHumidity) * 100 * 10) / 10)]; if (GVAR(currentUnit) == 2) then { - ctrlSetText [230, Str(Round(GVAR(altitude)))]; + ctrlSetText [230, str(round(GVAR(altitude)))]; } else { - ctrlSetText [230, Str(Round(GVAR(altitude) * 3.2808399))]; + ctrlSetText [230, str(round(GVAR(altitude) * 3.2808399))]; }; diff --git a/addons/atragmx/functions/fnc_update_c1_ballistic_coefficient_data.sqf b/addons/atragmx/functions/fnc_update_c1_ballistic_coefficient_data.sqf index 4c0c6d7175b..886ad33ba97 100644 --- a/addons/atragmx/functions/fnc_update_c1_ballistic_coefficient_data.sqf +++ b/addons/atragmx/functions/fnc_update_c1_ballistic_coefficient_data.sqf @@ -17,9 +17,9 @@ // Distances if (GVAR(currentUnit) != 1) then { - {ctrlSetText [_x, Str(Round(((GVAR(workingMemory) select 19) select _forEachIndex) select 0))]} forEach [170021, 170022, 170023, 170024, 170025, 170026, 170027]; + {ctrlSetText [_x, str(round(((GVAR(workingMemory) select 19) select _forEachIndex) select 0))]} forEach [170021, 170022, 170023, 170024, 170025, 170026, 170027]; } else { - {ctrlSetText [_x, Str(Round((((GVAR(workingMemory) select 19) select _forEachIndex) select 0) * 1.0936133))]} forEach [170021, 170022, 170023, 170024, 170025, 170026, 170027]; + {ctrlSetText [_x, str(round((((GVAR(workingMemory) select 19) select _forEachIndex) select 0) * 1.0936133))]} forEach [170021, 170022, 170023, 170024, 170025, 170026, 170027]; }; // Ballistic coefficients -{ctrlSetText [_x, Str(Round((((GVAR(workingMemory) select 19) select _forEachIndex) select 1) * 1000) / 1000)]} forEach [170031, 170032, 170033, 170034, 170035, 170036, 170037]; +{ctrlSetText [_x, str(round((((GVAR(workingMemory) select 19) select _forEachIndex) select 1) * 1000) / 1000)]} forEach [170031, 170032, 170033, 170034, 170035, 170036, 170037]; diff --git a/addons/atragmx/functions/fnc_update_gun.sqf b/addons/atragmx/functions/fnc_update_gun.sqf index 5a5dab00fa8..67f726e92e6 100644 --- a/addons/atragmx/functions/fnc_update_gun.sqf +++ b/addons/atragmx/functions/fnc_update_gun.sqf @@ -17,34 +17,34 @@ ctrlSetText [1000, GVAR(workingMemory) select 0]; if (GVAR(currentUnit) != 2) then { - ctrlSetText [100, Str(Round((GVAR(workingMemory) select 5) / 2.54 * 100) / 100)]; + ctrlSetText [100, str(round((GVAR(workingMemory) select 5) / 2.54 * 100) / 100)]; } else { - ctrlSetText [100, Str(Round((GVAR(workingMemory) select 5) * 100) / 100)]; + ctrlSetText [100, str(round((GVAR(workingMemory) select 5) * 100) / 100)]; }; if (GVAR(currentUnit) != 2) then { - ctrlSetText [110, Str(Round((GVAR(workingMemory) select 12) * 15.4323584))]; + ctrlSetText [110, str(round((GVAR(workingMemory) select 12) * 15.4323584))]; } else { - ctrlSetText [110, Str(Round((GVAR(workingMemory) select 12) * 10) / 10)]; + ctrlSetText [110, str(round((GVAR(workingMemory) select 12) * 10) / 10)]; }; if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { - ctrlSetText [120, Str(Round((GVAR(workingMemory) select 15) * 1000) / 1000)]; + ctrlSetText [120, str(round((GVAR(workingMemory) select 15) * 1000) / 1000)]; } else { - ctrlSetText [120, Str(Round((GVAR(workingMemory) select 4) * -1000 * 1000) / 1000)]; + ctrlSetText [120, str(round((GVAR(workingMemory) select 4) * -1000 * 1000) / 1000)]; }; if (GVAR(currentUnit) != 2) then { - ctrlSetText [130, Str(Round((GVAR(workingMemory) select 1) * 3.2808399))]; + ctrlSetText [130, str(round((GVAR(workingMemory) select 1) * 3.2808399))]; } else { - ctrlSetText [130, Str(Round(GVAR(workingMemory) select 1))]; + ctrlSetText [130, str(round(GVAR(workingMemory) select 1))]; }; switch (GVAR(currentUnit)) do { case 0: { - ctrlSetText [140, format["*%1", Round(GVAR(workingMemory) select 2)]]; + ctrlSetText [140, format["*%1", round(GVAR(workingMemory) select 2)]]; }; case 1: { - ctrlSetText [140, Str(Round((GVAR(workingMemory) select 2) * 1.0936133))]; + ctrlSetText [140, str(round((GVAR(workingMemory) select 2) * 1.0936133))]; }; case 2: { - ctrlSetText [140, Str(Round(GVAR(workingMemory) select 2))]; + ctrlSetText [140, str(round(GVAR(workingMemory) select 2))]; }; }; [] call FUNC(update_scope_unit); diff --git a/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf b/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf index 59bd0149733..56347ac6db6 100644 --- a/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf +++ b/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf @@ -18,39 +18,39 @@ ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 12008); if (GVAR(currentUnit) != 2) then { - ctrlSetText [120000, Str(Round((GVAR(workingMemory) select 5) / 2.54 * 100) / 100)]; + ctrlSetText [120000, str(round((GVAR(workingMemory) select 5) / 2.54 * 100) / 100)]; } else { - ctrlSetText [120000, Str(Round((GVAR(workingMemory) select 5) * 100) / 100)]; + ctrlSetText [120000, str(round((GVAR(workingMemory) select 5) * 100) / 100)]; }; if (GVAR(currentUnit) != 2) then { - ctrlSetText [120010, Str(Round((GVAR(workingMemory) select 12) * 15.4323584))]; + ctrlSetText [120010, str(round((GVAR(workingMemory) select 12) * 15.4323584))]; } else { - ctrlSetText [120010, Str(Round((GVAR(workingMemory) select 12) * 10) / 10)]; + ctrlSetText [120010, str(round((GVAR(workingMemory) select 12) * 10) / 10)]; }; if (GVAR(currentUnit) != 2) then { - ctrlSetText [120020, Str(Round((GVAR(workingMemory) select 13) / 10 / 2.54 * 1000) / 1000)]; + ctrlSetText [120020, str(round((GVAR(workingMemory) select 13) / 10 / 2.54 * 1000) / 1000)]; } else { - ctrlSetText [120020, Str(Round((GVAR(workingMemory) select 13) / 10 * 1000) / 1000)]; + ctrlSetText [120020, str(round((GVAR(workingMemory) select 13) / 10 * 1000) / 1000)]; }; if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { - ctrlSetText [120030, Str(Round((GVAR(workingMemory) select 15) * 1000) / 1000)]; + ctrlSetText [120030, str(round((GVAR(workingMemory) select 15) * 1000) / 1000)]; } else { - ctrlSetText [120030, Str(Round((GVAR(workingMemory) select 4) * -1000 * 1000) / 1000)]; + ctrlSetText [120030, str(round((GVAR(workingMemory) select 4) * -1000 * 1000) / 1000)]; }; if (GVAR(currentUnit) != 2) then { - ctrlSetText [120040, Str(Round((GVAR(workingMemory) select 14) / 2.54 * 10) / 10)]; + ctrlSetText [120040, str(round((GVAR(workingMemory) select 14) / 2.54 * 10) / 10)]; } else { - ctrlSetText [120040, Str(Round((GVAR(workingMemory) select 14) * 100) / 100)]; + ctrlSetText [120040, str(round((GVAR(workingMemory) select 14) * 100) / 100)]; }; if (GVAR(currentUnit) != 2) then { - ctrlSetText [120050, Str(Round((GVAR(workingMemory) select 1) * 3.2808399))]; + ctrlSetText [120050, str(round((GVAR(workingMemory) select 1) * 3.2808399))]; } else { - ctrlSetText [120050, Str(Round(GVAR(workingMemory) select 1))]; + ctrlSetText [120050, str(round(GVAR(workingMemory) select 1))]; }; if (GVAR(currentUnit) == 1) then { - ctrlSetText [120060, Str(Round((GVAR(workingMemory) select 2) * 1.0936133))]; + ctrlSetText [120060, str(round((GVAR(workingMemory) select 2) * 1.0936133))]; } else { - ctrlSetText [120060, Str(Round(GVAR(workingMemory) select 2))]; + ctrlSetText [120060, str(round(GVAR(workingMemory) select 2))]; }; if (GVAR(currentUnit) == 0) then { ctrlSetText [120061, "*"]; diff --git a/addons/atragmx/functions/fnc_update_inclination_angle.sqf b/addons/atragmx/functions/fnc_update_inclination_angle.sqf index 532b3d94e8f..b7ae40160c6 100644 --- a/addons/atragmx/functions/fnc_update_inclination_angle.sqf +++ b/addons/atragmx/functions/fnc_update_inclination_angle.sqf @@ -19,7 +19,7 @@ private _inclinationAngleCosine = 0.5 max parseNumber(ctrlText 140041) min 1; private _inclinationAngleDegree = -60 max parseNumber(ctrlText 140040) min 60; if (_this == 0) then { - ctrlSetText [140040, Str(round(acos(_inclinationAngleCosine)))]; + ctrlSetText [140040, str(round(acos(_inclinationAngleCosine)))]; } else { - ctrlSetText [140041, Str(round(cos(_inclinationAngleDegree) * 100) / 100)]; + ctrlSetText [140041, str(round(cos(_inclinationAngleDegree) * 100) / 100)]; }; diff --git a/addons/atragmx/functions/fnc_update_muzzle_velocity_data.sqf b/addons/atragmx/functions/fnc_update_muzzle_velocity_data.sqf index 23193aa9036..36af09d6427 100644 --- a/addons/atragmx/functions/fnc_update_muzzle_velocity_data.sqf +++ b/addons/atragmx/functions/fnc_update_muzzle_velocity_data.sqf @@ -17,12 +17,12 @@ if (GVAR(currentUnit) == 2) then { // Temperatures - {ctrlSetText [_x, Str(Round((((GVAR(workingMemory) select 18) select _forEachIndex) select 0) * 10) / 10)]} forEach [160021, 160022, 160023, 160024, 160025, 160026, 160027]; + {ctrlSetText [_x, str(round((((GVAR(workingMemory) select 18) select _forEachIndex) select 0) * 10) / 10)]} forEach [160021, 160022, 160023, 160024, 160025, 160026, 160027]; // Muzzle velocities - {ctrlSetText [_x, Str(Round(((GVAR(workingMemory) select 18) select _forEachIndex) select 1))]} forEach [160031, 160032, 160033, 160034, 160035, 160036, 160037]; + {ctrlSetText [_x, str(round(((GVAR(workingMemory) select 18) select _forEachIndex) select 1))]} forEach [160031, 160032, 160033, 160034, 160035, 160036, 160037]; } else { // Temperatures - {ctrlSetText [_x, Str(Round(((((GVAR(workingMemory) select 18) select _forEachIndex) select 0) * 1.8 + 32) * 10) / 10)]} forEach [160021, 160022, 160023, 160024, 160025, 160026, 160027]; + {ctrlSetText [_x, str(round(((((GVAR(workingMemory) select 18) select _forEachIndex) select 0) * 1.8 + 32) * 10) / 10)]} forEach [160021, 160022, 160023, 160024, 160025, 160026, 160027]; // Muzzle velocities - {ctrlSetText [_x, Str(Round((((GVAR(workingMemory) select 18) select _forEachIndex) select 1) * 3.2808399))]} forEach [160031, 160032, 160033, 160034, 160035, 160036, 160037]; + {ctrlSetText [_x, str(round((((GVAR(workingMemory) select 18) select _forEachIndex) select 1) * 3.2808399))]} forEach [160031, 160032, 160033, 160034, 160035, 160036, 160037]; }; diff --git a/addons/atragmx/functions/fnc_update_range_card.sqf b/addons/atragmx/functions/fnc_update_range_card.sqf index 066bd651746..e280c7d137a 100644 --- a/addons/atragmx/functions/fnc_update_range_card.sqf +++ b/addons/atragmx/functions/fnc_update_range_card.sqf @@ -59,16 +59,16 @@ private _speedOfSound = GVAR(temperature) call EFUNC(weather,calculateSpeedOfSou private _clickNumber = GVAR(workingMemory) select 8; private _clickInterval = _clickSize / _clickNumber; - _elevation = Round(_elevation / _clickInterval); - _windage1 = Round(_windage1 / _clickInterval); - _windage2 = Round(_windage2 / _clickInterval); + _elevation = round(_elevation / _clickInterval); + _windage1 = round(_windage1 / _clickInterval); + _windage2 = round(_windage2 / _clickInterval); }; }; - private _elevationOutput = Str(Round(_elevation * 100) / 100); - private _windageOutput = Str(Round(_windage1 * 100) / 100); + private _elevationOutput = str(round(_elevation * 100) / 100); + private _windageOutput = str(round(_windage1 * 100) / 100); - private _rangeOutput = Str(_range); + private _rangeOutput = str(_range); if (_velocity < _speedOfSound) then { _rangeOutput = _rangeOutput + "*"; }; @@ -80,19 +80,19 @@ private _speedOfSound = GVAR(temperature) call EFUNC(weather,calculateSpeedOfSou switch (GVAR(rangeCardCurrentColumn)) do { case 0: { if (GVAR(showWind2)) then { - _lastColumnOutput = Str(Round(_windage2 * 100) / 100); + _lastColumnOutput = str(round(_windage2 * 100) / 100); } else { - _lastColumnOutput = Str(Round(_lead * 100) / 100); + _lastColumnOutput = str(round(_lead * 100) / 100); }; }; case 1: { - _lastColumnOutput = Str(Round(_velocity)); + _lastColumnOutput = str(round(_velocity)); }; case 2: { - _lastColumnOutput = Str(Round(_kineticEnergy)); + _lastColumnOutput = str(round(_kineticEnergy)); }; case 3: { - _lastColumnOutput = Str(Round(_TOF * 100) / 100); + _lastColumnOutput = str(round(_TOF * 100) / 100); } }; diff --git a/addons/atragmx/functions/fnc_update_result.sqf b/addons/atragmx/functions/fnc_update_result.sqf index cfd8f460a93..3e8d4ef9bd3 100644 --- a/addons/atragmx/functions/fnc_update_result.sqf +++ b/addons/atragmx/functions/fnc_update_result.sqf @@ -69,16 +69,16 @@ switch (GVAR(currentScopeUnit)) do { private _clickNumber = GVAR(workingMemory) select 8; private _clickInterval = _clickSize / _clickNumber; - _elevationAbs = Round(_elevationAbs / _clickInterval); - _windageAbs = Round(_windageAbs / _clickInterval); + _elevationAbs = round(_elevationAbs / _clickInterval); + _windageAbs = round(_windageAbs / _clickInterval); - _wind2 = Round(_wind2 / _clickInterval); + _wind2 = round(_wind2 / _clickInterval); - _elevationRel = Round(_elevationRel / _clickInterval); - _windageRel = Round(_windageRel / _clickInterval); + _elevationRel = round(_elevationRel / _clickInterval); + _windageRel = round(_windageRel / _clickInterval); - _elevationCur = Round(_elevationCur / _clickInterval); - _windageCur = Round(_windageCur / _clickInterval); + _elevationCur = round(_elevationCur / _clickInterval); + _windageCur = round(_windageCur / _clickInterval); }; }; @@ -88,7 +88,7 @@ if (GVAR(showWind2)) then { ctrlSetText [42, "Lead"]; }; -_elevationAbs = Round(_elevationAbs * 100) / 100; +_elevationAbs = round(_elevationAbs * 100) / 100; if (_elevationAbs > 0) then { ctrlSetText [400, str abs _elevationAbs]; } else { @@ -98,7 +98,7 @@ if (_elevationAbs > 0) then { ctrlSetText [400, "0.0"]; }; }; -_elevationRel = Round(_elevationRel * 100) / 100; +_elevationRel = round(_elevationRel * 100) / 100; if (_elevationRel > 0) then { ctrlSetText [401, str abs _elevationRel]; } else { @@ -108,7 +108,7 @@ if (_elevationRel > 0) then { ctrlSetText [401, "0.0"]; }; }; -_elevationCur = Round(_elevationCur * 100) / 100; +_elevationCur = round(_elevationCur * 100) / 100; if (_elevationCur > 0) then { ctrlSetText [402, str abs _elevationCur]; } else { @@ -119,7 +119,7 @@ if (_elevationCur > 0) then { }; }; -_windageAbs = Round(_windageAbs * 100) / 100; +_windageAbs = round(_windageAbs * 100) / 100; if (_windageAbs > 0) then { ctrlSetText [410, format["%1R", abs(_windageAbs)]]; } else { @@ -129,7 +129,7 @@ if (_windageAbs > 0) then { ctrlSetText [410, "0.0"]; }; }; -_windageRel = Round(_windageRel * 100) / 100; +_windageRel = round(_windageRel * 100) / 100; if (_windageRel > 0) then { ctrlSetText [411, format["%1R", abs(_windageRel)]]; } else { @@ -139,7 +139,7 @@ if (_windageRel > 0) then { ctrlSetText [411, "0.0"]; }; }; -_windageCur = Round(_windageCur * 100) / 100; +_windageCur = round(_windageCur * 100) / 100; if (_windageCur > 0) then { ctrlSetText [412, format["%1R", abs(_windageCur)]]; } else { @@ -151,7 +151,7 @@ if (_windageCur > 0) then { }; if (GVAR(showWind2)) then { - _wind2 = Round(_wind2 * 100) / 100; + _wind2 = round(_wind2 * 100) / 100; if (_wind2 > 0) then { ctrlSetText [420, format["%1R", abs(_wind2)]]; } else { @@ -162,7 +162,7 @@ if (GVAR(showWind2)) then { }; }; } else { - _lead = Round(_lead * 100) / 100; + _lead = round(_lead * 100) / 100; if (_lead > 0) then { if ((GVAR(targetSpeedDirection) select GVAR(currentTarget)) == 1) then { ctrlSetText [420, format["%1R", abs(_lead)]]; diff --git a/addons/atragmx/functions/fnc_update_scope_unit.sqf b/addons/atragmx/functions/fnc_update_scope_unit.sqf index d1f0e9cf170..e72b490ef03 100644 --- a/addons/atragmx/functions/fnc_update_scope_unit.sqf +++ b/addons/atragmx/functions/fnc_update_scope_unit.sqf @@ -16,7 +16,7 @@ */ ctrlSetText [2000, GVAR(scopeUnits) select GVAR(currentScopeUnit)]; -ctrlSetText [2001, Str(GVAR(currentScopeClickNumber))]; +ctrlSetText [2001, str(GVAR(currentScopeClickNumber))]; if (GVAR(currentScopeUnit) == 3) then { ctrlSetText [5000, format["Clicks=%1", GVAR(currentScopeClickNumber)]]; diff --git a/addons/atragmx/functions/fnc_update_target.sqf b/addons/atragmx/functions/fnc_update_target.sqf index a87ba9ba54f..df37e7848e4 100644 --- a/addons/atragmx/functions/fnc_update_target.sqf +++ b/addons/atragmx/functions/fnc_update_target.sqf @@ -17,32 +17,32 @@ if (GVAR(showWind2)) then { if (GVAR(currentUnit) != 2) then { - ctrlSetText [300, format["%1/%2", Round((GVAR(windSpeed1) select GVAR(currentTarget)) * 2.23693629), Round((GVAR(windSpeed2) select GVAR(currentTarget)) * 2.23693629)]]; + ctrlSetText [300, format["%1/%2", round((GVAR(windSpeed1) select GVAR(currentTarget)) * 2.23693629), round((GVAR(windSpeed2) select GVAR(currentTarget)) * 2.23693629)]]; } else { - ctrlSetText [300, format["%1/%2", Round(GVAR(windSpeed1) select GVAR(currentTarget)), Round(GVAR(windSpeed2) select GVAR(currentTarget))]]; + ctrlSetText [300, format["%1/%2", round(GVAR(windSpeed1) select GVAR(currentTarget)), round(GVAR(windSpeed2) select GVAR(currentTarget))]]; }; } else { if (GVAR(currentUnit) != 2) then { - ctrlSetText [300, Str(Round((GVAR(windSpeed1) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)]; + ctrlSetText [300, str(round((GVAR(windSpeed1) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)]; } else { - ctrlSetText [300, Str(Round((GVAR(windSpeed1) select GVAR(currentTarget)) * 100) / 100)]; + ctrlSetText [300, str(round((GVAR(windSpeed1) select GVAR(currentTarget)) * 100) / 100)]; }; }; -ctrlSetText [310, Str(Round((GVAR(windDirection) select GVAR(currentTarget))))]; -ctrlSetText [320, Str(Round((GVAR(inclinationAngle) select GVAR(currentTarget))))]; +ctrlSetText [310, str(round((GVAR(windDirection) select GVAR(currentTarget))))]; +ctrlSetText [320, str(round((GVAR(inclinationAngle) select GVAR(currentTarget))))]; if (GVAR(currentUnit) != 2) then { - ctrlSetText [330, Str(Round((GVAR(targetSpeed) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)]; + ctrlSetText [330, str(round((GVAR(targetSpeed) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)]; } else { - ctrlSetText [330, Str(Round((GVAR(targetSpeed) select GVAR(currentTarget)) * 100) / 100)]; + ctrlSetText [330, str(round((GVAR(targetSpeed) select GVAR(currentTarget)) * 100) / 100)]; }; switch (GVAR(currentUnit)) do { case 0: { - ctrlSetText [340, format["*%1", Round((GVAR(targetRange) select GVAR(currentTarget)))]]; + ctrlSetText [340, format["*%1", round((GVAR(targetRange) select GVAR(currentTarget)))]]; }; case 1: { - ctrlSetText [340, Str(Round((GVAR(targetRange) select GVAR(currentTarget)) * 1.0936133))]; + ctrlSetText [340, str(round((GVAR(targetRange) select GVAR(currentTarget)) * 1.0936133))]; }; case 2: { - ctrlSetText [340, Str(Round((GVAR(targetRange) select GVAR(currentTarget))))]; + ctrlSetText [340, str(round((GVAR(targetRange) select GVAR(currentTarget))))]; }; }; diff --git a/addons/atragmx/functions/fnc_update_target_data.sqf b/addons/atragmx/functions/fnc_update_target_data.sqf index 92b5df50a06..f47d0401ddb 100644 --- a/addons/atragmx/functions/fnc_update_target_data.sqf +++ b/addons/atragmx/functions/fnc_update_target_data.sqf @@ -15,22 +15,22 @@ * Public: No */ -ctrlSetText [140000, Str(Round((GVAR(latitude) select GVAR(currentTarget)) * 100) / 100)]; -ctrlSetText [140010, Str(Round((GVAR(directionOfFire) select GVAR(currentTarget)) * 100) / 100)]; +ctrlSetText [140000, str(round((GVAR(latitude) select GVAR(currentTarget)) * 100) / 100)]; +ctrlSetText [140010, str(round((GVAR(directionOfFire) select GVAR(currentTarget)) * 100) / 100)]; if (GVAR(currentUnit) != 2) then { - ctrlSetText [140020, Str(Round((GVAR(windSpeed1) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)]; - ctrlSetText [140021, Str(Round((GVAR(windSpeed2) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)]; + ctrlSetText [140020, str(round((GVAR(windSpeed1) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)]; + ctrlSetText [140021, str(round((GVAR(windSpeed2) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)]; } else { - ctrlSetText [140020, Str(Round((GVAR(windSpeed1) select GVAR(currentTarget)) * 100) / 100)]; - ctrlSetText [140021, Str(Round((GVAR(windSpeed2) select GVAR(currentTarget)) * 100) / 100)]; + ctrlSetText [140020, str(round((GVAR(windSpeed1) select GVAR(currentTarget)) * 100) / 100)]; + ctrlSetText [140021, str(round((GVAR(windSpeed2) select GVAR(currentTarget)) * 100) / 100)]; }; -ctrlSetText [140030, Str(Round((GVAR(windDirection) select GVAR(currentTarget))))]; -ctrlSetText [140040, Str(Round((GVAR(inclinationAngle) select GVAR(currentTarget))))]; -ctrlSetText [140041, Str(Round(cos(GVAR(inclinationAngle) select GVAR(currentTarget)) * 100) / 100)]; +ctrlSetText [140030, str(round((GVAR(windDirection) select GVAR(currentTarget))))]; +ctrlSetText [140040, str(round((GVAR(inclinationAngle) select GVAR(currentTarget))))]; +ctrlSetText [140041, str(round(cos(GVAR(inclinationAngle) select GVAR(currentTarget)) * 100) / 100)]; if (GVAR(currentUnit) != 2) then { - ctrlSetText [140050, Str(Round((GVAR(targetSpeed) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)]; + ctrlSetText [140050, str(round((GVAR(targetSpeed) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)]; } else { - ctrlSetText [140050, Str(Round((GVAR(targetSpeed) select GVAR(currentTarget)) * 100) / 100)]; + ctrlSetText [140050, str(round((GVAR(targetSpeed) select GVAR(currentTarget)) * 100) / 100)]; }; if ((GVAR(targetSpeedDirection) select GVAR(currentTarget)) == 1) then { ctrlSetText [140051, ">"]; @@ -38,9 +38,9 @@ if ((GVAR(targetSpeedDirection) select GVAR(currentTarget)) == 1) then { ctrlSetText [140051, "<"]; }; if (GVAR(currentUnit) == 1) then { - ctrlSetText [140060, Str(Round((GVAR(targetRange) select GVAR(currentTarget)) * 1.0936133))]; + ctrlSetText [140060, str(round((GVAR(targetRange) select GVAR(currentTarget)) * 1.0936133))]; } else { - ctrlSetText [140060, Str(Round((GVAR(targetRange) select GVAR(currentTarget))))]; + ctrlSetText [140060, str(round((GVAR(targetRange) select GVAR(currentTarget))))]; }; if (GVAR(currentUnit) == 0) then { ctrlSetText [140061, "*"]; diff --git a/addons/atragmx/functions/fnc_update_truing_drop_data.sqf b/addons/atragmx/functions/fnc_update_truing_drop_data.sqf index ad0f0dda0e8..1180b689cd0 100644 --- a/addons/atragmx/functions/fnc_update_truing_drop_data.sqf +++ b/addons/atragmx/functions/fnc_update_truing_drop_data.sqf @@ -16,11 +16,11 @@ */ if (GVAR(currentUnit) == 2) then { - ctrlSetText [18011, Str(Round(GVAR(truingDropRangeData) select 0))]; - ctrlSetText [18012, Str(Round(GVAR(truingDropRangeData) select 1))]; + ctrlSetText [18011, str(round(GVAR(truingDropRangeData) select 0))]; + ctrlSetText [18012, str(round(GVAR(truingDropRangeData) select 1))]; } else { - ctrlSetText [18011, Str(Round((GVAR(truingDropRangeData) select 0) * 1.0936133))]; - ctrlSetText [18012, Str(Round((GVAR(truingDropRangeData) select 1) * 1.0936133))]; + ctrlSetText [18011, str(round((GVAR(truingDropRangeData) select 0) * 1.0936133))]; + ctrlSetText [18012, str(round((GVAR(truingDropRangeData) select 1) * 1.0936133))]; }; if (GVAR(truingDropMode) == 0) then { @@ -53,25 +53,25 @@ switch (_dropUnit) do { }; }; -ctrlSetText [18006, Str(Round((_dropData select 0) * 100) / 100)]; -ctrlSetText [18013, Str(Round((_dropData select 1) * 100) / 100)]; -ctrlSetText [18014, Str(Round((_dropData select 2) * 100) / 100)]; +ctrlSetText [18006, str(round((_dropData select 0) * 100) / 100)]; +ctrlSetText [18013, str(round((_dropData select 1) * 100) / 100)]; +ctrlSetText [18014, str(round((_dropData select 2) * 100) / 100)]; if (GVAR(currentUnit) != 2) then { - ctrlSetText [18007, Str(Round((GVAR(workingMemory) select 1) * 3.2808399))]; - ctrlSetText [18016, Str(Round((GVAR(workingMemory) select 1) * 3.2808399))]; + ctrlSetText [18007, str(round((GVAR(workingMemory) select 1) * 3.2808399))]; + ctrlSetText [18016, str(round((GVAR(workingMemory) select 1) * 3.2808399))]; if (GVAR(truingDropMuzzleVelocity) > 0) then { - ctrlSetText [18016, Str(Round(GVAR(truingDropMuzzleVelocity) * 3.2808399))]; + ctrlSetText [18016, str(round(GVAR(truingDropMuzzleVelocity) * 3.2808399))]; }; } else { - ctrlSetText [18007, Str(Round(GVAR(workingMemory) select 1))]; - ctrlSetText [18016, Str(Round(GVAR(workingMemory) select 1))]; + ctrlSetText [18007, str(round(GVAR(workingMemory) select 1))]; + ctrlSetText [18016, str(round(GVAR(workingMemory) select 1))]; if (GVAR(truingDropMuzzleVelocity) > 0) then { - ctrlSetText [18016, Str(Round(GVAR(truingDropMuzzleVelocity)))]; + ctrlSetText [18016, str(round(GVAR(truingDropMuzzleVelocity)))]; }; }; -ctrlSetText [18008, Str(Round((GVAR(workingMemory) select 15) * 1000) / 1000)]; -ctrlSetText [18017, Str(Round((GVAR(workingMemory) select 15) * 1000) / 1000)]; +ctrlSetText [18008, str(round((GVAR(workingMemory) select 15) * 1000) / 1000)]; +ctrlSetText [18017, str(round((GVAR(workingMemory) select 15) * 1000) / 1000)]; if (GVAR(truingDropC1) > 0) then { - ctrlSetText [18017, Str(Round(GVAR(truingDropC1) * 1000) / 1000)]; + ctrlSetText [18017, str(round(GVAR(truingDropC1) * 1000) / 1000)]; }; diff --git a/addons/attach/functions/fnc_canDetach.sqf b/addons/attach/functions/fnc_canDetach.sqf index 7202ba410fc..9b70d35ff4e 100644 --- a/addons/attach/functions/fnc_canDetach.sqf +++ b/addons/attach/functions/fnc_canDetach.sqf @@ -32,7 +32,7 @@ private _inRange = false; _attachedList deleteAt _forEachIndex; _attachToVehicle setVariable [QGVAR(attached), _attachedList, true]; }; - if (((getPos _unit) distance2d (getPos _xObject)) < 4) exitWith {_inRange = true}; + if (((getPos _unit) distance2D (getPos _xObject)) < 4) exitWith {_inRange = true}; } forEach _attachedList; _inRange && diff --git a/addons/attach/functions/fnc_detach.sqf b/addons/attach/functions/fnc_detach.sqf index d953b02bd16..8eab98e0720 100644 --- a/addons/attach/functions/fnc_detach.sqf +++ b/addons/attach/functions/fnc_detach.sqf @@ -31,8 +31,8 @@ private _minDistance = 1000; { _x params ["_xObject", "_xItemName"]; - if (((getPos _unit) distance2d (getPos _xObject)) < _minDistance) then { - _minDistance = ((getPos _unit) distance2d (getPos _xObject)); + if (((getPos _unit) distance2D (getPos _xObject)) < _minDistance) then { + _minDistance = ((getPos _unit) distance2D (getPos _xObject)); _attachedObject = _xObject; _itemName = _xItemName; _attachedIndex = _forEachIndex; diff --git a/addons/attach/functions/fnc_placeApprove.sqf b/addons/attach/functions/fnc_placeApprove.sqf index 2f0c4d6b751..9e9f8effba4 100644 --- a/addons/attach/functions/fnc_placeApprove.sqf +++ b/addons/attach/functions/fnc_placeApprove.sqf @@ -48,10 +48,10 @@ while {(_closeInMax - _closeInMin) > 0.01} do { { if (_doesIntersect) exitWith {}; private _startingPosShifted = _startingPosition vectorAdd _x; - private _startASL = if (surfaceIsWater _startingPosShifted) then {_startingPosShifted} else {ATLtoASL _startingPosShifted}; + private _startASL = if (surfaceIsWater _startingPosShifted) then {_startingPosShifted} else {ATLToASL _startingPosShifted}; { private _endPosShifted = _endPosTest vectorAdd _x; - private _endASL = if (surfaceIsWater _startingPosShifted) then {_endPosShifted} else {ATLtoASL _endPosShifted}; + private _endASL = if (surfaceIsWater _startingPosShifted) then {_endPosShifted} else {ATLToASL _endPosShifted}; #ifdef DRAW_ATTACH_SCAN [{ diff --git a/addons/cargo/XEH_postInit.sqf b/addons/cargo/XEH_postInit.sqf index f48849b50bc..45c1b9601a6 100644 --- a/addons/cargo/XEH_postInit.sqf +++ b/addons/cargo/XEH_postInit.sqf @@ -51,7 +51,7 @@ params ["_item", "_emptyPosAGL"]; _item hideObjectGlobal false; - _item setPosASL (AGLtoASL _emptyPosAGL); + _item setPosASL (AGLToASL _emptyPosAGL); // Let objects remain invulernable for a short while after placement [EFUNC(common,statusEffect_set), [_item, "blockDamage", QUOTE(ADDON), false], 2] call CBA_fnc_waitAndExecute; diff --git a/addons/cargo/functions/fnc_handleScrollWheel.sqf b/addons/cargo/functions/fnc_handleScrollWheel.sqf index 9ec2c498e64..e6f3b23e76f 100644 --- a/addons/cargo/functions/fnc_handleScrollWheel.sqf +++ b/addons/cargo/functions/fnc_handleScrollWheel.sqf @@ -38,7 +38,7 @@ if (!CBA_events_control) then { // Uses this method of selecting position because setPosATL did not have immediate effect private _positionChange = _position vectorDiff (getPosASL _deployedItem); - private _selectionPosition = _unit worldToModel (ASLtoAGL getPosWorld _deployedItem); + private _selectionPosition = _unit worldToModel (ASLToAGL getPosWorld _deployedItem); _selectionPosition = _selectionPosition vectorAdd _positionChange; _deployedItem attachTo [_unit, _selectionPosition]; diff --git a/addons/cargo/functions/fnc_paradropItem.sqf b/addons/cargo/functions/fnc_paradropItem.sqf index 6a84a20799c..934beb2aad2 100644 --- a/addons/cargo/functions/fnc_paradropItem.sqf +++ b/addons/cargo/functions/fnc_paradropItem.sqf @@ -63,7 +63,7 @@ if (_item isEqualType objNull) then { [QGVAR(serverUnload), [_object, _posBehindVehicleAGL]] call CBA_fnc_serverEvent; } else { _object = createVehicle [_item, _posBehindVehicleAGL, [], 0, "NONE"]; - _object setPosASL (AGLtoASL _posBehindVehicleAGL); + _object setPosASL (AGLToASL _posBehindVehicleAGL); }; [QEGVAR(common,setVelocity), [_object, (velocity _vehicle) vectorAdd ((vectorNormalized (vectorDir _vehicle)) vectorMultiply -5)], _object] call CBA_fnc_targetEvent; diff --git a/addons/cargo/functions/fnc_setSpace.sqf b/addons/cargo/functions/fnc_setSpace.sqf index 01c078496c2..514b84ea176 100644 --- a/addons/cargo/functions/fnc_setSpace.sqf +++ b/addons/cargo/functions/fnc_setSpace.sqf @@ -35,7 +35,7 @@ private _cargoSpace = _space; } forEach _loaded; // If the new value is the same as the old, do nothing -if (_cargoSpace == (_vehicle call FUNC(getCargoSpaceLeft))) exitwith {}; +if (_cargoSpace == (_vehicle call FUNC(getCargoSpaceLeft))) exitWith {}; // Apply new space globally // Necessary to update value, even if no space, as API could be used again diff --git a/addons/cargo/functions/fnc_unloadItem.sqf b/addons/cargo/functions/fnc_unloadItem.sqf index 7580de8488a..e22d87a098b 100644 --- a/addons/cargo/functions/fnc_unloadItem.sqf +++ b/addons/cargo/functions/fnc_unloadItem.sqf @@ -116,7 +116,7 @@ if (_object isEqualType objNull) then { _object setDir _direction; }; - _object setPosASL (AGLtoASL _emptyPosAGL); + _object setPosASL (AGLToASL _emptyPosAGL); [QEGVAR(common,fixCollision), _object] call CBA_fnc_localEvent; [QEGVAR(common,fixPosition), _object] call CBA_fnc_localEvent; diff --git a/addons/cargo/menu.hpp b/addons/cargo/menu.hpp index 1811369d7d5..51020335d45 100644 --- a/addons/cargo/menu.hpp +++ b/addons/cargo/menu.hpp @@ -8,16 +8,16 @@ class GVAR(menu) { class controlsBackground { class HeaderBackground: ACE_gui_backgroundBase { idc = -1; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - x = "13 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "13 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 1)"; + x = "13 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; + y = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + w = "13 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; text = "#(argb,8,8,3)color(0,0,0,0)"; }; class CenterBackground: HeaderBackground { - y = "2.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - h = "14.2 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + y = "2.1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + h = "14.2 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; text = "#(argb,8,8,3)color(0,0,0,0.8)"; colorText[] = {0, 0, 0, "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; colorBackground[] = {0, 0, 0, "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; @@ -28,36 +28,36 @@ class GVAR(menu) { class HeaderName { idc = 1; type = CT_STATIC; - x = "13 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "13 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "13 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; + y = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + w = "13 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; style = QUOTE(ST_LEFT + ST_SHADOW); font = "RobotoCondensed"; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 1)"; colorText[] = {0.95, 0.95, 0.95, 0.75}; colorBackground[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; text = CSTRING(cargoMenu); }; class SubHeader: HeaderName { idc = 2; - x = "13 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "2.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "13 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "13 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; + y = "2.5 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + w = "13 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; style = ST_CENTER; colorText[] = {1, 1, 1, 0.9}; colorBackground[] = {0, 0, 0, 0}; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 1.2)"; text = ""; }; class cargoList: ACE_gui_listBoxBase { idc = 100; - x = "13.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "12.8 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "10 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)"; + x = "13.1 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; + y = "4 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + w = "12.8 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "10 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 0.7)"; rowHeight = 0.03; colorBackground[] = {0, 0, 0, 0.2}; colorText[] = {1, 1, 1, 1.0}; @@ -70,12 +70,12 @@ class GVAR(menu) { class btnCancel: ACE_gui_buttonBase { text = "$STR_DISP_CANCEL"; idc = 11; - x = "13.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "14.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "6 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)"; + x = "13.1 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; + y = "14.1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + w = "6 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + size = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 0.7)"; animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)"; animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.8)"; animTextureOver = "#(argb,8,8,3)color(1,1,1,1)"; @@ -96,13 +96,13 @@ class GVAR(menu) { class btnUnload: btnCancel { text = CSTRING(unloadObject); idc = 12; - x = "19.9 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + x = "19.9 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; action = QUOTE(ACE_player call FUNC(startUnload)); }; class btnPlace: btnUnload { text = CSTRING(deployObject); idc = 13; - y = "15.2 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + y = "15.2 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; action = QUOTE(ACE_player call FUNC(startDeploy)); colorDisabled[] = {0.25, 0.25, 0.25, 1}; }; diff --git a/addons/cargo/renameMenu.hpp b/addons/cargo/renameMenu.hpp index b6acc9ad4e3..a3cb845c6b7 100644 --- a/addons/cargo/renameMenu.hpp +++ b/addons/cargo/renameMenu.hpp @@ -8,16 +8,16 @@ class GVAR(renameMenu) { class controlsBackground { class HeaderBackground: ACE_gui_backgroundBase { idc = -1; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - x = "13 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "13 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 1)"; + x = "13 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; + y = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + w = "13 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; text = "#(argb,8,8,3)color(0,0,0,0)"; }; class CenterBackground: HeaderBackground { - y = "2.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - h = "2.9 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + y = "2.1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + h = "2.9 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; text = "#(argb,8,8,3)color(0,0,0,0.8)"; colorText[] = {0, 0, 0, "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; colorBackground[] = {0, 0, 0, "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; @@ -28,13 +28,13 @@ class GVAR(renameMenu) { class HeaderName { idc = 1; type = CT_STATIC; - x = "13 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "13 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "13 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; + y = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + w = "13 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; style = QUOTE(ST_LEFT + ST_SHADOW); font = "RobotoCondensed"; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 1)"; colorText[] = {0.95, 0.95, 0.95, 0.75}; colorBackground[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])", "(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])", "(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; text = CSTRING(renameObjectUI); @@ -43,21 +43,21 @@ class GVAR(renameMenu) { onLoad = QUOTE((_this select 0) ctrlSetText (GVAR(interactionVehicle) getVariable [ARR_2(QQGVAR(customName),'')])); idc = 100; canModify = 1; - x = "13.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "2.3 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "12.8 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - SizeEx = "1.5 * (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)"; + x = "13.1 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; + y = "2.3 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + w = "12.8 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1.5 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + SizeEx = "1.5 * (((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 0.7)"; }; class btnCancel: ACE_gui_buttonBase { text = "$STR_DISP_CANCEL"; idc = 11; - x = "13.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "3.9 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "5 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)"; + x = "13.1 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; + y = "3.9 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + w = "5 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + size = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 0.7)"; animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)"; animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.8)"; animTextureOver = "#(argb,8,8,3)color(1,1,1,1)"; @@ -78,7 +78,7 @@ class GVAR(renameMenu) { class btnSave: btnCancel { text = ECSTRING(Common,Save); idc = 12; - x = "20.9 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + x = "20.9 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; action = QUOTE(closeDialog 1; call FUNC(renameObject)); }; }; diff --git a/addons/casings/functions/fnc_createCasing.sqf b/addons/casings/functions/fnc_createCasing.sqf index fe35ad5945c..428d940414a 100644 --- a/addons/casings/functions/fnc_createCasing.sqf +++ b/addons/casings/functions/fnc_createCasing.sqf @@ -47,7 +47,7 @@ private _modelPath = GVAR(cachedCasings) getOrDefaultCall [_ammo, { if (_modelPath isEqualTo "") exitWith {}; -private _unitPos = getposASL _unit; +private _unitPos = getPosASL _unit; // Distant shooters don't produce as many cases if ((AGLToASL positionCameraToWorld [0,0,0]) vectorDistance _unitPos > 100 && {random 1 < 0.9}) exitWith {}; diff --git a/addons/common/CfgUIGrids.hpp b/addons/common/CfgUIGrids.hpp index 1e8963e03e1..7c48886bafd 100644 --- a/addons/common/CfgUIGrids.hpp +++ b/addons/common/CfgUIGrids.hpp @@ -5,13 +5,13 @@ class CfgUIGrids { class Variables { grid_ACE_displayText[] = { { - "((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))", - "safeZoneY + 0.175 * safezoneH", - "(10 *(((safezoneW / safezoneH) min 1.2) / 40))", - "(3 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))" + "((safeZoneX + safeZoneW) - (10 *(((safeZoneW / safeZoneH) min 1.2) / 40)) - 2.9 *(((safeZoneW / safeZoneH) min 1.2) / 40))", + "safeZoneY + 0.175 * safeZoneH", + "(10 *(((safeZoneW / safeZoneH) min 1.2) / 40))", + "(3 *((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25))" }, - "(((safezoneW / safezoneH) min 1.2) / 40)", - "((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)" + "(((safeZoneW / safeZoneH) min 1.2) / 40)", + "((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)" }; }; }; diff --git a/addons/common/CompassControl.hpp b/addons/common/CompassControl.hpp index 627e18d2f8d..16b1b3cf43d 100644 --- a/addons/common/CompassControl.hpp +++ b/addons/common/CompassControl.hpp @@ -10,7 +10,7 @@ #define POINTER_WIDTH_FACTOR (1/128) #define LEFT (0.5 - 8 * GUI_GRID_W) -#define TOP (safezoneY + 1.6 * GUI_GRID_H) +#define TOP (safeZoneY + 1.6 * GUI_GRID_H) #define WIDTH (16 * GUI_GRID_W) #define HEIGHT (0.5 * GUI_GRID_H) diff --git a/addons/common/DisableMouseDialog.hpp b/addons/common/DisableMouseDialog.hpp index 75689cf6526..1d1d6cfaa74 100644 --- a/addons/common/DisableMouseDialog.hpp +++ b/addons/common/DisableMouseDialog.hpp @@ -8,10 +8,10 @@ class GVAR(DisableMouse_Dialog) { class Background: ctrlMapEmpty { idc = 101; fade = 1; - x = "safezoneXAbs"; - y = "safezoneY"; - w = "safezoneWAbs"; - h = "safezoneH"; + x = "safeZoneXAbs"; + y = "safeZoneY"; + w = "safeZoneWAbs"; + h = "safeZoneH"; }; }; }; diff --git a/addons/common/HintConfig.hpp b/addons/common/HintConfig.hpp index c299bee8dfb..c3eda57d6bb 100644 --- a/addons/common/HintConfig.hpp +++ b/addons/common/HintConfig.hpp @@ -39,11 +39,11 @@ class RscTitles { idc = 1; text = ""; //size = "1 / 40 / (getResolution select 5)"; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 1)"; colorText[] = {1, 1, 1, 1}; colorBackground[] = {0, 0, 0, 0.5}; - x = "safeZoneW + safeZoneX - 0 * safezoneW"; //safeZoneW + safeZoneX - 0.2 * safezoneW; - y = "safeZoneY + 0.2 * safezoneH"; + x = "safeZoneW + safeZoneX - 0 * safeZoneW"; //safeZoneW + safeZoneX - 0.2 * safeZoneW; + y = "safeZoneY + 0.2 * safeZoneH"; w = "0.2 * safeZoneW"; h = "0.1 * SafeZoneH"; font = "RobotoCondensed"; @@ -63,11 +63,11 @@ class RscTitles { idc = 1; text = ""; //size = "1 / 40 / (getResolution select 5)"; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 1)"; colorText[] = {1, 1, 1, 1}; colorBackground[] = {0.8, 0, 0, 0.5}; x = "0.3 * safeZoneW + safeZoneX"; - y = "0.4 * safezoneH + safeZoneY"; + y = "0.4 * safeZoneH + safeZoneY"; w = "0.4 * safeZoneW"; h = "0.2 * SafeZoneH"; }; diff --git a/addons/common/ProgressScreen.hpp b/addons/common/ProgressScreen.hpp index bef2994e7d9..c3026a9fe4f 100644 --- a/addons/common/ProgressScreen.hpp +++ b/addons/common/ProgressScreen.hpp @@ -18,28 +18,28 @@ class GVAR(ProgressBar_Dialog) { size = 1; colorBackground[] = {0, 0, 0, 0.0}; colorText[] = {0, 0, 0, 0}; - x = "safezoneX"; - y = "safezoneY"; - w = "safezoneW"; - h = "safezoneH"; + x = "safeZoneX"; + y = "safeZoneY"; + w = "safeZoneW"; + h = "safeZoneH"; }; class TitleBackground: ACE_gui_staticBase { idc = 1; style = ST_CENTER; - sizeEx = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + sizeEx = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; colorBackground[] = {0, 0, 0, 0.5}; colorText[] = {1, 1, 1, 1}; - x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "0 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "1 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; + y = "0 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + w = "38 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; }; class Progress: ACE_gui_RscProgress { idc = 2; - x = "1.2 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "0.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "1.2 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; + y = "0.1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + w = "38 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; colorFrame[] = {1,1,1,0.5}; colorBar[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.77])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.51])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.08])","(profilenamespace getVariable ['GUI_BCG_RGB_A',0.8])"}; texture = "#(argb,8,8,3)color(1,1,1,0.7)"; diff --git a/addons/common/RscInfoType.hpp b/addons/common/RscInfoType.hpp index 672d043276c..89d3c02ec1d 100644 --- a/addons/common/RscInfoType.hpp +++ b/addons/common/RscInfoType.hpp @@ -6,19 +6,19 @@ class RscInGameUI { }; class RscUnitInfoSoldier: RscUnitInfo { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSoldier',_this select 0)]; [ARR_2('ace_infoDisplayChanged',[ARR_2(_this select 0,'Soldier')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uiNamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSoldier',_this select 0)]; [ARR_2('ace_infoDisplayChanged',[ARR_2(_this select 0,'Soldier')])] call CBA_fnc_localEvent;); }; class RscUnitInfoTank: RscUnitInfo { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgVehicle',_this select 0)];); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uiNamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgVehicle',_this select 0)];); }; class RscUnitInfoAirNoWeapon: RscUnitInfo { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft',_this select 0)];); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uiNamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft',_this select 0)];); }; class RscUnitInfoAir: RscUnitInfoAirNoWeapon { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft',_this select 0)];); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uiNamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft',_this select 0)];); }; class RscUnitInfo_AH64D_gunner { @@ -30,11 +30,11 @@ class RscInGameUI { }; class RscUnitInfoSubmarine: RscUnitInfo { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSubmarine',_this select 0)];); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uiNamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSubmarine',_this select 0)];); }; class RscUnitInfoShip: RscUnitInfo { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgShip',_this select 0)];); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uiNamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgShip',_this select 0)];); }; class RscWeaponEmpty { @@ -94,7 +94,7 @@ class RscInGameUI { }; class RscUnitInfoParachute: RscUnitInfo { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgParachute',_this select 0)]; [ARR_2('ace_infoDisplayChanged',[ARR_2(_this select 0,'Parachute')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uiNamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgParachute',_this select 0)]; [ARR_2('ace_infoDisplayChanged',[ARR_2(_this select 0,'Parachute')])] call CBA_fnc_localEvent;); }; class RscUnitVehicle { @@ -106,10 +106,10 @@ class RscInGameUI { }; class RscStaminaBar { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscStaminaBar"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2(QUOTE(QGVAR(dlgStaminaBar)),_this select 0)]); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscStaminaBar"",'IGUI')] call (uiNamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2(QUOTE(QGVAR(dlgStaminaBar)),_this select 0)]); }; class RscStanceInfo { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscStanceInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); [ARR_2('ace_infoDisplayChanged',[ARR_2(_this select 0,'Stance')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscStanceInfo"",'IGUI')] call (uiNamespace getvariable 'BIS_fnc_initDisplay'); [ARR_2('ace_infoDisplayChanged',[ARR_2(_this select 0,'Stance')])] call CBA_fnc_localEvent;); }; }; diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 748d6fa41cc..91f3de8e0c6 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -165,7 +165,7 @@ if (isServer) then { private _zeusLogic = getAssignedCuratorLogic _dcPlayer; if ((!isNil "_zeusLogic") && {!isNull _zeusLogic}) then { { - if ((_x getvariable ["bis_fnc_moduleRemoteControl_owner", objnull]) isEqualTo _dcPlayer) exitWith { + if ((_x getVariable ["bis_fnc_moduleRemoteControl_owner", objNull]) isEqualTo _dcPlayer) exitWith { INFO_3("[%1] DC - Was Zeus [%2] while controlling unit [%3] - manually clearing `bis_fnc_moduleRemoteControl_owner`",[_x] call FUNC(getName),_dcPlayer,_x); _x setVariable ["bis_fnc_moduleRemoteControl_owner", nil, true]; }; @@ -496,10 +496,10 @@ GVAR(reloadMutex_lastMagazines) = []; private _isLauncher = _weapon isKindOf ["Launcher", configFile >> "CfgWeapons"]; private _duration = 0; if (_isLauncher) then { - _duration = getNumber (configfile >> "CfgMovesMaleSdr" >> "States" >> _gesture >> "speed"); + _duration = getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> _gesture >> "speed"); }; if (_duration == 0) then { - _duration = getNumber (configfile >> "CfgGesturesMale" >> "States" >> _gesture >> "speed"); + _duration = getNumber (configFile >> "CfgGesturesMale" >> "States" >> _gesture >> "speed"); }; if (_duration != 0) then { @@ -562,7 +562,7 @@ GVAR(reloadMutex_lastMagazines) = []; // Lastly, do JIP events // JIP Detection and event trigger. Run this at the very end, just in case anything uses it // Note: usage of player is most likely on purpose -if (didJip) then { +if (didJIP) then { // We are jipping! Get ready and wait, and throw the event [{ if(!isNull player && GVAR(settingsInitFinished)) then { diff --git a/addons/common/XEH_preStart.sqf b/addons/common/XEH_preStart.sqf index 3168243c067..5e02fb26f17 100644 --- a/addons/common/XEH_preStart.sqf +++ b/addons/common/XEH_preStart.sqf @@ -3,7 +3,7 @@ #include "XEH_PREP.hpp" if (isFilePatchingEnabled) then { - private _notLoaded = configProperties [configfile >> "ace_notLoaded", "isText _x"]; + private _notLoaded = configProperties [configFile >> "ace_notLoaded", "isText _x"]; { INFO_2("%1 not loaded because %2",configName _x,getText _x); } forEach _notLoaded; diff --git a/addons/common/define.hpp b/addons/common/define.hpp index ce8765ec9f4..e27c369146b 100644 --- a/addons/common/define.hpp +++ b/addons/common/define.hpp @@ -107,7 +107,7 @@ class ACE_gui_editBase { style = "0x00 + 0x40"; font = "RobotoCondensed"; shadow = 2; - sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + sizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 1)"; colorDisabled[] = {1, 1, 1, 0.25}; }; @@ -187,10 +187,10 @@ class ACE_gui_RscProgress { colorFrame[] = {1, 1, 1, 0.7}; colorBar[] = {1, 1, 1, 0.7}; texture = "#(argb,8,8,3)color(1,1,1,0.7)"; - x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "10 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "0.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "1 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; + y = "10 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + w = "38 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "0.5 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; }; class ACE_gui_staticBase { @@ -384,9 +384,9 @@ class ACE_gui_comboBoxBase: RscCombo { class ACE_gui_mapBase { moveOnEdges = 1; x = "SafeZoneXAbs"; - y = "SafeZoneY + 1.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + y = "SafeZoneY + 1.5 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; w = "SafeZoneWAbs"; - h = "SafeZoneH - 1.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + h = "SafeZoneH - 1.5 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; type = 100; // Use 100 to hide markers style = 48; shadow = 0; @@ -440,15 +440,15 @@ class ACE_gui_mapBase { onMouseButtonDblClick = ""; fontLabel = "RobotoCondensed"; - sizeExLabel = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; + sizeExLabel = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 0.8)"; fontGrid = "TahomaB"; sizeExGrid = 0.02; fontUnits = "TahomaB"; - sizeExUnits = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; + sizeExUnits = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 0.8)"; fontNames = "RobotoCondensed"; - sizeExNames = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8) * 2"; + sizeExNames = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 0.8) * 2"; fontInfo = "RobotoCondensed"; - sizeExInfo = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; + sizeExInfo = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 0.8)"; fontLevel = "TahomaB"; sizeExLevel = 0.02; text = "#(argb,8,8,3)color(1,1,1,1)"; @@ -458,12 +458,12 @@ class ACE_gui_mapBase { size = 50; }; class Legend { - x = "SafeZoneX + (((safezoneW / safezoneH) min 1.2) / 40)"; - y = "SafeZoneY + safezoneH - 4.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "3.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "SafeZoneX + (((safeZoneW / safeZoneH) min 1.2) / 40)"; + y = "SafeZoneY + safeZoneH - 4.5 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + w = "10 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "3.5 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; font = "RobotoCondensed"; - sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; + sizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 0.8)"; colorBackground[] = {1, 1, 1, 0.5}; color[] = {0, 0, 0, 1}; }; diff --git a/addons/common/dev/test_mapConfigs.sqf b/addons/common/dev/test_mapConfigs.sqf index 369b2b18089..261dc0a9abd 100644 --- a/addons/common/dev/test_mapConfigs.sqf +++ b/addons/common/dev/test_mapConfigs.sqf @@ -28,7 +28,7 @@ private _maps = configProperties [configFile >> "CfgWorldList", "(isClass _x)", private _stepX = 1e10; private _stepY = 1e10; { - private _zoom = getnumber (_x >> "zoomMax"); + private _zoom = getNumber (_x >> "zoomMax"); if (_zoom < _zoomMax) then { _zoomMax = _zoom; _formatX = getText (_x >> "formatX"); diff --git a/addons/common/functions/fnc_ASLToPosition.sqf b/addons/common/functions/fnc_ASLToPosition.sqf index b99e9fb88a3..991e79c4331 100644 --- a/addons/common/functions/fnc_ASLToPosition.sqf +++ b/addons/common/functions/fnc_ASLToPosition.sqf @@ -20,5 +20,5 @@ if (surfaceIsWater _this) then { _this } else { - ASLtoATL _this + ASLToATL _this }; diff --git a/addons/common/functions/fnc_addLineToDebugDraw.sqf b/addons/common/functions/fnc_addLineToDebugDraw.sqf index 016c99ddf48..3d6309fdd43 100644 --- a/addons/common/functions/fnc_addLineToDebugDraw.sqf +++ b/addons/common/functions/fnc_addLineToDebugDraw.sqf @@ -25,10 +25,10 @@ if (isNil QGVAR(debugLines)) then { }; if (count GVAR(debugLines) < 100) then { - GVAR(debugLines) pushBack [ASLtoAGL _startASL, ASLtoAGL _endASL, _color]; + GVAR(debugLines) pushBack [ASLToAGL _startASL, ASLToAGL _endASL, _color]; GVAR(debugLinesIndex) = 0; } else { - GVAR(debugLines) set [GVAR(debugLinesIndex), [ASLtoAGL _startASL, ASLtoAGL _endASL, _color]]; + GVAR(debugLines) set [GVAR(debugLinesIndex), [ASLToAGL _startASL, ASLToAGL _endASL, _color]]; GVAR(debugLinesIndex) = (GVAR(debugLinesIndex) + 1) mod 100; }; diff --git a/addons/common/functions/fnc_checkFiles_diagnoseACE.sqf b/addons/common/functions/fnc_checkFiles_diagnoseACE.sqf index f9271ca2137..82241c45274 100644 --- a/addons/common/functions/fnc_checkFiles_diagnoseACE.sqf +++ b/addons/common/functions/fnc_checkFiles_diagnoseACE.sqf @@ -16,7 +16,7 @@ */ // Only run once -if (missionNameSpace getVariable [QGVAR(checkFiles_diagnoseACE), false]) exitWith { +if (missionNamespace getVariable [QGVAR(checkFiles_diagnoseACE), false]) exitWith { createHashMap // return }; diff --git a/addons/common/functions/fnc_defineVariable.sqf b/addons/common/functions/fnc_defineVariable.sqf index 85eb7b447f2..e0e7c49e4de 100644 --- a/addons/common/functions/fnc_defineVariable.sqf +++ b/addons/common/functions/fnc_defineVariable.sqf @@ -24,7 +24,7 @@ params ["_name", "_value", "_defaultGlobal", "_category", ["_code", 0], ["_persi if (isNil "_defaultGlobal") exitWith {}; -if !(_name isEqualType "") exitwith { +if !(_name isEqualType "") exitWith { [format ["Tried to the deinfe a variable with an invalid name: %1 Arguments: %2", _name, _this]] call FUNC(debug); }; diff --git a/addons/common/functions/fnc_deprecateComponent.sqf b/addons/common/functions/fnc_deprecateComponent.sqf index d979c043efa..1ed85de2336 100644 --- a/addons/common/functions/fnc_deprecateComponent.sqf +++ b/addons/common/functions/fnc_deprecateComponent.sqf @@ -23,8 +23,8 @@ _oldComponent params ["_oldComponentName", "_oldSettingName"]; _newComponent params ["_newComponentName", "_newSettingName"]; private _isReplacementAvailable = [_newComponentName] call FUNC(isModLoaded); -private _isDeprecatedLoaded = missionNamespace getvariable [_oldSettingName, false]; -private _isReplacementLoaded = missionNamespace getvariable [_newSettingName, false]; +private _isDeprecatedLoaded = missionNamespace getVariable [_oldSettingName, false]; +private _isReplacementLoaded = missionNamespace getVariable [_newSettingName, false]; if (_isDeprecatedLoaded && {_isReplacementAvailable} && {!_isReplacementLoaded}) then { [_newSettingName, true, true, true] call FUNC(setSetting); diff --git a/addons/common/functions/fnc_displayIcon.sqf b/addons/common/functions/fnc_displayIcon.sqf index da08fa832a4..db01bedb043 100644 --- a/addons/common/functions/fnc_displayIcon.sqf +++ b/addons/common/functions/fnc_displayIcon.sqf @@ -21,11 +21,11 @@ */ // positions for the icon UI -#define RIGHT_SIDE (safezoneW + safezoneX) -#define LEFT_SIDE safezoneX +#define RIGHT_SIDE (safeZoneW + safeZoneX) +#define LEFT_SIDE safeZoneX #define TOP_SIDE safeZoneY -#define BOTTOM_SIDE (safeZoneH + safezoneY) -#define ICON_WIDTH (2 * (((safezoneW / safezoneH) min 1.2) / 40)) +#define BOTTOM_SIDE (safeZoneH + safeZoneY) +#define ICON_WIDTH (2 * (((safeZoneW / safeZoneH) min 1.2) / 40)) #define X_POS_ICONS (RIGHT_SIDE - (1.5 * ICON_WIDTH)) #define Y_POS_ICONS (TOP_SIDE + (2.5 * ICON_WIDTH)) #define DIFFERENCE_ICONS (1.1 * ICON_WIDTH) diff --git a/addons/common/functions/fnc_displayTextStructured.sqf b/addons/common/functions/fnc_displayTextStructured.sqf index a9376552a95..ed494627702 100644 --- a/addons/common/functions/fnc_displayTextStructured.sqf +++ b/addons/common/functions/fnc_displayTextStructured.sqf @@ -30,7 +30,7 @@ if (typeName _text != "TEXT") then { if (_x isEqualType "" && {isLocalized _x}) then { _text set [_foreachIndex, localize _x]; }; - }foreach _text; + } forEach _text; _text = format _text; }; }; @@ -51,18 +51,18 @@ _ctrlHint ctrlSetBackgroundColor GVAR(displayTextColor); _ctrlHint ctrlSetTextColor GVAR(displayTextFontColor); // Use profile settings from CfgUIGrids.hpp -private _xPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_X", ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))]; -private _yPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safezoneH]; -private _wPos = (_width *(((safezoneW / safezoneH) min 1.2) / 40)); -private _hPos = _size * (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)); +private _xPos = profileNamespace getVariable ["IGUI_GRID_ACE_displayText_X", ((safeZoneX + safeZoneW) - (10 *(((safeZoneW / safeZoneH) min 1.2) / 40)) - 2.9 *(((safeZoneW / safeZoneH) min 1.2) / 40))]; +private _yPos = profileNamespace getVariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safeZoneH]; +private _wPos = (_width *(((safeZoneW / safeZoneH) min 1.2) / 40)); +private _hPos = _size * (2 *((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)); // Ensure still in bounds for large width/height -_xPos = safezoneX max (_xPos min (safezoneX + safezoneW - _wPos)); -_yPos = safeZoneY max (_yPos min (safeZoneY + safezoneH - _hPos)); +_xPos = safeZoneX max (_xPos min (safeZoneX + safeZoneW - _wPos)); +_yPos = safeZoneY max (_yPos min (safeZoneY + safeZoneH - _hPos)); // Zeus Interface Open and Display would be under the "CREATE" list if (!isNull curatorCamera) then { - _xPos = _xPos min ((safezoneX + safezoneW - 12.5 * (((safezoneW / safezoneH) min 1.2) / 40)) - _wPos); + _xPos = _xPos min ((safeZoneX + safeZoneW - 12.5 * (((safeZoneW / safeZoneH) min 1.2) / 40)) - _wPos); }; private _position = [_xPos, _yPos, _wPos, _hPos]; diff --git a/addons/common/functions/fnc_findUnloadPosition.sqf b/addons/common/functions/fnc_findUnloadPosition.sqf index 2047f7349d8..7fb4e41a73c 100644 --- a/addons/common/functions/fnc_findUnloadPosition.sqf +++ b/addons/common/functions/fnc_findUnloadPosition.sqf @@ -61,7 +61,7 @@ if (isNull _unloader || {_unloader in _vehicle}) then { // Ideal unload pos is halfway between unloader and vehicle (at the unloader's height) private _originASL = ((getPosASL _unloader) vectorAdd (getPosASL _vehicle)) vectorMultiply 0.5; _originASL set [2, (getPosASL _unloader) select 2]; -private _originAGL = ASLtoAGL _originASL; +private _originAGL = ASLToAGL _originASL; // Do a manual search for empty pos (handles underwater, buildings or piers) TRACE_2("Checking for unload",_originAGL,_radiusOfItem); @@ -74,9 +74,9 @@ while {_rangeToCheck < _maxDistance} do { private _roundPointIsValid = false; - if (((AGLtoASL _roundAGL) select 2) > 0) then { + if (((AGLToASL _roundAGL) select 2) > 0) then { // 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); if (_belowRoundArray isNotEqualTo []) then { @@ -85,7 +85,7 @@ while {_rangeToCheck < _maxDistance} do { // Point is above something: Terrain (null) or Building if ((isNull _aboveBuilding) || {_aboveBuilding isKindOf "Building"}) then { // Get the real intersection point - _roundAGL = ASLtoAGL ((_belowRoundArray select 0) select 0); + _roundAGL = ASLToAGL ((_belowRoundArray select 0) select 0); _roundPointIsValid = true; }; @@ -102,13 +102,13 @@ while {_rangeToCheck < _maxDistance} do { for "_index" from 0 to (COL_TEST_COUNT -1) do { // Scan for collisions with objects with lineIntersectsSurfaces private _angle = _index * (360 / COL_TEST_COUNT); - private _point1ASL = (AGLtoASL _roundAGL) vectorAdd [_radiusOfItem * cos _angle, _radiusOfItem * sin _angle, 0.1]; - private _point2ASL = (AGLtoASL _roundAGL) vectorAdd [-_radiusOfItem * cos _angle, -_radiusOfItem * sin _angle, _radiusOfItem + 0.5]; + private _point1ASL = (AGLToASL _roundAGL) vectorAdd [_radiusOfItem * cos _angle, _radiusOfItem * sin _angle, 0.1]; + private _point2ASL = (AGLToASL _roundAGL) vectorAdd [-_radiusOfItem * cos _angle, -_radiusOfItem * sin _angle, _radiusOfItem + 0.5]; private _testIntersections = lineIntersectsSurfaces [_point1ASL, _point2ASL]; if (((count _testIntersections) == 1) && {isNull ((_testIntersections select 0) select 2)}) then { private _hitGroundASL = (_testIntersections select 0) select 0; - private _hitHeightOffset = ((AGLtoASL _roundAGL) select 2) - (_hitGroundASL select 2); + private _hitHeightOffset = ((AGLToASL _roundAGL) select 2) - (_hitGroundASL select 2); private _hit2dOffset = _roundAGL distance2D _hitGroundASL; private _slope = _hitHeightOffset atan2 _hit2dOffset; @@ -124,8 +124,8 @@ while {_rangeToCheck < _maxDistance} do { _roundPointIsValid = false; }; - _point1ASL = (AGLtoASL _roundAGL) vectorAdd [_radiusOfItem * cos _angle, _radiusOfItem * sin _angle, 0.5]; - _point2ASL = (AGLtoASL _roundAGL) vectorAdd [-_radiusOfItem * cos _angle, -_radiusOfItem * sin _angle, 1]; + _point1ASL = (AGLToASL _roundAGL) vectorAdd [_radiusOfItem * cos _angle, _radiusOfItem * sin _angle, 0.5]; + _point2ASL = (AGLToASL _roundAGL) vectorAdd [-_radiusOfItem * cos _angle, -_radiusOfItem * sin _angle, 1]; _testIntersections = lineIntersectsSurfaces [_point1ASL, _point2ASL]; if (_testIntersections isNotEqualTo []) exitWith { diff --git a/addons/common/functions/fnc_getAddon.sqf b/addons/common/functions/fnc_getAddon.sqf index b1a6f7cf995..ab3ad1c2173 100644 --- a/addons/common/functions/fnc_getAddon.sqf +++ b/addons/common/functions/fnc_getAddon.sqf @@ -22,7 +22,7 @@ params ["_config"]; // Return first addon if (_addons isNotEqualTo []) then { - (configSourceModList (configfile >> "CfgPatches" >> _addons select 0)) param [0, ""] + (configSourceModList (configFile >> "CfgPatches" >> _addons select 0)) param [0, ""] } else { // If nothing found at all, return "" "" diff --git a/addons/common/functions/fnc_getMapGridData.sqf b/addons/common/functions/fnc_getMapGridData.sqf index daa4bd86cdf..c6817b5d5b5 100644 --- a/addons/common/functions/fnc_getMapGridData.sqf +++ b/addons/common/functions/fnc_getMapGridData.sqf @@ -30,7 +30,7 @@ private _stepX = 1e10; private _stepY = 1e10; { - private _zoom = getnumber (_x >> "zoomMax"); + private _zoom = getNumber (_x >> "zoomMax"); if (_zoom < _zoomMax) then { _zoomMax = _zoom; _formatX = getText (_x >> "formatX"); diff --git a/addons/common/functions/fnc_getVehicleIcon.sqf b/addons/common/functions/fnc_getVehicleIcon.sqf index a18765567cc..6bda8f63108 100644 --- a/addons/common/functions/fnc_getVehicleIcon.sqf +++ b/addons/common/functions/fnc_getVehicleIcon.sqf @@ -28,8 +28,8 @@ private _objectType = if (_object isEqualType objNull) then { private _cachedValue = GVAR(vehicleIconCache) get _objectType; if (isNil "_cachedValue") then { - private _vehicleValue = getText (configfile >> "CfgVehicles" >> _objectType >> "icon"); - private _vehicleIconValue = getText (configfile >> "CfgVehicleIcons" >> _vehicleValue); + private _vehicleValue = getText (configFile >> "CfgVehicles" >> _objectType >> "icon"); + private _vehicleIconValue = getText (configFile >> "CfgVehicleIcons" >> _vehicleValue); if (_vehicleIconValue == "") then { if (_vehicleValue != "" && {((toLowerANSI _vehicleValue) find ".paa") > -1}) then { diff --git a/addons/common/functions/fnc_positionToASL.sqf b/addons/common/functions/fnc_positionToASL.sqf index b286d2f7ab6..808bfe35636 100644 --- a/addons/common/functions/fnc_positionToASL.sqf +++ b/addons/common/functions/fnc_positionToASL.sqf @@ -20,5 +20,5 @@ if (surfaceIsWater _this) then { _this } else { - ATLtoASL _this + ATLToASL _this }; diff --git a/addons/common/functions/fnc_progressBar.sqf b/addons/common/functions/fnc_progressBar.sqf index 9b5519c232f..36f04b18f8c 100644 --- a/addons/common/functions/fnc_progressBar.sqf +++ b/addons/common/functions/fnc_progressBar.sqf @@ -57,7 +57,7 @@ if (_dialog) then { //Adjust position based on user setting: private _ctrlPos = ctrlPosition (uiNamespace getVariable QGVAR(ctrlProgressBarTitle)); -_ctrlPos set [1, ((0 + 29 * GVAR(settingProgressBarLocation)) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))]; +_ctrlPos set [1, ((0 + 29 * GVAR(settingProgressBarLocation)) * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2))]; (uiNamespace getVariable QGVAR(ctrlProgressBG)) ctrlSetPosition _ctrlPos; (uiNamespace getVariable QGVAR(ctrlProgressBG)) ctrlCommit 0; diff --git a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf index 7273fc61caf..0134bc210c2 100644 --- a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf +++ b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf @@ -17,7 +17,7 @@ */ //paramsArray is a normal variable not a command -private _paramsArray = missionnamespace getVariable ["paramsArray", []]; +private _paramsArray = missionNamespace getVariable ["paramsArray", []]; TRACE_1("Reading missionConfigFile params",_paramsArray); diff --git a/addons/common/functions/fnc_runTests.sqf b/addons/common/functions/fnc_runTests.sqf index 4a449fb7eb8..a430cadabaa 100644 --- a/addons/common/functions/fnc_runTests.sqf +++ b/addons/common/functions/fnc_runTests.sqf @@ -30,7 +30,7 @@ INFO_1("ace_common_fnc_runTests starting for [%1]",_specificTest); _total = _total + 1; private _testFile = getText _x; 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 isNotEqualTo true}) then { systemChat format ["Test [%1] Failed", _testName]; diag_log text format ["----- Finished Testing %1 [Failed] -----", _testName]; diff --git a/addons/common/functions/fnc_setPlayerOwner.sqf b/addons/common/functions/fnc_setPlayerOwner.sqf index 2b37349f9af..010f0b9b462 100644 --- a/addons/common/functions/fnc_setPlayerOwner.sqf +++ b/addons/common/functions/fnc_setPlayerOwner.sqf @@ -17,7 +17,7 @@ * Public: No */ -if (missionNameSpace getVariable [QGVAR(setPlayerOwnerRunning), false]) exitWith {}; +if (missionNamespace getVariable [QGVAR(setPlayerOwnerRunning), false]) exitWith {}; GVAR(setPlayerOwnerRunning) = true; if (isServer) then { diff --git a/addons/common/functions/fnc_showHud.sqf b/addons/common/functions/fnc_showHud.sqf index d74bed9cbde..b552b7230af 100644 --- a/addons/common/functions/fnc_showHud.sqf +++ b/addons/common/functions/fnc_showHud.sqf @@ -65,6 +65,6 @@ for "_index" from 0 to 9 do { }; TRACE_2("showHud",_resultMask,keys GVAR(showHudHash)); -showHud _resultMask; +showHUD _resultMask; _resultMask diff --git a/addons/common/functions/fnc_switchAttachmentMode.sqf b/addons/common/functions/fnc_switchAttachmentMode.sqf index f721428a531..ab1dac6c1c7 100644 --- a/addons/common/functions/fnc_switchAttachmentMode.sqf +++ b/addons/common/functions/fnc_switchAttachmentMode.sqf @@ -63,7 +63,7 @@ switch (_weapon) do { }; if (_exit) exitWith {}; // Don't notify if the unit isn't the local player or if an invalid weapon was passed -private _configSwitchItem = configfile >> "CfgWeapons" >> _switchItem; +private _configSwitchItem = configFile >> "CfgWeapons" >> _switchItem; private _switchItemHintText = getText (_configSwitchItem >> "MRT_SwitchItemHintText"); private _switchItemHintImage = getText (_configSwitchItem >> "picture"); diff --git a/addons/common/functions/fnc_switchPersistentLaser.sqf b/addons/common/functions/fnc_switchPersistentLaser.sqf index 79c0e91f727..5c61693c54f 100644 --- a/addons/common/functions/fnc_switchPersistentLaser.sqf +++ b/addons/common/functions/fnc_switchPersistentLaser.sqf @@ -17,7 +17,7 @@ params ["_enabled"]; -if (!hasInterface) exitwith {}; +if (!hasInterface) exitWith {}; // Reset state { diff --git a/addons/common/functions/fnc_unloadPersonLocal.sqf b/addons/common/functions/fnc_unloadPersonLocal.sqf index 0378c6a4b86..24e44fc6797 100644 --- a/addons/common/functions/fnc_unloadPersonLocal.sqf +++ b/addons/common/functions/fnc_unloadPersonLocal.sqf @@ -34,7 +34,7 @@ if (_emptyPos isEqualTo []) then { }; }; -if (count _emptyPos != 3) exitwith { +if (count _emptyPos != 3) exitWith { WARNING_4("Could not find unload pos %1-ASL: %2 isTouchingGround: %3 Speed: %4",_vehicle,getPosASL _vehicle,isTouchingGround _vehicle,speed _vehicle); if ((!isNull _unloader) && {[_unloader] call FUNC(isPlayer)}) then { //display text saying there are no safe places to exit the vehicle diff --git a/addons/concertina_wire/functions/fnc_deploy.sqf b/addons/concertina_wire/functions/fnc_deploy.sqf index c915109e1b0..b1699ffc857 100644 --- a/addons/concertina_wire/functions/fnc_deploy.sqf +++ b/addons/concertina_wire/functions/fnc_deploy.sqf @@ -48,7 +48,7 @@ GVAR(deployPFH) = [{ private _anim = 0 max (1 - (_range / 12)); if (!(alive _unit) || _range >= 12 || (_unit getVariable [QGVAR(wireDeployed), false])) exitWith { - private _wire = "ACE_ConcertinaWire" createvehicle [0, 0, 0]; + private _wire = "ACE_ConcertinaWire" createVehicle [0, 0, 0]; { _wire animate [_x, _anim]; } forEach WIRE_FAST; diff --git a/addons/concertina_wire/functions/fnc_dismountSuccess.sqf b/addons/concertina_wire/functions/fnc_dismountSuccess.sqf index 86aac9e8bf5..d90d3931dab 100644 --- a/addons/concertina_wire/functions/fnc_dismountSuccess.sqf +++ b/addons/concertina_wire/functions/fnc_dismountSuccess.sqf @@ -31,7 +31,7 @@ params ["_wire"]; private _dir = getDir _wire; private _pos = getPosASL _wire; - private _wirecoil = "ACE_ConcertinaWireCoil" createvehicle [0, 0, 0]; + private _wirecoil = "ACE_ConcertinaWireCoil" createVehicle [0, 0, 0]; deleteVehicle _wire; diff --git a/addons/csw/functions/fnc_assemble_deployWeapon.sqf b/addons/csw/functions/fnc_assemble_deployWeapon.sqf index 22ad49aef29..ee0b3156eae 100644 --- a/addons/csw/functions/fnc_assemble_deployWeapon.sqf +++ b/addons/csw/functions/fnc_assemble_deployWeapon.sqf @@ -31,7 +31,7 @@ TRACE_3("assemble_deployWeapon_carryWeaponClassname",_tripod,_player,_carryWeaponClassname); private _tripodClassname = typeOf _tripod; - private _weaponConfig = configfile >> "CfgWeapons" >> _carryWeaponClassname >> QUOTE(ADDON); + private _weaponConfig = configFile >> "CfgWeapons" >> _carryWeaponClassname >> QUOTE(ADDON); private _assembledClassname = getText (_weaponConfig >> "assembleTo" >> _tripodClassname); if (!isClass (configFile >> "CfgVehicles" >> _assembledClassname)) exitWith {ERROR_1("bad static classname [%1]",_assembledClassname);}; diff --git a/addons/dagr/functions/fnc_menuInit.sqf b/addons/dagr/functions/fnc_menuInit.sqf index fc05185638f..b7433b92aae 100644 --- a/addons/dagr/functions/fnc_menuInit.sqf +++ b/addons/dagr/functions/fnc_menuInit.sqf @@ -584,7 +584,7 @@ GVAR(menuRun) = true; }; GVAR(tmpUpdateRate) = 0.1 max GVAR(tmpUpdateRate) min 2.0; if (!GVAR(busy)) then { - (__dsp displayCtrl __mainText) ctrlSetText (Str(GVAR(tmpUpdateRate) * 1000) + "ms"); + (__dsp displayCtrl __mainText) ctrlSetText (str(GVAR(tmpUpdateRate) * 1000) + "ms"); (__dsp displayCtrl __F1) ctrlSetText "Save"; (__dsp displayCtrl __F3) ctrlSetText "Cancel"; }; diff --git a/addons/dagr/functions/fnc_outputData.sqf b/addons/dagr/functions/fnc_outputData.sqf index b7064ce248a..646f56d1c88 100644 --- a/addons/dagr/functions/fnc_outputData.sqf +++ b/addons/dagr/functions/fnc_outputData.sqf @@ -17,7 +17,7 @@ 135471 cutRsc ["DAGR_DISPLAY", "plain down"]; -#define __display (uiNameSpace getVariable "DAGR_DISPLAY") +#define __display (uiNamespace getVariable "DAGR_DISPLAY") #define __gridControl (__display displayCtrl 266851) #define __speedControl (__display displayCtrl 266852) @@ -62,7 +62,7 @@ GVAR(outputPFH) = [{ }; // Time - private _dagrTime = [daytime, "HH:MM"] call bis_fnc_timeToString; + private _dagrTime = [dayTime, "HH:MM"] call bis_fnc_timeToString; // Output __gridControl ctrlSetText _dagrGrid; diff --git a/addons/dagr/functions/fnc_outputVector.sqf b/addons/dagr/functions/fnc_outputVector.sqf index e9bd0ea6c38..816ed2e4b23 100644 --- a/addons/dagr/functions/fnc_outputVector.sqf +++ b/addons/dagr/functions/fnc_outputVector.sqf @@ -17,7 +17,7 @@ 135471 cutRsc ["DAGR_DISPLAY", "plain down"]; -#define __display (uiNameSpace getVariable "DAGR_DISPLAY") +#define __display (uiNamespace getVariable "DAGR_DISPLAY") #define __gridControl (__display displayCtrl 266851) #define __speedControl (__display displayCtrl 266858) @@ -36,7 +36,7 @@ if (_lazPosX < 0) then { _lazPosX = _lazPosX + 99999;}; if (_lazPosY < 0) then {_lazPosY = _lazPosY + 99999;}; // Find laser position -private _xGrid = toArray Str(round _lazPosX); +private _xGrid = toArray str(round _lazPosX); while {count _xGrid < 5} do { _xGrid = [48] + _xGrid; @@ -45,7 +45,7 @@ _xGrid resize 4; _xGrid = toString _xGrid; _xGrid = parseNumber _xGrid; -private _yGrid = toArray Str(round _lazPosY); +private _yGrid = toArray str(round _lazPosY); while {count _yGrid < 5} do { _yGrid = [48] + _yGrid; }; @@ -54,17 +54,17 @@ _yGrid = toString _yGrid; _yGrid = parseNumber _yGrid; private _xCoord = switch true do { - case (_xGrid >= 1000): { "" + Str(_xGrid) }; - case (_xGrid >= 100): { "0" + Str(_xGrid) }; - case (_xGrid >= 10): { "00" + Str(_xGrid) }; - default { "000" + Str(_xGrid) }; + case (_xGrid >= 1000): { "" + str(_xGrid) }; + case (_xGrid >= 100): { "0" + str(_xGrid) }; + case (_xGrid >= 10): { "00" + str(_xGrid) }; + default { "000" + str(_xGrid) }; }; private _yCoord = switch true do { - case (_yGrid >= 1000): { "" + Str(_yGrid) }; - case (_yGrid >= 100): { "0" + Str(_yGrid) }; - case (_yGrid >= 10): { "00" + Str(_yGrid) }; - default { "000" + Str(_yGrid) }; + case (_yGrid >= 1000): { "" + str(_yGrid) }; + case (_yGrid >= 100): { "0" + str(_yGrid) }; + case (_yGrid >= 10): { "00" + str(_yGrid) }; + default { "000" + str(_yGrid) }; }; private _dagrGrid = _xCoord + " " + _yCoord; @@ -74,7 +74,7 @@ private _elevation = floor ((_lazPosZ) + EGVAR(common,mapAltitude)); private _dagrElevation = str _elevation + "m"; // Time -private _dagrTime = [daytime, "HH:MM"] call bis_fnc_timeToString; +private _dagrTime = [dayTime, "HH:MM"] call bis_fnc_timeToString; // Bearing private _bearing = GVAR(LAZHEADING); diff --git a/addons/dagr/functions/fnc_outputWP.sqf b/addons/dagr/functions/fnc_outputWP.sqf index 27944f0bb91..9142449dcc8 100644 --- a/addons/dagr/functions/fnc_outputWP.sqf +++ b/addons/dagr/functions/fnc_outputWP.sqf @@ -17,7 +17,7 @@ 135471 cutRsc ["DAGR_DISPLAY", "plain down"]; -#define __display (uiNameSpace getVariable "DAGR_DISPLAY") +#define __display (uiNamespace getVariable "DAGR_DISPLAY") #define __gridControl (__display displayCtrl 266851) #define __speedControl (__display displayCtrl 266858) @@ -48,17 +48,17 @@ GVAR(outputPFH) = [{ private _yGrid2 = DAGR_WP_INFO - _xGrid2 * 10000; _xCoord2 = switch true do { - case (_xGrid2 >= 1000): { "" + Str(_xGrid2) }; - case (_xGrid2 >= 100): { "0" + Str(_xGrid2) }; - case (_xGrid2 >= 10): { "00" + Str(_xGrid2) }; - default { "000" + Str(_xGrid2) }; + case (_xGrid2 >= 1000): { "" + str(_xGrid2) }; + case (_xGrid2 >= 100): { "0" + str(_xGrid2) }; + case (_xGrid2 >= 10): { "00" + str(_xGrid2) }; + default { "000" + str(_xGrid2) }; }; _yCoord2 = switch true do { - case (_yGrid2 >= 1000): { "" + Str(_yGrid2) }; - case (_yGrid2 >= 100): { "0" + Str(_yGrid2) }; - case (_yGrid2 >= 10): { "00" + Str(_yGrid2) }; - default { "000" + Str(_yGrid2) }; + case (_yGrid2 >= 1000): { "" + str(_yGrid2) }; + case (_yGrid2 >= 100): { "0" + str(_yGrid2) }; + case (_yGrid2 >= 10): { "00" + str(_yGrid2) }; + default { "000" + str(_yGrid2) }; }; _dagrGrid2 = _xCoord2 + " " + _yCoord2; diff --git a/addons/disarming/functions/fnc_disarmDropItems.sqf b/addons/disarming/functions/fnc_disarmDropItems.sqf index 6e842e739a4..c95647b82ab 100644 --- a/addons/disarming/functions/fnc_disarmDropItems.sqf +++ b/addons/disarming/functions/fnc_disarmDropItems.sqf @@ -50,7 +50,7 @@ if (!_doNotDropAmmo) then { if ((_x getVariable [QGVAR(disarmUnit), objNull]) == _target) exitWith { _holder = _x; }; - } forEach ((getpos _target) nearObjects [DISARM_CONTAINER, 3]); + } forEach ((getPos _target) nearObjects [DISARM_CONTAINER, 3]); }; //Create a new weapon holder @@ -101,7 +101,7 @@ if !([_targetMagazinesStart, _targetMagazinesEnd, _holderMagazinesStart, _holder }; //Remove Items, Assigned Items and NVG -private _holderItemsStart = getitemCargo _holder; +private _holderItemsStart = getItemCargo _holder; private _targetItemsStart = (assignedItems _target) + (items _target) - (weapons _target); if ((headgear _target) != "") then {_targetItemsStart pushBack (headgear _target);}; if ((goggles _target) != "") then {_targetItemsStart pushBack (goggles _target);}; @@ -131,7 +131,7 @@ private _addToCrateCount = []; _holder addItemCargoGlobal [(_addToCrateClassnames select _forEachIndex), (_addToCrateCount select _forEachIndex)]; } forEach _addToCrateClassnames; -private _holderItemsEnd = getitemCargo _holder; +private _holderItemsEnd = getItemCargo _holder; private _targetItemsEnd = (assignedItems _target) + (items _target) - (weapons _target); if ((headgear _target) != "") then {_targetItemsEnd pushBack (headgear _target);}; if ((goggles _target) != "") then {_targetItemsEnd pushBack (goggles _target);}; @@ -172,7 +172,7 @@ if (_holderIsEmpty) then { private _needToRemoveWeapon = ({_x in _listOfItemsToRemove} count (weapons _target)) > 0; private _needToRemoveMagazines = ({_x in _listOfItemsToRemove} count (magazines _target)) > 0; - private _needToRemoveBackpack = ((backPack _target) != "") && {(backPack _target) in _listOfItemsToRemove}; + private _needToRemoveBackpack = ((backpack _target) != "") && {(backpack _target) in _listOfItemsToRemove}; private _needToRemoveVest = ((vest _target) != "") && {(vest _target) in _listOfItemsToRemove}; private _needToRemoveUniform = ((uniform _target) != "") && {(uniform _target) in _listOfItemsToRemove}; @@ -192,7 +192,7 @@ if (_holderIsEmpty) then { } forEach (magazines _target); //Drop backpack (Keeps variables for ACRE/TFR) - if (_needToRemoveBackpack) then {_target action ["DropBag", _holder, (backPack _target)];}; + if (_needToRemoveBackpack) then {_target action ["DropBag", _holder, (backpack _target)];}; } else { [_pfID] call CBA_fnc_removePerFrameHandler; diff --git a/addons/disarming/functions/fnc_openDisarmDialog.sqf b/addons/disarming/functions/fnc_openDisarmDialog.sqf index 6cf15f4cad1..f12922327a1 100644 --- a/addons/disarming/functions/fnc_openDisarmDialog.sqf +++ b/addons/disarming/functions/fnc_openDisarmDialog.sqf @@ -96,7 +96,7 @@ GVAR(disarmTarget) = _target; if ((_x getVariable [QGVAR(disarmUnit), objNull]) == _target) exitWith { _holder = _x; }; - } forEach ((getpos _target) nearObjects [DISARM_CONTAINER, 3]); + } forEach ((getPos _target) nearObjects [DISARM_CONTAINER, 3]); //If a holder exists, show it's inventory if (!isNull _holder) then { diff --git a/addons/disarming/gui_disarm.hpp b/addons/disarming/gui_disarm.hpp index 4c8ce53e6c0..b6afa26551d 100644 --- a/addons/disarming/gui_disarm.hpp +++ b/addons/disarming/gui_disarm.hpp @@ -7,13 +7,13 @@ class RscActiveText; class RscListBox; //Use the definese from -#define X_BIS(num) (num * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)) -#define Y_BIS(num) (num * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)) -#define W_BIS(num) (num * (((safezoneW / safezoneH) min 1.2) / 40)) -#define H_BIS(num) (num * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)) +#define X_BIS(num) (num * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)) +#define Y_BIS(num) (num * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)) +#define W_BIS(num) (num * (((safeZoneW / safeZoneH) min 1.2) / 40)) +#define H_BIS(num) (num * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)) -#define X_MAKEITBIGGA(num) (num * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)) -#define Y_MAKEITBIGGA(num) (num * (safeZoneH / 30) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)) +#define X_MAKEITBIGGA(num) (num * (safeZoneH / 40) + (safeZoneX + (safeZoneW - safeZoneH)/2)) +#define Y_MAKEITBIGGA(num) (num * (safeZoneH / 30) + (safeZoneY + (safeZoneH - (safeZoneH / 1.2))/2)) #define W_MAKEITBIGGA(num) (num * (safeZoneH / 40)) #define H_MAKEITBIGGA(num) (num * (safeZoneH / 30)) @@ -140,9 +140,9 @@ class GVAR(remoteInventory) { }; class GroundContainer: RscListBox { idc = 632; - sizeEx = "0.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - sizeEx2 = "0.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - rowHeight = "1.75 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + sizeEx = "0.8 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + sizeEx2 = "0.8 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + rowHeight = "1.75 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; canDrag = 0; colorText[] = {1,1,1,1}; colorBackground[] = {0,0,0,0}; diff --git a/addons/dragging/functions/fnc_handleScrollWheel.sqf b/addons/dragging/functions/fnc_handleScrollWheel.sqf index c7641a8ffa7..065701bbd44 100644 --- a/addons/dragging/functions/fnc_handleScrollWheel.sqf +++ b/addons/dragging/functions/fnc_handleScrollWheel.sqf @@ -42,7 +42,7 @@ if (!CBA_events_control) then { // Uses this method of selecting position because setPosATL did not have immediate effect private _positionChange = _position vectorDiff (getPosASL _carriedItem); - private _selectionPosition = _unit worldToModel (ASLtoAGL getPosWorld _carriedItem); + private _selectionPosition = _unit worldToModel (ASLToAGL getPosWorld _carriedItem); _selectionPosition = _selectionPosition vectorAdd _positionChange; _carriedItem attachTo [_unit, _selectionPosition]; diff --git a/addons/dragon/functions/fnc_attackProfile_DRAGON.sqf b/addons/dragon/functions/fnc_attackProfile_DRAGON.sqf index 58e3844c882..6642d7d7de0 100644 --- a/addons/dragon/functions/fnc_attackProfile_DRAGON.sqf +++ b/addons/dragon/functions/fnc_attackProfile_DRAGON.sqf @@ -23,7 +23,7 @@ _attackProfileStateParams params ["_maxCorrectableDistance", "_wireCut", "_seeke private _projectilePos = getPosASL _projectile; private _distanceToProjectile = (getPosASL _shooter) vectorDistanceSqr _projectilePos; -private _retPos = _projectilePos vectorAdd (AGLtoASL (_projectile vectorModelToWorld [0, 50, 0])); +private _retPos = _projectilePos vectorAdd (AGLToASL (_projectile vectorModelToWorld [0, 50, 0])); // _shooter returns the vehicle that shot it. If the launcher dies, the wire would probably be cut so assume it if ((_distanceToProjectile > _seekerMaxRangeSqr) || _wireCut || { !alive _shooter }) exitWith { diff --git a/addons/explosives/ExplosivesUI.hpp b/addons/explosives/ExplosivesUI.hpp index ef32c0c04b6..1b14ba5e887 100644 --- a/addons/explosives/ExplosivesUI.hpp +++ b/addons/explosives/ExplosivesUI.hpp @@ -12,10 +12,10 @@ class Rsc_ACE_CallScreen_Edit: RscEdit { text = ""; style = "0x00 + 0x40 + 0x200"; shadow = 1; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 20) * 1)"; - x = "0.288594 * safezoneW + safezoneX"; - w = "0.0825 * safezoneW"; - h = "0.044 * safezoneH"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 20) * 1)"; + x = "0.288594 * safeZoneW + safeZoneX"; + w = "0.0825 * safeZoneW"; + h = "0.044 * safeZoneH"; }; class Rsc_ACE_HiddenButton: RscButton { colorText[] = {0, 0, 0, 0}; @@ -40,175 +40,175 @@ class Rsc_ACE_PhoneInterface { class RscPicture_1200: RscPicture { idc = 1200; text = QPATHTOF(Data\UI\Cellphone_Background.paa); - x = "0.231875 * safezoneW + safezoneX"; - y = "0.104 * safezoneH + safezoneY"; - w = "0.195937 * safezoneW"; - h = "0.704 * safezoneH"; + x = "0.231875 * safeZoneW + safeZoneX"; + y = "0.104 * safeZoneH + safeZoneY"; + w = "0.195937 * safeZoneW"; + h = "0.704 * safeZoneH"; }; class numkey_1: Rsc_ACE_NumKeyButton { idc = 1600; - x = "0.278281 * safezoneW + safezoneX"; - y = "0.533 * safezoneH + safezoneY"; - w = "0.0309375 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.278281 * safeZoneW + safeZoneX"; + y = "0.533 * safeZoneH + safeZoneY"; + w = "0.0309375 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = "1"; action = "ctrlSetText [1400,((ctrlText 1400) + '1')];"; }; class numkey_2: Rsc_ACE_NumKeyButton { idc = 1601; - x = "0.314375 * safezoneW + safezoneX"; - y = "0.533 * safezoneH + safezoneY"; - w = "0.0309375 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.314375 * safeZoneW + safeZoneX"; + y = "0.533 * safeZoneH + safeZoneY"; + w = "0.0309375 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = "2"; action = "ctrlSetText [1400,((ctrlText 1400) + '2')];"; }; class numkey_3: Rsc_ACE_NumKeyButton { idc = 1602; - x = "0.350469 * safezoneW + safezoneX"; - y = "0.533 * safezoneH + safezoneY"; - w = "0.0309375 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.350469 * safeZoneW + safeZoneX"; + y = "0.533 * safeZoneH + safeZoneY"; + w = "0.0309375 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = "3"; action = "ctrlSetText [1400,((ctrlText 1400) + '3')];"; }; class numkey_4: Rsc_ACE_NumKeyButton { idc = 1603; - x = "0.278281 * safezoneW + safezoneX"; - y = "0.577 * safezoneH + safezoneY"; - w = "0.0309375 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.278281 * safeZoneW + safeZoneX"; + y = "0.577 * safeZoneH + safeZoneY"; + w = "0.0309375 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = "4"; action = "ctrlSetText [1400,((ctrlText 1400) + '4')];"; }; class numkey_5: Rsc_ACE_NumKeyButton { idc = 1604; - x = "0.314375 * safezoneW + safezoneX"; - y = "0.577 * safezoneH + safezoneY"; - w = "0.0309375 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.314375 * safeZoneW + safeZoneX"; + y = "0.577 * safeZoneH + safeZoneY"; + w = "0.0309375 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = "5"; action = "ctrlSetText [1400,((ctrlText 1400) + '5')];"; }; class numkey_6: Rsc_ACE_NumKeyButton { idc = 1605; - x = "0.350469 * safezoneW + safezoneX"; - y = "0.577 * safezoneH + safezoneY"; - w = "0.0309375 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.350469 * safeZoneW + safeZoneX"; + y = "0.577 * safeZoneH + safeZoneY"; + w = "0.0309375 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = "6"; action = "ctrlSetText [1400,((ctrlText 1400) + '6')];"; }; class numkey_7: Rsc_ACE_NumKeyButton { idc = 1606; - x = "0.278281 * safezoneW + safezoneX"; - y = "0.621 * safezoneH + safezoneY"; - w = "0.0309375 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.278281 * safeZoneW + safeZoneX"; + y = "0.621 * safeZoneH + safeZoneY"; + w = "0.0309375 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = "7"; action = "ctrlSetText [1400,((ctrlText 1400) + '7')];"; }; class numkey_8: Rsc_ACE_NumKeyButton { idc = 1607; - x = "0.314375 * safezoneW + safezoneX"; - y = "0.621 * safezoneH + safezoneY"; - w = "0.0309375 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.314375 * safeZoneW + safeZoneX"; + y = "0.621 * safeZoneH + safeZoneY"; + w = "0.0309375 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = "8"; action = "ctrlSetText [1400,((ctrlText 1400) + '8')];"; }; class numkey_9: Rsc_ACE_NumKeyButton { idc = 1608; - x = "0.350469 * safezoneW + safezoneX"; - y = "0.621 * safezoneH + safezoneY"; - w = "0.0309375 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.350469 * safeZoneW + safeZoneX"; + y = "0.621 * safeZoneH + safeZoneY"; + w = "0.0309375 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = "9"; action = "ctrlSetText [1400,((ctrlText 1400) + '9')];"; }; class numkey_0: Rsc_ACE_NumKeyButton { idc = 1609; - x = "0.314375 * safezoneW + safezoneX"; - y = "0.676 * safezoneH + safezoneY"; - w = "0.0309375 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.314375 * safeZoneW + safeZoneX"; + y = "0.676 * safeZoneH + safeZoneY"; + w = "0.0309375 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = "0"; action = "ctrlSetText [1400,((ctrlText 1400) + '0')];"; }; class speedDialAdd: Rsc_ACE_NumKeyButton { idc = 1610; - x = "0.278281 * safezoneW + safezoneX"; - y = "0.676 * safezoneH + safezoneY"; - w = "0.0309375 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.278281 * safeZoneW + safeZoneX"; + y = "0.676 * safeZoneH + safeZoneY"; + w = "0.0309375 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = CSTRING(Phone_AddToSpeedDial); action = QUOTE([ARR_2(ctrlText 1401,ctrlText 1400)] call FUNC(addToSpeedDial)); }; class clear: Rsc_ACE_HiddenButton { idc = 1610; - x = "0.278281 * safezoneW + safezoneX"; - y = "0.445 * safezoneH + safezoneY"; - w = "0.020625 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.278281 * safeZoneW + safeZoneX"; + y = "0.445 * safeZoneH + safeZoneY"; + w = "0.020625 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = CSTRING(Clear); action = QUOTE(ctrlSetText [ARR_2(1400,'')];[ctrlText 1401] call FUNC(removeFromSpeedDial);ctrlSetText [ARR_2(1401,'')];); }; class dial: Rsc_ACE_HiddenButton { idc = 1611; - x = "0.309219 * safezoneW + safezoneX"; - y = "0.445 * safezoneH + safezoneY"; - w = "0.04125 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.309219 * safeZoneW + safeZoneX"; + y = "0.445 * safeZoneH + safeZoneY"; + w = "0.04125 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = CSTRING(Phone_Dial); action = QUOTE([ARR_2(ace_player,ctrlText 1400)] call FUNC(dialPhone)); }; class up: Rsc_ACE_HiddenButton { idc = 1612; - x = "0.360781 * safezoneW + safezoneX"; - y = "0.445 * safezoneH + safezoneY"; - w = "0.020625 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.360781 * safeZoneW + safeZoneX"; + y = "0.445 * safeZoneH + safeZoneY"; + w = "0.020625 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = CSTRING(Phone_Up); action = QUOTE([true] call FUNC(setSpeedDial)); }; class down: Rsc_ACE_HiddenButton { idc = 1613; - x = "0.345312 * safezoneW + safezoneX"; - y = "0.485 * safezoneH + safezoneY"; - w = "0.020625 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.345312 * safeZoneW + safeZoneX"; + y = "0.485 * safeZoneH + safeZoneY"; + w = "0.020625 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = CSTRING(Phone_Down); action = QUOTE([false] call FUNC(setSpeedDial)); }; class speedDial_Text: RscText { idc = 1405; - y = "0.302 * safezoneH + safezoneY"; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 22) * 1)"; - x = "0.288594 * safezoneW + safezoneX"; - w = "0.0825 * safezoneW"; - h = "0.044 * safezoneH"; + y = "0.302 * safeZoneH + safeZoneY"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 22) * 1)"; + x = "0.288594 * safeZoneW + safeZoneX"; + w = "0.0825 * safeZoneW"; + h = "0.044 * safeZoneH"; text = "Name"; }; class speedDial_edit: Rsc_ACE_CallScreen_Edit { idc = 1401; - y = "0.302 * safezoneH + safezoneY"; - x = "0.318 * safezoneW + safezoneX"; + y = "0.302 * safeZoneH + safeZoneY"; + x = "0.318 * safeZoneW + safeZoneX"; w = "0.1"; }; class numberEdit_Text: RscText { idc = 1406; - y = "0.348 * safezoneH + safezoneY"; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 22) * 1)"; - x = "0.288594 * safezoneW + safezoneX"; - w = "0.0825 * safezoneW"; - h = "0.044 * safezoneH"; + y = "0.348 * safeZoneH + safeZoneY"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 22) * 1)"; + x = "0.288594 * safeZoneW + safeZoneX"; + w = "0.0825 * safeZoneW"; + h = "0.044 * safeZoneH"; text = "#"; }; class number_edit: Rsc_ACE_CallScreen_Edit { canModify = 0; idc = 1400; - y = "0.348 * safezoneH + safezoneY"; - x = "0.3 * safezoneW + safezoneX"; + y = "0.348 * safeZoneH + safeZoneY"; + x = "0.3 * safeZoneW + safeZoneX"; }; }; }; diff --git a/addons/explosives/functions/fnc_addClacker.sqf b/addons/explosives/functions/fnc_addClacker.sqf index 794aec0a107..ace01a15265 100644 --- a/addons/explosives/functions/fnc_addClacker.sqf +++ b/addons/explosives/functions/fnc_addClacker.sqf @@ -34,7 +34,7 @@ private _detonators = [_unit] call FUNC(getDetonators); } forEach _requiredItems; if !(_hasRequired) exitWith {}; -private _config = ConfigFile >> "CfgMagazines" >> _magazineClass >> "ACE_Triggers" >> configName _config; +private _config = configFile >> "CfgMagazines" >> _magazineClass >> "ACE_Triggers" >> configName _config; private _clacker = _unit getVariable [QGVAR(Clackers), []]; GVAR(PlacedCount) = GVAR(PlacedCount) + 1; diff --git a/addons/explosives/functions/fnc_addDetonateActions.sqf b/addons/explosives/functions/fnc_addDetonateActions.sqf index 0001edffcb0..388b2cf7048 100644 --- a/addons/explosives/functions/fnc_addDetonateActions.sqf +++ b/addons/explosives/functions/fnc_addDetonateActions.sqf @@ -19,16 +19,16 @@ params ["_unit", "_detonator"]; TRACE_2("params",_unit,_detonator); -private _range = getNumber (ConfigFile >> "CfgWeapons" >> _detonator >> QGVAR(Range)); +private _range = getNumber (configFile >> "CfgWeapons" >> _detonator >> QGVAR(Range)); private _result = [_unit] call FUNC(getPlacedExplosives); private _children = []; private _explosivesList = []; { if (!isNull(_x select 0)) then { - private _required = getArray (ConfigFile >> "ACE_Triggers" >> (_x select 4) >> "requires"); + private _required = getArray (configFile >> "ACE_Triggers" >> (_x select 4) >> "requires"); if (_detonator in _required) then { - private _item = ConfigFile >> "CfgMagazines" >> (_x select 3); + private _item = configFile >> "CfgMagazines" >> (_x select 3); _explosivesList pushBack _x; diff --git a/addons/explosives/functions/fnc_addTransmitterActions.sqf b/addons/explosives/functions/fnc_addTransmitterActions.sqf index 043c9db661f..d225aeda056 100644 --- a/addons/explosives/functions/fnc_addTransmitterActions.sqf +++ b/addons/explosives/functions/fnc_addTransmitterActions.sqf @@ -21,7 +21,7 @@ TRACE_1("params",_unit); private _detonators = [_unit] call FUNC(getDetonators); private _children = []; { - private _config = ConfigFile >> "CfgWeapons" >> _x; + private _config = configFile >> "CfgWeapons" >> _x; _children pushBack [ [ diff --git a/addons/explosives/functions/fnc_addTriggerActions.sqf b/addons/explosives/functions/fnc_addTriggerActions.sqf index b6b6e0ce415..8be63fbc4f9 100644 --- a/addons/explosives/functions/fnc_addTriggerActions.sqf +++ b/addons/explosives/functions/fnc_addTriggerActions.sqf @@ -22,7 +22,7 @@ TRACE_2("params",_magazine,_explosive); private _isAttached = !isNull (attachedTo _explosive); private _detonators = [ACE_player] call FUNC(getDetonators); private _triggerTypes = [_magazine] call FUNC(triggerType); -private _magTriggers = ConfigFile >> "CfgMagazines" >> _magazine >> "ACE_Triggers"; +private _magTriggers = configFile >> "CfgMagazines" >> _magazine >> "ACE_Triggers"; private _children = []; { private _required = getArray (_x >> "requires"); diff --git a/addons/explosives/functions/fnc_defuseExplosive.sqf b/addons/explosives/functions/fnc_defuseExplosive.sqf index 049fff88469..1c8b687c8f3 100644 --- a/addons/explosives/functions/fnc_defuseExplosive.sqf +++ b/addons/explosives/functions/fnc_defuseExplosive.sqf @@ -19,7 +19,7 @@ params ["_unit", "_explosive"]; TRACE_2("params",_unit,_explosive); -if (GVAR(ExplodeOnDefuse) && {(random 1.0) < (getNumber (ConfigFile >> "CfgAmmo" >> typeOf _explosive >> QGVAR(explodeOnDefuseChance)))}) exitWith { +if (GVAR(ExplodeOnDefuse) && {(random 1.0) < (getNumber (configFile >> "CfgAmmo" >> typeOf _explosive >> QGVAR(explodeOnDefuseChance)))}) exitWith { TRACE_1("exploding on defuse",_explosive); [_unit, -1, [_explosive, 1], "#ExplodeOnDefuse"] call FUNC(detonateExplosive); [QGVAR(explodeOnDefuse), [_explosive, _unit]] call CBA_fnc_globalEvent; diff --git a/addons/explosives/functions/fnc_getPlacedExplosives.sqf b/addons/explosives/functions/fnc_getPlacedExplosives.sqf index 867bae2275f..37ecd334bd4 100644 --- a/addons/explosives/functions/fnc_getPlacedExplosives.sqf +++ b/addons/explosives/functions/fnc_getPlacedExplosives.sqf @@ -23,7 +23,7 @@ TRACE_1("params",_unit); private _filter = nil; if (count _this > 1) then { - _filter = ConfigFile >> "ACE_Triggers" >> (_this select 1); + _filter = configFile >> "ACE_Triggers" >> (_this select 1); }; private _clackerList = []; private _adjustedList = false; @@ -34,7 +34,7 @@ private _list = []; _clackerList set [_forEachIndex, "X"]; _adjustedList = true; } else { - if (isNil "_filter" || {(ConfigFile >> "ACE_Triggers" >> (_x select 4)) == _filter}) then { + if (isNil "_filter" || {(configFile >> "ACE_Triggers" >> (_x select 4)) == _filter}) then { _list pushBack _x; }; }; diff --git a/addons/explosives/functions/fnc_onInventoryChanged.sqf b/addons/explosives/functions/fnc_onInventoryChanged.sqf index 7cf01c2a142..d5f1077dc2d 100644 --- a/addons/explosives/functions/fnc_onInventoryChanged.sqf +++ b/addons/explosives/functions/fnc_onInventoryChanged.sqf @@ -23,7 +23,7 @@ TRACE_3("params",_receiver,_giver,_item); if ((_receiver != ace_player) && {_giver != ace_player}) exitWith {}; -private _config = ConfigFile >> "CfgWeapons" >> _item; +private _config = configFile >> "CfgWeapons" >> _item; if (isClass _config && {getNumber(_config >> QGVAR(Detonator)) == 1}) then { private _clackerItems = _giver getVariable [QGVAR(Clackers), []]; _receiver setVariable [QGVAR(Clackers), (_receiver getVariable [QGVAR(Clackers), []]) + _clackerItems, true]; diff --git a/addons/explosives/functions/fnc_placeExplosive.sqf b/addons/explosives/functions/fnc_placeExplosive.sqf index ec19a6f6fd9..bb6fcea6ab3 100644 --- a/addons/explosives/functions/fnc_placeExplosive.sqf +++ b/addons/explosives/functions/fnc_placeExplosive.sqf @@ -37,15 +37,15 @@ if (isNil "_triggerConfig") exitWith { objNull }; -private _magazineTrigger = ConfigFile >> "CfgMagazines" >> _magazineClass >> "ACE_Triggers" >> _triggerConfig; -_triggerConfig = ConfigFile >> "ACE_Triggers" >> _triggerConfig; +private _magazineTrigger = configFile >> "CfgMagazines" >> _magazineClass >> "ACE_Triggers" >> _triggerConfig; +_triggerConfig = configFile >> "ACE_Triggers" >> _triggerConfig; if (isNil "_triggerConfig") exitWith { ERROR_1("Config not found in PlaceExplosive: %1",_this); objNull }; -private _ammo = getText(ConfigFile >> "CfgMagazines" >> _magazineClass >> "ammo"); +private _ammo = getText(configFile >> "CfgMagazines" >> _magazineClass >> "ammo"); if (isText(_magazineTrigger >> "ammo")) then { _ammo = getText (_magazineTrigger >> "ammo"); }; diff --git a/addons/explosives/functions/fnc_selectTrigger.sqf b/addons/explosives/functions/fnc_selectTrigger.sqf index 7c7d5e58d46..0a864a77c48 100644 --- a/addons/explosives/functions/fnc_selectTrigger.sqf +++ b/addons/explosives/functions/fnc_selectTrigger.sqf @@ -20,7 +20,7 @@ params ["_explosive", "_magazine", "_trigger"]; TRACE_3("params",_explosive,_magazine,_trigger); -private _config = ConfigFile >> "ACE_Triggers" >> _trigger; +private _config = configFile >> "ACE_Triggers" >> _trigger; // Make selected trigger the active one (for keybind) if it's the first to be connected private _activeTrigger = GVAR(activeTrigger); diff --git a/addons/explosives/functions/fnc_setupExplosive.sqf b/addons/explosives/functions/fnc_setupExplosive.sqf index d25e5d3276a..9214b999146 100644 --- a/addons/explosives/functions/fnc_setupExplosive.sqf +++ b/addons/explosives/functions/fnc_setupExplosive.sqf @@ -78,7 +78,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)]; #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 if ((lineIntersectsSurfaces [eyePos _unit, _testPos, _unit]) isNotEqualTo []) exitWith {_return = false;}; } forEach [[0,0], [-1,-1], [1,-1], [-1,1], [1,1]]; @@ -167,7 +167,7 @@ GVAR(TweakedAngle) = 0; if (isNull _attachVehicle) then { _placeAngle = _cameraAngle - GVAR(TweakedAngle) + 180; - _expSetupVehicle setPosAsl _virtualPosASL; + _expSetupVehicle setPosASL _virtualPosASL; _expSetupVehicle setDir _placeAngle; _placeAngle = _placeAngle + 180; //CfgAmmos seem to be 180 for some reason } else { diff --git a/addons/explosives/functions/fnc_startDefuse.sqf b/addons/explosives/functions/fnc_startDefuse.sqf index e023592547c..ef3efac885f 100644 --- a/addons/explosives/functions/fnc_startDefuse.sqf +++ b/addons/explosives/functions/fnc_startDefuse.sqf @@ -25,8 +25,8 @@ private _fnc_DefuseTime = { params ["_specialist", "_target"]; TRACE_2("defuseTime",_specialist,_target); private _defuseTime = 5; - if (isNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> QGVAR(DefuseTime))) then { - _defuseTime = getNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> QGVAR(DefuseTime)); + if (isNumber(configFile >> "CfgAmmo" >> typeOf (_target) >> QGVAR(DefuseTime))) then { + _defuseTime = getNumber(configFile >> "CfgAmmo" >> typeOf (_target) >> QGVAR(DefuseTime)); }; if (!_specialist && {GVAR(PunishNonSpecialists)}) then { _defuseTime = _defuseTime * 1.5; @@ -34,7 +34,7 @@ private _fnc_DefuseTime = { _defuseTime }; private _actionToPlay = "MedicOther"; -if (STANCE _unit == "Prone") then { +if (stance _unit == "Prone") then { _actionToPlay = "PutDown"; }; diff --git a/addons/explosives/functions/fnc_triggerType.sqf b/addons/explosives/functions/fnc_triggerType.sqf index 0fba459491b..aa890c049f2 100644 --- a/addons/explosives/functions/fnc_triggerType.sqf +++ b/addons/explosives/functions/fnc_triggerType.sqf @@ -19,10 +19,10 @@ params ["_magazineClassname"]; TRACE_1("params",_magazineClassname); private _result = []; -private _config = getArray (ConfigFile >> "CfgMagazines" >> _magazineClassname >> "ACE_Triggers" >> "SupportedTriggers"); +private _config = getArray (configFile >> "CfgMagazines" >> _magazineClassname >> "ACE_Triggers" >> "SupportedTriggers"); private _count = count _config; for "_index" from 0 to (_count - 1) do { - _result set [_index, ConfigFile >> "ACE_Triggers" >> (_config select _index)]; + _result set [_index, configFile >> "ACE_Triggers" >> (_config select _index)]; }; _result diff --git a/addons/fastroping/XEH_postInit.sqf b/addons/fastroping/XEH_postInit.sqf index 1daecbb715b..0cfeee67bd9 100644 --- a/addons/fastroping/XEH_postInit.sqf +++ b/addons/fastroping/XEH_postInit.sqf @@ -54,7 +54,7 @@ addMissionEventHandler ["Draw3D", { if !(cursorObject isKindOf "Helicopter") exitWith {}; private _config = configOf cursorObject; private _enabled = getNumber (_config >> QGVAR(enabled)); - drawIcon3D ["", [.5,.5,1,1], (ASLtoAGL getPosASL cursorObject), 0.5, 0.5, 0, format ["%1 = %2", typeOf cursorObject, _enabled], 0.5, 0.025, "TahomaB"]; + drawIcon3D ["", [.5,.5,1,1], (ASLToAGL getPosASL cursorObject), 0.5, 0.5, 0, format ["%1 = %2", typeOf cursorObject, _enabled], 0.5, 0.025, "TahomaB"]; if (_enabled > 0) then { { private _hookAttachment = cursorObject getVariable [QGVAR(FRIES), cursorObject]; diff --git a/addons/fastroping/functions/fnc_deployRopes.sqf b/addons/fastroping/functions/fnc_deployRopes.sqf index eea81a77461..c4e999db17c 100644 --- a/addons/fastroping/functions/fnc_deployRopes.sqf +++ b/addons/fastroping/functions/fnc_deployRopes.sqf @@ -26,7 +26,7 @@ private _ropeOrigins = getArray (_config >> QGVAR(ropeOrigins)); private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; private _hookAttachment = _vehicle getVariable [QGVAR(FRIES), _vehicle]; -private _ropeLength = getNumber (configfile >> "CfgWeapons" >> _ropeClass >> QEGVAR(logistics_rope,length)); +private _ropeLength = getNumber (configFile >> "CfgWeapons" >> _ropeClass >> QEGVAR(logistics_rope,length)); if (_ropeLength <= 0) then { _ropeLength = DEFAULT_ROPE_LENGTH; diff --git a/addons/fcs/CfgOptics.hpp b/addons/fcs/CfgOptics.hpp index f8770d7327d..551a965a60d 100644 --- a/addons/fcs/CfgOptics.hpp +++ b/addons/fcs/CfgOptics.hpp @@ -26,7 +26,7 @@ class RscInGameUI { }; }; class Rsc_ACE_Helo_UI_Turret: RscUnitInfo { // RscOptics_Heli_Attack_01_gunner - onLoad = "[""onLoad"",_this,""RscUnitInfo"",'IGUI'] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];"; + onLoad = "[""onLoad"",_this,""RscUnitInfo"",'IGUI'] call (uiNamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];"; class CA_IGUI_elements_group: RscControlsGroup { class controls { MACRO_RANGEFINDER diff --git a/addons/fcs/functions/fnc_getAngle.sqf b/addons/fcs/functions/fnc_getAngle.sqf index 9a856d46c97..03e8b4fdc8e 100644 --- a/addons/fcs/functions/fnc_getAngle.sqf +++ b/addons/fcs/functions/fnc_getAngle.sqf @@ -21,7 +21,7 @@ * Public: No */ -#define PRECISION 0.1 +#define VAR_PRECISION 0.1 params ["_distance", "_angleTarget", "_maxElev", "_initSpeed", "_airFriction", "_timeToLive", "_simulationStep"]; @@ -69,9 +69,9 @@ private _it2 = 0; _data set [7, _maxElev]; private _f1 = _data call _fnc_traceBullet; -if (abs _f1 <= PRECISION) exitWith {0}; +if (abs _f1 <= VAR_PRECISION) exitWith {0}; -while {abs _f1 > PRECISION} do { +while {abs _f1 > VAR_PRECISION} do { _data set [7, _angle2]; private _f2 = _data call _fnc_traceBullet; diff --git a/addons/finger/functions/fnc_keyPress.sqf b/addons/finger/functions/fnc_keyPress.sqf index 2445986d15b..16dca938b34 100644 --- a/addons/finger/functions/fnc_keyPress.sqf +++ b/addons/finger/functions/fnc_keyPress.sqf @@ -29,8 +29,8 @@ if (diag_tickTime < (GVAR(lastFPTime) + FP_ACTION_TIMEOUT)) exitWith {true}; GVAR(lastFPTime) = diag_tickTime; // Find where is the finger pointing -private _originASL = AGLtoASL positionCameraToWorld [0, 0, 0]; -private _fingerPosASL = AGLtoASL positionCameraToWorld [0, 0, FP_DISTANCE]; +private _originASL = AGLToASL positionCameraToWorld [0, 0, 0]; +private _fingerPosASL = AGLToASL positionCameraToWorld [0, 0, FP_DISTANCE]; private _intersections = lineIntersectsSurfaces [_originASL, _fingerPosASL, ACE_player, vehicle ACE_player, true, 1]; if (_intersections isNotEqualTo []) then { _fingerPosASL = _intersections select 0 select 0; diff --git a/addons/finger/functions/fnc_perFrameEH.sqf b/addons/finger/functions/fnc_perFrameEH.sqf index 4af4f6b643e..36acea8a447 100644 --- a/addons/finger/functions/fnc_perFrameEH.sqf +++ b/addons/finger/functions/fnc_perFrameEH.sqf @@ -39,7 +39,7 @@ private _iconBaseSize = GVAR(sizeCoef) * BASE_SIZE * 0.10713 * (call EFUNC(commo _iconSize = _iconSize * linearConversion [0, GVAR(maxRange), (getPosASL ACE_player) vectorDistance (getPosASL _sourceUnit), 0.25, 2, true]; }; - drawIcon3D [QPATHTOF(UI\fp_icon2.paa), _drawColor, ASLtoAGL _pos, _iconSize, _iconSize, 0, _name, 1, 0.03, "RobotoCondensed"]; + drawIcon3D [QPATHTOF(UI\fp_icon2.paa), _drawColor, ASLToAGL _pos, _iconSize, _iconSize, 0, _name, 1, 0.03, "RobotoCondensed"]; }; } forEach GVAR(fingersHash); diff --git a/addons/fortify/functions/fnc_addActions.sqf b/addons/fortify/functions/fnc_addActions.sqf index 4802effa01d..7ac07d1693a 100644 --- a/addons/fortify/functions/fnc_addActions.sqf +++ b/addons/fortify/functions/fnc_addActions.sqf @@ -21,7 +21,7 @@ private _side = side group _player; private _objects = missionNamespace getVariable [format [QGVAR(Objects_%1), _side], []]; private _actions = []; private _infiniteBudget = ([side group _player] call FUNC(getBudget)) == -1; -private _subActions = createHashmap; +private _subActions = createHashMap; { _x params ["_classname", "_cost", ["_category", ""]]; diff --git a/addons/fortify/functions/fnc_buildLocationModule.sqf b/addons/fortify/functions/fnc_buildLocationModule.sqf index c777b80d4e4..497af641f41 100644 --- a/addons/fortify/functions/fnc_buildLocationModule.sqf +++ b/addons/fortify/functions/fnc_buildLocationModule.sqf @@ -18,7 +18,7 @@ params ["_logic"]; TRACE_1("buildLocations",_logic); -private _area = _logic getvariable ["objectArea",[0,0,0,false,0]]; // seems to be set via the canSetArea config +private _area = _logic getVariable ["objectArea",[0,0,0,false,0]]; // seems to be set via the canSetArea config if ((_area param [0, 0]) == 0) exitWith {WARNING_1("Bad size? %1",_area);}; private _locationArray = [_logic]; _locationArray append _area; diff --git a/addons/fortify/functions/fnc_getPlaceableSet.sqf b/addons/fortify/functions/fnc_getPlaceableSet.sqf index d5e610d0475..dfe5a01a1b8 100644 --- a/addons/fortify/functions/fnc_getPlaceableSet.sqf +++ b/addons/fortify/functions/fnc_getPlaceableSet.sqf @@ -20,7 +20,7 @@ TRACE_1("getPlaceableSet",_preset); private _config = missionConfigFile >> "ACEX_Fortify_Presets" >> _preset; if (!isClass _config) then { - _config = configfile >> "ACEX_Fortify_Presets" >> _preset; + _config = configFile >> "ACEX_Fortify_Presets" >> _preset; }; if (!isClass _config) exitWith { private _msg = format ["Could not find [%1]", _preset]; diff --git a/addons/frag/functions/fnc_addPfhRound.sqf b/addons/frag/functions/fnc_addPfhRound.sqf index 358a9ee71ea..b795a1dff04 100644 --- a/addons/frag/functions/fnc_addPfhRound.sqf +++ b/addons/frag/functions/fnc_addPfhRound.sqf @@ -60,7 +60,7 @@ if (alive _round) then { private _spallTrackID = []; private _args = [ - _round, getPosASL _round, velocity _round, _type, diag_frameno, getPosASL _round, _doSpall, _spallTrack, _spallTrackID, + _round, getPosASL _round, velocity _round, _type, diag_frameNo, getPosASL _round, _doSpall, _spallTrack, _spallTrackID, getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(skip)), getNumber (configFile >> "CfgAmmo" >> _type >> "explosive"), getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange"), diff --git a/addons/frag/functions/fnc_doExplosions.sqf b/addons/frag/functions/fnc_doExplosions.sqf index a5a687aa538..74e191532a5 100644 --- a/addons/frag/functions/fnc_doExplosions.sqf +++ b/addons/frag/functions/fnc_doExplosions.sqf @@ -21,7 +21,7 @@ _args params ["_explosions", "_index"]; for "_i" from _index to ((_index + 2) min (count _explosions)) do { private _exp = _explosions select _i; _exp params ["_refExp", "_bpos", "_hit", "_distance", "_indirectHitRange", "_depth"]; - _refExp createVehicle (ASLtoATL _bpos); + _refExp createVehicle (ASLToATL _bpos); // if (_hit >= 150 && _distance > _indirectHitRange) then { // [_bpos, _refExp, _depth] call FUNC(doReflections); // }; diff --git a/addons/frag/functions/fnc_frago.sqf b/addons/frag/functions/fnc_frago.sqf index 8fd77dbc739..460b2e2b3a9 100644 --- a/addons/frag/functions/fnc_frago.sqf +++ b/addons/frag/functions/fnc_frago.sqf @@ -73,7 +73,7 @@ if (_warn) then { // Gunery equation is for a non-fragmenting metal, imperical value of 80% represents fragmentation private _fragPower = 0.8 * (((_m / _c) + _k) ^ - (1 / 2)) * _gC; -private _atlPos = ASLtoATL _lastPos; +private _atlPos = ASLToATL _lastPos; private _fragPowerRandom = _fragPower * 0.5; if ((_atlPos select 2) < 0.5) then { diff --git a/addons/frag/functions/fnc_pfhRound.sqf b/addons/frag/functions/fnc_pfhRound.sqf index 0c261dcffba..412a734a055 100644 --- a/addons/frag/functions/fnc_pfhRound.sqf +++ b/addons/frag/functions/fnc_pfhRound.sqf @@ -22,7 +22,7 @@ if (_round in GVAR(blackList)) exitWith { }; if (!alive _round) exitWith { - if ((diag_frameno - _firedFrame) > 1) then { //skip if deleted within a single frame + if ((diag_frameNo - _firedFrame) > 1) then { //skip if deleted within a single frame if (_skip == 0) then { if ((_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}) || {_force == 1}) then { // shotbullet, shotShell don't seem to explode when touching water, so don't create frags diff --git a/addons/goggles/define.hpp b/addons/goggles/define.hpp index 81d3fcb6896..4e641b692c4 100644 --- a/addons/goggles/define.hpp +++ b/addons/goggles/define.hpp @@ -18,8 +18,8 @@ class RscPicture { fixedWidth = 0; shadow = 0; text = ""; - x = "safezoneX"; - y = "safezoneY"; - w = "safezoneW"; - h = "safezoneH"; + x = "safeZoneX"; + y = "safeZoneY"; + w = "safeZoneW"; + h = "safeZoneH"; }; diff --git a/addons/goggles/functions/fnc_applyRotorWashEffect.sqf b/addons/goggles/functions/fnc_applyRotorWashEffect.sqf index 85b7e60934d..341adcecdde 100644 --- a/addons/goggles/functions/fnc_applyRotorWashEffect.sqf +++ b/addons/goggles/functions/fnc_applyRotorWashEffect.sqf @@ -75,7 +75,7 @@ if !(_safe) then { }; }; - _safe = getNumber (ConfigFile >> "CfgGlasses" >> goggles _unit >> "ACE_Protection") == 1; + _safe = getNumber (configFile >> "CfgGlasses" >> goggles _unit >> "ACE_Protection") == 1; }; // quit if protected by goggles or helmet diff --git a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf index 33c4bdffc21..ef5d6bc4a7d 100644 --- a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf +++ b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf @@ -20,7 +20,7 @@ TRACE_1("params",_grenadePosASL); // Affect local AI (players are not local, except for ACE_player) // @todo: Affect units in static weapons, turned out, etc -private _affected = ((ASLtoAGL _grenadePosASL) nearEntities ["CAManBase", 20]) - [ACE_player]; +private _affected = ((ASLToAGL _grenadePosASL) nearEntities ["CAManBase", 20]) - [ACE_player]; { private _unit = _x; @@ -69,7 +69,7 @@ private _affected = ((ASLtoAGL _grenadePosASL) nearEntities ["CAManBase", 20]) - if (!hasInterface) exitWith {}; // Create flash to illuminate environment -private _light = "#lightpoint" createVehicleLocal ASLtoAGL _grenadePosASL; +private _light = "#lightpoint" createVehicleLocal ASLToAGL _grenadePosASL; _light setPosASL _grenadePosASL; _light setLightBrightness 20; @@ -122,7 +122,7 @@ _strength = 1 - (((_eyePos vectorDistance _grenadePosASL) min 25) / 25) ^ 0.4; _strength = _strength * _losCoefficient; // Account for people looking away by slightly reducing the effect for visual effects. -private _eyeDir = ((AGLtoASL positionCameraToWorld [0, 0, 1]) vectorDiff (AGLtoASL positionCameraToWorld [0, 0, 0])); +private _eyeDir = ((AGLToASL positionCameraToWorld [0, 0, 1]) vectorDiff (AGLToASL positionCameraToWorld [0, 0, 0])); private _dirToUnitVector = _eyePos vectorFromTo _grenadePosASL; private _angleDiff = acos (_eyeDir vectorDotProduct _dirToUnitVector); TRACE_2("",_angleDiff,((1 - (_angleDiff - 45) / (120 - 45)) max 0)); diff --git a/addons/gunbag/functions/fnc_calculateMass.sqf b/addons/gunbag/functions/fnc_calculateMass.sqf index 6dd6a5a660d..b614d95f587 100644 --- a/addons/gunbag/functions/fnc_calculateMass.sqf +++ b/addons/gunbag/functions/fnc_calculateMass.sqf @@ -23,7 +23,7 @@ private _mass = getNumber (configFile >> "CfgWeapons" >> _weapon >> "WeaponSlots { _mass = _mass + getNumber (configFile >> "CfgWeapons" >> _x >> "ItemInfo" >> "mass"); -} foreach _items; +} forEach _items; { _mass = _mass + getNumber (configFile >> "CfgMagazines" >> _x >> "mass"); diff --git a/addons/hellfire/functions/fnc_attackProfile.sqf b/addons/hellfire/functions/fnc_attackProfile.sqf index 221d99e7ae2..aa457d02fa5 100644 --- a/addons/hellfire/functions/fnc_attackProfile.sqf +++ b/addons/hellfire/functions/fnc_attackProfile.sqf @@ -32,7 +32,7 @@ if (_attackProfileStateParams isEqualTo []) then { _attackProfileStateParams params ["_attackStage", "_configLaunchHeightClear", "_missileStateData"]; private _projectilePos = getPosASL _projectile; -private _distanceFromLaunch2d = _launchPos distance2d _projectilePos; +private _distanceFromLaunch2d = _launchPos distance2D _projectilePos; private _heightAboveLaunch = (_projectilePos select 2) - (_launchPos select 2); // Add height depending on distance for compensate @@ -45,7 +45,7 @@ if (_returnTargetPos isEqualTo [0, 0, 0]) then { private _closingRate = vectorMagnitude velocity _projectile; // subtract 500 meters to account for the fact that we don't want to be at the perfect pitch exactly when we cross the target // 500 seemed good in testing -private _timeToGo = ((_projectilePos distance2d _seekerTargetPos) - 500) / _closingRate; +private _timeToGo = ((_projectilePos distance2D _seekerTargetPos) - 500) / _closingRate; // we could do stuff like desired attack angle, but I'm not going that far today private _los = _projectilePos vectorFromTo _seekerTargetPos; @@ -64,14 +64,14 @@ switch (_attackStage) do { if (_heightAboveLaunch > _configLaunchHeightClear) then { _attackProfileStateParams set [0, STAGE_SEEK_CRUISE]; - _attackProfileStateParams set [2, [_projectilePos select 2, _seekerTargetPos distance2d _projectilePos]]; + _attackProfileStateParams set [2, [_projectilePos select 2, _seekerTargetPos distance2D _projectilePos]]; TRACE_2("New Stage: STAGE_SEEK_CRUISE",_distanceFromLaunch2d,_heightAboveLaunch); }; if (_atMinRotationAngle) then { _attackProfileStateParams set [0, STAGE_ATTACK_TERMINAL]; - _attackProfileStateParams set [2, [_projectilePos select 2, _seekerTargetPos distance2d _projectilePos]]; + _attackProfileStateParams set [2, [_projectilePos select 2, _seekerTargetPos distance2D _projectilePos]]; TRACE_2("New Stage: STAGE_ATTACK_TERMINAL",_distanceToTarget2d,_currentHeightOverTarget); }; }; @@ -84,7 +84,7 @@ switch (_attackStage) do { if (_seekerTargetPos isNotEqualTo [0,0,0]) then { _attackProfileStateParams set [0, STAGE_ATTACK_CRUISE]; - _attackProfileStateParams set [2, [_projectilePos select 2, _seekerTargetPos distance2d _projectilePos]]; + _attackProfileStateParams set [2, [_projectilePos select 2, _seekerTargetPos distance2D _projectilePos]]; TRACE_1("New Stage: STAGE_ATTACK_CRUISE",_distanceFromLaunch2d); }; }; @@ -92,7 +92,7 @@ switch (_attackStage) do { _missileStateData params ["_heightBeforeStateSwitch", "_initialDistanceToTarget"]; private _currentHeightOverTarget = (_projectilePos select 2) - (_seekerTargetPos select 2); - private _distanceToTarget2d = _seekerTargetPos distance2d _projectilePos; + private _distanceToTarget2d = _seekerTargetPos distance2D _projectilePos; _returnTargetPos set [2, _heightBeforeStateSwitch + (_initialDistanceToTarget * sin 7)]; @@ -100,7 +100,7 @@ switch (_attackStage) do { if (_atMinRotationAngle || {(_currentHeightOverTarget atan2 _distanceToTarget2d) > 15}) then { // Wait until we can come down at a sharp angle _attackProfileStateParams set [0, STAGE_ATTACK_TERMINAL]; - _attackProfileStateParams set [2, [_projectilePos select 2, _seekerTargetPos distance2d _projectilePos]]; + _attackProfileStateParams set [2, [_projectilePos select 2, _seekerTargetPos distance2D _projectilePos]]; TRACE_2("New Stage: STAGE_ATTACK_TERMINAL",_distanceToTarget2d,_currentHeightOverTarget); }; }; diff --git a/addons/hellfire/functions/fnc_getAttackProfileSettings.sqf b/addons/hellfire/functions/fnc_getAttackProfileSettings.sqf index b032c44d233..d9e1c23b205 100644 --- a/addons/hellfire/functions/fnc_getAttackProfileSettings.sqf +++ b/addons/hellfire/functions/fnc_getAttackProfileSettings.sqf @@ -44,7 +44,7 @@ _attackProfileStateParams set [0, _startingStage]; _attackProfileStateParams set [1, _configLaunchHeightClear]; _attackProfileStateParams set [2, [ _projectilePos select 2, - _seekerTargetPos distance2d _projectilePos + _seekerTargetPos distance2D _projectilePos ]]; TRACE_1("new shot settings",_attackProfileStateParams); diff --git a/addons/huntir/functions/fnc_cam.sqf b/addons/huntir/functions/fnc_cam.sqf index 65542c66e87..4a80a4819e9 100644 --- a/addons/huntir/functions/fnc_cam.sqf +++ b/addons/huntir/functions/fnc_cam.sqf @@ -31,10 +31,10 @@ GVAR(ELEVAT) = 0.01; HUNTIR_BACKGROUND_LAYER_ID cutText["","PLAIN"]; -closedialog 0; +closeDialog 0; createDialog QGVAR(cam_dialog); -uiNameSpace setVariable [QGVAR(monitor), findDisplay 18880]; -(uiNameSpace getVariable QGVAR(monitor)) displaySetEventHandler ["Keydown", QUOTE(_this call FUNC(keyPressed))]; +uiNamespace setVariable [QGVAR(monitor), findDisplay 18880]; +(uiNamespace getVariable QGVAR(monitor)) displaySetEventHandler ["Keydown", QUOTE(_this call FUNC(keyPressed))]; ctrlSetText [4, "0X"]; @@ -68,7 +68,7 @@ GVAR(no_cams) sort true; } forEach GVAR(no_cams); [{ //Close monitor if we no longer have the item: - if ((!([ACE_player, "ACE_HuntIR_monitor"] call EFUNC(common,hasItem))) && {!isNull (uiNameSpace getVariable [QGVAR(monitor), displayNull])}) then { + if ((!([ACE_player, "ACE_HuntIR_monitor"] call EFUNC(common,hasItem))) && {!isNull (uiNamespace getVariable [QGVAR(monitor), displayNull])}) then { closeDialog 0; [QGVAR(monitorClosed), [ACE_player]] call CBA_fnc_localEvent; }; @@ -105,11 +105,11 @@ GVAR(no_cams) sort true; GVAR(NV) = 0; setAperture -1; - closedialog 0; - titletext [" ", "BLACK IN", 4]; + closeDialog 0; + titleText [" ", "BLACK IN", 4]; ACE_player switchCamera "INTERNAL"; - GVAR(cam) CameraEffect ["Terminate", "Back"]; - CamDestroy GVAR(cam); + GVAR(cam) cameraEffect ["Terminate", "Back"]; + camDestroy GVAR(cam); deleteVehicle GVAR(logic); if (player != ACE_player) then { player remoteControl ACE_player; @@ -119,19 +119,19 @@ GVAR(no_cams) sort true; switch (GVAR(ZOOM)) do { case 0: { - GVAR(cam) camsetFOV 0.7; + GVAR(cam) camSetFov 0.7; GVAR(cam) camSetFocus [GVAR(pos) select 2, 1]; }; case 1: { - GVAR(cam) camsetFOV 0.35; + GVAR(cam) camSetFov 0.35; GVAR(cam) camSetFocus [(GVAR(pos) select 2)/2, 1]; }; case 2: { - GVAR(cam) camsetFOV 0.17; + GVAR(cam) camSetFov 0.17; GVAR(cam) camSetFocus [(GVAR(pos) select 2)/4, 1]; }; case 3: { - GVAR(cam) camsetFOV 0.1; + GVAR(cam) camSetFov 0.1; GVAR(cam) camSetFocus [(GVAR(pos) select 2)/8, 1]; }; }; @@ -139,7 +139,7 @@ GVAR(no_cams) sort true; GVAR(logic) setPosATL (GVAR(pos) vectorAdd [0, 0, -5]); GVAR(logic) setDir GVAR(ROTATE); GVAR(logic) setVectorUp [0.0001, 0.0001, 1]; - GVAR(cam) CameraEffect ["internal", "BACK"]; + GVAR(cam) cameraEffect ["internal", "BACK"]; private _cam_coord_y = GVAR(ELEVAT) * cos(GVAR(ROTATE)); private _cam_coord_x = GVAR(ELEVAT) * sin(GVAR(ROTATE)); GVAR(cam) camSetRelPos [_cam_coord_x, _cam_coord_y, 2]; diff --git a/addons/huntir/functions/fnc_huntir.sqf b/addons/huntir/functions/fnc_huntir.sqf index efb9e139d12..c54d193d9e3 100644 --- a/addons/huntir/functions/fnc_huntir.sqf +++ b/addons/huntir/functions/fnc_huntir.sqf @@ -34,7 +34,7 @@ createDialog QGVAR(cam_dialog_off); }; closeDialog 0; createDialog QGVAR(cam_dialog_inactive); - uiNameSpace setVariable [QGVAR(monitor), findDisplay 18881]; + uiNamespace setVariable [QGVAR(monitor), findDisplay 18881]; [{ GVAR(startTime) = CBA_missionTime; GVAR(done) = false; @@ -46,7 +46,7 @@ createDialog QGVAR(cam_dialog_off); [QGVAR(monitorStarted), [ACE_player]] call CBA_fnc_localEvent; [{ //Close monitor if we no longer have item: - if ((!([ACE_player, "ACE_HuntIR_monitor"] call EFUNC(common,hasItem))) && {!isNull (uiNameSpace getVariable [QGVAR(monitor), displayNull])}) then { + if ((!([ACE_player, "ACE_HuntIR_monitor"] call EFUNC(common,hasItem))) && {!isNull (uiNamespace getVariable [QGVAR(monitor), displayNull])}) then { closeDialog 0; [QGVAR(monitorClosed), [ACE_player]] call CBA_fnc_localEvent; }; @@ -108,7 +108,7 @@ createDialog QGVAR(cam_dialog_off); ctrlSetText [1, "No GDS System detected"]; [{ GVAR(done) = true; - closedialog 0; + closeDialog 0; HUNTIR_BACKGROUND_LAYER_ID cutText ["", "PLAIN"]; [QGVAR(monitorClosed), [ACE_player]] call CBA_fnc_localEvent; }, [], 3, 0] call CBA_fnc_waitAndExecute; diff --git a/addons/interact_menu/CursorMenus.hpp b/addons/interact_menu/CursorMenus.hpp index 79f1109598c..82cb9e79e66 100644 --- a/addons/interact_menu/CursorMenus.hpp +++ b/addons/interact_menu/CursorMenus.hpp @@ -28,10 +28,10 @@ class RscTitles { size = 1; colorBackground[] = {0, 0, 0, 0.65}; colorText[] = {0, 0, 0, 0}; - x = "safezoneX"; - y = "safezoneY"; - w = "safezoneW"; - h = "safezoneH"; + x = "safeZoneX"; + y = "safeZoneY"; + w = "safeZoneW"; + h = "safeZoneH"; }; }; }; diff --git a/addons/interact_menu/functions/fnc_addActionToClass.sqf b/addons/interact_menu/functions/fnc_addActionToClass.sqf index 91197d02d92..d2167c8079c 100644 --- a/addons/interact_menu/functions/fnc_addActionToClass.sqf +++ b/addons/interact_menu/functions/fnc_addActionToClass.sqf @@ -30,7 +30,7 @@ private _useInheritance = _this param [4, false, [false]]; private _excludedClasses = _this param [5, [], [[]]]; TRACE_6("addActionToClass",_objectType,_typeNum,_parentPath,_action,_useInheritance,_excludedClasses); -if (_useInheritance) exitwith { +if (_useInheritance) exitWith { BEGIN_COUNTER(addAction); private _cfgVehicles = configFile >> "CfgVehicles"; // store this so we don't resolve for every element _excludedClasses = (_excludedClasses apply {configName (_cfgVehicles >> _x)}) - [""]; // ends up being faster than toLower'ing everything else diff --git a/addons/interact_menu/functions/fnc_keyDown.sqf b/addons/interact_menu/functions/fnc_keyDown.sqf index 2ae39bff26b..2d15715b953 100644 --- a/addons/interact_menu/functions/fnc_keyDown.sqf +++ b/addons/interact_menu/functions/fnc_keyDown.sqf @@ -84,8 +84,8 @@ if (GVAR(useCursorMenu)) then { } else { createDialog QGVAR(cursorMenu); }; - (finddisplay 91919) displayAddEventHandler ["KeyUp", {[_this,'keyup'] call CBA_events_fnc_keyHandler}]; - (finddisplay 91919) displayAddEventHandler ["KeyDown", { + (findDisplay 91919) displayAddEventHandler ["KeyUp", {[_this,'keyup'] call CBA_events_fnc_keyHandler}]; + (findDisplay 91919) displayAddEventHandler ["KeyDown", { // Handle the escape key being pressed with menu open: if ((_this select [1,4]) isEqualTo [1,false,false,false]) exitWith { // escape key with no modifiers [displayNull] call FUNC(handleEscapeMenu); @@ -102,8 +102,8 @@ if (GVAR(useCursorMenu)) then { _ctrl ctrlCommit 0; // handles Mouse moving and LMB in cursor mode when action on keyrelease is disabled - ((finddisplay 91919) displayctrl 9922) ctrlAddEventHandler ["MouseMoving", DFUNC(handleMouseMovement)]; - ((finddisplay 91919) displayctrl 9922) ctrlAddEventHandler ["MouseButtonDown", DFUNC(handleMouseButtonDown)]; + ((findDisplay 91919) displayCtrl 9922) ctrlAddEventHandler ["MouseMoving", DFUNC(handleMouseMovement)]; + ((findDisplay 91919) displayCtrl 9922) ctrlAddEventHandler ["MouseButtonDown", DFUNC(handleMouseButtonDown)]; setMousePosition [0.5, 0.5]; } else { if (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]) then { @@ -111,7 +111,7 @@ if (GVAR(useCursorMenu)) then { }; }; -GVAR(selfMenuOffset) = (AGLtoASL (positionCameraToWorld [0, 0, 2])) vectorDiff (AGLtoASL (positionCameraToWorld [0, 0, 0])); +GVAR(selfMenuOffset) = (AGLToASL (positionCameraToWorld [0, 0, 2])) vectorDiff (AGLToASL (positionCameraToWorld [0, 0, 0])); //Auto expand the first level when self, mounted vehicle or zeus (skips the first animation as there is only one choice) if (GVAR(openedMenuType) == 0) then { diff --git a/addons/interact_menu/functions/fnc_render.sqf b/addons/interact_menu/functions/fnc_render.sqf index e4ee0d63575..2089f6b1060 100644 --- a/addons/interact_menu/functions/fnc_render.sqf +++ b/addons/interact_menu/functions/fnc_render.sqf @@ -38,7 +38,7 @@ if (GVAR(openedMenuType) >= 0) then { private _closestSelection = -1; { _x params ["", "_sPos"]; - private _distanceFromCursor = _cursorScreenPos distance2d _sPos; + private _distanceFromCursor = _cursorScreenPos distance2D _sPos; if ((_distanceFromCursor < 0.1118) && {_distanceFromCursor < _closestDistance}) then { _closestDistance = _distanceFromCursor; _closestSelection = _forEachIndex; diff --git a/addons/interact_menu/functions/fnc_renderActionPoints.sqf b/addons/interact_menu/functions/fnc_renderActionPoints.sqf index 62d29be91f4..492f8b73c9a 100644 --- a/addons/interact_menu/functions/fnc_renderActionPoints.sqf +++ b/addons/interact_menu/functions/fnc_renderActionPoints.sqf @@ -19,8 +19,8 @@ GVAR(currentOptions) = []; private _player = ACE_player; -GVAR(cameraPosASL) = AGLtoASL (positionCameraToWorld [0, 0, 0]); -GVAR(cameraDir) = (AGLtoASL (positionCameraToWorld [0, 0, 1])) vectorDiff GVAR(cameraPosASL); +GVAR(cameraPosASL) = AGLToASL (positionCameraToWorld [0, 0, 0]); +GVAR(cameraDir) = (AGLToASL (positionCameraToWorld [0, 0, 1])) vectorDiff GVAR(cameraPosASL); private _fnc_renderNearbyActions = { // Render all nearby interaction menus @@ -99,7 +99,7 @@ private _fnc_renderSelfActions = { private _pos = if !(GVAR(useCursorMenu)) then { //Convert to ASL, add offset and then convert back to AGL (handles waves when over water) - ASLtoAGL ((AGLtoASL (positionCameraToWorld [0, 0, 0])) vectorAdd GVAR(selfMenuOffset)); + ASLToAGL ((AGLToASL (positionCameraToWorld [0, 0, 0])) vectorAdd GVAR(selfMenuOffset)); } else { [0.5, 0.5] }; @@ -160,7 +160,7 @@ if (count GVAR(collectedActionPoints) > 1) then { private _delta = vectorNormalized ((GVAR(collectedActionPoints) select _i select 1) vectorDiff (GVAR(collectedActionPoints) select _j select 1)); // If _i is inside a cone with 20º half angle with origin on _j - if ((_delta select 2 > 0.94) && {((GVAR(collectedActionPoints) select _i select 1) distance2d (GVAR(collectedActionPoints) select _j select 1)) < 0.1}) exitWith { + if ((_delta select 2 > 0.94) && {((GVAR(collectedActionPoints) select _i select 1) distance2D (GVAR(collectedActionPoints) select _j select 1)) < 0.1}) exitWith { GVAR(collectedActionPoints) deleteAt _i; }; }; diff --git a/addons/interact_menu/functions/fnc_renderBaseMenu.sqf b/addons/interact_menu/functions/fnc_renderBaseMenu.sqf index 9e3aaa53a92..5af5afcc7ca 100644 --- a/addons/interact_menu/functions/fnc_renderBaseMenu.sqf +++ b/addons/interact_menu/functions/fnc_renderBaseMenu.sqf @@ -46,7 +46,7 @@ if ((GVAR(openedMenuType) == 0) && {isNull (ACE_controlledUAV select 0)} && {veh if ((_distanceToBasePoint > 1.2) && {!(_params select 4)}) exitWith { // If distance to action is greater than 1.2 m and check isn't disabled in params, check LOS - lineIntersects [AGLtoASL _headPos, AGLtoASL _pos, _object, ACE_player] + lineIntersects [AGLToASL _headPos, AGLToASL _pos, _object, ACE_player] }; false }) exitWith {false}; @@ -91,7 +91,7 @@ if (_activeActionTree isEqualTo []) exitWith {false}; BEGIN_COUNTER(fnc_renderMenus); if (count _pos > 2) then { - _sPos pushBack (((AGLtoASL _pos) vectorDiff GVAR(cameraPosASL)) vectorDotProduct GVAR(cameraDir)); + _sPos pushBack (((AGLToASL _pos) vectorDiff GVAR(cameraPosASL)) vectorDotProduct GVAR(cameraDir)); } else { _sPos pushBack 0; }; diff --git a/addons/interact_menu/functions/fnc_renderIcon.sqf b/addons/interact_menu/functions/fnc_renderIcon.sqf index 78b709472a3..a1118b77b0c 100644 --- a/addons/interact_menu/functions/fnc_renderIcon.sqf +++ b/addons/interact_menu/functions/fnc_renderIcon.sqf @@ -27,8 +27,8 @@ if(GVAR(iconCount) > (count GVAR(iconCtrls))-1) then { private _displayNum = [[46, 12] select visibleMap, 91919] select (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]); GVAR(iconCtrls) pushBack ((findDisplay _displayNum) ctrlCreate ["RscStructuredText", 54021 + GVAR(iconCount)]); if (GVAR(useCursorMenu)) then { - ((finddisplay _displayNum) displayctrl (54021 + GVAR(iconCount))) ctrlAddEventHandler ["MouseMoving", DFUNC(handleMouseMovement)]; - ((finddisplay _displayNum) displayctrl (54021 + GVAR(iconCount))) ctrlAddEventHandler ["MouseButtonDown", DFUNC(handleMouseButtonDown)]; + ((findDisplay _displayNum) displayCtrl (54021 + GVAR(iconCount))) ctrlAddEventHandler ["MouseMoving", DFUNC(handleMouseMovement)]; + ((findDisplay _displayNum) displayCtrl (54021 + GVAR(iconCount))) ctrlAddEventHandler ["MouseButtonDown", DFUNC(handleMouseButtonDown)]; }; }; private _ctrl = GVAR(iconCtrls) select GVAR(iconCount); @@ -48,9 +48,9 @@ _text = if ([GVAR(useListMenu), GVAR(useListMenuSelf)] select GVAR(keyDownSelfAc GVAR(iconCount) = GVAR(iconCount) + 1; private _pos = if ([GVAR(useListMenu), GVAR(useListMenuSelf)] select GVAR(keyDownSelfAction)) then { - [(_sPos select 0) - (0.0095 * SafeZoneW), (_sPos select 1) - (0.0095 * SafeZoneW), 0.20 * SafeZoneW, 0.035 * SafeZoneW] + [(_sPos select 0) - (0.0095 * safeZoneW), (_sPos select 1) - (0.0095 * safeZoneW), 0.20 * safeZoneW, 0.035 * safeZoneW] } else { - [(_sPos select 0) - (0.0750 * SafeZoneW), (_sPos select 1) - (0.0095 * SafeZoneW), 0.15 * SafeZoneW, 0.100 * SafeZoneW] + [(_sPos select 0) - (0.0750 * safeZoneW), (_sPos select 1) - (0.0095 * safeZoneW), 0.15 * safeZoneW, 0.100 * safeZoneW] }; diff --git a/addons/interact_menu/functions/fnc_renderSelector.sqf b/addons/interact_menu/functions/fnc_renderSelector.sqf index bf719299244..27170d9fa83 100644 --- a/addons/interact_menu/functions/fnc_renderSelector.sqf +++ b/addons/interact_menu/functions/fnc_renderSelector.sqf @@ -22,8 +22,8 @@ if(GVAR(iconCount) > (count GVAR(iconCtrls))-1) then { private _displayNum = [[46, 12] select visibleMap,91919] select (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]); GVAR(iconCtrls) pushBack ((findDisplay _displayNum) ctrlCreate ["RscStructuredText", 54021+GVAR(iconCount)]); if (GVAR(useCursorMenu)) then { - ((finddisplay _displayNum) displayctrl (54021+GVAR(iconCount))) ctrlAddEventHandler ["MouseMoving", DFUNC(handleMouseMovement)]; - ((finddisplay _displayNum) displayctrl (54021+GVAR(iconCount))) ctrlAddEventHandler ["MouseButtonDown", DFUNC(handleMouseButtonDown)]; + ((findDisplay _displayNum) displayCtrl (54021+GVAR(iconCount))) ctrlAddEventHandler ["MouseMoving", DFUNC(handleMouseMovement)]; + ((findDisplay _displayNum) displayCtrl (54021+GVAR(iconCount))) ctrlAddEventHandler ["MouseButtonDown", DFUNC(handleMouseButtonDown)]; }; }; @@ -31,10 +31,10 @@ private _ctrl = GVAR(iconCtrls) select GVAR(iconCount); private _pos = if (GVAR(UseListMenu)) then { [_ctrl, GVAR(iconCount), format ["", _icon, GVAR(selectorColorHex)]] call FUNC(ctrlSetParsedTextCached); - [(_sPos select 0)-(0.014*SafeZoneW), (_sPos select 1)-(0.014*SafeZoneW), 0.05*SafeZoneW, 0.035*SafeZoneW] + [(_sPos select 0)-(0.014*safeZoneW), (_sPos select 1)-(0.014*safeZoneW), 0.05*safeZoneW, 0.035*safeZoneW] } else { [_ctrl, GVAR(iconCount), format ["", _icon, GVAR(selectorColorHex)]] call FUNC(ctrlSetParsedTextCached); - [(_sPos select 0)-(0.050*SafeZoneW), (_sPos select 1)-(0.014*SafeZoneW), 0.1*SafeZoneW, 0.035*SafeZoneW] + [(_sPos select 0)-(0.050*safeZoneW), (_sPos select 1)-(0.014*safeZoneW), 0.1*safeZoneW, 0.035*safeZoneW] }; GVAR(iconCount) = GVAR(iconCount) + 1; diff --git a/addons/interaction/RscTitles.hpp b/addons/interaction/RscTitles.hpp index ec7856c62cb..d2f2f0ef92c 100644 --- a/addons/interaction/RscTitles.hpp +++ b/addons/interaction/RscTitles.hpp @@ -13,8 +13,8 @@ class ACE_Interaction_Button_Base { style = 2; x = 0; y = 0; - w = "2.0 / 16 * safezoneW"; - h = "0.3 / 9 * safezoneH"; + w = "2.0 / 16 * safeZoneW"; + h = "0.3 / 9 * safeZoneH"; offsetX = 0.003; offsetY = 0.003; diff --git a/addons/interaction/XEH_postInit.sqf b/addons/interaction/XEH_postInit.sqf index dc1c167d7c1..2bf3546f591 100644 --- a/addons/interaction/XEH_postInit.sqf +++ b/addons/interaction/XEH_postInit.sqf @@ -180,7 +180,7 @@ private _action = [ nil, nil, nil, nil, nil, { params ["_target", "", "", "_actionData"]; - _actionData set [1, format [localize "STR_ACTION_TAKE_BAG", getText (configfile >> "CfgWeapons" >> weaponCargo _target select 0 >> "displayName")]]; + _actionData set [1, format [localize "STR_ACTION_TAKE_BAG", getText (configFile >> "CfgWeapons" >> weaponCargo _target select 0 >> "displayName")]]; } ] call EFUNC(interact_menu,createAction); diff --git a/addons/interaction/dev/initReplaceTerrainCursorObject.sqf b/addons/interaction/dev/initReplaceTerrainCursorObject.sqf index 3f71954acb5..6dadf678b7c 100644 --- a/addons/interaction/dev/initReplaceTerrainCursorObject.sqf +++ b/addons/interaction/dev/initReplaceTerrainCursorObject.sqf @@ -49,7 +49,7 @@ DFUNC(replaceTerrainModelsAdd) = { [{ private _object = cursorObject; - if (isNull _object) exitwith {}; + if (isNull _object) exitWith {}; [_object, true, nil, nil, nil, true] call EFUNC(dragging,setCarryable); [_object, true, nil, nil, nil, true] call EFUNC(dragging,setDraggable); diff --git a/addons/interaction/functions/fnc_modifyJoinGroupAction.sqf b/addons/interaction/functions/fnc_modifyJoinGroupAction.sqf index eef77dfd37d..9eeda7ee3c4 100644 --- a/addons/interaction/functions/fnc_modifyJoinGroupAction.sqf +++ b/addons/interaction/functions/fnc_modifyJoinGroupAction.sqf @@ -20,7 +20,7 @@ params ["_target", "_player", "", "_actionData"]; -private _actionText = format ["%1: %2", localize LSTRING(JoinGroup), groupID group _target]; +private _actionText = format ["%1: %2", localize LSTRING(JoinGroup), groupId group _target]; TRACE_3("",_target,group _target,_actionText); _actionData set [1, _actionText]; diff --git a/addons/interaction/functions/fnc_openDoor.sqf b/addons/interaction/functions/fnc_openDoor.sqf index 11b9c67c918..f83cc88b1ec 100644 --- a/addons/interaction/functions/fnc_openDoor.sqf +++ b/addons/interaction/functions/fnc_openDoor.sqf @@ -89,9 +89,9 @@ GVAR(usedScrollWheel) = false; }; // this allows for holding the door in it's current state. - if (CBA_missionTime > _time && {diag_frameno > _frame}) then { + if (CBA_missionTime > _time && {diag_frameNo > _frame}) then { GVAR(usedScrollWheel) = true; }; // do incremental door opening {_house animate [_x, GVAR(doorTargetPhase)]} forEach _animations; -}, 0.1, [_house, _animations, getPosASL ACE_player, CBA_missionTime + 0.2, diag_frameno + 2, _door]] call CBA_fnc_addPerFrameHandler; +}, 0.1, [_house, _animations, getPosASL ACE_player, CBA_missionTime + 0.2, diag_frameNo + 2, _door]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/interaction/functions/fnc_passMagazine.sqf b/addons/interaction/functions/fnc_passMagazine.sqf index 87500785026..757700ce8ba 100644 --- a/addons/interaction/functions/fnc_passMagazine.sqf +++ b/addons/interaction/functions/fnc_passMagazine.sqf @@ -34,7 +34,7 @@ private _magToPassIndex = 0; _magToPass = _x; _magToPassIndex = _forEachIndex; }; -} foreach _filteredMags; +} forEach _filteredMags; //remove the magazine from _player and add it to _target _magToPass params ["_magToPassClassName", "_magToPassAmmoCount"]; diff --git a/addons/interaction/functions/fnc_renameGroup.sqf b/addons/interaction/functions/fnc_renameGroup.sqf index 4ffff5771a1..8ad606a1eb1 100644 --- a/addons/interaction/functions/fnc_renameGroup.sqf +++ b/addons/interaction/functions/fnc_renameGroup.sqf @@ -20,12 +20,12 @@ params [ ["_group", grpNull, [grpNull]], ["_newName", "", [""]] ]; -if (_newName isEqualTo (groupID _group)) exitWith {true}; +if (_newName isEqualTo (groupId _group)) exitWith {true}; private _lowerName = toLower _newName; // Case insensitive name search private _nameAlreadyTaken = allGroups findIf { side _x isEqualTo side _group - && {_lowerName isEqualTo toLower (groupID _x)} + && {_lowerName isEqualTo toLower (groupId _x)} && {_group != _x} } != -1; diff --git a/addons/interaction/functions/fnc_renameGroupUI.sqf b/addons/interaction/functions/fnc_renameGroupUI.sqf index 5d891b0cf8e..9e0973327da 100644 --- a/addons/interaction/functions/fnc_renameGroupUI.sqf +++ b/addons/interaction/functions/fnc_renameGroupUI.sqf @@ -21,7 +21,7 @@ private _display = findDisplay 46 createDisplay QGVAR(groupNameDisplay); private _textCtrl = _display displayCtrl 451; - _textCtrl ctrlSetText (groupID group _unit); + _textCtrl ctrlSetText (groupId group _unit); _display setVariable [QGVAR(renamedGroup), group _unit]; _display displayAddEventHandler ["Unload", { params ["_display", "_exitCode"]; diff --git a/addons/interaction/groupRename_GUI.hpp b/addons/interaction/groupRename_GUI.hpp index 20684b0e463..977b9b3efda 100644 --- a/addons/interaction/groupRename_GUI.hpp +++ b/addons/interaction/groupRename_GUI.hpp @@ -1,4 +1,4 @@ -#define FONT_H (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) +#define FONT_H (((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 1) #define FONT_W (FONT_H / pixelH * pixelW) #define GAP_W (pixelW * 2) #define GAP_H (pixelH * 2) diff --git a/addons/inventory/RscDisplayInventory.hpp b/addons/inventory/RscDisplayInventory.hpp index 91e68f5fb1c..06752dcfec5 100644 --- a/addons/inventory/RscDisplayInventory.hpp +++ b/addons/inventory/RscDisplayInventory.hpp @@ -17,13 +17,13 @@ class RscStructuredText; class RscActiveText; class RscCombo; -#define X_BIS(num) (num * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)) -#define Y_BIS(num) (num * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)) -#define W_BIS(num) (num * (((safezoneW / safezoneH) min 1.2) / 40)) -#define H_BIS(num) (num * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)) +#define X_BIS(num) (num * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)) +#define Y_BIS(num) (num * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)) +#define W_BIS(num) (num * (((safeZoneW / safeZoneH) min 1.2) / 40)) +#define H_BIS(num) (num * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)) -#define X_MAKEITBIGGA(num) (num * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)) -#define Y_MAKEITBIGGA(num) (num * (safeZoneH / 30) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)) +#define X_MAKEITBIGGA(num) (num * (safeZoneH / 40) + (safeZoneX + (safeZoneW - safeZoneH)/2)) +#define Y_MAKEITBIGGA(num) (num * (safeZoneH / 30) + (safeZoneY + (safeZoneH - (safeZoneH / 1.2))/2)) #define W_MAKEITBIGGA(num) (num * (safeZoneH / 40)) #define H_MAKEITBIGGA(num) (num * (safeZoneH / 30)) diff --git a/addons/javelin/functions/fnc_getTarget.sqf b/addons/javelin/functions/fnc_getTarget.sqf index 6fd4686eb8d..926e400a18b 100644 --- a/addons/javelin/functions/fnc_getTarget.sqf +++ b/addons/javelin/functions/fnc_getTarget.sqf @@ -20,8 +20,8 @@ params ["_lastTarget", "_maxRange"]; scopeName "main"; -private _viewASL = AGLtoASL positionCameraToWorld [0,0,0]; -private _viewDir = _viewASL vectorFromTo (AGLtoASL positionCameraToWorld [0,0,1]); +private _viewASL = AGLToASL positionCameraToWorld [0,0,0]; +private _viewDir = _viewASL vectorFromTo (AGLToASL positionCameraToWorld [0,0,1]); // Attempt to lock onto current target if it is still valid if (!isNull _lastTarget) then { @@ -65,7 +65,7 @@ if ((cursorTarget isKindOf "AllVehicles") && {(cursorObject distance ace_player) // Attempt to scan using multiple rayscasts - This is expensive (n^2) and care should be given to balance accuracy vs speed for "_xOffset" from -14 to 14 step 2 do { for "_yOffset" from -12 to 12 step 4 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]; // 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 isNotEqualTo []) then { diff --git a/addons/javelin/functions/fnc_mapHelperDraw.sqf b/addons/javelin/functions/fnc_mapHelperDraw.sqf index 4f7ac84b4a6..e8b917a933e 100644 --- a/addons/javelin/functions/fnc_mapHelperDraw.sqf +++ b/addons/javelin/functions/fnc_mapHelperDraw.sqf @@ -25,7 +25,7 @@ if (isNil QGVAR(arguments)) then { _currentShooter setVariable ["ace_missileguidance_target", nil, false]; GVAR(arguments) = [ - diag_frameno, // Last run frame + diag_frameNo, // Last run frame objNull, // currentTargetObject 0, // Lock Start Time 0, // Next Sound timer @@ -37,7 +37,7 @@ if (isNil QGVAR(arguments)) then { [{ if (isNull (uiNamespace getVariable ["ACE_RscOptics_javelin", displayNull])) exitWith {true}; GVAR(arguments) params ["_lastRunFrame"]; - (diag_frameno < _lastRunFrame) || {diag_frameno > (_lastRunFrame + 1)} + (diag_frameNo < _lastRunFrame) || {diag_frameNo > (_lastRunFrame + 1)} }, { TRACE_1("old/null display - ending optic draw",_this); private _fireDisabledEH = GVAR(arguments) param [4, -1]; diff --git a/addons/javelin/functions/fnc_onOpticDraw.sqf b/addons/javelin/functions/fnc_onOpticDraw.sqf index aacc4f5fa1f..9dfb7d2e484 100644 --- a/addons/javelin/functions/fnc_onOpticDraw.sqf +++ b/addons/javelin/functions/fnc_onOpticDraw.sqf @@ -53,7 +53,7 @@ if ((_ammoCount == 0) || // No ammo loaded __JavelinIGUISeek ctrlSetTextColor __ColorGray; _fireDisabledEH = [_fireDisabledEH] call FUNC(enableFire); - _this set [0, diag_frameno]; + _this set [0, diag_frameNo]; _this set [4, _fireDisabledEH]; // Fix weapon being in top-attack when loading AP magazine (https://feedback.bistudio.com/T171012) @@ -194,7 +194,7 @@ if (isNull _newTarget) then { }; // Save arguments for next run -_this set [0, diag_frameno]; +_this set [0, diag_frameNo]; _this set [1, _currentTarget]; _this set [2, _lockStartTime]; _this set [3, _soundNextPlayTime]; diff --git a/addons/javelin/script_component.hpp b/addons/javelin/script_component.hpp index 3e9ad4ebfc1..b5cf7bea3ce 100644 --- a/addons/javelin/script_component.hpp +++ b/addons/javelin/script_component.hpp @@ -18,7 +18,7 @@ // Javelin IGUI defines -#define __JavelinIGUI (uinamespace getVariable "ACE_RscOptics_javelin") +#define __JavelinIGUI (uiNamespace getVariable "ACE_RscOptics_javelin") // Custom controls #define __JavelinIGUITargeting (__JavelinIGUI displayCtrl 6999) diff --git a/addons/kestrel4500/RscTitles.hpp b/addons/kestrel4500/RscTitles.hpp index faae6a8f32b..ffb44de9132 100644 --- a/addons/kestrel4500/RscTitles.hpp +++ b/addons/kestrel4500/RscTitles.hpp @@ -64,7 +64,7 @@ class Kestrel4500_Display { SizeEX=0.025; idc=74000; style=48; - x="safezoneX"; + x="safeZoneX"; y = DIALOG_SAFE_Y(0); w="1.024"; h="1.024*4/3"; @@ -74,7 +74,7 @@ class Kestrel4500_Display { }; class POWER: Kestrel4500_RscButton { idc=-1; - x="safezoneX+0.385"; + x="safeZoneX+0.385"; y = DIALOG_SAFE_Y(1.125); w="0.042"; h="0.042*4/3"; @@ -83,7 +83,7 @@ class Kestrel4500_Display { }; class ENTER: POWER { idc=-1; - x="safezoneX+0.46"; + x="safeZoneX+0.46"; y = DIALOG_SAFE_Y(1.0); w=0.1; action=QUOTE(0 call FUNC(buttonPressed)); @@ -91,7 +91,7 @@ class Kestrel4500_Display { }; class TOP: Kestrel4500_RscButton { idc=-1; - x="safezoneX+0.46"; + x="safeZoneX+0.46"; y = DIALOG_SAFE_Y(0.93); w=0.1; h=0.03; @@ -106,7 +106,7 @@ class Kestrel4500_Display { }; class LEFT: Kestrel4500_RscButton { idc=-1; - x="safezoneX+0.4"; + x="safeZoneX+0.4"; y = DIALOG_SAFE_Y(0.97); w=0.046; h=0.11; @@ -115,13 +115,13 @@ class Kestrel4500_Display { }; class RIGHT: LEFT { idc=-1; - x="safezoneX+0.58"; + x="safeZoneX+0.58"; action=QUOTE(4 call FUNC(buttonPressed)); onMouseButtonDown = "playSound 'kestrel4500_right_button_click'"; }; class MEMORY: Kestrel4500_RscButton { idc=-1; - x="safezoneX+0.395"; + x="safeZoneX+0.395"; y = DIALOG_SAFE_Y(0.87); w=0.05; h="0.045*4/3"; @@ -129,13 +129,13 @@ class Kestrel4500_Display { }; class BACKLIGHT: MEMORY { idc=-1; - x="safezoneX+0.585"; + x="safeZoneX+0.585"; action=QUOTE(6 call FUNC(buttonPressed)); }; class TEXT_TOP: Kestrel4500_RscText { idc=74100; - x="safezoneX+0.40"; + x="safeZoneX+0.40"; y = DIALOG_SAFE_Y(0.58); w=0.22; h=0.04; @@ -236,7 +236,7 @@ class RscTitles { font="TahomaB"; SizeEX=".025*0.75"; style=48; - x="safezoneX+0.14"; + x="safeZoneX+0.14"; y = DISPLAY_SAFE_Y(0); w="0.512*0.75"; h="1.024*4/3*0.75"; @@ -246,7 +246,7 @@ class RscTitles { }; class RscTextTop: Kestrel4500_RscText { idc=75100; - x="safezoneX-0.05+0.40*0.75"; + x="safeZoneX-0.05+0.40*0.75"; y = DISPLAY_SAFE_Y(0.58*0.75); w="0.22*0.75"; h="0.04*0.75"; diff --git a/addons/kestrel4500/functions/fnc_generateOutputData.sqf b/addons/kestrel4500/functions/fnc_generateOutputData.sqf index 59bb3056dd1..1aeac9a182a 100644 --- a/addons/kestrel4500/functions/fnc_generateOutputData.sqf +++ b/addons/kestrel4500/functions/fnc_generateOutputData.sqf @@ -89,7 +89,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { private _monthString = localize (["str_january","str_february","str_march","str_april","str_may","str_june","str_july","str_august","str_september","str_october","str_november","str_december"] select (_month - 1)); _textTop = _dayString; _textCenter = format["%1 %2 %3", _day, _monthString, _year]; - _textBottomBig = [daytime, "HH:MM:SS"] call bis_fnc_timeToString; + _textBottomBig = [dayTime, "HH:MM:SS"] call bis_fnc_timeToString; }; case 1: { // Direction if (!GVAR(MinAvgMax)) then { @@ -105,7 +105,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { }; case 2: { // Wind SPD if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(_windSpeed * 10) / 10); + _textCenterBig = str(round(_windSpeed * 10) / 10); } else { _textCenterLine1Left = "Max"; _textCenterLine2Left = "Avg"; @@ -116,13 +116,13 @@ if (GVAR(referenceHeadingMenu) == 0) then { _textInfoLine2 = "- average"; }; case 1: { - _textCenterLine1Right = Str(round((GVAR(Max) select 2) * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 2) / (GVAR(Entries) select 2) * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Max) select 2) * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 2) / (GVAR(Entries) select 2) * 10) / 10); _textInfoLine2 = "- stop"; }; case 2: { - _textCenterLine1Right = Str(round((GVAR(Max) select 2) * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 2) / (GVAR(Entries) select 2) * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Max) select 2) * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 2) / (GVAR(Entries) select 2) * 10) / 10); _textInfoLine2 = "- clear"; }; }; @@ -131,10 +131,10 @@ if (GVAR(referenceHeadingMenu) == 0) then { case 3: { // CROSSWIND if (!GVAR(MinAvgMax)) then { if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { - _textCenterBig = Str(round(abs(sin(GVAR(RefHeading) - _playerDir) * _windSpeed) * 10) / 10); + _textCenterBig = str(round(abs(sin(GVAR(RefHeading) - _playerDir) * _windSpeed) * 10) / 10); _textInfoLine1 = format["%1 m/s @ %2", round(_windSpeed * 10) / 10, round(_playerDir)]; } else { - _textCenterBig = Str(round(abs(sin(GVAR(RefHeading) - _windDir) * _windSpeed) * 10) / 10); + _textCenterBig = str(round(abs(sin(GVAR(RefHeading) - _windDir) * _windSpeed) * 10) / 10); _textInfoLine1 = format["%1 m/s @ %2", round(_windSpeed * 10) / 10, round(180 + _windDir)]; }; _textInfoLine2 = "- set heading"; @@ -148,13 +148,13 @@ if (GVAR(referenceHeadingMenu) == 0) then { _textInfoLine2 = "- average"; }; case 1: { - _textCenterLine1Right = Str(round((GVAR(Max) select 3) * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 3) / (GVAR(Entries) select 3) * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Max) select 3) * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 3) / (GVAR(Entries) select 3) * 10) / 10); _textInfoLine2 = "- stop"; }; case 2: { - _textCenterLine1Right = Str(round((GVAR(Max) select 3) * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 3) / (GVAR(Entries) select 3) * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Max) select 3) * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 3) / (GVAR(Entries) select 3) * 10) / 10); _textInfoLine2 = "- clear"; }; }; @@ -163,10 +163,10 @@ if (GVAR(referenceHeadingMenu) == 0) then { case 4: { // HEADWIND if (!GVAR(MinAvgMax)) then { if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { - _textCenterBig = Str(round(cos(GVAR(RefHeading) - _playerDir) * _windSpeed * 10) / 10); + _textCenterBig = str(round(cos(GVAR(RefHeading) - _playerDir) * _windSpeed * 10) / 10); _textInfoLine1 = format["%1 m/s @ %2", round(_windSpeed * 10) / 10, round(_playerDir)]; } else { - _textCenterBig = Str(round(-cos(GVAR(RefHeading) - _windDir) * _windSpeed * 10) / 10); + _textCenterBig = str(round(-cos(GVAR(RefHeading) - _windDir) * _windSpeed * 10) / 10); _textInfoLine1 = format["%1 m/s @ %2", round(_windSpeed * 10) / 10, round(180 + _windDir)]; }; _textInfoLine2 = "- set heading"; @@ -180,13 +180,13 @@ if (GVAR(referenceHeadingMenu) == 0) then { _textInfoLine2 = "- average"; }; case 1: { - _textCenterLine1Right = Str(round((GVAR(Max) select 4) * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 4) / (GVAR(Entries) select 4) * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Max) select 4) * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 4) / (GVAR(Entries) select 4) * 10) / 10); _textInfoLine2 = "- stop"; }; case 2: { - _textCenterLine1Right = Str(round((GVAR(Max) select 4) * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 4) / (GVAR(Entries) select 4) * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Max) select 4) * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 4) / (GVAR(Entries) select 4) * 10) / 10); _textInfoLine2 = "- clear"; }; }; @@ -194,124 +194,124 @@ if (GVAR(referenceHeadingMenu) == 0) then { }; case 5: { // TEMP if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(_temperature * 10) / 10); + _textCenterBig = str(round(_temperature * 10) / 10); } else { _textCenterLine1Left = "Min"; _textCenterLine2Left = "Avg"; _textCenterLine3Left = "Max"; - _textCenterLine1Right = Str(round((GVAR(Min) select 5) * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 5) / (GVAR(Entries) select 5) * 10) / 10); - _textCenterLine3Right = Str(round((GVAR(Max) select 5) * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Min) select 5) * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 5) / (GVAR(Entries) select 5) * 10) / 10); + _textCenterLine3Right = str(round((GVAR(Max) select 5) * 10) / 10); }; }; case 6: { // CHILL if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(_chill * 10) / 10); + _textCenterBig = str(round(_chill * 10) / 10); } else { _textCenterLine1Left = "Min"; _textCenterLine2Left = "Avg"; _textCenterLine3Left = "Max"; - _textCenterLine1Right = Str(round((GVAR(Min) select 6) * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 6) / (GVAR(Entries) select 6) * 10) / 10); - _textCenterLine3Right = Str(round((GVAR(Max) select 6) * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Min) select 6) * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 6) / (GVAR(Entries) select 6) * 10) / 10); + _textCenterLine3Right = str(round((GVAR(Max) select 6) * 10) / 10); }; }; case 7: { // HUMIDITY if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(_humidity * 100 * 10) / 10); + _textCenterBig = str(round(_humidity * 100 * 10) / 10); } else { _textCenterLine1Left = "Min"; _textCenterLine2Left = "Avg"; _textCenterLine3Left = "Max"; - _textCenterLine1Right = Str(round((GVAR(Min) select 7) * 100 * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 7) / (GVAR(Entries) select 7) * 100 * 10) / 10); - _textCenterLine3Right = Str(round((GVAR(Max) select 7) * 100 * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Min) select 7) * 100 * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 7) / (GVAR(Entries) select 7) * 100 * 10) / 10); + _textCenterLine3Right = str(round((GVAR(Max) select 7) * 100 * 10) / 10); }; }; case 8: { // HEAT INDEX if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(_heatIndex * 10) / 10); + _textCenterBig = str(round(_heatIndex * 10) / 10); } else { _textCenterLine1Left = "Min"; _textCenterLine2Left = "Avg"; _textCenterLine3Left = "Max"; - _textCenterLine1Right = Str(round((GVAR(Min) select 8) * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 8) / (GVAR(Entries) select 8) * 10) / 10); - _textCenterLine3Right = Str(round((GVAR(Max) select 8) * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Min) select 8) * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 8) / (GVAR(Entries) select 8) * 10) / 10); + _textCenterLine3Right = str(round((GVAR(Max) select 8) * 10) / 10); }; }; case 9: { // DEW POINT if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(_dewPoint * 10) / 10); + _textCenterBig = str(round(_dewPoint * 10) / 10); } else { _textCenterLine1Left = "Min"; _textCenterLine2Left = "Avg"; _textCenterLine3Left = "Max"; - _textCenterLine1Right = Str(round((GVAR(Min) select 9) * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 9) / (GVAR(Entries) select 9) * 10) / 10); - _textCenterLine3Right = Str(round((GVAR(Max) select 9) * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Min) select 9) * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 9) / (GVAR(Entries) select 9) * 10) / 10); + _textCenterLine3Right = str(round((GVAR(Max) select 9) * 10) / 10); }; }; case 10: { // WET BULB if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(_wetBulb * 10) / 10); + _textCenterBig = str(round(_wetBulb * 10) / 10); } else { _textCenterLine1Left = "Min"; _textCenterLine2Left = "Avg"; _textCenterLine3Left = "Max"; - _textCenterLine1Right = Str(round((GVAR(Min) select 10) * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 10) / (GVAR(Entries) select 10) * 10) / 10); - _textCenterLine3Right = Str(round((GVAR(Max) select 10) * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Min) select 10) * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 10) / (GVAR(Entries) select 10) * 10) / 10); + _textCenterLine3Right = str(round((GVAR(Max) select 10) * 10) / 10); }; }; case 11: { // BARO if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(_barometricPressure * 10) / 10); + _textCenterBig = str(round(_barometricPressure * 10) / 10); } else { _textCenterLine1Left = "Min"; _textCenterLine2Left = "Avg"; _textCenterLine3Left = "Max"; - _textCenterLine1Right = Str(round((GVAR(Min) select 11) * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 11) / (GVAR(Entries) select 11) * 10) / 10); - _textCenterLine3Right = Str(round((GVAR(Max) select 11) * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Min) select 11) * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 11) / (GVAR(Entries) select 11) * 10) / 10); + _textCenterLine3Right = str(round((GVAR(Max) select 11) * 10) / 10); }; }; case 12: { // ALTITUDE if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(EGVAR(common,mapAltitude) + _playerAltitude)); + _textCenterBig = str(round(EGVAR(common,mapAltitude) + _playerAltitude)); } else { _textCenterLine1Left = "Min"; _textCenterLine2Left = "Avg"; _textCenterLine3Left = "Max"; - _textCenterLine1Right = Str(round(GVAR(Min) select 12)); - _textCenterLine2Right = Str(round((GVAR(Total) select 12) / (GVAR(Entries) select 12))); - _textCenterLine3Right = Str(round(GVAR(Max) select 12)); + _textCenterLine1Right = str(round(GVAR(Min) select 12)); + _textCenterLine2Right = str(round((GVAR(Total) select 12) / (GVAR(Entries) select 12))); + _textCenterLine3Right = str(round(GVAR(Max) select 12)); }; }; case 13: { // DENSITY ALTITUDE if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(_densityAltitude)); + _textCenterBig = str(round(_densityAltitude)); } else { _textCenterLine1Left = "Min"; _textCenterLine2Left = "Avg"; _textCenterLine3Left = "Max"; - _textCenterLine1Right = Str(round(GVAR(Min) select 13)); - _textCenterLine2Right = Str(round((GVAR(Total) select 13) / (GVAR(Entries) select 13))); - _textCenterLine3Right = Str(round(GVAR(Max) select 13)); + _textCenterLine1Right = str(round(GVAR(Min) select 13)); + _textCenterLine2Right = str(round((GVAR(Total) select 13) / (GVAR(Entries) select 13))); + _textCenterLine3Right = str(round(GVAR(Max) select 13)); }; }; case 14: { // User Screen 1 - _textCenterLine1Left = Str(round(_playerDir)); - _textCenterLine2Left = Str(round(EGVAR(common,mapAltitude) + _playerAltitude)); - _textCenterLine3Left = Str(round(abs(_windSpeed) * 10) / 10); + _textCenterLine1Left = str(round(_playerDir)); + _textCenterLine2Left = str(round(EGVAR(common,mapAltitude) + _playerAltitude)); + _textCenterLine3Left = str(round(abs(_windSpeed) * 10) / 10); _textCenterLine1Right = GVAR(Directions) select GVAR(Direction); _textCenterLine2Right = "m"; _textCenterLine3Right = "m/s"; }; case 15: { // User Screen 2 - _textCenterLine1Left = Str(round(_temperature * 10) / 10); - _textCenterLine2Left = Str(round(_humidity * 100 * 10) / 10); - _textCenterLine3Left = Str(round((_playerAltitude call EFUNC(weather,calculateBarometricPressure)) * 10) / 10); + _textCenterLine1Left = str(round(_temperature * 10) / 10); + _textCenterLine2Left = str(round(_humidity * 100 * 10) / 10); + _textCenterLine3Left = str(round((_playerAltitude call EFUNC(weather,calculateBarometricPressure)) * 10) / 10); _textCenterLine1Right = "C"; _textCenterLine2Right = "%"; _textCenterLine3Right = "hPA"; @@ -322,7 +322,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { switch (GVAR(referenceHeadingMenu)) do { case 1: { _textCenterLine1 = "MAGNETIC HEADING"; - _textCenterLine2 = Str(round(GVAR(RefHeading))); + _textCenterLine2 = str(round(GVAR(RefHeading))); _textCenterLine3 = "Auto Set "; _textCenterLine4 = "Manual Set "; _textCenterLine5 = "================"; @@ -330,7 +330,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { }; case 2: { _textCenterLine1 = "MAGNETIC HEADING"; - _textCenterLine2 = Str(round(_playerDir)); + _textCenterLine2 = str(round(_playerDir)); _textCenterLine3 = "Point Down the"; _textCenterLine4 = "Runway or Range"; _textCenterLine5 = "================"; @@ -338,7 +338,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { }; case 3: { _textCenterLine1 = "MAGNETIC HEADING"; - _textCenterLine2 = Str(round(GVAR(TmpHeading))); + _textCenterLine2 = str(round(GVAR(TmpHeading))); _textCenterLine3 = "Press < and >"; _textCenterLine4 = "to Adjust"; _textCenterLine5 = "================"; diff --git a/addons/killtracker/XEH_postInit.sqf b/addons/killtracker/XEH_postInit.sqf index 35050d1dc30..bf944c930e0 100644 --- a/addons/killtracker/XEH_postInit.sqf +++ b/addons/killtracker/XEH_postInit.sqf @@ -16,7 +16,7 @@ * Public: No */ -if ((getText (missionconfigfile >> "CfgDebriefingSections" >> QUOTE(XADDON) >> "variable")) != QXGVAR(outputText)) exitWith { +if ((getText (missionConfigFile >> "CfgDebriefingSections" >> QUOTE(XADDON) >> "variable")) != QXGVAR(outputText)) exitWith { TRACE_1("no mission debriefing config",_this); }; @@ -65,7 +65,7 @@ GVAR(killCount) = 0; private _killInfo = []; if (!isNull _killer) then { - if !(_killer isKindof "CAManBase") then { // If killer is a vehicle log the vehicle type + if !(_killer isKindOf "CAManBase") then { // If killer is a vehicle log the vehicle type _killInfo pushBack format [LLSTRING(Vehicle), getText ((configOf _killer) >> "displayName")]; }; if (isNull _instigator) then { diff --git a/addons/laser/RscTitles.hpp b/addons/laser/RscTitles.hpp index 7421246181b..c63b601ab77 100644 --- a/addons/laser/RscTitles.hpp +++ b/addons/laser/RscTitles.hpp @@ -9,10 +9,10 @@ class RscTitles { class controls { class ModeControlGroup: RscControlsGroupNoScrollbars { idc = IDC_MODECONTROLGROUP; - x = "3.8 * (((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable ['IGUI_GRID_WEAPON_X',((safezoneX + safezoneW) - (10 * (((safezoneW / safezoneH) min 1.2) / 40)) - 4.3 * (((safezoneW / safezoneH) min 1.2) / 40))])"; - y = "2.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getVariable ['IGUI_GRID_WEAPON_Y', (safezoneY + 0.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])"; - w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "3.8 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (profilenamespace getvariable ['IGUI_GRID_WEAPON_X',((safeZoneX + safeZoneW) - (10 * (((safeZoneW / safeZoneH) min 1.2) / 40)) - 4.3 * (((safeZoneW / safeZoneH) min 1.2) / 40))])"; + y = "2.5 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (profilenamespace getVariable ['IGUI_GRID_WEAPON_Y', (safeZoneY + 0.5 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25))])"; + w = "10 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; class controls { class AttackMode: RscText { @@ -21,29 +21,29 @@ class RscTitles { colorBackground[] = {0, 0, 0, 0}; x = "0"; y = "0"; - w = "(2.6) * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - sizeEx = "0.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + w = "(2.6) * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + sizeEx = "0.8 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; }; class LaserCode: RscText { idc = IDC_LASERCODE; colorText[] = {1, 1, 1, 1}; colorBackground[] = {0, 0, 0, 0}; - x = "(3.6) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "(3.6) * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; y = "0"; - w = "(2.5) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - h = "(1) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - sizeEx = "0.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + w = "(2.5) * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + h = "(1) * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + sizeEx = "0.8 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; }; class LaserIcon: RscPictureKeepAspect { idc = IDC_LASERICON; colorText[] = {1, 0, 0, 1}; colorBackground[] = {0, 0, 0, 0}; text = "\a3\Ui_F_Curator\Data\CfgCurator\laser_ca.paa"; - x = "(6.1) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "(6.1) * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; y = "0"; - w = "(1) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - h = "(1) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + w = "(1) * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + h = "(1) * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; }; }; }; diff --git a/addons/laser/functions/fnc_dev_drawVisibleLaserTargets.sqf b/addons/laser/functions/fnc_dev_drawVisibleLaserTargets.sqf index 4c57a613252..294a0262385 100644 --- a/addons/laser/functions/fnc_dev_drawVisibleLaserTargets.sqf +++ b/addons/laser/functions/fnc_dev_drawVisibleLaserTargets.sqf @@ -35,8 +35,8 @@ private _testSeekerDir = vectorDirVisual _seekerVehicle; private _resultPos = _results select 0; if (!isNil "_resultPos") then { // Draw lock results - drawLine3D [ASLtoAGL _testSeekerPosASL, ASLtoAGL _resultPos, [0,0,1,1]]; - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [0,0,1,1], (ASLtoAGL _resultPos), 1.5, 1.5, 45, format ["%1 from %2", _code, _results select 1], 0.5, 0.025, "TahomaB"]; + drawLine3D [ASLToAGL _testSeekerPosASL, ASLToAGL _resultPos, [0,0,1,1]]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [0,0,1,1], (ASLToAGL _resultPos), 1.5, 1.5, 45, format ["%1 from %2", _code, _results select 1], 0.5, 0.025, "TahomaB"]; }; } forEach [ACE_DEFAULT_LASER_CODE, 1688]; // Scan at codes 1111 and 1688 @@ -51,29 +51,29 @@ private _testSeekerDir = vectorDirVisual _seekerVehicle; if (_laserMethod isEqualTo QFUNC(findLaserSource)) then { // Normal vanilla laserTarget func private _targetObject = _obj getVariable [QGVAR(targetObject), objNull]; private _targetPosASL = getPosASL _targetObject; - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,0,0,1], (ASLtoAGL _targetPosASL), 0.5, 0.5, 0, "", 0.5, 0.025, "TahomaB"]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,0,0,1], (ASLToAGL _targetPosASL), 0.5, 0.5, 0, "", 0.5, 0.025, "TahomaB"]; (_y call FUNC(findLaserSource)) params ["_laserPosASL", "_laserDir"]; private _resultsRay = [_laserPosASL, _laserDir, _obj] call FUNC(shootRay); private _rayPos = _resultsRay select 0; if (isNil "_rayPos") then { - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,0,0,1], (ASLtoAGL _targetPosASL), 2, 2, 0, "Nil Ray", 0.5, 0.025, "TahomaB"]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,0,0,1], (ASLToAGL _targetPosASL), 2, 2, 0, "Nil Ray", 0.5, 0.025, "TahomaB"]; } else { private _diff = _rayPos vectorDistance (getPosASL _targetObject); // Diff from ray position compared to actual - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,0,0,1], (ASLtoAGL _rayPos), 2, 2, 0, format ["Diff %1",_diff], 0.5, 0.025, "TahomaB"]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,0,0,1], (ASLToAGL _rayPos), 2, 2, 0, format ["Diff %1",_diff], 0.5, 0.025, "TahomaB"]; }; }; // Draw array weapon lasers [YELLOW] if ((_laserMethod isEqualType []) && {(count _laserMethod) == 2}) then { _laserMethod params ["_modelPosition", "_weaponName"]; private _laserPosASL = _obj modelToWorldVisualWorld _modelPosition; - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,1,0,1], (ASLtoAGL _laserPosASL), 0.5, 0.5, 0, _weaponName, 0.5, 0.025, "TahomaB"]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,1,0,1], (ASLToAGL _laserPosASL), 0.5, 0.5, 0, _weaponName, 0.5, 0.025, "TahomaB"]; private _laserDir = _obj weaponDirection _weaponName; private _resultsRay = [_laserPosASL, _laserDir, _obj] call FUNC(shootRay); private _rayPos = _resultsRay select 0; if (!isNil "_rayPos") then { - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,1,0,1], (ASLtoAGL _rayPos), 2, 2, 0, _weaponName, 0.5, 0.025, "TahomaB"]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,1,0,1], (ASLToAGL _rayPos), 2, 2, 0, _weaponName, 0.5, 0.025, "TahomaB"]; }; }; } forEach GVAR(laserEmitters); diff --git a/addons/laser/functions/fnc_handleLaserTargetCreation.sqf b/addons/laser/functions/fnc_handleLaserTargetCreation.sqf index f7db74793fb..4d5a7164b75 100644 --- a/addons/laser/functions/fnc_handleLaserTargetCreation.sqf +++ b/addons/laser/functions/fnc_handleLaserTargetCreation.sqf @@ -22,13 +22,13 @@ TRACE_1("params",_this); // Only handle locally created lasers if(!(local _targetObject)) exitWith {TRACE_1("not local",_targetObject);}; - private _owners = allUnits select {(lasertarget _x) == _targetObject}; + private _owners = allUnits select {(laserTarget _x) == _targetObject}; if (count _owners == 1) exitWith { TRACE_2("Laser target owner [allUnits]",_targetObject,_owners select 0); [_targetObject, _owners select 0] call FUNC(addLaserTarget); }; - _owners = vehicles select {(lasertarget _x) == _targetObject}; + _owners = vehicles select {(laserTarget _x) == _targetObject}; if (count _owners == 1) exitWith { TRACE_2("Laser target owner [vehicles]",_targetObject,_owners select 0); [_targetObject, _owners select 0] call FUNC(addLaserTarget); diff --git a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf index a14b3a8b183..cf805f7496f 100644 --- a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf +++ b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf @@ -192,10 +192,10 @@ END_COUNTER(seekerFindLaserSpot); #ifdef DRAW_LASER_INFO if (isNil "_finalPos") then { - drawIcon3D ["\A3\ui_f\data\map\vehicleicons\iconMan_ca.paa", [0.9,1,0,1], (ASLtoAGL _posASL), 1, 1, 0, format ["Seeker: %1", _seekerCode], 0.5, 0.025, "TahomaB"]; + drawIcon3D ["\A3\ui_f\data\map\vehicleicons\iconMan_ca.paa", [0.9,1,0,1], (ASLToAGL _posASL), 1, 1, 0, format ["Seeker: %1", _seekerCode], 0.5, 0.025, "TahomaB"]; } else { - drawIcon3D ["\A3\ui_f\data\map\vehicleicons\iconManAT_ca.paa", [0.5,1,0,1], (ASLtoAGL _posASL), 1, 1, 0, format ["Seeker: %1", _seekerCode], 0.5, 0.025, "TahomaB"]; - drawLine3D [ASLtoAGL _posASL, ASLtoAGL _finalPos, [0.5,1,0,1]]; + drawIcon3D ["\A3\ui_f\data\map\vehicleicons\iconManAT_ca.paa", [0.5,1,0,1], (ASLToAGL _posASL), 1, 1, 0, format ["Seeker: %1", _seekerCode], 0.5, 0.025, "TahomaB"]; + drawLine3D [ASLToAGL _posASL, ASLToAGL _finalPos, [0.5,1,0,1]]; }; #endif diff --git a/addons/laser/functions/fnc_shootRay.sqf b/addons/laser/functions/fnc_shootRay.sqf index 862e972dd1b..9b8341909c3 100644 --- a/addons/laser/functions/fnc_shootRay.sqf +++ b/addons/laser/functions/fnc_shootRay.sqf @@ -48,8 +48,8 @@ TRACE_3("",_resultPos,_distance,_intersects); #ifdef DRAW_LASER_INFO if (!isNil "_resultPos") then { private _text = [_distance, 4, 0] call CBA_fnc_formatNumber; - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0, 1, 0, 1], ASLtoAGL _resultPos, 0.5, 0.5, 0, _text, 0.4, 0.025, "TahomaB"]; - drawLine3D [ASLtoAGL _posASL, ASLtoAGL _resultPos, [0,1,0,1]]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0, 1, 0, 1], ASLToAGL _resultPos, 0.5, 0.5, 0, _text, 0.4, 0.025, "TahomaB"]; + drawLine3D [ASLToAGL _posASL, ASLToAGL _resultPos, [0,1,0,1]]; }; #endif diff --git a/addons/laser/functions/fnc_showVehicleHud.sqf b/addons/laser/functions/fnc_showVehicleHud.sqf index 35120a294d6..856030bf8cb 100644 --- a/addons/laser/functions/fnc_showVehicleHud.sqf +++ b/addons/laser/functions/fnc_showVehicleHud.sqf @@ -68,7 +68,7 @@ GVAR(pfID) = [{ if (_adjustDown) then { private _ctrl = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl IDC_MODECONTROLGROUP; private _pos = ctrlPosition _ctrl; - _pos set [1, (_pos select 1) + ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)]; + _pos set [1, (_pos select 1) + ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)]; _ctrl ctrlSetPosition _pos; _ctrl ctrlCommit 0; }; diff --git a/addons/map/config.cpp b/addons/map/config.cpp index 943a63c228e..a4d086d6029 100644 --- a/addons/map/config.cpp +++ b/addons/map/config.cpp @@ -119,16 +119,16 @@ class RscDisplayDiary { onButtonClick = ""; }; class CA_PlayerName: RscText { - x = "2 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; + x = "2 * ( ((safeZoneW / safeZoneH) min 1.2) / 40)"; }; class ProfilePicture: RscPicture { - x = "13.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; + x = "13.5 * ( ((safeZoneW / safeZoneH) min 1.2) / 40)"; }; class ProfileBackground: RscText { - x = "13.3 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; + x = "13.3 * ( ((safeZoneW / safeZoneH) min 1.2) / 40)"; }; class Separator1: RscPicture { - x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; + x = "14.5 * ( ((safeZoneW / safeZoneH) min 1.2) / 40)"; }; }; }; diff --git a/addons/map_gestures/functions/fnc_addGroupColorMapping.sqf b/addons/map_gestures/functions/fnc_addGroupColorMapping.sqf index f533f9df345..c5577fb7e88 100644 --- a/addons/map_gestures/functions/fnc_addGroupColorMapping.sqf +++ b/addons/map_gestures/functions/fnc_addGroupColorMapping.sqf @@ -22,7 +22,7 @@ if (!params [["_group", "", [grpNull, ""]], ["_leadColor", [1,1,1,1], [[]], 4], }; TRACE_3("params",_group,_leadColor,_unitColor); -if (_group isEqualType grpNull) then {_group = groupID _group}; +if (_group isEqualType grpNull) then {_group = groupId _group}; if (_group == "") exitWith {ERROR("Group ID is blank, which is not valid.")}; if !([_leadColor] call FUNC(isValidColorArray)) exitWith {ERROR("leadColor is not a valid color array.")}; diff --git a/addons/map_gestures/functions/fnc_drawMapGestures.sqf b/addons/map_gestures/functions/fnc_drawMapGestures.sqf index 0a69c1924b8..35b462910a8 100644 --- a/addons/map_gestures/functions/fnc_drawMapGestures.sqf +++ b/addons/map_gestures/functions/fnc_drawMapGestures.sqf @@ -41,7 +41,7 @@ private _players = [_positions, FUNC(getProximityPlayers), missionNamespace, QGV }; // If color settings for the group exist, then use those, otherwise fall back to the default colors - private _colorMap = GVAR(GroupColorCfgMappingNew) getOrDefault [toLower groupID (group _x), [GVAR(defaultLeadColor), GVAR(defaultColor)]]; + private _colorMap = GVAR(GroupColorCfgMappingNew) getOrDefault [toLower groupId (group _x), [GVAR(defaultLeadColor), GVAR(defaultColor)]]; private _color = _colorMap select (_x != leader _x); TRACE_2("",_colorMap,_color); diff --git a/addons/map_gestures/functions/fnc_initDisplaySpectator.sqf b/addons/map_gestures/functions/fnc_initDisplaySpectator.sqf index dbbd31ae65c..7c1f09bbf53 100644 --- a/addons/map_gestures/functions/fnc_initDisplaySpectator.sqf +++ b/addons/map_gestures/functions/fnc_initDisplaySpectator.sqf @@ -23,11 +23,11 @@ _mapCtrl ctrlAddEventHandler ["Draw", { private _aceSpectatorFocus = missionNamespace getVariable [QEGVAR(spectator,camFocus), objNull]; if (!isNull _aceSpectatorFocus) then { - _targets pushback [_aceSpectatorFocus, GVAR(maxRange)]; + _targets pushBack [_aceSpectatorFocus, GVAR(maxRange)]; }; private _vanillaSpectatorFocus = uiNamespace getVariable ["RscEGSpectator_focus", objNull]; if (!isNull _vanillaSpectatorFocus) then { - _targets pushback [_vanillaSpectatorFocus, GVAR(maxRange)]; + _targets pushBack [_vanillaSpectatorFocus, GVAR(maxRange)]; }; [_this select 0, _targets] call FUNC(drawMapGestures); }]; diff --git a/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf b/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf index 782d8762a07..652edf8768b 100644 --- a/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf +++ b/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf @@ -73,11 +73,11 @@ switch (true) do { GVAR(freeDrawingData) = ["left", _currentMousePos, _currentMousePos]; } else { if ((GVAR(freeDrawingData) select 0) == "left") then { // We are already drawing on this line, find best spot - if ((_currentMousePos distance2d _posTopLeft) < ((GVAR(freeDrawingData) select 1) distance2d _posTopLeft)) then { + if ((_currentMousePos distance2D _posTopLeft) < ((GVAR(freeDrawingData) select 1) distance2D _posTopLeft)) then { GVAR(freeDrawingData) set [1, _currentMousePos]; }; - if ((_currentMousePos distance2d _posBottomLeft) < ((GVAR(freeDrawingData) select 2) distance2d _posBottomLeft)) then { + if ((_currentMousePos distance2D _posBottomLeft) < ((GVAR(freeDrawingData) select 2) distance2D _posBottomLeft)) then { GVAR(freeDrawingData) set [2, _currentMousePos]; }; }; @@ -95,11 +95,11 @@ switch (true) do { GVAR(freeDrawingData) = ["top", _currentMousePos, _currentMousePos]; } else { if ((GVAR(freeDrawingData) select 0) == "top") then { // We are already drawing on this line, find best spot - if ((_currentMousePos distance2d _posTopLeft) < ((GVAR(freeDrawingData) select 1) distance2d _posTopLeft)) then { + if ((_currentMousePos distance2D _posTopLeft) < ((GVAR(freeDrawingData) select 1) distance2D _posTopLeft)) then { GVAR(freeDrawingData) set [1, _currentMousePos]; }; - if ((_currentMousePos distance2d _posTopRight) < ((GVAR(freeDrawingData) select 2) distance2d _posTopRight)) then { + if ((_currentMousePos distance2D _posTopRight) < ((GVAR(freeDrawingData) select 2) distance2D _posTopRight)) then { GVAR(freeDrawingData) set [2, _currentMousePos]; }; }; @@ -117,11 +117,11 @@ switch (true) do { GVAR(freeDrawingData) = ["right", _currentMousePos, _currentMousePos]; } else { if ((GVAR(freeDrawingData) select 0) == "right") then { // We are already drawing on this line, find best spot - if ((_currentMousePos distance2d _posTopRight) < ((GVAR(freeDrawingData) select 1) distance2d _posTopRight)) then { + if ((_currentMousePos distance2D _posTopRight) < ((GVAR(freeDrawingData) select 1) distance2D _posTopRight)) then { GVAR(freeDrawingData) set [1, _currentMousePos]; }; - if ((_currentMousePos distance2d _posBottomRight) < ((GVAR(freeDrawingData) select 2) distance2d _posBottomRight)) then { + if ((_currentMousePos distance2D _posBottomRight) < ((GVAR(freeDrawingData) select 2) distance2D _posBottomRight)) then { GVAR(freeDrawingData) set [2, _currentMousePos]; }; }; @@ -139,11 +139,11 @@ switch (true) do { GVAR(freeDrawingData) = ["bottom", _currentMousePos, _currentMousePos]; } else { if ((GVAR(freeDrawingData) select 0) == "bottom") then { // We are already drawing on this line, find best spot - if ((_currentMousePos distance2d _posBottomLeft) < ((GVAR(freeDrawingData) select 1) distance2d _posBottomLeft)) then { + if ((_currentMousePos distance2D _posBottomLeft) < ((GVAR(freeDrawingData) select 1) distance2D _posBottomLeft)) then { GVAR(freeDrawingData) set [1, _currentMousePos]; }; - if ((_currentMousePos distance2d _posBottomRight) < ((GVAR(freeDrawingData) select 2) distance2d _posBottomRight)) then { + if ((_currentMousePos distance2D _posBottomRight) < ((GVAR(freeDrawingData) select 2) distance2D _posBottomRight)) then { GVAR(freeDrawingData) set [2, _currentMousePos]; }; }; diff --git a/addons/marker_flags/XEH_preStart.sqf b/addons/marker_flags/XEH_preStart.sqf index 2a2bc521616..e671b522a4c 100644 --- a/addons/marker_flags/XEH_preStart.sqf +++ b/addons/marker_flags/XEH_preStart.sqf @@ -2,5 +2,5 @@ #include "XEH_PREP.hpp" -private _weapons = (configProperties [configfile >> "CfgWeapons", QUOTE(isClass _x && {isText (_x >> QQGVAR(vehicle))}), true]) apply {configName _x}; +private _weapons = (configProperties [configFile >> "CfgWeapons", QUOTE(isClass _x && {isText (_x >> QQGVAR(vehicle))}), true]) apply {configName _x}; uiNamespace setVariable [QGVAR(flagItems), compileFinal str _weapons]; diff --git a/addons/markers/XEH_preInit.sqf b/addons/markers/XEH_preInit.sqf index 142dedb89a1..605920b7770 100644 --- a/addons/markers/XEH_preInit.sqf +++ b/addons/markers/XEH_preInit.sqf @@ -12,7 +12,7 @@ PREP_RECOMPILE_END; if (isNil QGVAR(MarkersCache)) then { GVAR(MarkersCache) = []; - private _config = configfile >> "CfgMarkers"; + private _config = configFile >> "CfgMarkers"; for "_a" from 0 to (count _config - 1) do { private _marker = _config select _a; @@ -31,7 +31,7 @@ if (isNil QGVAR(MarkersCache)) then { if (isNil QGVAR(MarkerColorsCache)) then { GVAR(MarkerColorsCache) = []; - private _config = configfile >> "CfgMarkerColors"; + private _config = configFile >> "CfgMarkerColors"; for "_a" from 0 to (count _config - 1) do { private _marker = _config select _a; diff --git a/addons/markers/functions/fnc_initInsertMarker.sqf b/addons/markers/functions/fnc_initInsertMarker.sqf index a102502b24c..2a3804959f2 100644 --- a/addons/markers/functions/fnc_initInsertMarker.sqf +++ b/addons/markers/functions/fnc_initInsertMarker.sqf @@ -19,7 +19,7 @@ #define BORDER 0.005 [{ - disableserialization; + disableSerialization; params ["_display"]; TRACE_1("params",_display); @@ -29,24 +29,24 @@ }; //BIS Controls: - private _text = _display displayctrl IDC_INSERT_MARKER; - private _picture = _display displayctrl IDC_INSERT_MARKER_PICTURE; - private _channel = _display displayctrl IDC_INSERT_MARKER_CHANNELS; - private _buttonOK = _display displayctrl IDC_OK; - private _buttonCancel = _display displayctrl IDC_CANCEL; - private _description = _display displayctrl 1100; - private _title = _display displayctrl 1001; - private _descriptionChannel = _display displayctrl 1101; + private _text = _display displayCtrl IDC_INSERT_MARKER; + private _picture = _display displayCtrl IDC_INSERT_MARKER_PICTURE; + private _channel = _display displayCtrl IDC_INSERT_MARKER_CHANNELS; + private _buttonOK = _display displayCtrl IDC_OK; + private _buttonCancel = _display displayCtrl IDC_CANCEL; + private _description = _display displayCtrl 1100; + private _title = _display displayCtrl 1001; + private _descriptionChannel = _display displayCtrl 1101; //ACE Controls: private _ctrlTimestamp = _display displayCtrl IDC_ACE_INSERT_MARKER_TIMESTAMP; private _ctrlTimestampText = _display displayCtrl IDC_ACE_INSERT_MARKER_TIMESTAMP_TEXT; - private _aceShapeLB = _display displayctrl IDC_ACE_INSERT_MARKER_SHAPE; - private _aceColorLB = _display displayctrl IDC_ACE_INSERT_MARKER_COLOR; - private _aceAngleSlider = _display displayctrl IDC_ACE_INSERT_MARKER_ANGLE; - private _aceAngleSliderText = _display displayctrl IDC_ACE_INSERT_MARKER_ANGLE_TEXT; - private _aceScaleSlider = _display displayctrl IDC_ACE_INSERT_MARKER_SCALE; - private _aceScaleSliderText = _display displayctrl IDC_ACE_INSERT_MARKER_SCALE_TEXT; + private _aceShapeLB = _display displayCtrl IDC_ACE_INSERT_MARKER_SHAPE; + private _aceColorLB = _display displayCtrl IDC_ACE_INSERT_MARKER_COLOR; + private _aceAngleSlider = _display displayCtrl IDC_ACE_INSERT_MARKER_ANGLE; + private _aceAngleSliderText = _display displayCtrl IDC_ACE_INSERT_MARKER_ANGLE_TEXT; + private _aceScaleSlider = _display displayCtrl IDC_ACE_INSERT_MARKER_SCALE; + private _aceScaleSliderText = _display displayCtrl IDC_ACE_INSERT_MARKER_SCALE_TEXT; private _mapDisplay = displayParent _display; if (isNull _mapDisplay) exitWith {ERROR("No Map");}; @@ -102,7 +102,7 @@ ctrlSetFocus _text; //--- Background - private _pos = ctrlposition _text; + private _pos = ctrlPosition _text; _pos params ["_posX", "_posY", "_posW", "_posH"]; _posX = _posX + 0.01; _posY = _posY min ((safeZoneH + safeZoneY) - (11 * _posH + 11 * BORDER)); //prevent buttons being placed below bottom edge of screen diff --git a/addons/markers/functions/fnc_mapDisplayInitEH.sqf b/addons/markers/functions/fnc_mapDisplayInitEH.sqf index e5242b9067c..6d26d3dab81 100644 --- a/addons/markers/functions/fnc_mapDisplayInitEH.sqf +++ b/addons/markers/functions/fnc_mapDisplayInitEH.sqf @@ -18,14 +18,14 @@ params ["_display"]; TRACE_1("params",_display); -private _bisShapeLB = _display displayctrl 1091; +private _bisShapeLB = _display displayCtrl 1091; private _curSelShape = missionNamespace getVariable [QGVAR(curSelMarkerShape), 0]; TRACE_2("shape",_bisShapeLB,_curSelShape); _bisShapeLB ctrlAddEventHandler ["LBSelChanged", {_this call FUNC(onLBSelChangedShape)}]; _bisShapeLB lbSetCurSel _curSelShape; -private _bisColorLB = _display displayctrl 1090; +private _bisColorLB = _display displayCtrl 1090; private _curSelColor = missionNamespace getVariable [QGVAR(curSelMarkerColor), 0]; TRACE_2("color",_bisColorLB,_curSelColor); _bisColorLB ctrlAddEventHandler ["LBSelChanged", {_this call FUNC(onLBSelChangedColor)}]; diff --git a/addons/markers/functions/fnc_placeMarker.sqf b/addons/markers/functions/fnc_placeMarker.sqf index fdd758be5e1..1899dff5fd5 100644 --- a/addons/markers/functions/fnc_placeMarker.sqf +++ b/addons/markers/functions/fnc_placeMarker.sqf @@ -35,7 +35,7 @@ if (_closeNum isEqualTo 1) then { private _newestMarkerDist = 1e10; { - private _distX = GVAR(currentMarkerPosition) distance2d (getMarkerPos _x); + private _distX = GVAR(currentMarkerPosition) distance2D (getMarkerPos _x); if (_distX < _newestMarkerDist) then { _newestMarker = _x; _newestMarkerDist = _distX; diff --git a/addons/markers/functions/fnc_setMarkerJIP.sqf b/addons/markers/functions/fnc_setMarkerJIP.sqf index 12dfe5de77d..fe4a1b68ae5 100644 --- a/addons/markers/functions/fnc_setMarkerJIP.sqf +++ b/addons/markers/functions/fnc_setMarkerJIP.sqf @@ -27,7 +27,7 @@ TRACE_2("params",_allMapMarkers,_allMapMarkersProperties); private _data = _allMapMarkersProperties select _index; _data params ["_markerClassname", "_colorClassname", "_pos", "_dir", "_scale"]; - private _config = (configfile >> "CfgMarkers") >> _markerClassname; + private _config = (configFile >> "CfgMarkers") >> _markerClassname; if (!isClass _config) then { WARNING("CfgMarker not found, changed to milDot"); @@ -36,7 +36,7 @@ TRACE_2("params",_allMapMarkers,_allMapMarkersProperties); _x setMarkerTypeLocal configName _config; - _config = configfile >> "CfgMarkerColors" >> _colorClassname; + _config = configFile >> "CfgMarkerColors" >> _colorClassname; if (!isClass _config) then { WARNING("CfgMarkerColors not found, changed to Default"); diff --git a/addons/markers/functions/fnc_setMarkerNetwork.sqf b/addons/markers/functions/fnc_setMarkerNetwork.sqf index 7d0cc0e8271..94c66f40789 100644 --- a/addons/markers/functions/fnc_setMarkerNetwork.sqf +++ b/addons/markers/functions/fnc_setMarkerNetwork.sqf @@ -21,7 +21,7 @@ params ["_marker", "_data"]; TRACE_2("params",_marker,_data); _data params ["_markerClassname", "_colorClassname", "_pos", "_dir", "_scale"]; -private _config = configfile >> "CfgMarkers" >> _markerClassname; +private _config = configFile >> "CfgMarkers" >> _markerClassname; if (!isClass _config) then { WARNING("CfgMarker not found, changed to milDot"); @@ -30,7 +30,7 @@ if (!isClass _config) then { _marker setMarkerTypeLocal configName _config; -_config = configfile >> "CfgMarkerColors" >> _colorClassname; +_config = configFile >> "CfgMarkerColors" >> _colorClassname; if (!isClass _config) then { WARNING("CfgMarkerColors not found, changed to Default"); diff --git a/addons/medical_ai/XEH_preStart.sqf b/addons/medical_ai/XEH_preStart.sqf index ccb92538b74..3782a3eab78 100644 --- a/addons/medical_ai/XEH_preStart.sqf +++ b/addons/medical_ai/XEH_preStart.sqf @@ -25,4 +25,4 @@ private _itemHash = createHashMap; ["morphine", ["morphine"]], ["epinephrine", ["epinephrine"]] ]; -uinamespace setVariable [QGVAR(itemHash), compileFinal _itemHash]; +uiNamespace setVariable [QGVAR(itemHash), compileFinal _itemHash]; diff --git a/addons/medical_ai/functions/fnc_addHealingCommandActions.sqf b/addons/medical_ai/functions/fnc_addHealingCommandActions.sqf index cc91ca7eb3c..9228cd3ad51 100644 --- a/addons/medical_ai/functions/fnc_addHealingCommandActions.sqf +++ b/addons/medical_ai/functions/fnc_addHealingCommandActions.sqf @@ -30,7 +30,7 @@ private _action = [ [ [ QGVAR(medicHeal_) + str _x, - format ["%1: (%2)", [_x, false, true] call EFUNC(common,getName), groupID _x], + format ["%1: (%2)", [_x, false, true] call EFUNC(common,getName), groupId _x], "", {}, {true}, @@ -41,7 +41,7 @@ private _action = [ [ [ QGVAR(healUnit_) + str _x, - format [localize "str_action_heal_soldier", ([_x, false, true] call EFUNC(common,getName)) + " (" + str groupID _x + ")"], + format [localize "str_action_heal_soldier", ([_x, false, true] call EFUNC(common,getName)) + " (" + str groupId _x + ")"], "", { (_this select 2) params ["_healer", "_target"]; diff --git a/addons/medical_damage/functions/fnc_debug_explosiveTest.sqf b/addons/medical_damage/functions/fnc_debug_explosiveTest.sqf index d17b268c157..a867a654707 100644 --- a/addons/medical_damage/functions/fnc_debug_explosiveTest.sqf +++ b/addons/medical_damage/functions/fnc_debug_explosiveTest.sqf @@ -34,7 +34,7 @@ params [ _distances params [["_min", 1], ["_max", 10], ["_step", 1]]; -if (isNil "_center") exitwith {}; +if (isNil "_center") exitWith {}; _max = _max max _min; private _nSteps = 0 max ceil ((_max - _min) / _step); diff --git a/addons/medical_engine/functions/fnc_handleDamage.sqf b/addons/medical_engine/functions/fnc_handleDamage.sqf index 168203366c2..95e48fcc3e4 100644 --- a/addons/medical_engine/functions/fnc_handleDamage.sqf +++ b/addons/medical_engine/functions/fnc_handleDamage.sqf @@ -94,7 +94,7 @@ if ( GET_NUMBER(_ammoCfg >> "explosive",0) > 0 || {GET_NUMBER(_ammoCfg >> "indirectHit",0) > 0} } -) exitwith { +) exitWith { TRACE_5("Vehicle hit",_unit,_shooter,_instigator,_damage,_newDamage); _unit setVariable [QEGVAR(medical,lastDamageSource), _shooter]; diff --git a/addons/medical_treatment/XEH_postInit.sqf b/addons/medical_treatment/XEH_postInit.sqf index 0752e67ddf4..63d2f7d0967 100644 --- a/addons/medical_treatment/XEH_postInit.sqf +++ b/addons/medical_treatment/XEH_postInit.sqf @@ -80,7 +80,7 @@ if (["ace_trenches"] call EFUNC(common,isModLoaded)) then { {!isNil {_target getVariable QGVAR(headstoneData)}} ] call EFUNC(interact_menu,createAction); - [missionNameSpace getVariable [QGVAR(graveClassname), "ACE_Grave"], 0, [], _checkHeadstoneAction] call EFUNC(interact_menu,addActionToClass); + [missionNamespace getVariable [QGVAR(graveClassname), "ACE_Grave"], 0, [], _checkHeadstoneAction] call EFUNC(interact_menu,addActionToClass); }; if (isServer) then { diff --git a/addons/medical_treatment/functions/fnc_ivBagLocal.sqf b/addons/medical_treatment/functions/fnc_ivBagLocal.sqf index 80f06fc11e0..dc416f90c50 100644 --- a/addons/medical_treatment/functions/fnc_ivBagLocal.sqf +++ b/addons/medical_treatment/functions/fnc_ivBagLocal.sqf @@ -23,7 +23,7 @@ params ["_patient", "_bodyPart", "_classname"]; private _bloodVolume = GET_BLOOD_VOLUME(_patient); if (_bloodVolume >= DEFAULT_BLOOD_VOLUME) exitWith {}; -private _partIndex = ALL_BODY_PARTS find tolowerANSI _bodyPart; +private _partIndex = ALL_BODY_PARTS find toLowerANSI _bodyPart; // Get attributes for the used IV private _defaultConfig = configFile >> QUOTE(ADDON) >> "IV"; diff --git a/addons/medical_treatment/functions/fnc_medicationLocal.sqf b/addons/medical_treatment/functions/fnc_medicationLocal.sqf index 0b23b365e84..18ef4e4d680 100644 --- a/addons/medical_treatment/functions/fnc_medicationLocal.sqf +++ b/addons/medical_treatment/functions/fnc_medicationLocal.sqf @@ -49,7 +49,7 @@ TRACE_1("Running treatmentMedicationLocal with Advanced configuration for",_pati // Handle tourniquet on body part blocking blood flow at injection site -private _partIndex = ALL_BODY_PARTS find tolowerANSI _bodyPart; +private _partIndex = ALL_BODY_PARTS find toLowerANSI _bodyPart; if (HAS_TOURNIQUET_APPLIED_ON(_patient,_partIndex)) exitWith { TRACE_1("unit has tourniquets blocking blood flow on injection site",_tourniquets); diff --git a/addons/medical_treatment/functions/fnc_placeBodyBagInGrave.sqf b/addons/medical_treatment/functions/fnc_placeBodyBagInGrave.sqf index 82cd2bc080b..55908b1e17d 100644 --- a/addons/medical_treatment/functions/fnc_placeBodyBagInGrave.sqf +++ b/addons/medical_treatment/functions/fnc_placeBodyBagInGrave.sqf @@ -29,7 +29,7 @@ TRACE_2("placeBodyBagInGrave",_bodybag,_medic); if (GVAR(graveDiggingMarker)) then { _graveClassname = missionNamespace getVariable [QGVAR(graveClassname), "ACE_Grave"]; }; - private _graveRotation = missionNameSpace getVariable [QGVAR(graveRotation), 0]; + private _graveRotation = missionNamespace getVariable [QGVAR(graveRotation), 0]; [[_medic, _bodybag], _graveClassname, [0,0,0], _graveRotation, true] call FUNC(placeInBodyBagOrGrave); }, diff --git a/addons/medical_treatment/functions/fnc_placeInGrave.sqf b/addons/medical_treatment/functions/fnc_placeInGrave.sqf index 6bea5c6db96..afc6a1fe4a2 100644 --- a/addons/medical_treatment/functions/fnc_placeInGrave.sqf +++ b/addons/medical_treatment/functions/fnc_placeInGrave.sqf @@ -27,7 +27,7 @@ private _graveClassname = ""; if (GVAR(graveDiggingMarker)) then { _graveClassname = missionNamespace getVariable [QGVAR(graveClassname), "ACE_Grave"]; }; -private _graveRotation = missionNameSpace getVariable [QGVAR(graveRotation), 0]; +private _graveRotation = missionNamespace getVariable [QGVAR(graveRotation), 0]; [_this, _graveClassname, [0,0,0], _graveRotation, true] call FUNC(placeInBodyBagOrGrave) diff --git a/addons/medical_treatment/functions/fnc_splintLocal.sqf b/addons/medical_treatment/functions/fnc_splintLocal.sqf index ee15a63bf0c..4861f428cdd 100644 --- a/addons/medical_treatment/functions/fnc_splintLocal.sqf +++ b/addons/medical_treatment/functions/fnc_splintLocal.sqf @@ -20,7 +20,7 @@ params ["_medic", "_patient", "_bodyPart"]; TRACE_3("splintLocal",_medic,_patient,_bodyPart); -private _partIndex = ALL_BODY_PARTS find tolowerANSI _bodyPart; +private _partIndex = ALL_BODY_PARTS find toLowerANSI _bodyPart; private _fractures = GET_FRACTURES(_patient); _fractures set [_partIndex, -1]; diff --git a/addons/medical_treatment/functions/fnc_tourniquetLocal.sqf b/addons/medical_treatment/functions/fnc_tourniquetLocal.sqf index 9a0480bcb01..0ed8afd37c9 100644 --- a/addons/medical_treatment/functions/fnc_tourniquetLocal.sqf +++ b/addons/medical_treatment/functions/fnc_tourniquetLocal.sqf @@ -19,7 +19,7 @@ params ["_patient", "_bodyPart"]; TRACE_2("tourniquetLocal",_patient,_bodyPart); -private _partIndex = ALL_BODY_PARTS find tolowerANSI _bodyPart; +private _partIndex = ALL_BODY_PARTS find toLowerANSI _bodyPart; private _tourniquets = GET_TOURNIQUETS(_patient); _tourniquets set [_partIndex, CBA_missionTime]; diff --git a/addons/medical_treatment/functions/fnc_tourniquetRemove.sqf b/addons/medical_treatment/functions/fnc_tourniquetRemove.sqf index 97680353e45..80dab5094cf 100644 --- a/addons/medical_treatment/functions/fnc_tourniquetRemove.sqf +++ b/addons/medical_treatment/functions/fnc_tourniquetRemove.sqf @@ -22,7 +22,7 @@ params ["_medic", "_patient", "_bodyPart"]; TRACE_3("tourniquetRemove",_medic,_patient,_bodyPart); // Remove tourniquet from body part, exit if no tourniquet applied -private _partIndex = ALL_BODY_PARTS find tolowerANSI _bodyPart; +private _partIndex = ALL_BODY_PARTS find toLowerANSI _bodyPart; private _tourniquets = GET_TOURNIQUETS(_patient); if (_tourniquets select _partIndex == 0) exitWith { diff --git a/addons/microdagr/CfgUIGrids.hpp b/addons/microdagr/CfgUIGrids.hpp index 5d7b921800a..3c5379f879d 100644 --- a/addons/microdagr/CfgUIGrids.hpp +++ b/addons/microdagr/CfgUIGrids.hpp @@ -3,7 +3,7 @@ class CfgUIGrids { class Presets { class Arma3 { class Variables { - grid_ACE_microDagr[] = {{"(safezoneX + safezoneW - 11 * (((safezoneW / safezoneH) min 1.2) / 40))","(safezoneY + safezoneH - 15 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))","(10 * (((safezoneW / safezoneH) min 1.2) / 40))","(10 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))"},"(((safezoneW / safezoneH) min 1.2) / 40)","((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"}; + grid_ACE_microDagr[] = {{"(safeZoneX + safeZoneW - 11 * (((safeZoneW / safeZoneH) min 1.2) / 40))","(safeZoneY + safeZoneH - 15 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25))","(10 * (((safeZoneW / safeZoneH) min 1.2) / 40))","(10 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25))"},"(((safeZoneW / safeZoneH) min 1.2) / 40)","((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"}; }; }; }; diff --git a/addons/microdagr/functions/fnc_updateDisplay.sqf b/addons/microdagr/functions/fnc_updateDisplay.sqf index 3e5775b86dc..e5de2b2fe49 100644 --- a/addons/microdagr/functions/fnc_updateDisplay.sqf +++ b/addons/microdagr/functions/fnc_updateDisplay.sqf @@ -24,7 +24,7 @@ if (isNull _display) exitWith {ERROR("No Display");}; private _daylight = [] call EFUNC(common,ambientBrightness); (_display displayCtrl IDC_MICRODAGRSHELL) ctrlSetTextColor [_daylight, _daylight, _daylight, 1]; -(_display displayCtrl IDC_CLOCKTEXT) ctrlSetText ([daytime, "HH:MM"] call bis_fnc_timeToString); +(_display displayCtrl IDC_CLOCKTEXT) ctrlSetText ([dayTime, "HH:MM"] call bis_fnc_timeToString); private _waypoints = [] call FUNC(deviceGetWaypoints); @@ -61,7 +61,7 @@ case (APP_MODE_INFODISPLAY): { private _dayString = if ((date select 2) < 10) then {"0" + str (date select 2)} else {str (date select 2)}; (_display displayCtrl IDC_MODEDISPLAY_TIMEDISPLAYGREEN1) ctrlSetText format ["%1-%2-%3", _yearString, _monthSring, _dayString]; //"18-Feb-2010"; - (_display displayCtrl IDC_MODEDISPLAY_TIMEDISPLAYGREEN2) ctrlSetText ([daytime, "HH:MM:SS"] call bis_fnc_timeToString); + (_display displayCtrl IDC_MODEDISPLAY_TIMEDISPLAYGREEN2) ctrlSetText ([dayTime, "HH:MM:SS"] call bis_fnc_timeToString); } else { private _targetPosName = ""; private _targetPosLocationASL = []; diff --git a/addons/microdagr/gui.hpp b/addons/microdagr/gui.hpp index 1404f6b81db..2a3f52deb43 100644 --- a/addons/microdagr/gui.hpp +++ b/addons/microdagr/gui.hpp @@ -40,8 +40,8 @@ class GVAR(RscText): RscText { }; //Redfine Scaling for the Dialog -#define X_PART(num) QUOTE((((60 - 25)/2) + (num)) * (safeZoneH / 64) + (safezoneX + (safezoneW - safeZoneH)/2)) -#define Y_PART(num) QUOTE((0 + (num)) * (safeZoneH / 36) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)) +#define X_PART(num) QUOTE((((60 - 25)/2) + (num)) * (safeZoneH / 64) + (safeZoneX + (safeZoneW - safeZoneH)/2)) +#define Y_PART(num) QUOTE((0 + (num)) * (safeZoneH / 36) + (safeZoneY + (safeZoneH - (safeZoneH / 1.2))/2)) #define W_PART(num) QUOTE((num) * (safeZoneH / 64)) #define H_PART(num) QUOTE((num) * (safeZoneH / 36)) diff --git a/addons/minedetector/XEH_postInit.sqf b/addons/minedetector/XEH_postInit.sqf index f5f5de0ca8a..0671699f9e8 100644 --- a/addons/minedetector/XEH_postInit.sqf +++ b/addons/minedetector/XEH_postInit.sqf @@ -16,9 +16,9 @@ addMissionEventHandler ["Draw3D", { { private _name = format ["%1@%2", typeOf _x, (floor ((_x distance _detectorPointAGL) * 10)) / 10]; if ((getNumber (configOf _x >> QGVAR(detectable))) == 1) then { - drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [1,0,0,1], (ASLtoAGL (getPosASL _x)), 1, 1, 0, _name, 1, 0.02, "PuristaMedium"]; + drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [1,0,0,1], (ASLToAGL (getPosASL _x)), 1, 1, 0, _name, 1, 0.02, "PuristaMedium"]; } else { - drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [1,1,0,1], (ASLtoAGL (getPosASL _x)), 1, 1, 0, _name, 1, 0.02, "PuristaMedium"]; + drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [1,1,0,1], (ASLToAGL (getPosASL _x)), 1, 1, 0, _name, 1, 0.02, "PuristaMedium"]; }; } forEach _mines; }]; diff --git a/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf b/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf index 5462a80a75b..cc823b1e8c3 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf @@ -45,7 +45,7 @@ if (_2dDistance <= 1) then { _addHeight = [0, 0, (_projectilePos#2) + 8]; } else { // Always climb an arc on initial launch if we are close to the round - if ((((ASLtoAGL _projectilePos) select 2) < 5) && {_distanceToShooter < 15}) then { + if ((((ASLToAGL _projectilePos) select 2) < 5) && {_distanceToShooter < 15}) then { _addHeight = _addHeight vectorAdd [0,0,_distanceToTarget]; TRACE_1("climb - near shooter",_addHeight); } else { diff --git a/addons/missileguidance/functions/fnc_attackProfile_LOFT.sqf b/addons/missileguidance/functions/fnc_attackProfile_LOFT.sqf index 1fff2ef8c51..934ac04123a 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_LOFT.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_LOFT.sqf @@ -32,7 +32,7 @@ if (_seekerTargetPos isEqualTo [0, 0, 0]) exitWith { }; private _projectilePos = getPosASLVisual _projectile; -private _distanceToTarget2d = _projectilePos distance2d _seekerTargetPos; +private _distanceToTarget2d = _projectilePos distance2D _seekerTargetPos; private _closingRate = vectorMagnitude velocity _projectile; private _timeToGo = (_projectilePos distance _seekerTargetPos) / _closingRate; diff --git a/addons/missileguidance/functions/fnc_attackProfile_WIRE.sqf b/addons/missileguidance/functions/fnc_attackProfile_WIRE.sqf index 361b0d8fcf5..1733ad10153 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_WIRE.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_WIRE.sqf @@ -30,7 +30,7 @@ if ((_distanceToProjectile > _seekerMaxRangeSqr) || { _wireCut }) exitWith { // wire snap, random direction if !(_wireCut) then { _attackProfileStateParams set [1, true]; - playSound3D ["a3\sounds_f\air\sfx\SL_rope_break.wss", objNull, false, AGLtoASL (_shooter modelToWorld _wireCutSource), 5, 1, 150]; + playSound3D ["a3\sounds_f\air\sfx\SL_rope_break.wss", objNull, false, AGLToASL (_shooter modelToWorld _wireCutSource), 5, 1, 150]; }; _lastInput }; diff --git a/addons/missileguidance/functions/fnc_dev_ProjectileCamera.sqf b/addons/missileguidance/functions/fnc_dev_ProjectileCamera.sqf index 5073709a27e..bf3a5af67c5 100644 --- a/addons/missileguidance/functions/fnc_dev_ProjectileCamera.sqf +++ b/addons/missileguidance/functions/fnc_dev_ProjectileCamera.sqf @@ -14,7 +14,7 @@ params ["_projectile"]; private _camera = "camera" camCreate getPosATL _projectile; -_camera camPrepareFOV 0.7; +_camera camPrepareFov 0.7; _camera cameraEffect ["internal", "back"]; _camera camCommitPrepared 0; diff --git a/addons/missileguidance/functions/fnc_doAttackProfile.sqf b/addons/missileguidance/functions/fnc_doAttackProfile.sqf index 3c74ab87c6d..e33d2bfd9be 100644 --- a/addons/missileguidance/functions/fnc_doAttackProfile.sqf +++ b/addons/missileguidance/functions/fnc_doAttackProfile.sqf @@ -30,8 +30,8 @@ if ((isNil "_attackProfilePos") || {_attackProfilePos isEqualTo [0,0,0]}) exitWi }; if (GVAR(debug_drawGuidanceInfo)) then { - drawLine3D [(ASLtoAGL _attackProfilePos), (ASLtoAGL _seekerTargetPos), [0,1,1,1]]; - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0,0,1,1], ASLtoAGL _attackProfilePos, 0.5, 0.5, 0, _attackProfileName, 1, 0.025, "TahomaB"]; + drawLine3D [(ASLToAGL _attackProfilePos), (ASLToAGL _seekerTargetPos), [0,1,1,1]]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0,0,1,1], ASLToAGL _attackProfilePos, 0.5, 0.5, 0, _attackProfileName, 1, 0.025, "TahomaB"]; }; TRACE_2("return",_attackProfilePos,_attackProfileName); diff --git a/addons/missileguidance/functions/fnc_doSeekerSearch.sqf b/addons/missileguidance/functions/fnc_doSeekerSearch.sqf index b6fd158ce04..fe915d1bb4f 100644 --- a/addons/missileguidance/functions/fnc_doSeekerSearch.sqf +++ b/addons/missileguidance/functions/fnc_doSeekerSearch.sqf @@ -31,7 +31,7 @@ if ((isNil "_seekerTargetPos") || {_seekerTargetPos isEqualTo [0,0,0]}) then { / TRACE_2("seeker returned bad pos - using last known",_seekLastTargetPos,_lastKnownPos); _seekerTargetPos = _lastKnownPos; if (GVAR(debug_drawGuidanceInfo)) then { - drawIcon3D ["\A3\ui_f\data\map\markers\military\unknown_CA.paa", [1,1,0,1], ASLtoAGL _lastKnownPos, 0.25, 0.25, 0, "LastKnownPos", 1, 0.02, "TahomaB"]; + drawIcon3D ["\A3\ui_f\data\map\markers\military\unknown_CA.paa", [1,1,0,1], ASLToAGL _lastKnownPos, 0.25, 0.25, 0, "LastKnownPos", 1, 0.02, "TahomaB"]; }; } else { TRACE_1("seeker returned no pos",_seekerTargetPos); @@ -45,7 +45,7 @@ if ((isNil "_seekerTargetPos") || {_seekerTargetPos isEqualTo [0,0,0]}) then { / }; if (GVAR(debug_drawGuidanceInfo)) then { - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0,1,0,1], ASLtoAGL _seekerTargetPos, 0.5, 0.5, 0, _seekerTypeName, 1, 0.025, "TahomaB"]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0,1,0,1], ASLToAGL _seekerTargetPos, 0.5, 0.5, 0, _seekerTypeName, 1, 0.025, "TahomaB"]; }; TRACE_2("return",_seekerTargetPos,_seekerTypeName); diff --git a/addons/missileguidance/functions/fnc_guidancePFH.sqf b/addons/missileguidance/functions/fnc_guidancePFH.sqf index 28f677bbdde..2615d9061a7 100644 --- a/addons/missileguidance/functions/fnc_guidancePFH.sqf +++ b/addons/missileguidance/functions/fnc_guidancePFH.sqf @@ -42,7 +42,7 @@ private _timestep = diag_deltaTime * accTime; // Run seeker function: private _seekerTargetPos = [[0,0,0], _args, _seekerStateParams, _lastKnownPosState, _timestep] call FUNC(doSeekerSearch); // Run attack profile function: -_seekerTargetPos = AGLtoASL ASLToAGL _seekerTargetPos; +_seekerTargetPos = AGLToASL ASLToAGL _seekerTargetPos; private _profileAdjustedTargetPos = [_seekerTargetPos, _args, _attackProfileStateParams, _timestep] call FUNC(doAttackProfile); private _projectilePos = getPosASLVisual _projectile; @@ -190,15 +190,15 @@ if ((_pitchRate != 0 || {_yawRate != 0})) then { if (GVAR(debug_drawGuidanceInfo)) then { TRACE_3("",_projectilePos,_seekerTargetPos,_profileAdjustedTargetPos); - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,1], ASLtoAGL _projectilePos, 0.75, 0.75, 0, _ammo, 1, 0.025, "TahomaB"]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,1], ASLToAGL _projectilePos, 0.75, 0.75, 0, _ammo, 1, 0.025, "TahomaB"]; if (!isGamePaused && accTime > 0) then { - private _ps = "#particlesource" createVehicleLocal (ASLtoAGL _projectilePos); + private _ps = "#particlesource" createVehicleLocal (ASLToAGL _projectilePos); _PS setParticleParams [["\A3\Data_f\cl_basic", 8, 3, 1], "", "Billboard", 1, 3.0141, [0, 0, 0], [0, 0, 0], 1, 1.275, 1, 0, [1, 1], [[1, 0, 0, 1], [1, 0, 0, 1], [1, 0, 0, 1]], [1], 1, 0, "", "", nil]; _PS setDropInterval 1.0; }; - drawLine3D [ASLtoAGL _projectilePos, (ASLtoAGL _projectilePos) vectorAdd velocity _projectile, [1, 1, 1, 1]]; + drawLine3D [ASLToAGL _projectilePos, (ASLToAGL _projectilePos) vectorAdd velocity _projectile, [1, 1, 1, 1]]; }; _stateParams set [0, diag_tickTime]; diff --git a/addons/missileguidance/functions/fnc_seekerType_MWR.sqf b/addons/missileguidance/functions/fnc_seekerType_MWR.sqf index df51acdd8c0..1b7eef07ee7 100644 --- a/addons/missileguidance/functions/fnc_seekerType_MWR.sqf +++ b/addons/missileguidance/functions/fnc_seekerType_MWR.sqf @@ -60,7 +60,7 @@ if (_isActive || { CBA_missionTime >= _timeWhenActive }) then { _seekerBaseRadiusAdjusted = _seekerBaseRadiusAtGround; }; // Look in front of seeker for any targets - private _nearestObjects = nearestObjects [ASLtoAGL _searchPos, _lockTypes, _seekerBaseRadiusAdjusted, false]; + private _nearestObjects = nearestObjects [ASLToAGL _searchPos, _lockTypes, _seekerBaseRadiusAdjusted, false]; _nearestObjects = _nearestObjects apply { // I check both Line of Sight versions to make sure that a single bush doesnt make the target lock dissapear but at the same time ensure that this can see through smoke. Should work 80% of the time if ([_projectile, getPosASL _x, _seekerAngle] call FUNC(checkSeekerAngle) && { ([_projectile, _x, true] call FUNC(checkLOS)) || { ([_projectile, _x, false] call FUNC(checkLOS)) } }) then { @@ -78,8 +78,8 @@ if (_isActive || { CBA_missionTime >= _timeWhenActive }) then { }; private _closestDistance = _seekerBaseRadiusAtGround; { - if ((_x distance2d _searchPos) < _closestDistance) then { - _closestDistance = _x distance2d _searchPos; + if ((_x distance2D _searchPos) < _closestDistance) then { + _closestDistance = _x distance2D _searchPos; _target = _x; }; } forEach _nearestObjects; @@ -105,7 +105,7 @@ if (_isActive || { CBA_missionTime >= _timeWhenActive }) then { }; if (GVAR(debug_drawGuidanceInfo)) then { - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,1], ASLtoAGL _expectedTargetPos, 0.75, 0.75, 0, "expected target pos", 1, 0.025, "TahomaB"]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,1], ASLToAGL _expectedTargetPos, 0.75, 0.75, 0, "expected target pos", 1, 0.025, "TahomaB"]; }; if !(isNull _target) then { diff --git a/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf b/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf index 88e2ba02d56..827c365a346 100644 --- a/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf +++ b/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf @@ -85,9 +85,9 @@ TRACE_1("",_ambianceSounds); private _newPosASL = if (_followPlayers) then { // Select a target unit at random. private _targetUnit = selectRandom _allUnits; - AGLtoASL (_targetUnit getPos [_minimalDistance + random (_maximalDistance - _minimalDistance), random 360]); + AGLToASL (_targetUnit getPos [_minimalDistance + random (_maximalDistance - _minimalDistance), random 360]); } else { - AGLtoASL (_logic getPos [_minimalDistance + random (_maximalDistance - _minimalDistance), random 360]); + AGLToASL (_logic getPos [_minimalDistance + random (_maximalDistance - _minimalDistance), random 360]); }; TRACE_1("",_newPosASL); diff --git a/addons/movement/functions/fnc_handleClimb.sqf b/addons/movement/functions/fnc_handleClimb.sqf index 1325f2f021e..a54007862e3 100644 --- a/addons/movement/functions/fnc_handleClimb.sqf +++ b/addons/movement/functions/fnc_handleClimb.sqf @@ -24,5 +24,5 @@ private _pos = _unit modelToWorldVisual (_unit selectionPosition "camera"); _pos = _pos vectorDiff (_unit selectionPosition "camera"); -_unit setPosASL (AGLtoASL _pos); -TRACE_2("",AGLtoASL _pos,getPosASL _unit); +_unit setPosASL (AGLToASL _pos); +TRACE_2("",AGLToASL _pos,getPosASL _unit); diff --git a/addons/nametags/functions/fnc_onDraw3d.sqf b/addons/nametags/functions/fnc_onDraw3d.sqf index f831a3209fc..4fbbc7ee1c7 100644 --- a/addons/nametags/functions/fnc_onDraw3d.sqf +++ b/addons/nametags/functions/fnc_onDraw3d.sqf @@ -37,7 +37,7 @@ if (GVAR(showPlayerNames) == 4) then { private _camPosAGL = positionCameraToWorld [0, 0, 0]; if !((_camPosAGL select 0) isEqualType 0) exitWith {}; // handle RHS / bugged vehicle slots -private _camPosASL = AGLtoASL _camPosAGL; +private _camPosASL = AGLToASL _camPosAGL; // Show nametag for the unit behind the cursor or its commander if (_enabledTagsCursor) then { @@ -115,7 +115,7 @@ if (_enabledTagsNearby) then { private _screenPos = worldToScreen (_target modelToWorld (_target selectionPosition "head")); if (_screenPos isNotEqualTo []) then { // 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 { _centerOffsetFactor = 0; }; diff --git a/addons/nightvision/RscTitles.hpp b/addons/nightvision/RscTitles.hpp index 1a4d030e015..f3b1d1870f6 100644 --- a/addons/nightvision/RscTitles.hpp +++ b/addons/nightvision/RscTitles.hpp @@ -28,13 +28,13 @@ class RscTitles { idc = 1002; text = "#(argb,8,8,3)color(0,0,0,1)"; x = "safeZoneXAbs"; - Y = "safezoneY"; - W = "(safezoneX - safeZoneXAbs) * ((getResolution select 4)/(16/3))"; + Y = "safeZoneY"; + W = "(safeZoneX - safeZoneXAbs) * ((getResolution select 4)/(16/3))"; H = "safeZoneH"; }; class trippleHeadRight: trippleHeadLeft { idc = 1003; - x = "safeZoneXAbs + safeZoneWAbs - (safezoneX - safeZoneXABS) * ((getResolution select 4)/(16/3))"; + x = "safeZoneXAbs + safeZoneWAbs - (safeZoneX - safeZoneXABS) * ((getResolution select 4)/(16/3))"; }; }; }; diff --git a/addons/nightvision/functions/fnc_refreshGoggleType.sqf b/addons/nightvision/functions/fnc_refreshGoggleType.sqf index ccfbd017b6f..2c7dedaa834 100644 --- a/addons/nightvision/functions/fnc_refreshGoggleType.sqf +++ b/addons/nightvision/functions/fnc_refreshGoggleType.sqf @@ -106,7 +106,7 @@ if (_borderImage == "") then { _borderImageCtrl ctrlSetFade ([.15, 0] select _eyeCups); #define BORDER_SIZE 3 - GVAR(defaultPositionBorder) = [safezoneX - (((BORDER_SIZE * 0.75) * safezoneH) - safezoneW) / 2, safezoneY - ((BORDER_SIZE - 1) / 2) * safezoneH, (BORDER_SIZE * 0.75) * safezoneH, BORDER_SIZE * safezoneH]; + GVAR(defaultPositionBorder) = [safeZoneX - (((BORDER_SIZE * 0.75) * safeZoneH) - safeZoneW) / 2, safeZoneY - ((BORDER_SIZE - 1) / 2) * safeZoneH, (BORDER_SIZE * 0.75) * safeZoneH, BORDER_SIZE * safeZoneH]; [_borderImageCtrl, GVAR(defaultPositionBorder), _scale] call FUNC(scaleCtrl); }; @@ -119,7 +119,7 @@ if (_hideHex) then { _hexCtrl ctrlSetText QPATHTOF(data\nvg_mask_hexes_thin.paa); #define HEX_SIZE 1.5 - GVAR(defaultPositionHex) = [safezoneX - (((HEX_SIZE * 0.75) * safezoneH) - safezoneW) / 2, safezoneY - ((HEX_SIZE - 1) / 2) * safezoneH, (HEX_SIZE * 0.75) * safezoneH, HEX_SIZE * safezoneH]; + GVAR(defaultPositionHex) = [safeZoneX - (((HEX_SIZE * 0.75) * safeZoneH) - safeZoneW) / 2, safeZoneY - ((HEX_SIZE - 1) / 2) * safeZoneH, (HEX_SIZE * 0.75) * safeZoneH, HEX_SIZE * safeZoneH]; [_hexCtrl, GVAR(defaultPositionHex), _scale] call FUNC(scaleCtrl); }; diff --git a/addons/nlaw/XEH_postInit.sqf b/addons/nlaw/XEH_postInit.sqf index 16be48ce26c..5e3f35572c8 100644 --- a/addons/nlaw/XEH_postInit.sqf +++ b/addons/nlaw/XEH_postInit.sqf @@ -30,20 +30,20 @@ addMissionEventHandler ["Draw3d", { // GREEN - Draw an object called "testTarget"'s aim pos and 1 sec aimpos predicted by velocity if ((!isNil "testTarget") && {!isNull testTarget}) then { { - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0,1,0,1], ASLtoAGL ((aimPos testTarget) vectorAdd ((velocity testTarget) vectorMultiply _x)), 0.75, 0.75, 0, format ["%1", _x], 1, 0.025, "TahomaB"]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0,1,0,1], ASLToAGL ((aimPos testTarget) vectorAdd ((velocity testTarget) vectorMultiply _x)), 0.75, 0.75, 0, format ["%1", _x], 1, 0.025, "TahomaB"]; } forEach [0, 1, 2, 3]; }; // RED - If lock key is down, draw weapon dir and predicted path at various times if (GVAR(yawChange) != 0) then { { - private _viewASL = AGLtoASL positionCameraToWorld [0,0,0]; + private _viewASL = AGLToASL positionCameraToWorld [0,0,0]; private _viewDir = ACE_player weaponDirection (currentWeapon ACE_player); (_viewDir call CBA_fnc_vect2Polar) params ["", "_yaw", "_pitch"]; private _realYaw = _yaw + GVAR(yawChange) * _x; private _realPitch = _pitch + GVAR(pitchChange) * _x; private _returnTargetPos = _viewASL vectorAdd ([1000, _realYaw, _realPitch] call CBA_fnc_polar2vect); - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,1], ASLtoAGL _returnTargetPos, 0.75, 0.75, 0, format ["%1", _x], 1, 0.025, "TahomaB"]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,1], ASLToAGL _returnTargetPos, 0.75, 0.75, 0, format ["%1", _x], 1, 0.025, "TahomaB"]; } forEach [0, 1, 2, 3]; }; }]; diff --git a/addons/nlaw/functions/fnc_attackProfile.sqf b/addons/nlaw/functions/fnc_attackProfile.sqf index f5277808357..8f06e26f9c4 100644 --- a/addons/nlaw/functions/fnc_attackProfile.sqf +++ b/addons/nlaw/functions/fnc_attackProfile.sqf @@ -35,14 +35,14 @@ private _flightTime = CBA_missionTime - _startTime; private _realYaw = _yaw + _yawChange * _flightTime; private _realPitch = _pitch + _pitchChange * _flightTime; -drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,1,1], ASLtoAGL _launchPos, 0.75, 0.75, 0, "LAUNCH", 1, 0.025, "TahomaB"]; -drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0,1,1,1], ASLtoAGL (_launchPos vectorAdd (_startLOS vectorMultiply (_distanceFromLaunch + 50))), 0.75, 0.75, 0, "Original LOS", 1, 0.025, "TahomaB"]; -drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,1,0,1], ASLtoAGL (_launchPos vectorAdd ([_distanceFromLaunch + 50, _realYaw, _realPitch] call CBA_fnc_polar2vect)), 0.75, 0.75, 0, format ["Predicted @%1sec",(floor(_flightTime * 10)/10)], 1, 0.025, "TahomaB"]; -drawLine3D [ASLtoAGL _launchPos, ASLtoAGL (_launchPos vectorAdd (_startLOS vectorMultiply (_distanceFromLaunch + 50))), [1,0,0,1]]; -drawLine3D [ASLtoAGL _launchPos, ASLtoAGL (_launchPos vectorAdd ([_distanceFromLaunch + 50, _realYaw, _realPitch] call CBA_fnc_polar2vect)), [1,1,0,1]]; +drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,1,1], ASLToAGL _launchPos, 0.75, 0.75, 0, "LAUNCH", 1, 0.025, "TahomaB"]; +drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0,1,1,1], ASLToAGL (_launchPos vectorAdd (_startLOS vectorMultiply (_distanceFromLaunch + 50))), 0.75, 0.75, 0, "Original LOS", 1, 0.025, "TahomaB"]; +drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,1,0,1], ASLToAGL (_launchPos vectorAdd ([_distanceFromLaunch + 50, _realYaw, _realPitch] call CBA_fnc_polar2vect)), 0.75, 0.75, 0, format ["Predicted @%1sec",(floor(_flightTime * 10)/10)], 1, 0.025, "TahomaB"]; +drawLine3D [ASLToAGL _launchPos, ASLToAGL (_launchPos vectorAdd (_startLOS vectorMultiply (_distanceFromLaunch + 50))), [1,0,0,1]]; +drawLine3D [ASLToAGL _launchPos, ASLToAGL (_launchPos vectorAdd ([_distanceFromLaunch + 50, _realYaw, _realPitch] call CBA_fnc_polar2vect)), [1,1,0,1]]; private _test = lineIntersectsSurfaces [_launchPos, _launchPos vectorAdd (_startLOS vectorMultiply 3000), player, _projectile]; if ((count _test) > 0) then { - private _posAGL = ASLtoAGL ((_test select 0) select 0); + private _posAGL = ASLToAGL ((_test select 0) select 0); drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,1], _posAGL, 0.75, 0.75, 0, "Original Impact", 1, 0.025, "TahomaB"]; }; #endif diff --git a/addons/nlaw/functions/fnc_navigation.sqf b/addons/nlaw/functions/fnc_navigation.sqf index 1cfd8f91d56..7572b44d6f3 100644 --- a/addons/nlaw/functions/fnc_navigation.sqf +++ b/addons/nlaw/functions/fnc_navigation.sqf @@ -67,8 +67,8 @@ _navigationParams set [6, _yawRateDifference]; private _desiredYawChange = _yawRateDifference * PROPORTIONALITY_CONSTANT + _yawRateDifference * 2; #ifdef DRAW_NLAW_INFO -drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,1,1], ASLtoAGL getPosASLVisual _projectile, 0.75, 0.75, 0, format ["dP [%1] dY: [%2]", _desiredPitchChange, _desiredYawChange], 1, 0.025, "TahomaB"]; -drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,1,1], [0, 0, 1] vectorAdd ASLtoAGL getPosASLVisual _projectile, 0.75, 0.75, 0, format ["pitch proportional [%1] yaw proportional [%2]", _pitchModifier, _yawModifier], 1, 0.025, "TahomaB"]; +drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,1,1], ASLToAGL getPosASLVisual _projectile, 0.75, 0.75, 0, format ["dP [%1] dY: [%2]", _desiredPitchChange, _desiredYawChange], 1, 0.025, "TahomaB"]; +drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,1,1], [0, 0, 1] vectorAdd ASLToAGL getPosASLVisual _projectile, 0.75, 0.75, 0, format ["pitch proportional [%1] yaw proportional [%2]", _pitchModifier, _yawModifier], 1, 0.025, "TahomaB"]; #endif TRACE_4("nlaw pitch/yaw info",_currentPitch,_lastPitch,_currentYaw,_lastYaw); diff --git a/addons/nlaw/functions/fnc_onFired.sqf b/addons/nlaw/functions/fnc_onFired.sqf index e8332b8caf9..cbaa2cfc0a4 100644 --- a/addons/nlaw/functions/fnc_onFired.sqf +++ b/addons/nlaw/functions/fnc_onFired.sqf @@ -50,7 +50,7 @@ if (_shooter == ACE_player) then { private _debugYaw = _debugYaw + _yawChange * _x; private _debugPitch = _debugPitch + _pitchChange * _x; private _debugPos = _debugPos vectorAdd ([_distance, _debugYaw, _debugPitch] call CBA_fnc_polar2vect); - GVAR(debug_firedPrediction) pushBack ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0,0,0,1], ASLtoAGL _debugPos, 0.5, 0.5, 0, format ["%1", _x], 1, 0.025, "TahomaB"]; + GVAR(debug_firedPrediction) pushBack ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0,0,0,1], ASLToAGL _debugPos, 0.5, 0.5, 0, format ["%1", _x], 1, 0.025, "TahomaB"]; }; #endif } else { diff --git a/addons/nlaw/functions/fnc_seeker.sqf b/addons/nlaw/functions/fnc_seeker.sqf index a3a60e94a1f..a77b7ecb3b6 100644 --- a/addons/nlaw/functions/fnc_seeker.sqf +++ b/addons/nlaw/functions/fnc_seeker.sqf @@ -62,7 +62,7 @@ if ((_projPos distance _launchPos) >= 20) then { // This represents a position that the missile was at between the last frame and now private _virtualPos = _lastPos vectorAdd (_vectorDir vectorMultiply _stepSize); #ifdef DRAW_NLAW_INFO - drawLine3D [ASLtoAGL _virtualPos, ASLtoAGL (_virtualPos vectorAdd [0,0,-5]), [1,0,_stepSize/(_frameDistance max 0.1),1]]; + drawLine3D [ASLToAGL _virtualPos, ASLToAGL (_virtualPos vectorAdd [0,0,-5]), [1,0,_stepSize/(_frameDistance max 0.1),1]]; #endif // Limit scan to 5 meters directly down (shaped charge jet has a very limited range) @@ -71,7 +71,7 @@ if ((_projPos distance _launchPos) >= 20) then { (_res select 0) params ["_targetPos", "", "_target"]; if ((_target isKindOf "Tank") || {_target isKindOf "Car"} || {_target isKindOf "Air"}) exitWith { TRACE_3("Firing shaped charge down",_target,_targetPos distance _virtualPos,_frameDistance); - TRACE_2("",_target worldToModel (ASLtoAGL _virtualPos),boundingBoxReal _target); + TRACE_2("",_target worldToModel (ASLToAGL _virtualPos),boundingBoxReal _target); _virtualPos = _virtualPos vectorAdd (_vectorDir vectorMultiply 1.25); deleteVehicle _projectile; diff --git a/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf b/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf index 74d18a66d90..1a6d35c2059 100644 --- a/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf +++ b/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf @@ -76,7 +76,7 @@ _text = format [" { _var = missionNamespace getVariable [_x, nil]; - if(!isnil "_var" && {_var isEqualType []} && {(count _var) > MIN_ARRAY_SIZE}) then { + if(!isNil "_var" && {_var isEqualType []} && {(count _var) > MIN_ARRAY_SIZE}) then { _text = format ["%1 - ARRAY SIZE: %2", _x, (count _var)]; [_text] call _outputText; }; @@ -86,7 +86,7 @@ _text = format [" private _unit = _x; { private _var = _unit getVariable [_x, nil]; - if(!isnil "_var" && {_var isEqualType []} && {(count _var) > MIN_ARRAY_SIZE}) then { + if(!isNil "_var" && {_var isEqualType []} && {(count _var) > MIN_ARRAY_SIZE}) then { _text = format ["%1 on [%2] - ARRAY SIZE: %3", _x, _unit, (count _var)]; [_text] call _outputText; }; diff --git a/addons/optionsmenu/gui/mainMenu.hpp b/addons/optionsmenu/gui/mainMenu.hpp index 0b26df7017a..9df21dbeb5f 100644 --- a/addons/optionsmenu/gui/mainMenu.hpp +++ b/addons/optionsmenu/gui/mainMenu.hpp @@ -22,7 +22,7 @@ class RscDisplayMain: RscStandardDisplay { class ACE_news_apex: InfoNews { idc = IDC_MAIN_INFO; - y = "safezoneY + safezoneH - (3 * 2 + 1) * (pixelH * pixelGrid * 2) - 4 * (4 * pixelH)"; + y = "safeZoneY + safeZoneH - (3 * 2 + 1) * (pixelH * pixelGrid * 2) - 4 * (4 * pixelH)"; class Controls: Controls { class Background: Background {}; diff --git a/addons/overheating/functions/fnc_getWeaponData.sqf b/addons/overheating/functions/fnc_getWeaponData.sqf index 8edd86bb1aa..ec68cf67b9d 100644 --- a/addons/overheating/functions/fnc_getWeaponData.sqf +++ b/addons/overheating/functions/fnc_getWeaponData.sqf @@ -77,7 +77,7 @@ if (_muzzle == "this") then { _muzzle = _weapon; }; -private _reloadTime = getNumber (configfile >> "CfgWeapons" >> _weapon >> (_modes select 0) >> "reloadTime"); +private _reloadTime = getNumber (configFile >> "CfgWeapons" >> _weapon >> (_modes select 0) >> "reloadTime"); private _closedBolt = getNumber (configFile >> "CfgWeapons" >> _weapon >> QGVAR(closedBolt)); diff --git a/addons/overpressure/functions/fnc_firedEHBB.sqf b/addons/overpressure/functions/fnc_firedEHBB.sqf index 98147fc7df3..59b51f28629 100644 --- a/addons/overpressure/functions/fnc_firedEHBB.sqf +++ b/addons/overpressure/functions/fnc_firedEHBB.sqf @@ -32,7 +32,7 @@ private _direction = (vectorDir _projectile) vectorMultiply -1; private _position = (getPosASL _projectile) vectorAdd (_direction vectorMultiply _offset); // Damage to others -private _affected = (ASLtoAGL _position) nearEntities ["CAManBase", _backblastRange]; +private _affected = (ASLToAGL _position) nearEntities ["CAManBase", _backblastRange]; // Let each client handle their own affected units ["ace_overpressure", [_unit, _position, _direction, _weapon, _magazine, _ammo], _affected] call CBA_fnc_targetEvent; diff --git a/addons/overpressure/functions/fnc_firedEHOP.sqf b/addons/overpressure/functions/fnc_firedEHOP.sqf index b4b7763eae6..eb51a055076 100644 --- a/addons/overpressure/functions/fnc_firedEHOP.sqf +++ b/addons/overpressure/functions/fnc_firedEHOP.sqf @@ -33,7 +33,7 @@ private _position = getPosASL _projectile; private _direction = vectorDir _projectile; // Damage to others -private _affected = (ASLtoAGL _position) nearEntities ["CAManBase", _dangerZoneRange]; +private _affected = (ASLToAGL _position) nearEntities ["CAManBase", _dangerZoneRange]; // Let each client handle their own affected units ["ace_overpressure", [_unit, _position, _direction, _weapon, _magazine, _ammo], _affected] call CBA_fnc_targetEvent; diff --git a/addons/overpressure/functions/fnc_overpressureDamage.sqf b/addons/overpressure/functions/fnc_overpressureDamage.sqf index 12b7a820cab..f727413d4a5 100644 --- a/addons/overpressure/functions/fnc_overpressureDamage.sqf +++ b/addons/overpressure/functions/fnc_overpressureDamage.sqf @@ -73,4 +73,4 @@ TRACE_3("cache",_overpressureAngle,_overpressureRange,_overpressureDamage); #endif }; }; -} forEach ((ASLtoAGL _posASL) nearEntities ["CAManBase", _overpressureRange]); +} forEach ((ASLToAGL _posASL) nearEntities ["CAManBase", _overpressureRange]); diff --git a/addons/parachute/RscTitles.hpp b/addons/parachute/RscTitles.hpp index 48cf11bee4d..388115a2a88 100644 --- a/addons/parachute/RscTitles.hpp +++ b/addons/parachute/RscTitles.hpp @@ -13,37 +13,37 @@ class RscTitles { class AltimeterImage: RscPicture { idc = 1200; text = QPATHTOF(UI\watch_altimeter.paa); - x = "0.118437 * safezoneW + safezoneX"; - y = "0.621 * safezoneH + safezoneY"; - w = "0.20625 * safezoneW"; - h = "0.341 * safezoneH"; + x = "0.118437 * safeZoneW + safeZoneX"; + y = "0.621 * safeZoneH + safeZoneY"; + w = "0.20625 * safeZoneW"; + h = "0.341 * safeZoneH"; }; class HeightText: RscText { idc = 1100; text = "----"; - x = "0.200937 * safezoneW + safezoneX"; - y = "0.764 * safezoneH + safezoneY"; - w = "0.04125 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.200937 * safeZoneW + safeZoneX"; + y = "0.764 * safeZoneH + safeZoneY"; + w = "0.04125 * safeZoneW"; + h = "0.033 * safeZoneH"; colorBackground[] = {0,0,0,0}; colorText[] = {0,0,0,1}; }; class DecendRate: RscText { idc = 1000; text = "--"; - x = "0.21125 * safezoneW + safezoneX"; - y = "0.742 * safezoneH + safezoneY"; - w = "0.020625 * safezoneW"; - h = "0.022 * safezoneH"; + x = "0.21125 * safeZoneW + safeZoneX"; + y = "0.742 * safeZoneH + safeZoneY"; + w = "0.020625 * safeZoneW"; + h = "0.022 * safeZoneH"; colorText[] = {0,0,0,1}; }; class TimeText: RscText { idc = 1001; text = "00:00:00"; - x = "0.202094 * safezoneW + safezoneX"; - y = "0.819 * safezoneH + safezoneY"; - w = "0.0380375 * safezoneW"; - h = "0.022 * safezoneH"; + x = "0.202094 * safeZoneW + safeZoneX"; + y = "0.819 * safeZoneH + safeZoneY"; + w = "0.0380375 * safeZoneW"; + h = "0.022 * safeZoneH"; colorText[] = {0,0,0,1}; }; }; diff --git a/addons/parachute/functions/fnc_cutParachute.sqf b/addons/parachute/functions/fnc_cutParachute.sqf index c66d9ff0504..604fb201076 100644 --- a/addons/parachute/functions/fnc_cutParachute.sqf +++ b/addons/parachute/functions/fnc_cutParachute.sqf @@ -18,6 +18,6 @@ params ["_unit", "_parachute"]; TRACE_2("cutParachute",_unit,_parachute); -playSound3d ["A3\Sounds_F\characters\parachute\parachute_landing.wss", _unit]; +playSound3D ["A3\Sounds_F\characters\parachute\parachute_landing.wss", _unit]; _unit action ["GetOut", _parachute]; deleteVehicle _parachute; diff --git a/addons/pylons/XEH_postInit.sqf b/addons/pylons/XEH_postInit.sqf index 3167c0a838a..3acbfe71571 100644 --- a/addons/pylons/XEH_postInit.sqf +++ b/addons/pylons/XEH_postInit.sqf @@ -36,7 +36,7 @@ GVAR(loadoutAction) = [ // create action [QGVAR(setPylonLoadOutEvent), { params ["_aircraft", "_pylonIndex", "_pylon", "_turret", "_weaponToRemove"]; TRACE_5("setPylonLoadOutEvent",_aircraft,_pylonIndex,_pylon,_turret,_weaponToRemove); - _aircraft setPylonLoadOut [_pylonIndex, _pylon, false, _turret]; + _aircraft setPylonLoadout [_pylonIndex, _pylon, false, _turret]; if (_weaponToRemove != "") then { { if (_aircraft turretLocal _x) then { diff --git a/addons/pylons/functions/fnc_showDialog.sqf b/addons/pylons/functions/fnc_showDialog.sqf index 9c0faab52d0..7df50c6b2aa 100644 --- a/addons/pylons/functions/fnc_showDialog.sqf +++ b/addons/pylons/functions/fnc_showDialog.sqf @@ -73,8 +73,8 @@ GVAR(comboBoxes) = []; _combo ctrlSetPosition [ (_picturePos select 0) + (_uiPos select 0), (_picturePos select 1) + (_uiPos select 1), - 0.1 * safezoneW, - 0.028 * safezoneH + 0.1 * safeZoneW, + 0.028 * safeZoneH ]; _combo ctrlCommit 0; @@ -113,10 +113,10 @@ GVAR(comboBoxes) = []; [_button, false, _turret] call FUNC(onButtonTurret); _button ctrlAddEventHandler ["ButtonClick", {[_this select 0, true, []] call FUNC(onButtonTurret)}]; _button ctrlSetPosition [ - (_picturePos select 0) + (_uiPos select 0) - (0.0165 * safezoneW), + (_picturePos select 0) + (_uiPos select 0) - (0.0165 * safeZoneW), (_picturePos select 1) + (_uiPos select 1), - 0.0165 * safezoneW, - 0.028 * safezoneH + 0.0165 * safeZoneW, + 0.028 * safeZoneH ]; _button ctrlCommit 0; }; diff --git a/addons/pylons/menu.hpp b/addons/pylons/menu.hpp index 143792e566e..3f238a9da1c 100644 --- a/addons/pylons/menu.hpp +++ b/addons/pylons/menu.hpp @@ -23,143 +23,143 @@ class GVAR(DialogLoadout) { class TextTitlebar: RscText { idc = ID_TEXT_TITLEBAR; text = CSTRING(AircraftLoadoutTitle); - x = "0.15835 * safezoneW + safezoneX"; - y = "0.262 * safezoneH + safezoneY"; - w = "0.68304 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.15835 * safeZoneW + safeZoneX"; + y = "0.262 * safeZoneH + safeZoneY"; + w = "0.68304 * safeZoneW"; + h = "0.028 * safeZoneH"; colorBackground[] = {"(profileNamespace getVariable ['GUI_BCG_RGB_R', 0.13])","(profileNamespace getVariable ['GUI_BCG_RGB_G', 0.54])","(profileNamespace getVariable ['GUI_BCG_RGB_B', 0.21])",1}; }; class BackgroundDialog: IGUIBack { idc = ID_BACKGROUND_DIALOG; - x = "0.15835 * safezoneW + safezoneX"; - y = "0.29 * safezoneH + safezoneY"; - w = "0.68304 * safezoneW"; - h = "0.448 * safezoneH"; + x = "0.15835 * safeZoneW + safeZoneX"; + y = "0.29 * safeZoneH + safeZoneY"; + w = "0.68304 * safeZoneW"; + h = "0.448 * safeZoneH"; colorBackground[] = {0,0,0,0.3}; }; class BackgroundPicture: IGUIBack { idc = ID_BACKGROUND_PICTURE; - x = "0.171616 * safezoneW + safezoneX"; - y = "0.318 * safezoneH + safezoneY"; - w = "0.440035 * safezoneW"; - h = "0.392 * safezoneH"; + x = "0.171616 * safeZoneW + safeZoneX"; + y = "0.318 * safeZoneH + safeZoneY"; + w = "0.440035 * safeZoneW"; + h = "0.392 * safeZoneH"; colorBackground[] = {0.3,0.3,0.3,1}; }; class PictureAircraft: RscPictureKeepAspect { idc = ID_PICTURE_AIRCRAFT; - x = "0.171616 * safezoneW + safezoneX"; - y = "0.318 * safezoneH + safezoneY"; - w = "0.440035 * safezoneW"; - h = "0.392 * safezoneH"; + x = "0.171616 * safeZoneW + safeZoneX"; + y = "0.318 * safeZoneH + safeZoneY"; + w = "0.440035 * safeZoneW"; + h = "0.392 * safeZoneH"; }; class CheckboxMirror: RscCheckBox { idc = ID_CHECKBOX_MIRROR; - x = "0.171616 * safezoneW + safezoneX"; - y = "0.318 * safezoneH + safezoneY"; - w = "0.0165 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.171616 * safeZoneW + safeZoneX"; + y = "0.318 * safeZoneH + safeZoneY"; + w = "0.0165 * safeZoneW"; + h = "0.028 * safeZoneH"; }; class TextMirror: RscText { idc = ID_TEXT_MIRROR; text = "$STR_3DEN_Object_Attribute_PylonsMirror_displayName"; tooltip="$STR_3DEN_Object_Attribute_PylonsMirror_tooltip"; - x = "0.188116 * safezoneW + safezoneX"; - y = "0.318 * safezoneH + safezoneY"; - w = "0.0656768 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.188116 * safeZoneW + safeZoneX"; + y = "0.318 * safeZoneH + safeZoneY"; + w = "0.0656768 * safeZoneW"; + h = "0.028 * safeZoneH"; colorBackground[] = {0,0,0,0.5}; }; class CheckboxFRIES: RscCheckBox { idc = ID_CHECKBOX_FRIES; - x = "0.171616 * safezoneW + safezoneX"; - y = "0.346 * safezoneH + safezoneY"; - w = "0.0165 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.171616 * safeZoneW + safeZoneX"; + y = "0.346 * safeZoneH + safeZoneY"; + w = "0.0165 * safeZoneW"; + h = "0.028 * safeZoneH"; }; class TextFRIES: RscText { idc = ID_TEXT_FRIES; text = "FRIES"; - x = "0.188116 * safezoneW + safezoneX"; - y = "0.346 * safezoneH + safezoneY"; - w = "0.0656768 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.188116 * safeZoneW + safeZoneX"; + y = "0.346 * safeZoneH + safeZoneY"; + w = "0.0656768 * safeZoneW"; + h = "0.028 * safeZoneH"; colorBackground[] = {0,0,0,0.5}; }; class TextListTitle: RscText { idc = ID_TEXT_LISTTITLE; - x = "0.624786 * safezoneW + safezoneX"; - y = "0.318 * safezoneH + safezoneY"; - w = "0.203437 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.624786 * safeZoneW + safeZoneX"; + y = "0.318 * safeZoneH + safeZoneY"; + w = "0.203437 * safeZoneW"; + h = "0.028 * safeZoneH"; colorBackground[] = {0,0,0,0.5}; }; class ListLoadouts: RscListBox { idc = ID_LIST_LOADOUTS; - x = "0.624786 * safezoneW + safezoneX"; - y = "0.346 * safezoneH + safezoneY"; - w = "0.203437 * safezoneW"; - h = "0.294 * safezoneH"; + x = "0.624786 * safeZoneW + safeZoneX"; + y = "0.346 * safeZoneH + safeZoneY"; + w = "0.203437 * safeZoneW"; + h = "0.294 * safeZoneH"; }; class EditLoadoutName: RscEdit { idc = ID_EDIT_LOADOUTNAME; - x = "0.624786 * safezoneW + safezoneX"; - y = "0.64 * safezoneH + safezoneY"; - w = "0.203437 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.624786 * safeZoneW + safeZoneX"; + y = "0.64 * safeZoneH + safeZoneY"; + w = "0.203437 * safeZoneW"; + h = "0.028 * safeZoneH"; colorBackground[] = {0,0,0,0.7}; }; class ButtonSave: RscButtonMenu { idc = ID_BUTTON_SAVE; action = QUOTE(call FUNC(onButtonSave)); text = "$STR_disp_int_save"; - x = "0.624786 * safezoneW + safezoneX"; - y = "0.682 * safezoneH + safezoneY"; - w = "0.0590625 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.624786 * safeZoneW + safeZoneX"; + y = "0.682 * safeZoneH + safeZoneY"; + w = "0.0590625 * safeZoneW"; + h = "0.028 * safeZoneH"; }; class ButtonLoad: RscButtonMenu { idc = ID_BUTTON_LOAD; action = QUOTE(call FUNC(onButtonLoad)); text = "$STR_disp_int_load"; - x = "0.69703 * safezoneW + safezoneX"; - y = "0.682 * safezoneH + safezoneY"; - w = "0.0590625 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.69703 * safeZoneW + safeZoneX"; + y = "0.682 * safeZoneH + safeZoneY"; + w = "0.0590625 * safeZoneW"; + h = "0.028 * safeZoneH"; }; class ButtonDelete: RscButtonMenu { idc = ID_BUTTON_DELETE; action = QUOTE(call FUNC(onButtonDelete)); text = "$STR_disp_delete"; - x = "0.769275 * safezoneW + safezoneX"; - y = "0.682 * safezoneH + safezoneY"; - w = "0.0590625 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.769275 * safeZoneW + safeZoneX"; + y = "0.682 * safeZoneH + safeZoneY"; + w = "0.0590625 * safeZoneW"; + h = "0.028 * safeZoneH"; }; class ButtonApply: RscButtonMenu { idc = ID_BUTTON_APPLY; action = QUOTE(call FUNC(onButtonApply)); text = "$STR_ui_debug_but_apply"; - x = "0.683895 * safezoneW + safezoneX"; - y = "0.738 * safezoneH + safezoneY"; - w = "0.0721875 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.683895 * safeZoneW + safeZoneX"; + y = "0.738 * safeZoneH + safeZoneY"; + w = "0.0721875 * safeZoneW"; + h = "0.028 * safeZoneH"; }; class ButtonClose: RscButtonMenu { idc = ID_BUTTON_CLOSE; text = "$STR_disp_cancel"; action = QUOTE(call FUNC(onButtonClose)); - x = "0.769275 * safezoneW + safezoneX"; - y = "0.738 * safezoneH + safezoneY"; - w = "0.0721875 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.769275 * safeZoneW + safeZoneX"; + y = "0.738 * safeZoneH + safeZoneY"; + w = "0.0721875 * safeZoneW"; + h = "0.028 * safeZoneH"; }; class TextBanner: RscText { idc = ID_TEXT_BANNER; text = CSTRING(BannerText); - x = "0.171616 * safezoneW + safezoneX"; - y = "0.738 * safezoneH + safezoneY"; - w = "0.440035 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.171616 * safeZoneW + safeZoneX"; + y = "0.738 * safeZoneH + safeZoneY"; + w = "0.440035 * safeZoneW"; + h = "0.028 * safeZoneH"; colorBackground[] = {0.5,0,0,0.5}; }; }; diff --git a/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf b/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf index c1318e3f747..0a3a7a2dc1a 100644 --- a/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf +++ b/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf @@ -34,14 +34,14 @@ [ARR_5( \ {!isNull objectParent (_this select 0)}, \ { \ - LOG_1("moved in after %1 frames",diag_frameno-GVAR(frame)); \ + LOG_1("moved in after %1 frames",diag_frameNo-GVAR(frame)); \ (_this select 0) enableSimulation true; \ }, \ [ARR_3(_player,_moveBackCode,_moveBackParams)], \ TAKEN_SEAT_TIMEOUT, \ { \ params [ARR_3("_player","_moveBackCode","_moveBackParams")]; \ - WARNING_1("failed move in after %1 frames",diag_frameno-GVAR(frame)); \ + WARNING_1("failed move in after %1 frames",diag_frameNo-GVAR(frame)); \ [ARR_2(_player,_moveBackParams)] call _moveBackCode; \ localize "str_mis_state_failed" call EFUNC(common,displayTextStructured); \ _player enableSimulation true; \ @@ -61,7 +61,7 @@ private _fnc_move = { (_this select 2) params ["_moveInCode", "_moveInParams", "_currentTurret", "_moveBackCode", "_moveBackParams"]; - TRACE_6("fnc_move params",_moveInCode,_moveInParams,_currentTurret,_moveBackCode,_moveBackParams,call {GVAR(frame)=diag_frameno}); + TRACE_6("fnc_move params",_moveInCode,_moveInParams,_currentTurret,_moveBackCode,_moveBackParams,call {GVAR(frame)=diag_frameNo}); // workaround getting damage when moveOut while vehicle is moving // also this helps with arma bug when unit is stuck in wrong anim when move in turret with configured enabledByAnimationSource @@ -83,7 +83,7 @@ private _fnc_move = { {params ["_target", "_player", "_currentTurret"]; IS_MOVED_OUT}, { params ["", "_player", "", "_moveInCode", "_moveInParams", "_moveBackCode", "_moveBackParams"]; - LOG_2("moved out after %1 frames",diag_frameno-GVAR(frame),call {GVAR(frame)=diag_frameno; 0}); + LOG_2("moved out after %1 frames",diag_frameNo-GVAR(frame),call {GVAR(frame)=diag_frameNo; 0}); [_player, _moveInParams] call _moveInCode; WAIT_IN_OR_MOVE_BACK; }, diff --git a/addons/rangecard/RscTitles.hpp b/addons/rangecard/RscTitles.hpp index 720f724be4d..6b8af599752 100644 --- a/addons/rangecard/RscTitles.hpp +++ b/addons/rangecard/RscTitles.hpp @@ -73,8 +73,8 @@ class ACE_RangeCard_Dialog { SizeEX=0.025; idc=-1; style=48; - x="safezoneX"; - y="safezoneY+0.181889"; + x="safeZoneX"; + y="safeZoneY+0.181889"; w="1.62727*3/4"; h="1.62727"; colorBackground[]={1,1,1,1}; @@ -84,67 +84,67 @@ class ACE_RangeCard_Dialog { class CAPTION_TEXT_1: RangeCard_RscText { idc=770000; style=ST_LEFT; - x="safezoneX+0.18"; - y="safezoneY+0.181889+0.0"; + x="safeZoneX+0.18"; + y="safeZoneY+0.181889+0.0"; w="0.56*1.62727*3/4"; text=".408 CheyTac - 410 gr Predator Projectiles"; }; class CAPTION_TEXT_2: CAPTION_TEXT_1 { idc=770001; SizeEx=0.022; - y="safezoneY+0.181889+0.03"; + y="safeZoneY+0.181889+0.03"; text="Drop Tables for B.P.: 1013.25mb; Corrected for MVV at Air/Ammo Temperatures -15-35 °C"; }; class CAPTION_TEXT_3: CAPTION_TEXT_2 { idc=770002; - y="safezoneY+0.181889+0.06"; + y="safeZoneY+0.181889+0.06"; text="CheyTac Intervention - 29'' 1:13'' twist (M-200)"; }; class ZERO_RANGE_TEXT: RangeCard_RscText { idc=77003; style=ST_LEFT; SizeEx=0.028; - x="safezoneX+0.885"; - y="safezoneY+0.181889+0.01"; + x="safeZoneX+0.885"; + y="safeZoneY+0.181889+0.01"; w="0.125*1.62727*3/4"; text="100m ZERO"; }; class BAROMETRIC_PRESSURE_TEXT: ZERO_RANGE_TEXT { idc=77004; colorText[]={1,0,0,0.8}; - y="safezoneY+0.181889+0.05"; + y="safeZoneY+0.181889+0.05"; text="B.P.: 1013.25mb"; }; class TARGET_RANGE_TEXT_1: RangeCard_RscText { idc=770010; colorText[]={1,1,1,1}; - x="safezoneX+0.185"; - y="safezoneY+0.181889+0.098"; + x="safeZoneX+0.185"; + y="safeZoneY+0.181889+0.098"; text="Target"; }; class TARGET_RANGE_TEXT_2: TARGET_RANGE_TEXT_1 { idc=770011; SizeEx=0.03; - y="safezoneY+0.181889+0.125"; + y="safeZoneY+0.181889+0.125"; text="Range"; }; class TARGET_RANGE_TEXT_3: TARGET_RANGE_TEXT_1 { idc=770012; - y="safezoneY+0.181889+0.152"; + y="safeZoneY+0.181889+0.152"; text="(m)"; }; class BULLET_DROP_TEXT_1: RangeCard_RscText { idc=770013; - x="safezoneX+0.25"; - y="safezoneY+0.181889+0.095"; + x="safeZoneX+0.25"; + y="safeZoneY+0.181889+0.095"; w="0.405*1.62727*3/4"; text="Bullet Drop (MRADs)"; }; class WIND_LEAD_CAPTION_LIST: RangeCard_RscListNBox { idc=770100; sizeEx=0.021; - x="safezoneX+0.728"; - y="safezoneY+0.181889+0.091"; + x="safeZoneX+0.728"; + y="safeZoneY+0.181889+0.091"; w="0.25*1.62727*3/4"; h="0.0909445"; columns[]={"0.03/2", "0.985/2"}; @@ -153,8 +153,8 @@ class ACE_RangeCard_Dialog { }; class TEMPERATURE_CAPTION_LIST_1: RangeCard_RscListNBox { idc=770200; - x="safezoneX+0.24"; - y="safezoneY+0.181889+0.125"; + x="safeZoneX+0.24"; + y="safeZoneY+0.181889+0.125"; w="0.405*1.62727*3/4"; h="0.0909445"; columns[]={"0/9", "1/9", "2/9", "3/9", "4/9", "5/9", "5.9/9", "6.9/9", "7.8/9"}; @@ -163,8 +163,8 @@ class ACE_RangeCard_Dialog { }; class TEMPERATURE_CAPTION_LIST_2: RangeCard_RscListNBox { idc=770300; - x="safezoneX+0.728"; - y="safezoneY+0.181889+0.15"; + x="safeZoneX+0.728"; + y="safeZoneY+0.181889+0.15"; w="0.25*1.62727*3/4"; h="0.0909445"; columns[]={"0/6", "0.9/6", "1.8/6", "2.9/6", "3.8/6", "4.8/6"}; @@ -173,8 +173,8 @@ class ACE_RangeCard_Dialog { }; class RANGE_CARD_DATA: RangeCard_RscListNBox { idc=770400; - x="safezoneX+0.182"; - y="safezoneY+0.181889+0.194"; + x="safeZoneX+0.182"; + y="safeZoneY+0.181889+0.194"; w="0.72*1.62727*3/4"; h="1.62727"; columns[]={"0/16", "1.2/16", "2.2/16", "3.2/16", "4.2/16", "5.1/16", "6.1/16", "7.1/16", "8.1/16", @@ -185,13 +185,13 @@ class ACE_RangeCard_Dialog { class FOOTNOTE_TEXT_1: CAPTION_TEXT_1 { idc=770020; SizeEx=0.022; - y="safezoneY+1.72431"; + y="safeZoneY+1.72431"; w="0.705*1.62727*3/4"; text="For best results keep ammunition at ambient air temperature. Tables calculated for the above listed barrel"; }; class FOOTNOTE_TEXT_2: FOOTNOTE_TEXT_1 { idc=770021; - y="safezoneY+1.72431+0.024"; + y="safeZoneY+1.72431+0.024"; text="and load with optic mounted 1.5'' above line of bore."; }; }; diff --git a/addons/rangecard/functions/fnc_calculateRangeCard.sqf b/addons/rangecard/functions/fnc_calculateRangeCard.sqf index 0663fcfd531..c16b202539e 100644 --- a/addons/rangecard/functions/fnc_calculateRangeCard.sqf +++ b/addons/rangecard/functions/fnc_calculateRangeCard.sqf @@ -83,8 +83,8 @@ _bulletPos set [1, 0]; _bulletPos set [2, -(_boreHeight / 100)]; _bulletVelocity set [0, 0]; -_bulletVelocity set [1, Cos(_scopeBaseAngle) * _muzzleVelocity]; -_bulletVelocity set [2, Sin(_scopeBaseAngle) * _muzzleVelocity]; +_bulletVelocity set [1, cos(_scopeBaseAngle) * _muzzleVelocity]; +_bulletVelocity set [2, sin(_scopeBaseAngle) * _muzzleVelocity]; while {_TOF < 6 && (_bulletPos select 1) < _targetRange} do { _bulletSpeed = vectorMagnitude _bulletVelocity; @@ -123,21 +123,21 @@ while {_TOF < 6 && (_bulletPos select 1) < _targetRange} do { _tz = (_lastBulletPos select 2) + (_range - (_lastBulletPos select 1)) * ((_bulletPos select 2) - (_lastBulletPos select 2)) / ((_bulletPos select 1) - (_lastBulletPos select 1)); _elevation = - atan(_tz / _range); _windage = - atan(_tx / _range); - _lead = (_targetSpeed * _TOF) / (Tan(MRAD_TO_DEG(1)) * _range); + _lead = (_targetSpeed * _TOF) / (tan(MRAD_TO_DEG(1)) * _range); }; - private _elevationString = Str(round(-DEG_TO_MRAD(_elevation) * 10) / 10); + private _elevationString = str(round(-DEG_TO_MRAD(_elevation) * 10) / 10); if (_elevationString == "0") then { _elevationString = "-0.0"; }; if (_elevationString find "." == -1) then { _elevationString = _elevationString + ".0"; }; - private _windageString = Str(round(DEG_TO_MRAD(_windage) * 10) / 10); + private _windageString = str(round(DEG_TO_MRAD(_windage) * 10) / 10); if (_windageString find "." == -1) then { _windageString = _windageString + ".0"; }; - private _leadString = Str(round(_lead * 10) / 10); + private _leadString = str(round(_lead * 10) / 10); if (_leadString find "." == -1) then { _leadString = _leadString + ".0"; }; diff --git a/addons/rangecard/functions/fnc_updateRangeCard.sqf b/addons/rangecard/functions/fnc_updateRangeCard.sqf index ba44d7e41cc..76b679accf5 100644 --- a/addons/rangecard/functions/fnc_updateRangeCard.sqf +++ b/addons/rangecard/functions/fnc_updateRangeCard.sqf @@ -42,7 +42,7 @@ for "_row" from 0 to 49 do { _control ctrlSetTextColor [0, 0, 0, 1]; }; _control ctrlCommit 0; - _control ctrlSetText Str(100 + _row * 50); + _control ctrlSetText str(100 + _row * 50); GVAR(controls) pushBack _control; }; for "_column" from 0 to 8 do { diff --git a/addons/rearm/functions/fnc_canRearm.sqf b/addons/rearm/functions/fnc_canRearm.sqf index 8d2b0b58e50..34bb3727536 100644 --- a/addons/rearm/functions/fnc_canRearm.sqf +++ b/addons/rearm/functions/fnc_canRearm.sqf @@ -22,7 +22,7 @@ if (!alive _vehicle) exitWith {false}; if (GVAR(level) == 0 || {isNull _unit} || {!(_unit isKindOf "CAManBase")} || {!local _unit} || {_vehicle distance _unit > REARM_ACTION_DISTANCE} || {_vehicle getVariable [QGVAR(disabled), false]}) exitWith {false}; private _dummy = _unit getVariable [QGVAR(dummy), objNull]; -if (isNull _dummy) exitwith {false}; +if (isNull _dummy) exitWith {false}; private _magazineClass = _dummy getVariable QGVAR(magazineClass); if (isNil "_magazineClass") exitWith {false}; diff --git a/addons/rearm/functions/fnc_rearm.sqf b/addons/rearm/functions/fnc_rearm.sqf index 8ef09c8f76b..821691a3259 100644 --- a/addons/rearm/functions/fnc_rearm.sqf +++ b/addons/rearm/functions/fnc_rearm.sqf @@ -20,7 +20,7 @@ params ["_target", "_unit"]; TRACE_2("rearm",_target,_unit); private _attachedDummy = _unit getVariable [QGVAR(dummy), objNull]; -if (isNull _attachedDummy) exitwith {ERROR_1("attachedDummy null %1",_attachedDummy);}; +if (isNull _attachedDummy) exitWith {ERROR_1("attachedDummy null %1",_attachedDummy);}; private _magazineClass = _attachedDummy getVariable QGVAR(magazineClass); if (isNil "_magazineClass") exitWith {ERROR_1("magazineClass nil %1",_attachedDummy);}; diff --git a/addons/rearm/functions/fnc_rearmSuccessLocal.sqf b/addons/rearm/functions/fnc_rearmSuccessLocal.sqf index f41dff6ea9c..ace43baf8f9 100644 --- a/addons/rearm/functions/fnc_rearmSuccessLocal.sqf +++ b/addons/rearm/functions/fnc_rearmSuccessLocal.sqf @@ -31,7 +31,7 @@ if (_pylon > 0) exitWith { // Fill magazine completely if (_turretPath isEqualTo [-1]) then {_turretPath = [];}; // Convert back to pylon turret format TRACE_3("",_pylon,_magazineClass,_rounds); - _vehicle setPylonLoadOut [_pylon, _magazineClass, true, _turretPath]; + _vehicle setPylonLoadout [_pylon, _magazineClass, true, _turretPath]; [QEGVAR(common,displayTextStructured), [[LSTRING(Hint_RearmedTriple), _rounds, getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"), getText(configOf _vehicle >> "displayName")], 3, _unit], [_unit]] call CBA_fnc_targetEvent; @@ -41,7 +41,7 @@ if (_pylon > 0) exitWith { private _currentCount = _vehicle ammoOnPylon _pylon; private _newCount = ((_currentCount max 0) + _numRounds) min _rounds; TRACE_3("",_pylon,_magazineClass,_newCount); - _vehicle setPylonLoadOut [_pylon, _magazineClass, true, _turretPath]; + _vehicle setPylonLoadout [_pylon, _magazineClass, true, _turretPath]; _vehicle setAmmoOnPylon [_pylon, _newCount]; [QEGVAR(common,displayTextStructured), [[LSTRING(Hint_RearmedTriple), _numRounds, getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"), diff --git a/addons/rearm/functions/fnc_storeAmmo.sqf b/addons/rearm/functions/fnc_storeAmmo.sqf index e9f57369f3d..1d08d289be4 100644 --- a/addons/rearm/functions/fnc_storeAmmo.sqf +++ b/addons/rearm/functions/fnc_storeAmmo.sqf @@ -19,7 +19,7 @@ params ["_truck", "_unit"]; private _attachedDummy = _unit getVariable [QGVAR(dummy), objNull]; -if (isNull _attachedDummy) exitwith {}; +if (isNull _attachedDummy) exitWith {}; private _magazineClass = _attachedDummy getVariable [QGVAR(magazineClass), "#noVar"]; diff --git a/addons/refuel/dev/exportTerrainRefuelPositions.sqf b/addons/refuel/dev/exportTerrainRefuelPositions.sqf index c7f9abfb2fd..8064736ad9c 100644 --- a/addons/refuel/dev/exportTerrainRefuelPositions.sqf +++ b/addons/refuel/dev/exportTerrainRefuelPositions.sqf @@ -69,7 +69,7 @@ if (_checkCount != _totalCount) then { // export text private _nl = toString [10]; private _multipleBasePumps = 1 < count _basePumps; -private _output = [format [" %1[] = { /* %2 */", worldName, getText (configfile >> "CfgWorlds" >> worldName >> "description")]]; +private _output = [format [" %1[] = { /* %2 */", worldName, getText (configFile >> "CfgWorlds" >> worldName >> "description")]]; { if (_forEachIndex > 0) then {_output pushBack ","}; _x params ["_class", "_positions"]; diff --git a/addons/refuel/functions/fnc_connectNozzleAction.sqf b/addons/refuel/functions/fnc_connectNozzleAction.sqf index 502e1dc3a41..1a022b6e768 100644 --- a/addons/refuel/functions/fnc_connectNozzleAction.sqf +++ b/addons/refuel/functions/fnc_connectNozzleAction.sqf @@ -62,7 +62,7 @@ if (_bestPosASL isEqualTo []) exitWith { //Move it out slightly, for visibility sake (better to look a little funny than be embedded//sunk in the hull and be useless) _bestPosASL = _bestPosASL vectorAdd ((_bestPosASL vectorFromTo _startingPosASL) vectorMultiply 0.05); -private _attachPosModel = _sink worldToModel (ASLtoAGL _bestPosASL); +private _attachPosModel = _sink worldToModel (ASLToAGL _bestPosASL); [ GVAR(progressDuration), diff --git a/addons/reload/functions/fnc_displayAmmo.sqf b/addons/reload/functions/fnc_displayAmmo.sqf index 68e176587ad..7e38ee65f87 100644 --- a/addons/reload/functions/fnc_displayAmmo.sqf +++ b/addons/reload/functions/fnc_displayAmmo.sqf @@ -122,7 +122,7 @@ if (_isStaticWeapon) then { _loadedName = parseText format ["%1", _loadedName]; - private _text = composeText [_loadedName, linebreak, _ammoBarsStructuredText]; + private _text = composeText [_loadedName, lineBreak, _ammoBarsStructuredText]; [_text] call EFUNC(common,displayTextStructured); } else { if (_magazine != "") then { diff --git a/addons/repair/functions/fnc_canRepair.sqf b/addons/repair/functions/fnc_canRepair.sqf index ff61450b12b..4a77383c288 100644 --- a/addons/repair/functions/fnc_canRepair.sqf +++ b/addons/repair/functions/fnc_canRepair.sqf @@ -21,7 +21,7 @@ params ["_caller", "_target", "_hitPoint", "_className"]; TRACE_4("params",_caller,_target,_hitPoint,_className); -private _config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className); +private _config = (configFile >> "ACE_Repair" >> "Actions" >> _className); if !(isClass _config) exitWith {false}; // or go for a default? // if(isEngineOn _target) exitWith {false}; // Ignore here so action shows, then exit and show warning when selected #3348 diff --git a/addons/repair/functions/fnc_repair.sqf b/addons/repair/functions/fnc_repair.sqf index ccb2e42dfd0..ae4038daf0a 100644 --- a/addons/repair/functions/fnc_repair.sqf +++ b/addons/repair/functions/fnc_repair.sqf @@ -21,7 +21,7 @@ params ["_caller", "_target", "_hitPoint", "_className"]; TRACE_4("params",_caller,_target,_hitPoint,_className); -private _config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className); +private _config = (configFile >> "ACE_Repair" >> "Actions" >> _className); if !(isClass _config) exitWith {false}; // or go for a default? private _engineerRequired = if (isNumber (_config >> "requiredEngineer")) then { diff --git a/addons/repair/functions/fnc_repair_failure.sqf b/addons/repair/functions/fnc_repair_failure.sqf index 37b2c50447c..0c7fcbf9af3 100644 --- a/addons/repair/functions/fnc_repair_failure.sqf +++ b/addons/repair/functions/fnc_repair_failure.sqf @@ -59,7 +59,7 @@ if (!isNil "_weaponSelect") then { // Record specific callback -private _config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className); +private _config = (configFile >> "ACE_Repair" >> "Actions" >> _className); private _callback = getText (_config >> "callbackFailure"); if (isNil _callback) then { diff --git a/addons/repair/functions/fnc_repair_success.sqf b/addons/repair/functions/fnc_repair_success.sqf index 9da2b0c4039..94ffd819e31 100644 --- a/addons/repair/functions/fnc_repair_success.sqf +++ b/addons/repair/functions/fnc_repair_success.sqf @@ -54,7 +54,7 @@ if (!isNil "_weaponSelect") then { } forEach _claimedObjects; // Record specific callback -private _config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className); +private _config = (configFile >> "ACE_Repair" >> "Actions" >> _className); private _callback = getText (_config >> "callbackSuccess"); if (isNil _callback) then { diff --git a/addons/repair/functions/fnc_useItems.sqf b/addons/repair/functions/fnc_useItems.sqf index edc18bcb16f..784c4a5da2a 100644 --- a/addons/repair/functions/fnc_useItems.sqf +++ b/addons/repair/functions/fnc_useItems.sqf @@ -25,14 +25,14 @@ private _itemsUsedBy = []; if (_x isEqualType []) then { { private _itemUsedInfo = [_unit, _x] call FUNC(useItem); - if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; + if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushBack [(_itemUsedInfo select 1), _x]}; } forEach _x; }; // handle required item if (_x isEqualType "") then { private _itemUsedInfo = [_unit, _x] call FUNC(useItem); - if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; + if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushBack [(_itemUsedInfo select 1), _x]}; }; } forEach _items; diff --git a/addons/respawn/functions/fnc_updateRallypoint.sqf b/addons/respawn/functions/fnc_updateRallypoint.sqf index a0e14a4ed29..bedc887b3c2 100644 --- a/addons/respawn/functions/fnc_updateRallypoint.sqf +++ b/addons/respawn/functions/fnc_updateRallypoint.sqf @@ -18,7 +18,7 @@ */ params ["_rallypoint", "_side"]; -private _position = param [2, getpos _rallypoint]; +private _position = param [2, getPos _rallypoint]; if (!hasInterface) exitWith {}; diff --git a/addons/sandbag/functions/fnc_pickup.sqf b/addons/sandbag/functions/fnc_pickup.sqf index 2bcc418f4ca..07a6285e685 100644 --- a/addons/sandbag/functions/fnc_pickup.sqf +++ b/addons/sandbag/functions/fnc_pickup.sqf @@ -29,7 +29,7 @@ _unit setVariable [QGVAR(isUsingSandbag), true]; if (isNull _sandbag) exitWith {}; - deletevehicle _sandbag; + deleteVehicle _sandbag; // Force physx update { diff --git a/addons/scopes/RscTitles.hpp b/addons/scopes/RscTitles.hpp index c108caaf4d8..5b3002599ea 100644 --- a/addons/scopes/RscTitles.hpp +++ b/addons/scopes/RscTitles.hpp @@ -26,10 +26,10 @@ class RscTitles { colorBackground[] = { 1, 1, 1, 1 }; shadow = 1; - x = "(0.5 - 0.4 / 2) * safezoneW + safezoneX"; - y = "0 * safezoneH + safezoneY"; - w = "0.4 * safezoneW"; - h = "0.3 * safezoneH"; + x = "(0.5 - 0.4 / 2) * safeZoneW + safeZoneX"; + y = "0 * safeZoneH + safeZoneY"; + w = "0.4 * safeZoneW"; + h = "0.3 * safeZoneH"; }; class ACE_Scopes_Zeroing_Vertical: RscText { idc = 12; @@ -43,10 +43,10 @@ class RscTitles { colorBackground[] = { 1, 0, 0, 0 }; shadow = 0; - x = "(0.5 - 0.4 / 2 + 0.45*0.4) * safezoneW + safezoneX"; - y = "(0 + 0.19*0.3) * safezoneH + safezoneY"; - w = "0.04 * safezoneW"; - h = "0.025 * safezoneH"; + x = "(0.5 - 0.4 / 2 + 0.45*0.4) * safeZoneW + safeZoneX"; + y = "(0 + 0.19*0.3) * safeZoneH + safeZoneY"; + w = "0.04 * safeZoneW"; + h = "0.025 * safeZoneH"; }; class ACE_Scopes_Zeroing_Horizontal: RscText { idc = 13; @@ -60,10 +60,10 @@ class RscTitles { colorBackground[] = { 1, 0, 0, 0 }; shadow = 0; - x = "(0.5 - 0.4 / 2 + 0.6*0.4) * safezoneW + safezoneX"; - y = "(0 + 0.47*0.3) * safezoneH + safezoneY"; - w = "0.019 * safezoneW"; - h = "0.025 * safezoneH"; + x = "(0.5 - 0.4 / 2 + 0.6*0.4) * safeZoneW + safeZoneX"; + y = "(0 + 0.47*0.3) * safeZoneH + safeZoneY"; + w = "0.019 * safeZoneW"; + h = "0.025 * safeZoneH"; }; }; }; diff --git a/addons/sitting/functions/fnc_sit.sqf b/addons/sitting/functions/fnc_sit.sqf index 033a1f4d2ca..d359083c44a 100644 --- a/addons/sitting/functions/fnc_sit.sqf +++ b/addons/sitting/functions/fnc_sit.sqf @@ -56,7 +56,7 @@ TRACE_2("Sit pos and dir",_sitPosition,_sitDirection); // Set direction and position _player setDir _sitDirection; //modelToWorld returns AGL -_player setPosASL (AGLtoASL (_seat modelToWorld _sitPosition)); +_player setPosASL (AGLToASL (_seat modelToWorld _sitPosition)); // Set variables, save seat object on player _player setVariable [QGVAR(sittingStatus), [_seat, _actionID, _seatPos]]; diff --git a/addons/spectator/functions/fnc_cam_setVisionMode.sqf b/addons/spectator/functions/fnc_cam_setVisionMode.sqf index 5bcf8710b6b..eaec12a86d3 100644 --- a/addons/spectator/functions/fnc_cam_setVisionMode.sqf +++ b/addons/spectator/functions/fnc_cam_setVisionMode.sqf @@ -29,10 +29,10 @@ if !(_newVision in _visions) then { if (GVAR(camMode) != MODE_FPS) then { // 0+ are all thermal vision types if (_newVision < 0) then { - false setCamUseTi 0; + false setCamUseTI 0; camUseNVG (_newVision >= VISION_NVG); } else { - true setCamUseTi _newVision; + true setCamUseTI _newVision; }; // Give user feedback that vision mode changed diff --git a/addons/spectator/functions/fnc_setCameraAttributes.sqf b/addons/spectator/functions/fnc_setCameraAttributes.sqf index f33f23c09a4..48cc4fb0c58 100644 --- a/addons/spectator/functions/fnc_setCameraAttributes.sqf +++ b/addons/spectator/functions/fnc_setCameraAttributes.sqf @@ -88,7 +88,7 @@ if (!isNil QGVAR(camera)) then { // GVARs exits purely for pre-setting of these attributes if (!isNil "_position") then { - GVAR(camPos) = ATLtoASL _position; + GVAR(camPos) = ATLToASL _position; }; if (!isNil "_direction") then { diff --git a/addons/spectator/functions/fnc_ui_handleKeyDown.sqf b/addons/spectator/functions/fnc_ui_handleKeyDown.sqf index c26a06786d7..59dd418782a 100644 --- a/addons/spectator/functions/fnc_ui_handleKeyDown.sqf +++ b/addons/spectator/functions/fnc_ui_handleKeyDown.sqf @@ -108,13 +108,13 @@ if (_key == DIK_L) exitWith { { deleteVehicle _x; } forEach GVAR(camLights); GVAR(camLights) = []; } else { - private _cameraLight = "#lightpoint" createvehicleLocal getPosASL GVAR(camera); + private _cameraLight = "#lightpoint" createVehicleLocal getPosASL GVAR(camera); _cameraLight setLightBrightness 2; _cameraLight setLightAmbient [1,1,1]; _cameraLight setLightColor [0,0,0]; _cameraLight lightAttachObject [GVAR(camera), [0,0,0]]; - private _pointerLight = "#lightpoint" createvehicleLocal getPosASL GVAR(camera); + private _pointerLight = "#lightpoint" createVehicleLocal getPosASL GVAR(camera); _pointerLight setLightBrightness 1; _pointerLight setLightAmbient [1,1,1]; _pointerLight setLightColor [0,0,0]; diff --git a/addons/spectator/functions/fnc_ui_handleListClick.sqf b/addons/spectator/functions/fnc_ui_handleListClick.sqf index 600b7e711ce..f81a73f4fd1 100644 --- a/addons/spectator/functions/fnc_ui_handleListClick.sqf +++ b/addons/spectator/functions/fnc_ui_handleListClick.sqf @@ -33,7 +33,7 @@ if !(isNull _object) then { if (_dblClick) then { // Place camera within ~10m of the object and above ground level private _pos = getPosASLVisual _object; - GVAR(camera) setPosASL (AGLtoASL (_pos getPos [1 + random 10, random 360]) vectorAdd [0,0,2 + random 10]); + GVAR(camera) setPosASL (AGLToASL (_pos getPos [1 + random 10, random 360]) vectorAdd [0,0,2 + random 10]); // Reset the focus [objNull] call FUNC(setFocus); diff --git a/addons/spectator/functions/fnc_ui_updateHelp.sqf b/addons/spectator/functions/fnc_ui_updateHelp.sqf index 1ddbbacad91..4a226bf3613 100644 --- a/addons/spectator/functions/fnc_ui_updateHelp.sqf +++ b/addons/spectator/functions/fnc_ui_updateHelp.sqf @@ -31,7 +31,7 @@ private _controls = []; // When not in first person, camera rotation applies if (_cameraMode != MODE_FPS) then { - _controls pushback ["[RMB]", localize "STR_A3_Spectator_Helper_CameraRotation"]; + _controls pushBack ["[RMB]", localize "STR_A3_Spectator_Helper_CameraRotation"]; }; // When in free camera, focus/un-focus with LMB @@ -52,31 +52,31 @@ if (_hasTarget && {count _availableModes > 1}) then { }; if (_cameraMode == MODE_FREE) then { - _controls pushback [ + _controls pushBack [ format ["[%1/%2]", [DIK_W] call CBA_fnc_localizeKey, [DIK_S] call CBA_fnc_localizeKey], localize "STR_A3_Spectator_Helper_Movement" ]; - _controls pushback [ + _controls pushBack [ format ["[%1/%2]", [DIK_A] call CBA_fnc_localizeKey, [DIK_D] call CBA_fnc_localizeKey], localize "STR_A3_Spectator_Helper_Strafing" ]; - _controls pushback [ + _controls pushBack [ format ["[%1/%2]", [DIK_Q] call CBA_fnc_localizeKey, [DIK_Z] call CBA_fnc_localizeKey], localize "STR_A3_Spectator_Helper_Height" ]; } else { - _controls pushback [ + _controls pushBack [ format ["[%1]", toUpper ([DIK_RIGHT] call CBA_fnc_localizeKey)], localize LSTRING(nextUnit) ]; - _controls pushback [ + _controls pushBack [ format ["[%1]", toUpper ([DIK_LEFT] call CBA_fnc_localizeKey)], localize LSTRING(prevUnit) ]; }; if (_cameraMode != MODE_FPS) then { - _controls pushback [ + _controls pushBack [ format ["[%1]", ([DIK_N] call CBA_fnc_localizeKey)], localize LSTRING(nextVis) ]; @@ -128,7 +128,7 @@ lnbClear _help; // Set height based on number of rows private _newH = (GVAR(uiHelpH) / MAX_CONTROLS_HELP_ENTRIES) * count _controls; -private _newY = safezoneY + safezoneH - _newH; +private _newY = safeZoneY + safeZoneH - _newH; (ctrlPosition _help) params ["_newX","","_newW"]; diff --git a/addons/spectator/functions/fnc_ui_updateIconsToDraw.sqf b/addons/spectator/functions/fnc_ui_updateIconsToDraw.sqf index 6093467d639..e5a736a7754 100644 --- a/addons/spectator/functions/fnc_ui_updateIconsToDraw.sqf +++ b/addons/spectator/functions/fnc_ui_updateIconsToDraw.sqf @@ -89,7 +89,7 @@ private _camPos = AGLToASL positionCameraToWorld [0,0,0]; 0, _heightByDistance, 0, - groupID _group, + groupId _group, 2, _fontSizeByDistance, "PuristaMedium", diff --git a/addons/spectator/functions/fnc_ui_updateListEntities.sqf b/addons/spectator/functions/fnc_ui_updateListEntities.sqf index 000f9a4b226..969460329c9 100644 --- a/addons/spectator/functions/fnc_ui_updateListEntities.sqf +++ b/addons/spectator/functions/fnc_ui_updateListEntities.sqf @@ -54,7 +54,7 @@ private _entities = [true] call FUNC(getTargetEntities); // Cache the info of the group itself private _groupTexture = [_group] call FUNC(getGroupIcon); - private _groupInfo = [_group, str _group, _groupTexture, groupID _group]; + private _groupInfo = [_group, str _group, _groupTexture, groupId _group]; // Add the group to the correct side private _side = side _group; diff --git a/addons/spectator/script_component.hpp b/addons/spectator/script_component.hpp index b4e7c82ac88..c29c60bdefc 100644 --- a/addons/spectator/script_component.hpp +++ b/addons/spectator/script_component.hpp @@ -17,12 +17,12 @@ #include "\z\ace\addons\main\script_macros.hpp" // UI grid -#define SIZEX ((safezoneW / safezoneH) min 1.2) +#define SIZEX ((safeZoneW / safeZoneH) min 1.2) #define SIZEY (SIZEX / 1.2) #define W_PART(num) (num * (SIZEX / 40)) #define H_PART(num) (num * (SIZEY / 25)) -#define X_PART(num) (W_PART(num) + (safezoneX + (safezoneW - SIZEX)/2)) -#define Y_PART(num) (H_PART(num) + (safezoneY + (safezoneH - SIZEY)/2)) +#define X_PART(num) (W_PART(num) + (safeZoneX + (safeZoneW - SIZEX)/2)) +#define Y_PART(num) (H_PART(num) + (safeZoneY + (safeZoneH - SIZEY)/2)) // UI/Camera related values #define SPEED_SLOW 0.1 diff --git a/addons/spectator/ui.hpp b/addons/spectator/ui.hpp index f61e7749eea..d81887db760 100644 --- a/addons/spectator/ui.hpp +++ b/addons/spectator/ui.hpp @@ -82,7 +82,7 @@ class GVAR(display) { onMouseExit = QUOTE([true] call FUNC(ui_fadeList)); x = "safeZoneX"; - y = "safezoneY"; + y = "safeZoneY"; w = QUOTE(W_PART(13.5)); h = QUOTE(H_PART(1.5)); @@ -98,7 +98,7 @@ class GVAR(display) { class CameraTypesGroup: RscControlsGroupNoScrollbars { idc = IDC_CAM_TYPES; x = QUOTE(X_PART(15.5)); - y = QUOTE(safezoneY + safezoneH - H_PART(2.38)); + y = QUOTE(safeZoneY + safeZoneH - H_PART(2.38)); w = QUOTE(W_PART(8.6)); h = 2.6; class controls { @@ -245,8 +245,8 @@ class GVAR(display) { }; class HelpBackground: RscText { idc = IDC_HELP_BACK; - x = QUOTE(safezoneX + safezoneW - W_PART(12)); - y = QUOTE(safezoneY + safezoneH - H_PART(8)); + x = QUOTE(safeZoneX + safeZoneW - W_PART(12)); + y = QUOTE(safeZoneY + safeZoneH - H_PART(8)); w = QUOTE(W_PART(12)); h = QUOTE(H_PART(8)); colorBackground[] = {0,0,0,0.75}; @@ -256,8 +256,8 @@ class GVAR(display) { disableOverflow = 0; rowHeight = QUOTE(H_PART(1)); idc = IDC_HELP; - x = QUOTE(safezoneX + safezoneW - W_PART(12)); - y = QUOTE(safezoneY + safezoneH - H_PART(12)); + x = QUOTE(safeZoneX + safeZoneW - W_PART(12)); + y = QUOTE(safeZoneY + safeZoneH - H_PART(12)); w = QUOTE(W_PART(12)); h = QUOTE(H_PART(12)); }; diff --git a/addons/spottingscope/script_component.hpp b/addons/spottingscope/script_component.hpp index 6b2d95abbd5..cf7b8a835f7 100644 --- a/addons/spottingscope/script_component.hpp +++ b/addons/spottingscope/script_component.hpp @@ -16,8 +16,8 @@ #include "\z\ace\addons\main\script_macros.hpp" -#define POS_X_BASE(size) safezoneX + 0.5 * safezoneW - 0.5 * (size) / (getResolution select 5) -#define POS_Y_BASE(size) safezoneY + 0.5 * safezoneH - 0.5 * (size) / (getResolution select 5) * 4/3 +#define POS_X_BASE(size) safeZoneX + 0.5 * safeZoneW - 0.5 * (size) / (getResolution select 5) +#define POS_Y_BASE(size) safeZoneY + 0.5 * safeZoneH - 0.5 * (size) / (getResolution select 5) * 4/3 #define POS_W_BASE(size) (size) / (getResolution select 5) #define POS_H_BASE(size) (size) / (getResolution select 5) * 4/3 diff --git a/addons/tagging/functions/fnc_createTag.sqf b/addons/tagging/functions/fnc_createTag.sqf index 90923cc8034..134e37bcc0a 100644 --- a/addons/tagging/functions/fnc_createTag.sqf +++ b/addons/tagging/functions/fnc_createTag.sqf @@ -68,7 +68,7 @@ if (_object getVariable [QGVAR(testVar), false]) then { if (_selection == "" && _damage >= 1) then { { deleteVehicle _x; - } foreach (_object getVariable [QGVAR(attachedTags), []]); + } forEach (_object getVariable [QGVAR(attachedTags), []]); _object setVariable [QGVAR(attachedTags), []]; }; }]; diff --git a/addons/towing/functions/fnc_towStateMachinePFH.sqf b/addons/towing/functions/fnc_towStateMachinePFH.sqf index 7b295754fad..ad516f211b6 100644 --- a/addons/towing/functions/fnc_towStateMachinePFH.sqf +++ b/addons/towing/functions/fnc_towStateMachinePFH.sqf @@ -70,7 +70,7 @@ switch (_state) do { // can't use createVehicleLocal because rope can be non-local (like parent) and it must be attached to global vehicle GVAR(helper) = createVehicle [QGVAR(helper), [0, 0, 0], [], 0, "CAN_COLLIDE"]; GVAR(helper) attachTo [_unit, [0, 0, 0], "LeftHand", true]; - _rope = ropeCreate [_parent, _parent worldToModelVisual ASLtoAGL getPosASLVisual GVAR(attachHelper), GVAR(helper), [0, 0, 0], _length]; + _rope = ropeCreate [_parent, _parent worldToModelVisual ASLToAGL getPosASLVisual GVAR(attachHelper), GVAR(helper), [0, 0, 0], _length]; _args set [3, _rope]; }; @@ -95,7 +95,7 @@ switch (_state) do { case TOW_STATE_ATTACH: { TRACE_3("state attach",GVAR(attachHelper),_parent,_rope); private _child = GVAR(attachHelper) getVariable [QGVAR(object), objNull]; - private _relativeAttachPos = _child worldToModelVisual ASLtoAGL getPosASLVisual GVAR(attachHelper); + private _relativeAttachPos = _child worldToModelVisual ASLToAGL getPosASLVisual GVAR(attachHelper); TRACE_3("child&pos",_parent,_child,_relativeAttachPos); @@ -118,7 +118,7 @@ switch (_state) do { }; private _hookParent = createVehicle [QGVAR(hook), [0, 0, 0], [], 0, "CAN_COLLIDE"]; - _hookParent attachTo [_parent, _parent worldToModelVisual ASLtoAGL getPosASLVisual _rope]; + _hookParent attachTo [_parent, _parent worldToModelVisual ASLToAGL getPosASLVisual _rope]; private _hook = createVehicle [QGVAR(hook), [0, 0, 0], [], 0, "CAN_COLLIDE"]; _hook attachTo [_child, _relativeAttachPos]; diff --git a/addons/trenches/functions/fnc_continueDiggingTrench.sqf b/addons/trenches/functions/fnc_continueDiggingTrench.sqf index 78047c189e4..e3aadcfd51c 100644 --- a/addons/trenches/functions/fnc_continueDiggingTrench.sqf +++ b/addons/trenches/functions/fnc_continueDiggingTrench.sqf @@ -81,7 +81,7 @@ if(_actualProgress == 0) then { _cutterPos set [2, getTerrainHeightASL _cutterPos]; _trenchGrassCutter setPosASL _cutterPos; deleteVehicle _trenchGrassCutter; - } foreach getArray (configOf _trench >> QGVAR(grassCuttingPoints)); + } forEach getArray (configOf _trench >> QGVAR(grassCuttingPoints)); }; private _progressLeft = (_actualProgress * 10) + 1; diff --git a/addons/trenches/functions/fnc_placeConfirm.sqf b/addons/trenches/functions/fnc_placeConfirm.sqf index 9a49df86e79..2cfdaf8891e 100644 --- a/addons/trenches/functions/fnc_placeConfirm.sqf +++ b/addons/trenches/functions/fnc_placeConfirm.sqf @@ -64,7 +64,7 @@ for [{private _ix = -_dx/2},{_ix <= _dx/2},{_ix = _ix + _dx/3}] do { _pos set [2, getTerrainHeightASL _pos]; _pos2 = +_pos; _pos2 set [2, getTerrainHeightASL _pos + 1]; - drawLine3D [ASLtoAGL _pos, ASLtoAGL _pos2, [1,1,0,1]]; + drawLine3D [ASLToAGL _pos, ASLToAGL _pos2, [1,1,0,1]]; #endif }; }; diff --git a/addons/trenches/functions/fnc_placeTrench.sqf b/addons/trenches/functions/fnc_placeTrench.sqf index e6e03e0b579..285fe278e94 100644 --- a/addons/trenches/functions/fnc_placeTrench.sqf +++ b/addons/trenches/functions/fnc_placeTrench.sqf @@ -77,7 +77,7 @@ GVAR(digPFH) = [{ _pos set [2, getTerrainHeightASL _pos]; _pos2 = +_pos; _pos2 set [2, getTerrainHeightASL _pos + 1]; - drawLine3D [ASLtoAGL _pos, ASLtoAGL _pos2, [1,1,0,1]]; + drawLine3D [ASLToAGL _pos, ASLToAGL _pos2, [1,1,0,1]]; #endif }; }; diff --git a/addons/ui/CfgInGameUI.hpp b/addons/ui/CfgInGameUI.hpp index 8f39984b03c..3e1f28ba204 100644 --- a/addons/ui/CfgInGameUI.hpp +++ b/addons/ui/CfgInGameUI.hpp @@ -1,5 +1,5 @@ class CfgInGameUI { class DefaultAction { - size = QUOTE(profileNamespace getVariable [ARR_2('GVAR(hideDefaultActionIcon)',(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8))]); + size = QUOTE(profileNamespace getVariable [ARR_2('GVAR(hideDefaultActionIcon)',(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 0.8))]); }; }; diff --git a/addons/vector/RscInGameUI.hpp b/addons/vector/RscInGameUI.hpp index 7e2f7057650..b7a6f25022b 100644 --- a/addons/vector/RscInGameUI.hpp +++ b/addons/vector/RscInGameUI.hpp @@ -51,88 +51,88 @@ class RscInGameUI { class ACE_ScriptedDisplayControlsGroup: RscControlsGroupNoScrollbars { onLoad = "uiNamespace setVariable ['ACE_dlgVector', ctrlParent (_this select 0)];"; idc = 170; - x = "safezoneX"; - y = "safezoneY"; - w = "safezoneW"; - h = "safezoneH"; + x = "safeZoneX"; + y = "safeZoneY"; + w = "safeZoneW"; + h = "safeZoneH"; class controls { class Center: RscPicture { idc = IDC_CENTER; colorText[] = {1,0,0,0.5}; - x = "0.5 - (0.8 / 16 * safezoneW)/2 - safezoneX"; - y = "0.5 - (0.8 / 9 * safezoneH)/2 - safezoneY"; - w = "0.8 / 16 * safezoneW"; - h = "0.8 / 9 * safezoneH"; + x = "0.5 - (0.8 / 16 * safeZoneW)/2 - safeZoneX"; + y = "0.5 - (0.8 / 9 * safeZoneH)/2 - safeZoneY"; + w = "0.8 / 16 * safeZoneW"; + h = "0.8 / 9 * safeZoneH"; }; class Crosshair: Center { idc = IDC_CROSSHAIR; - x = "0.5 - (0.7 / 16 * safezoneW)/2 - safezoneX"; - y = "0.5 - (0.7 / 9 * safezoneH)/2 - safezoneY"; - w = "0.7 / 16 * safezoneW"; - h = "0.7 / 9 * safezoneH"; + x = "0.5 - (0.7 / 16 * safeZoneW)/2 - safeZoneX"; + y = "0.5 - (0.7 / 9 * safeZoneH)/2 - safeZoneY"; + w = "0.7 / 16 * safeZoneW"; + h = "0.7 / 9 * safeZoneH"; }; class Digit0: Center { idc = IDC_DIGIT_0; - x = "(0.54 + 0 * 0.02) * safezoneW"; - y = "0.54 * safezoneH"; - w = "0.5 / 16 * safezoneW"; - h = "0.5 / 9 * safezoneH"; + x = "(0.54 + 0 * 0.02) * safeZoneW"; + y = "0.54 * safeZoneH"; + w = "0.5 / 16 * safeZoneW"; + h = "0.5 / 9 * safeZoneH"; }; class Digit1: Digit0 { idc = IDC_DIGIT_1; - x = "(0.54 + 1 * 0.02) * safezoneW"; + x = "(0.54 + 1 * 0.02) * safeZoneW"; }; class Digit2: Digit0 { idc = IDC_DIGIT_2; - x = "(0.54 + 2 * 0.02) * safezoneW"; + x = "(0.54 + 2 * 0.02) * safeZoneW"; }; class Digit3: Digit0 { idc = IDC_DIGIT_3; - x = "(0.54 + 3 * 0.02) * safezoneW"; + x = "(0.54 + 3 * 0.02) * safeZoneW"; }; class Digit4: Digit0 { idc = IDC_DIGIT_4; - x = "(0.54 + 4 * 0.02) * safezoneW"; + x = "(0.54 + 4 * 0.02) * safeZoneW"; }; class Digit5: Digit0 { idc = IDC_DIGIT_5; - x = "(0.35 + 0 * 0.02) * safezoneW"; + x = "(0.35 + 0 * 0.02) * safeZoneW"; }; class Digit6: Digit0 { idc = IDC_DIGIT_6; - x = "(0.35 + 1 * 0.02) * safezoneW"; + x = "(0.35 + 1 * 0.02) * safeZoneW"; }; class Digit7: Digit0 { idc = IDC_DIGIT_7; - x = "(0.35 + 2 * 0.02) * safezoneW"; + x = "(0.35 + 2 * 0.02) * safeZoneW"; }; class Digit8: Digit0 { idc = IDC_DIGIT_8; - x = "(0.35 + 3 * 0.02) * safezoneW"; + x = "(0.35 + 3 * 0.02) * safeZoneW"; }; class Digit9: Digit0 { idc = IDC_DIGIT_9; - x = "(0.35 + 4 * 0.02) * safezoneW"; + x = "(0.35 + 4 * 0.02) * safeZoneW"; }; class DigitE1: Digit0 { idc = IDC_DIGIT_E1; - x = "(0.39 + 0 * 0.02) * safezoneW"; - y = "0.42 * safezoneH"; + x = "(0.39 + 0 * 0.02) * safeZoneW"; + y = "0.42 * safeZoneH"; }; class DigitE2: DigitE1 { idc = IDC_DIGIT_E2; - x = "(0.39 + 1 * 0.02) * safezoneW"; + x = "(0.39 + 1 * 0.02) * safeZoneW"; }; class DigitE3: DigitE1 { idc = IDC_DIGIT_E3; - x = "(0.39 + 2 * 0.02) * safezoneW"; + x = "(0.39 + 2 * 0.02) * safeZoneW"; }; class DigitE4: DigitE1 { idc = IDC_DIGIT_E4; - x = "(0.39 + 3 * 0.02) * safezoneW"; + x = "(0.39 + 3 * 0.02) * safeZoneW"; }; }; }; diff --git a/addons/viewports/dev/debugPoints.sqf b/addons/viewports/dev/debugPoints.sqf index 53fe016b628..2ffc81f512a 100644 --- a/addons/viewports/dev/debugPoints.sqf +++ b/addons/viewports/dev/debugPoints.sqf @@ -22,8 +22,8 @@ #define IDD_3DEN 313 [] spawn { - INFO_2("Pre-Init [is3den %1][3den display: %2]",is3den,!isNull findDisplay IDD_3DEN); - if (!is3den) exitWith {}; + INFO_2("Pre-Init [is3den %1][3den display: %2]",is3DEN,!isNull findDisplay IDD_3DEN); + if (!is3DEN) exitWith {}; GVAR(3denIndex) = 0; GVAR(3denViewports) = []; @@ -99,7 +99,7 @@ private _pointASL = _intersections # 0 # 0; if (isNil "_pointASL") exitWith {}; _pointASL = _pointASL vectorAdd [0,0,0.09]; // Add a little bit up because it always sinks into the model - private _pointMS = _vehicle worldToModel ASLtoAGL _pointASL; + private _pointMS = _vehicle worldToModel ASLToAGL _pointASL; private _name = format ["view_%1",GVAR(3denIndex)]; // [_name, _type, _camLocation, _camAttach, _screenLocation, _maxDistance, _compartments, _roles] @@ -114,7 +114,7 @@ addMissionEventHandler ["Draw3D", { private _vehicle = vehicle player; private _viewports = _vehicle getVariable [QGVAR(viewports), []]; - if (is3den) then { + if (is3DEN) then { _vehicle = (get3DENSelected "object") param [0, objNull]; if (isNull _vehicle) exitWith {}; _viewports = [_vehicle] call FUNC(getViewports); @@ -127,7 +127,7 @@ addMissionEventHandler ["Draw3D", { drawIcon3D ["#(argb,8,8,3)color(1,1,1,1)", [1,1,0,1], _vehicle modelToWorldVisual [0,0,0], 0.1, 0.1, 0, "", 1, 0.02, "TahomaB"]; if (alive player) then { // not using ace_player so this works in 3den - drawIcon3D ["#(argb,8,8,3)color(1,1,1,1)", [0,1,0,1], aslToAGL eyepos player, 0.1, 0.1, 0, "eye", 1, 0.02, "TahomaB"]; + drawIcon3D ["#(argb,8,8,3)color(1,1,1,1)", [0,1,0,1], ASLToAGL eyePos player, 0.1, 0.1, 0, "eye", 1, 0.02, "TahomaB"]; drawIcon3D ["#(argb,8,8,3)color(1,1,1,1)", [0,1,0,1], player modelToWorldVisual (player selectionPosition "pilot"), 0.1, 0.1, 0, "pilot", 1, 0.02, "TahomaB"]; }; // { diff --git a/addons/viewports/functions/fnc_eachFrame.sqf b/addons/viewports/functions/fnc_eachFrame.sqf index 21f2f09dc8d..55971172945 100644 --- a/addons/viewports/functions/fnc_eachFrame.sqf +++ b/addons/viewports/functions/fnc_eachFrame.sqf @@ -39,12 +39,12 @@ if (cba_events_control) then { ([_player] call FUNC(getSeatInfo)) params ["_role", "", "", "_compartment"]; private _newIndexAngle = 45; // Controls the max angle - private _eyesPosASL = AGLtoASL (positionCameraToWorld [0, 0, 0]); - private _eyesDir = (AGLtoASL (positionCameraToWorld [0, 0, 1])) vectorDiff _eyesPosASL; + private _eyesPosASL = AGLToASL (positionCameraToWorld [0, 0, 0]); + private _eyesDir = (AGLToASL (positionCameraToWorld [0, 0, 1])) vectorDiff _eyesPosASL; { _x params ["", "", "_camLocation", "", "_screenLocation", "_maxDistance", "_compartments", "_roles"]; - private _viewASL = AGLtoASL (_vehicle modelToWorldVisual _screenLocation); + private _viewASL = AGLToASL (_vehicle modelToWorldVisual _screenLocation); private _viewDiff = _viewASL vectorDiff _eyesPosASL; private _viewAngle = acos (_viewDiff vectorCos _eyesDir); #ifdef DEBUG_MODE_FULL diff --git a/addons/viewports/functions/fnc_viewCreate.sqf b/addons/viewports/functions/fnc_viewCreate.sqf index 8b08da95756..7d9e45864b0 100644 --- a/addons/viewports/functions/fnc_viewCreate.sqf +++ b/addons/viewports/functions/fnc_viewCreate.sqf @@ -68,12 +68,12 @@ switch (true) do { private _ctrlRender = _display ctrlCreate ["RscPicture", -1]; _ctrlRender ctrlSetText _renderTexture; - _ctrlRender ctrlSetPosition [safezoneX + 0.5 * safezoneW - 0.5 * _viewWidth, safezoneY + 0.5 * safeZoneH - 0.5 * _viewHeight, _viewWidth, _viewHeight]; + _ctrlRender ctrlSetPosition [safeZoneX + 0.5 * safeZoneW - 0.5 * _viewWidth, safeZoneY + 0.5 * safeZoneH - 0.5 * _viewHeight, _viewWidth, _viewHeight]; _ctrlRender ctrlCommit 0; private _ctrlOverlay = _display ctrlCreate ["RscPicture", -1]; _ctrlOverlay ctrlSetText "\a3\weapons_f\reticle\data\optika_tv_ca.paa"; - _ctrlOverlay ctrlSetPosition [safezoneX + 0.5 * safezoneW - 0.5 * _viewWidth, safezoneY + 0.5 * safeZoneH - 0.5 * _viewHeight, _viewWidth, _viewHeight]; + _ctrlOverlay ctrlSetPosition [safeZoneX + 0.5 * safeZoneW - 0.5 * _viewWidth, safeZoneY + 0.5 * safeZoneH - 0.5 * _viewHeight, _viewWidth, _viewHeight]; _ctrlOverlay ctrlCommit 0; if (_usingGoggles) then { @@ -82,7 +82,7 @@ switch (true) do { private _ctrlNVG = _display ctrlCreate ["RscPicture", -1]; _ctrlNVG ctrlSetText "#(argb,8,8,3)color(1,1,0.6,0.9)"; - _ctrlNVG ctrlSetPosition [safezoneX + 0.5 * safezoneW - 0.5 * _viewWidth, safezoneY + 0.5 * safeZoneH - 0.5 * _viewHeight, _viewWidth, _viewHeight]; + _ctrlNVG ctrlSetPosition [safeZoneX + 0.5 * safeZoneW - 0.5 * _viewWidth, safeZoneY + 0.5 * safeZoneH - 0.5 * _viewHeight, _viewWidth, _viewHeight]; _ctrlNVG ctrlCommit 0; } else { _camEffect = [0]; // 2.08's currentVisionMode change could allow matching real turret's vision mode @@ -106,20 +106,20 @@ switch (true) do { private _ctrlRender = _display ctrlCreate ["RscPicture", -1]; _ctrlRender ctrlSetText _renderTexture; - _ctrlRender ctrlSetPosition [safezoneX + 0.5 * safezoneW - 0.5 * _viewWidth, safezoneY + 0.5 * safeZoneH - 0.5 * _viewHeight, _viewWidth, _viewHeight]; + _ctrlRender ctrlSetPosition [safeZoneX + 0.5 * safeZoneW - 0.5 * _viewWidth, safeZoneY + 0.5 * safeZoneH - 0.5 * _viewHeight, _viewWidth, _viewHeight]; _ctrlRender ctrlCommit 0; if (_usingGoggles) then { // Roughly try to color match ace_nvg, and make it semi-opaque private _ctrlNVG = _display ctrlCreate ["RscPicture", -1]; _ctrlNVG ctrlSetText "#(argb,8,8,3)color(0.25,0.2,0.05,0.75)"; - _ctrlNVG ctrlSetPosition [safezoneX + 0.5 * safezoneW - 0.5 * _viewWidth, safezoneY + 0.5 * safeZoneH - 0.5 * _viewHeight, _viewWidth, _viewHeight]; + _ctrlNVG ctrlSetPosition [safeZoneX + 0.5 * safeZoneW - 0.5 * _viewWidth, safeZoneY + 0.5 * safeZoneH - 0.5 * _viewHeight, _viewWidth, _viewHeight]; _ctrlNVG ctrlCommit 0; }; private _ctrlOverlay = _display ctrlCreate ["RscPicture", -1]; _ctrlOverlay ctrlSetText QPATHTOF(data\optic_window_ca.paa); - _ctrlOverlay ctrlSetPosition [safezoneX + 0.5 * safezoneW - 0.5 * _viewWidth, safezoneY + 0.5 * safeZoneH - 0.5 * _viewHeight, _viewWidth, _viewHeight]; + _ctrlOverlay ctrlSetPosition [safeZoneX + 0.5 * safeZoneW - 0.5 * _viewWidth, safeZoneY + 0.5 * safeZoneH - 0.5 * _viewHeight, _viewWidth, _viewHeight]; _ctrlOverlay ctrlCommit 0; }; }; diff --git a/addons/weather/functions/fnc_updateTemperature.sqf b/addons/weather/functions/fnc_updateTemperature.sqf index 3036171145d..34338f9d79e 100644 --- a/addons/weather/functions/fnc_updateTemperature.sqf +++ b/addons/weather/functions/fnc_updateTemperature.sqf @@ -16,7 +16,7 @@ */ private _month = date select 1; -private _timeRatio = abs(daytime - 12) / 12; +private _timeRatio = abs(dayTime - 12) / 12; GVAR(currentTemperature) = (GVAR(TempDay) select (_month - 1)) * (1 - _timeRatio) + (GVAR(TempNight) select (_month - 1)) * _timeRatio; GVAR(currentTemperature) = GVAR(currentTemperature) + GVAR(temperatureShift) - GVAR(badWeatherShift) * GVAR(currentOvercast); diff --git a/addons/xm157/functions/fnc_ballistics_calculator.sqf b/addons/xm157/functions/fnc_ballistics_calculator.sqf index 1bf6fb86ad7..46b09170e3b 100644 --- a/addons/xm157/functions/fnc_ballistics_calculator.sqf +++ b/addons/xm157/functions/fnc_ballistics_calculator.sqf @@ -41,7 +41,7 @@ private _barometricPressure = _altitude call EFUNC(weather,calculateBarometricPr private _bulletPos = [0,0,-(_boreHeight / 100)]; private _lastBulletPos = +_bulletPos; -private _bulletVelocity = [0,Cos(_scopeBaseAngle) * _muzzleVelocity,Sin(_scopeBaseAngle) * _muzzleVelocity]; +private _bulletVelocity = [0,cos(_scopeBaseAngle) * _muzzleVelocity,sin(_scopeBaseAngle) * _muzzleVelocity]; private _gravity = [-sin (_bank) * cos(_scopeBaseAngle + _inclinationAngle) * -GRAVITY, sin(_scopeBaseAngle + _inclinationAngle) * -GRAVITY, cos (_bank) * cos(_scopeBaseAngle + _inclinationAngle) * -GRAVITY]; diff --git a/addons/xm157/functions/fnc_keyPress.sqf b/addons/xm157/functions/fnc_keyPress.sqf index 3a9dd53a269..684fdedefd2 100644 --- a/addons/xm157/functions/fnc_keyPress.sqf +++ b/addons/xm157/functions/fnc_keyPress.sqf @@ -23,7 +23,7 @@ if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) if !(ACE_player call CBA_fnc_canUseWeapon) exitWith { false }; if (currentMuzzle ACE_player != currentWeapon ACE_player) exitWith { false }; -private _display = uinamespace getVariable [QGVAR(display), displayNull]; +private _display = uiNamespace getVariable [QGVAR(display), displayNull]; if (isNull _display) exitWith { ERROR("keyPress-no display"); false }; if (_keyDown) then { playSound QGVAR(click); }; diff --git a/addons/xm157/functions/fnc_weaponInfo_onLoad.sqf b/addons/xm157/functions/fnc_weaponInfo_onLoad.sqf index dfefca30d43..e490c6e14d0 100644 --- a/addons/xm157/functions/fnc_weaponInfo_onLoad.sqf +++ b/addons/xm157/functions/fnc_weaponInfo_onLoad.sqf @@ -18,7 +18,7 @@ params ["_display"]; TRACE_1("weaponInfo_onLoad",_display); -uinamespace setVariable [QGVAR(display), _display]; +uiNamespace setVariable [QGVAR(display), _display]; [_display, true] call cba_optics_fnc_loadScriptedOptic; // pass thru to cba diff --git a/addons/yardage450/functions/fnc_acquireTarget.sqf b/addons/yardage450/functions/fnc_acquireTarget.sqf index d5aea3a800f..88f85f29cc3 100644 --- a/addons/yardage450/functions/fnc_acquireTarget.sqf +++ b/addons/yardage450/functions/fnc_acquireTarget.sqf @@ -45,7 +45,7 @@ GVAR(distanceIndex) = -1; private _range = (_min + _max) / 2; if (_range >= MIN_DISTANCE && _range <= MAX_DISTANCE) then { GVAR(targetAcquired) = true; - GVAR(targetRangeText) = Str(round(_range)); + GVAR(targetRangeText) = str(round(_range)); }; }; }; diff --git a/addons/zeus/functions/fnc_bi_moduleArsenal.sqf b/addons/zeus/functions/fnc_bi_moduleArsenal.sqf index 8dd5f269296..76f723b2dd3 100644 --- a/addons/zeus/functions/fnc_bi_moduleArsenal.sqf +++ b/addons/zeus/functions/fnc_bi_moduleArsenal.sqf @@ -21,15 +21,15 @@ params ["_logic", "", "_activated"]; if (_activated && local _logic) then { - _unit = _logic getvariable ["bis_fnc_curatorAttachObject_object",objnull]; + _unit = _logic getVariable ["bis_fnc_curatorAttachObject_object",objNull]; //--- Check if the unit is suitable _error = ""; switch true do { - case (isnull _unit): {_error = localize "str_a3_BIS_fnc_showCuratorFeedbackMessage_506";}; + case (isNull _unit): {_error = localize "str_a3_BIS_fnc_showCuratorFeedbackMessage_506";}; case !(alive _unit): {_error = localize "str_a3_BIS_fnc_moduleArsenal_errorDead";}; - case (isnull group _unit || !(side group _unit in [east,west,resistance,civilian])): {_error = localize "str_a3_BIS_fnc_moduleArsenal_errorBrain";}; - case (!isNull objectParent _unit || effectivecommander _unit != _unit): {_error = localize "str_a3_BIS_fnc_moduleArsenal_errorVehicle";}; + case (isNull group _unit || !(side group _unit in [east,west,resistance,civilian])): {_error = localize "str_a3_BIS_fnc_moduleArsenal_errorBrain";}; + case (!isNull objectParent _unit || effectiveCommander _unit != _unit): {_error = localize "str_a3_BIS_fnc_moduleArsenal_errorVehicle";}; }; if (_error == "") then { @@ -51,10 +51,10 @@ if (_activated && local _logic) then { } else { if !(isPlayer _unit) then { - ([] call bis_fnc_rscLayer) cuttext ["","black out",0.5]; + ([] call bis_fnc_rscLayer) cutText ["","black out",0.5]; ["#(argb,8,8,3)color(0,0,0,1)",false,nil,0,[0.5,0]] call bis_fnc_textTiles; ["Open",[true,nil,_unit]] call bis_fnc_arsenal; - ([] call bis_fnc_rscLayer) cuttext ["","plain"]; + ([] call bis_fnc_rscLayer) cutText ["","plain"]; } else { [objNull, localize "str_a3_BIS_fnc_moduleArsenal_errorDead"] call bis_fnc_showCuratorFeedbackMessage; diff --git a/addons/zeus/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index cdc4d35b648..a10807dbe70 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -24,33 +24,33 @@ params ["_logic", "_units", "_activated"]; if (_activated) then { // Terminate when not created on the server - if (!isServer && local _logic && isnull (getassignedcuratorunit _logic)) exitwith { - [format ["%1 is trying to create curator logic ModuleCurator_F",profilename],"bis_fnc_error",false] call bis_fnc_mp; - deletevehicle _logic; + if (!isServer && local _logic && isNull (getAssignedCuratorUnit _logic)) exitWith { + [format ["%1 is trying to create curator logic ModuleCurator_F",profileName],"bis_fnc_error",false] call bis_fnc_mp; + deleteVehicle _logic; }; // Get curator owner - _ownerVar = _logic getvariable ["owner",""]; - _ownerUID = parsenumber _ownerVar; - if (cheatsenabled) then { - _ownerVarArray = toarray _ownerVar; + _ownerVar = _logic getVariable ["owner",""]; + _ownerUID = parseNumber _ownerVar; + if (cheatsEnabled) then { + _ownerVarArray = toArray _ownerVar; _ownerVarArray resize 3; - if (tostring _ownerVarArray == "DEV") then {_ownerUID = 1;}; + if (toString _ownerVarArray == "DEV") then {_ownerUID = 1;}; }; - if (_ownerVar == "" && !ismultiplayer) then { + if (_ownerVar == "" && !isMultiplayer) then { ["Curator owner not defined, player used instead in singleplayer."] call bis_fnc_error; _ownerVar = player call bis_fnc_objectvar; }; - if (_ownerUID > 0 && !ismultiplayer) then { + if (_ownerUID > 0 && !isMultiplayer) then { _ownerVar = player call bis_fnc_objectvar; }; _isAdmin = _ownerVar == "#adminLogged" || _ownerVar == "#adminVoted"; // Wipe out the variable so clients can't access it - _logic setvariable ["owner",nil]; + _logic setVariable ["owner",nil]; // Server - if (isserver) then { + if (isServer) then { // Prepare admin variable _adminVar = ""; @@ -58,25 +58,25 @@ if (_activated) then { _letters = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]; _adminVar = "admin_"; for "_i" from 0 to 9 do {_adminVar = _adminVar + selectRandom _letters}; - _logic setvariable ["adminVar",_adminVar,true]; + _logic setVariable ["adminVar",_adminVar,true]; }; // Get allowed addons - _addonsType = _logic getvariable ["Addons",2]; + _addonsType = _logic getVariable ["Addons",2]; _addons = []; switch _addonsType do { // All (including unofficial ones) case 3: { - _cfgPatches = configfile >> "cfgpatches"; + _cfgPatches = configFile >> "cfgpatches"; for "_i" from 0 to (count _cfgPatches - 1) do { _class = _cfgPatches select _i; - if (isclass _class) then {_addons set [count _addons,configname _class];}; + if (isClass _class) then {_addons set [count _addons,configName _class];}; }; // Modified by ace_zeus - bis_fnc_activateaddons will error if time > 0 so only call if at start if (time <= 0) then { _addons call bis_fnc_activateaddons; }; - removeallcuratoraddons _logic; - _logic addcuratoraddons _addons; + removeAllCuratorAddons _logic; + _logic addCuratorAddons _addons; }; // All active @@ -86,74 +86,74 @@ if (_activated) then { case 1: { _addonsList = []; { - _addonsList = _addonsList + (unitaddons typeof _x); - } foreach (entities "all"); - removeallcuratoraddons _logic; - _logic addcuratoraddons _addonsList; + _addonsList = _addonsList + (unitAddons typeOf _x); + } forEach (entities "all"); + removeAllCuratorAddons _logic; + _logic addCuratorAddons _addonsList; }; // None case 0: { - removeallcuratoraddons _logic; + removeAllCuratorAddons _logic; }; }; // Handle ownership [_logic,_ownerVar,_ownerUID,_adminVar] spawn { - scriptname "BIS_fnc_moduleCurator: Owner"; + scriptName "BIS_fnc_moduleCurator: Owner"; params ["_logic", "_ownerVar", "_ownerUID", "_adminVar"]; if (_adminVar != "") then {_ownerVar = _adminVar;}; - _forced = _logic getvariable ["forced",0] > 0; - _name = _logic getvariable ["name",""]; + _forced = _logic getVariable ["forced",0] > 0; + _name = _logic getVariable ["name",""]; if (_name == "") then {_name = localize "STR_A3_curator";}; // Wait until mission starts waitUntil {time > 0}; // NOTE: DO NOT CHANGE TO CBA_missionTime, IT BREAKS THE MODULE // Refresh addon list, so it's broadcasted to clients - _addons = curatoraddons _logic; + _addons = curatorAddons _logic; removeAllCuratorAddons _logic; - _logic addcuratoraddons _addons; + _logic addCuratorAddons _addons; while {true} do { // Wait for player to become Zeus switch true do { case (_ownerUID > 0): { - waituntil { + waitUntil { sleep 0.01; - {getplayeruid _x == _ownerVar} count playableunits > 0 || isnull _logic + {getPlayerUID _x == _ownerVar} count playableUnits > 0 || isNull _logic }; }; default { - waituntil {isplayer (missionnamespace getvariable [_ownerVar,objnull]) || isnull _logic}; + waitUntil {isPlayer (missionNamespace getVariable [_ownerVar,objNull]) || isNull _logic}; }; }; - if (isnull _logic) exitwith {}; + if (isNull _logic) exitWith {}; // Assign - _player = objnull; + _player = objNull; switch true do { case (_ownerUID > 0): { { - if (getplayeruid _x == _ownerVar) exitwith {_player = _x;}; - } foreach playableunits; + if (getPlayerUID _x == _ownerVar) exitWith {_player = _x;}; + } forEach playableUnits; }; default { - _player = missionnamespace getvariable [_ownerVar,objnull]; + _player = missionNamespace getVariable [_ownerVar,objNull]; }; }; - waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic}; - waituntil {_player assignCurator _logic; getassignedcuratorunit _logic == _player || isnull _logic}; - if (isnull _logic) exitwith {}; + waitUntil {unassignCurator _logic; isNull (getAssignedCuratorUnit _logic) || isNull _logic}; + waitUntil {_player assignCurator _logic; getAssignedCuratorUnit _logic == _player || isNull _logic}; + if (isNull _logic) exitWith {}; // Add radio channels { - _x radiochanneladd [_player]; - } foreach (_logic getvariable ["channels",[]]); + _x radioChannelAdd [_player]; + } forEach (_logic getVariable ["channels",[]]); // Added by ace_zeus to delay ascension message code private _msgCode = { @@ -162,10 +162,10 @@ if (_activated) then { // Sent notification to all assigned players if ((_logic getVariable ["showNotification",true]) && GVAR(zeusAscension)) then { { - if (isplayer _x) then { + if (isPlayer _x) then { [["CuratorAssign",[_name,name _player]],"bis_fnc_showNotification",_x] call bis_fnc_mp; }; - } forEach (curatoreditableobjects _logic); + } forEach (curatorEditableObjects _logic); }; }; @@ -184,25 +184,25 @@ if (_activated) then { // Wait for player to stop being Zeus switch true do { case (_ownerUID > 0): { - waituntil { + waitUntil { sleep 0.01; - {getplayeruid _x == _ownerVar} count playableunits == 0 || isnull _logic + {getPlayerUID _x == _ownerVar} count playableUnits == 0 || isNull _logic }; }; default { - waituntil {_player != missionnamespace getvariable [_ownerVar,objnull] || isnull _logic}; + waitUntil {_player != missionNamespace getVariable [_ownerVar,objNull] || isNull _logic}; }; }; - if (isnull _logic) exitwith {}; + if (isNull _logic) exitWith {}; // Add radio channels { - _x radiochannelremove [_player]; - } foreach (_logic getvariable ["channels",[]]); + _x radioChannelRemove [_player]; + } forEach (_logic getVariable ["channels",[]]); // Unassign - waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic}; - if (isnull _logic) exitwith {}; + waitUntil {unassignCurator _logic; isNull (getAssignedCuratorUnit _logic) || isNull _logic}; + if (isNull _logic) exitWith {}; }; }; @@ -214,17 +214,17 @@ if (_activated) then { // Create bird _birdType = _logic getVariable ["birdType","eagle_f"]; if (_birdType != "") then { - _bird = createvehicle [_birdType,[100,100,100],[],0,"none"]; + _bird = createVehicle [_birdType,[100,100,100],[],0,"none"]; _logic setVariable ["bird",_bird,true]; }; // Locality changed - _logic addeventhandler [ - "local", + _logic addEventHandler [ + "Local", { _logic = _this select 0; - _bird = _logic getVariable ["bird",objnull]; - _bird setowner owner _logic; + _bird = _logic getVariable ["bird",objNull]; + _bird setOwner owner _logic; } ]; }; @@ -240,70 +240,70 @@ if (_activated) then { // Activated all future addons _addons = []; { - if (typeof _x == "ModuleCuratorAddAddons_F") then { - _paramAddons = call compile ("[" + (_x getvariable ["addons",""]) + "]"); + if (typeOf _x == "ModuleCuratorAddAddons_F") then { + _paramAddons = call compile ("[" + (_x getVariable ["addons",""]) + "]"); { if !(_x in _addons) then {_addons set [count _addons,_x];}; { if !(_x in _addons) then {_addons set [count _addons,_x];}; - } foreach (unitaddons _x); - } foreach _paramAddons; + } forEach (unitAddons _x); + } forEach _paramAddons; }; - } foreach (synchronizedobjects _logic); + } forEach (synchronizedObjects _logic); // Modified by ace_zeus - bis_fnc_activateaddons will error if time > 0 so only call if at start if (time <= 0) then { _addons call bis_fnc_activateaddons; }; }; // Player - if (hasinterface) then { - waituntil {local player}; + if (hasInterface) then { + waitUntil {local player}; _serverCommand = ["#kick", "#shutdown"] select (_ownerVar == "#adminLogged"); // Black effect until the interface is open - _forced = _logic getvariable ["forced",0] > 0; + _forced = _logic getVariable ["forced",0] > 0; if (_forced) then { _isCurator = switch true do { case (_ownerUID > 0): { - getplayeruid player == _ownerVar + getPlayerUID player == _ownerVar }; case (_isAdmin): { - isserver || servercommandavailable _serverCommand + isServer || serverCommandAvailable _serverCommand }; default { - player == missionnamespace getvariable [_ownerVar,objnull] + player == missionNamespace getVariable [_ownerVar,objNull] }; }; if (_isCurator) then { [true,true] spawn bis_fnc_forceCuratorInterface; - ("RscDisplayCurator" call bis_fnc_rscLayer) cuttext ["","black in",1e10]; + ("RscDisplayCurator" call bis_fnc_rscLayer) cutText ["","black in",1e10]; }; }; // Check if player is server admin if (_isAdmin) then { - _adminVar = _logic getvariable ["adminVar",""]; - _logic setvariable ["adminVar",nil]; - if (isserver) then { + _adminVar = _logic getVariable ["adminVar",""]; + _logic setVariable ["adminVar",nil]; + if (isServer) then { // Host - missionnamespace setvariable [_adminVar,player]; + missionNamespace setVariable [_adminVar,player]; } else { // Client [_logic,_adminVar,_serverCommand] spawn { - scriptname "BIS_fnc_moduleCurator: Admin check"; + scriptName "BIS_fnc_moduleCurator: Admin check"; _logic = _this select 0; _adminVar = _this select 1; _serverCommand = _this select 2; while {true} do { - waituntil {sleep 0.1; servercommandavailable _serverCommand}; - missionnamespace setvariable [_adminVar,player]; - publicvariable _adminVar; - _respawn = player addeventhandler ["respawn",format ["%1 = _this select 0; publicvariable '%1';",_adminVar]]; - - waituntil {sleep 0.1; !servercommandavailable _serverCommand}; - missionnamespace setvariable [_adminVar,objnull]; - publicvariable _adminVar; - player removeeventhandler ["respawn",_respawn]; + waitUntil {sleep 0.1; serverCommandAvailable _serverCommand}; + missionNamespace setVariable [_adminVar,player]; + publicVariable _adminVar; + _respawn = player addEventHandler ["Respawn",format ["%1 = _this select 0; publicvariable '%1';",_adminVar]]; + + waitUntil {sleep 0.1; !serverCommandAvailable _serverCommand}; + missionNamespace setVariable [_adminVar,objNull]; + publicVariable _adminVar; + player removeEventHandler ["Respawn",_respawn]; }; }; }; @@ -312,10 +312,10 @@ if (_activated) then { [_logic] spawn { _logic = _this select 0; sleep 1; - waituntil {alive player}; + waitUntil {alive player}; // Show warning when Zeus key is not assigned - if (count (actionkeys "curatorInterface") == 0) then { + if (count (actionKeys "curatorInterface") == 0) then { [ format [ localize "str_a3_cfgvehicles_modulecurator_f_keyNotAssigned", @@ -326,13 +326,13 @@ if (_activated) then { // Show hint about pinging for players if ( - isnil {profilenamespace getvariable "bis_fnc_curatorPinged_done"} + isNil {profileNamespace getVariable "bis_fnc_curatorPinged_done"} && {isTutHintsEnabled} && - {isnull getassignedcuratorlogic player} + {isNull getAssignedCuratorLogic player} && - {player in curatoreditableobjects _logic} + {player in curatorEditableObjects _logic} ) then { sleep 0.5; [["Curator","Ping"]] call bis_fnc_advHint; @@ -340,16 +340,16 @@ if (_activated) then { }; // Add local event handlers - _logic addeventhandler ["curatorFeedbackMessage",{_this call bis_fnc_showCuratorFeedbackMessage;}]; - _logic addeventhandler ["curatorPinged",{_this call bis_fnc_curatorPinged;}]; - _logic addeventhandler ["curatorObjectPlaced",{_this call bis_fnc_curatorObjectPlaced;}]; - _logic addeventhandler ["curatorObjectEdited",{_this call bis_fnc_curatorObjectEdited;}]; - _logic addeventhandler ["curatorWaypointPlaced",{_this call bis_fnc_curatorWaypointPlaced;}]; - - _logic addeventhandler ["curatorObjectDoubleClicked",{(_this select 1) call bis_fnc_showCuratorAttributes;}]; - _logic addeventhandler ["curatorGroupDoubleClicked",{(_this select 1) call bis_fnc_showCuratorAttributes;}]; - _logic addeventhandler ["curatorWaypointDoubleClicked",{(_this select 1) call bis_fnc_showCuratorAttributes;}]; - _logic addeventhandler ["curatorMarkerDoubleClicked",{(_this select 1) call bis_fnc_showCuratorAttributes;}]; + _logic addEventHandler ["CuratorFeedbackMessage",{_this call bis_fnc_showCuratorFeedbackMessage;}]; + _logic addEventHandler ["CuratorPinged",{_this call bis_fnc_curatorPinged;}]; + _logic addEventHandler ["CuratorObjectPlaced",{_this call bis_fnc_curatorObjectPlaced;}]; + _logic addEventHandler ["CuratorObjectEdited",{_this call bis_fnc_curatorObjectEdited;}]; + _logic addEventHandler ["CuratorWaypointPlaced",{_this call bis_fnc_curatorWaypointPlaced;}]; + + _logic addEventHandler ["CuratorObjectDoubleClicked",{(_this select 1) call bis_fnc_showCuratorAttributes;}]; + _logic addEventHandler ["CuratorGroupDoubleClicked",{(_this select 1) call bis_fnc_showCuratorAttributes;}]; + _logic addEventHandler ["CuratorWaypointDoubleClicked",{(_this select 1) call bis_fnc_showCuratorAttributes;}]; + _logic addEventHandler ["CuratorMarkerDoubleClicked",{(_this select 1) call bis_fnc_showCuratorAttributes;}]; player call bis_fnc_curatorRespawn; }; diff --git a/addons/zeus/functions/fnc_bi_moduleMine.sqf b/addons/zeus/functions/fnc_bi_moduleMine.sqf index 0bd8ba574ff..509efa0a1c5 100644 --- a/addons/zeus/functions/fnc_bi_moduleMine.sqf +++ b/addons/zeus/functions/fnc_bi_moduleMine.sqf @@ -21,18 +21,18 @@ params ["_logic", "_units", "_activated"]; if (_activated) then { - _explosive = gettext (configOf _logic >> "explosive"); + _explosive = getText (configOf _logic >> "explosive"); if (_explosive != "") then { - _explosive = createvehicle [_explosive,position _logic,[],0,"none"]; - _explosive attachto [_logic]; + _explosive = createVehicle [_explosive,position _logic,[],0,"none"]; + _explosive attachTo [_logic]; // Added by ace_zeus to control if mines are revealed if (GVAR(revealMines) > MINE_REVEAL_NONE) then { //--- Reveal the mine to curator's side { - _side = (getassignedcuratorunit _x) call bis_fnc_objectSide; - _side revealmine _explosive; - } forEach (objectcurators _logic); + _side = (getAssignedCuratorUnit _x) call bis_fnc_objectSide; + _side revealMine _explosive; + } forEach (objectCurators _logic); if (GVAR(revealMines) == MINE_REVEAL_FULL) then { //--- Mark minefields in the map @@ -43,8 +43,8 @@ if (_activated) then { //--- Show hint to curator who placed the object [[["Curator","PlaceMines"],nil,nil,nil,nil,nil,nil,true],"bis_fnc_advHint",_logic] call bis_fnc_mp; - waituntil {sleep 0.1; isnull _explosive || isnull _logic || !alive _logic}; - if (isnull _logic) then {deletevehicle _explosive;} else {_explosive setdamage 1;}; - deletevehicle _logic; + waitUntil {sleep 0.1; isNull _explosive || isNull _logic || !alive _logic}; + if (isNull _logic) then {deleteVehicle _explosive;} else {_explosive setDamage 1;}; + deleteVehicle _logic; }; }; diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index ba30a2eaf44..94771354ba4 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -23,26 +23,26 @@ _logic = _this select 0; _units = _this select 1; _activated = _this select 2; -if ({local _x} count (objectcurators _logic) > 0) then { +if ({local _x} count (objectCurators _logic) > 0) then { //--- Reveal the circle to curators - _logic hideobject false; - _logic setpos position _logic; + _logic hideObject false; + _logic setPos position _logic; }; -if !(isserver) exitwith {}; +if !(isServer) exitWith {}; if (_activated) then { - _ammo = _logic getvariable ["type",gettext (configOf _logic >> "ammo")]; + _ammo = _logic getVariable ["type",getText (configOf _logic >> "ammo")]; if (_ammo != "") then { - _cfgAmmo = configfile >> "cfgammo" >> _ammo; + _cfgAmmo = configFile >> "cfgammo" >> _ammo; //if !(isclass _cfgAmmo) exitwith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;}; // It seems BI broke this part... // _dirVar = _fnc_scriptname + typeof _logic; // _logic setdir (missionnamespace getvariable [_dirVar,direction _logic]); //--- Restore custom direction - _pos = getposatl _logic; + _pos = getPosATL _logic; _posAmmo = +_pos; _posAmmo set [2,0]; _dir = direction _logic; - _simulation = toLowerANSI gettext (configfile >> "cfgammo" >> _ammo >> "simulation"); + _simulation = toLowerANSI getText (configFile >> "cfgammo" >> _ammo >> "simulation"); _altitude = 0; _velocity = []; _attach = false; @@ -58,7 +58,7 @@ if (_activated) then { _altitude = 1000; _velocity = [0,0,-100]; _radio = "SentGenIncoming"; - _sounds = if (getnumber (_cfgAmmo >> "hit") < 200) then {["mortar1","mortar2"]} else {["shell1","shell2","shell3","shell4"]}; + _sounds = if (getNumber (_cfgAmmo >> "hit") < 200) then {["mortar1","mortar2"]} else {["shell1","shell2","shell3","shell4"]}; _sound = selectRandom _sounds; _hint = ["Curator","PlaceOrdnance"]; _shakeStrength = 0.01; @@ -66,7 +66,7 @@ if (_activated) then { }; case "shotsubmunitions": { _posAmmo = [_posAmmo,500,_dir + 180] call bis_fnc_relpos; - _altitude = 1000 - ((getterrainheightasl _posAmmo) - (getterrainheightasl _pos)); + _altitude = 1000 - ((getTerrainHeightASL _posAmmo) - (getTerrainHeightASL _pos)); _posAmmo set [2,_altitude]; _velocity = [sin _dir * 68,cos _dir * 68,-100]; _radio = "SentGenIncoming"; @@ -102,22 +102,22 @@ if (_activated) then { }; }; }; - } foreach allPlayers; + } forEach allPlayers; }; }; - if (count _hint > 0 && {count objectcurators _logic > 0}) then { - [[_hint,nil,nil,nil,nil,nil,nil,true],"bis_fnc_advHint",objectcurators _logic] call bis_fnc_mp; + if (count _hint > 0 && {count objectCurators _logic > 0}) then { + [[_hint,nil,nil,nil,nil,nil,nil,true],"bis_fnc_advHint",objectCurators _logic] call bis_fnc_mp; }; if (count _velocity == 3) then { - _altitude = (_logic getvariable ["altitude",_altitude]) call BIS_fnc_parseNumberSafe; - _radio = _logic getvariable ["radio",_radio]; + _altitude = (_logic getVariable ["altitude",_altitude]) call BIS_fnc_parseNumberSafe; + _radio = _logic getVariable ["radio",_radio]; //--- Create projectile _posAmmo set [2,_altitude]; - _projectile = createvehicle [_ammo,_posAmmo,[],0,"none"]; - _projectile setpos _posAmmo; - _projectile setvelocity _velocity; - if (_attach) then {_projectile attachto [_logic,[0,0,_altitude]];}; + _projectile = createVehicle [_ammo,_posAmmo,[],0,"none"]; + _projectile setPos _posAmmo; + _projectile setVelocity _velocity; + if (_attach) then {_projectile attachTo [_logic,[0,0,_altitude]];}; // Added by ace_zeus for ace_frag compatibility if (!isNil QEFUNC(frag,addPfhRound)) then { @@ -128,7 +128,7 @@ if (_activated) then { if (_sound != "") then {[[_logic,_sound,"say3D"],"bis_fnc_sayMessage"] call bis_fnc_mp;}; //--- Create sound source - _soundSource = if (_soundSourceClass != "") then {createSoundSource [_soundSourceClass,_pos,[],0]} else {objnull}; + _soundSource = if (_soundSourceClass != "") then {createSoundSource [_soundSourceClass,_pos,[],0]} else {objNull}; // Added by ace_zeus to toggle ordnance radio message if (GVAR(radioOrdnance)) then { @@ -138,54 +138,54 @@ if (_activated) then { //--- Update if (_attach) then { - waituntil { - _soundSource setposatl getposatl _projectile; + waitUntil { + _soundSource setPosATL getPosATL _projectile; sleep 1; - isnull _projectile || isnull _logic + isNull _projectile || isNull _logic }; } else { - waituntil { - _soundSource setposatl getposatl _projectile; + waitUntil { + _soundSource setPosATL getPosATL _projectile; - if (getposatl _logic distance _pos > 0 || direction _logic != _dir) then { - _posNew = getposasl _logic; + if (getPosATL _logic distance _pos > 0 || direction _logic != _dir) then { + _posNew = getPosASL _logic; _dirDiff = direction _logic - _dir; - _posNew = [_posNew,[getposasl _projectile,_pos] call bis_fnc_distance2d,direction _logic + 180] call bis_fnc_relpos; - _posNew set [2,getposasl _projectile select 2]; - _projectile setvelocity ([velocity _projectile,-_dirDiff] call bis_fnc_rotatevector2d); - _projectile setposasl _posNew; - _pos = getposatl _logic; + _posNew = [_posNew,[getPosASL _projectile,_pos] call bis_fnc_distance2d,direction _logic + 180] call bis_fnc_relpos; + _posNew set [2,getPosASL _projectile select 2]; + _projectile setVelocity ([velocity _projectile,-_dirDiff] call bis_fnc_rotatevector2d); + _projectile setPosASL _posNew; + _pos = getPosATL _logic; _dir = direction _logic; //missionnamespace setvariable [_dirVar,_dir]; See L37 }; sleep 0.1; - isnull _projectile || isnull _logic + isNull _projectile || isNull _logic }; }; - deletevehicle _projectile; - deletevehicle _soundSource; - if (count objectcurators _logic > 0) then { + deleteVehicle _projectile; + deleteVehicle _soundSource; + if (count objectCurators _logic > 0) then { //--- Delete curator spawned logic if (_shakeStrength > 0) then { if (_simulation == "shotsubmunitions") then {sleep 0.5;}; [[_shakeStrength,0.7,[position _logic,_shakeRadius]],"bis_fnc_shakeCuratorCamera"] call bis_fnc_mp; }; - deletevehicle _logic; + deleteVehicle _logic; } else { //--- Repeat to achieve permanent effect - _repeat = _logic getvariable ["repeat",0] > 0; + _repeat = _logic getVariable ["repeat",0] > 0; if (_repeat) then { [_logic,_units,_activated] call bis_fnc_moduleprojectile; } else { - deletevehicle _logic; + deleteVehicle _logic; }; }; } else { - deletevehicle _logic; + deleteVehicle _logic; }; } else { - ["Cannot create projectile, 'ammo' config attribute is missing in %1",typeof _logic] call bis_fnc_error; + ["Cannot create projectile, 'ammo' config attribute is missing in %1",typeOf _logic] call bis_fnc_error; }; }; diff --git a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf index 2aa438be532..dcc546ce3be 100644 --- a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf +++ b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf @@ -22,38 +22,38 @@ _logic = _this select 0; _units = _this select 1; _activated = _this select 2; -if (_activated && local _logic && !isnull curatorcamera) then { +if (_activated && local _logic && !isNull curatorCamera) then { //--- Terminate when remote control is already in progress - if !(isnull (missionnamespace getvariable ["bis_fnc_moduleRemoteControl_unit",objnull])) exitwith {}; + if !(isNull (missionNamespace getVariable ["bis_fnc_moduleRemoteControl_unit",objNull])) exitWith {}; //--- Get unit under cursor - _unit = objnull; - _mouseOver = missionnamespace getvariable ["bis_fnc_curatorObjectPlaced_mouseOver",[""]]; + _unit = objNull; + _mouseOver = missionNamespace getVariable ["bis_fnc_curatorObjectPlaced_mouseOver",[""]]; if ((_mouseOver select 0) == "OBJECT") then {_unit = _mouseOver select 1;}; - _unit = effectivecommander _unit; + _unit = effectiveCommander _unit; //--- Temp owner - private _tempOwner = _unit getvariable ["bis_fnc_moduleRemoteControl_owner", objnull]; + private _tempOwner = _unit getVariable ["bis_fnc_moduleRemoteControl_owner", objNull]; //--- Check if the unit is suitable _error = ""; if !(side group _unit in [east,west,resistance,civilian]) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorEmpty";}; - if (isplayer _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorPlayer";}; + if (isPlayer _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorPlayer";}; if !(alive _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorDestroyed";}; - if (isnull _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorNull";}; - if (!isnull _tempOwner && {_tempOwner in allPlayers}) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";}; - if (isuavconnected vehicle _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";}; + if (isNull _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorNull";}; + if (!isNull _tempOwner && {_tempOwner in allPlayers}) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";}; + if (isUAVConnected vehicle _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";}; if (_error == "") then { _unit spawn { - scriptname "bis_fnc_moduleRemoteControl: Loop"; + scriptName "bis_fnc_moduleRemoteControl: Loop"; _unit = _this; _vehicle = vehicle _unit; - _vehicleRole = str assignedvehiclerole _unit; + _vehicleRole = str assignedVehicleRole _unit; bis_fnc_moduleRemoteControl_unit = _unit; - _unit setvariable ["bis_fnc_moduleRemoteControl_owner",player,true]; + _unit setVariable ["bis_fnc_moduleRemoteControl_owner",player,true]; // Added by ace_zeus to toggle remote control wind sound if (GVAR(remoteWind)) then { @@ -61,125 +61,125 @@ if (_activated && local _logic && !isnull curatorcamera) then { [format ["wind%1",ceil random 5],"bis_fnc_playsound"] call bis_fnc_mp; }; - _blur = ppeffectcreate ["RadialBlur",144]; - _blur ppeffectenable true; - _blur ppeffectadjust [0,0,0.3,0.3]; - _blur ppeffectcommit 0; - _blur ppeffectadjust [0.03,0.03,0.1,0.1]; - _blur ppeffectcommit 1; - - _cam = "camera" camcreate getposatl curatorcamera; - _cam cameraeffect ["internal","back"]; - _cam campreparetarget (screentoworld [0.5,0.5]); - _cam camcommitprepared 0; - _cam campreparetarget _unit; - _cam campreparefov 0.1; - _cam camcommitprepared 1; + _blur = ppEffectCreate ["RadialBlur",144]; + _blur ppEffectEnable true; + _blur ppEffectAdjust [0,0,0.3,0.3]; + _blur ppEffectCommit 0; + _blur ppEffectAdjust [0.03,0.03,0.1,0.1]; + _blur ppEffectCommit 1; + + _cam = "camera" camCreate getPosATL curatorCamera; + _cam cameraEffect ["internal","back"]; + _cam camPrepareTarget (screenToWorld [0.5,0.5]); + _cam camCommitPrepared 0; + _cam camPrepareTarget _unit; + _cam camPrepareFov 0.1; + _cam camCommitPrepared 1; sleep 0.75; - ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cuttext ["","black out",0.25]; + ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cutText ["","black out",0.25]; sleep 0.25; //--- Wait for interface to close - (finddisplay 312) closedisplay 2; - waituntil {isnull curatorcamera}; + (findDisplay 312) closeDisplay 2; + waitUntil {isNull curatorCamera}; //--- Switch - player remotecontrol _unit; - if (cameraon != _vehicle) then { - _vehicle switchcamera cameraview; + player remoteControl _unit; + if (cameraOn != _vehicle) then { + _vehicle switchCamera cameraView; }; - ppeffectdestroy _blur; - _cam cameraeffect ["terminate","back"]; - camdestroy _cam; + ppEffectDestroy _blur; + _cam cameraEffect ["terminate","back"]; + camDestroy _cam; - _color = ppeffectcreate ["colorCorrections",1896]; - _color ppeffectenable true; - _color ppeffectadjust [1,1,0,[0,0,0,1],[1,1,1,1],[0,0,0,0],[0.9,0.0,0,0,0,0.5,1]]; - _color ppeffectcommit 0; + _color = ppEffectCreate ["colorCorrections",1896]; + _color ppEffectEnable true; + _color ppEffectAdjust [1,1,0,[0,0,0,1],[1,1,1,1],[0,0,0,0],[0.9,0.0,0,0,0,0.5,1]]; + _color ppEffectCommit 0; - _curator = getassignedcuratorlogic player; + _curator = getAssignedCuratorLogic player; [_curator,"curatorObjectRemoteControlled",[_curator,player,_unit,true]] call bis_fnc_callScriptedEventHandler; [["Curator","RemoteControl"],nil,nil,nil,nil,nil,nil,true] call bis_fnc_advHint; sleep 0.3; - _color ppeffectadjust [1,1,0,[0,0,0,1],[1,1,1,1],[0,0,0,0],[0.9,0.85,0,0,0,0.5,1]]; - _color ppeffectcommit 0.3; - ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cuttext ["","black in",0.5]; + _color ppEffectAdjust [1,1,0,[0,0,0,1],[1,1,1,1],[0,0,0,0],[0.9,0.85,0,0,0,0.5,1]]; + _color ppEffectCommit 0.3; + ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cutText ["","black in",0.5]; //--- Back to player _vehicle = vehicle _unit; - _vehicleRole = str assignedvehiclerole _unit; + _vehicleRole = str assignedVehicleRole _unit; _rating = rating player; - waituntil { + waitUntil { //--- Refresh when vehicle or vehicle role changes - if ((vehicle _unit != _vehicle || str assignedvehiclerole _unit != _vehicleRole) && {alive _unit}) then { - player remotecontrol _unit; + if ((vehicle _unit != _vehicle || str assignedVehicleRole _unit != _vehicleRole) && {alive _unit}) then { + player remoteControl _unit; _vehicle = vehicle _unit; - _vehicleRole = str assignedvehiclerole _unit; + _vehicleRole = str assignedVehicleRole _unit; }; if (rating player < _rating) then { - player addrating (-rating player + _rating); + player addRating (-rating player + _rating); }; sleep 0.01; - !isnull curatorcamera + !isNull curatorCamera || - {cameraon == vehicle player} + {cameraOn == vehicle player} || {!alive _unit} //--- Also isnull check, objNull is not alive || {!alive player} || - {isnull getassignedcuratorlogic player} + {isNull getAssignedCuratorLogic player} }; - player addrating (-rating player + _rating); - objnull remotecontrol _unit; - _unit setvariable ["bis_fnc_moduleRemoteControl_owner",nil,true]; + player addRating (-rating player + _rating); + objNull remoteControl _unit; + _unit setVariable ["bis_fnc_moduleRemoteControl_owner",nil,true]; if (alive player) then { //--- Death screen if ( - isnull curatorcamera + isNull curatorCamera && - {cameraon != vehicle player} + {cameraOn != vehicle player} && - {!isnull _unit} + {!isNull _unit} && - {!isnull getassignedcuratorlogic player} + {!isNull getAssignedCuratorLogic player} //&& //{(_unit getvariable ["bis_fnc_moduleRemoteControl_owner",objnull] == player)} ) then { sleep 2; - ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cuttext ["","black out",1]; + ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cutText ["","black out",1]; sleep 1; }; - if !(isnull _unit) then { - _unitPos = getposatl _unit; + if !(isNull _unit) then { + _unitPos = getPosATL _unit; _camPos = [_unitPos,10,direction _unit + 180] call bis_fnc_relpos; - _camPos set [2,(_unitPos select 2) + (getterrainheightasl _unitPos) - (getterrainheightasl _camPos) + 10]; + _camPos set [2,(_unitPos select 2) + (getTerrainHeightASL _unitPos) - (getTerrainHeightASL _camPos) + 10]; //[_camPos,_unit] call bis_fnc_setcuratorcamera; - (getassignedcuratorlogic player) setvariable ["bis_fnc_modulecuratorsetcamera_params",[_camPos,_unit]]; + (getAssignedCuratorLogic player) setVariable ["bis_fnc_modulecuratorsetcamera_params",[_camPos,_unit]]; }; sleep 0.1; //--- Engine needs a delay in case controlled unit was deleted - ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cuttext ["","black in",1e10]; - opencuratorinterface; - ppeffectdestroy _color; + ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cutText ["","black in",1e10]; + openCuratorInterface; + ppEffectDestroy _color; - waituntil {!isnull curatorcamera}; + waitUntil {!isNull curatorCamera}; } else { - ppeffectdestroy _color; + ppEffectDestroy _color; }; - player switchcamera cameraview; + player switchCamera cameraView; bis_fnc_moduleRemoteControl_unit = nil; - ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cuttext ["","black in",1]; + ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cutText ["","black in",1]; [_curator,"curatorObjectRemoteControlled",[_curator,player,_unit,false]] call bis_fnc_callScriptedEventHandler; sleep 0.01; }; } else { - [objnull,_error] call bis_fnc_showCuratorFeedbackMessage; + [objNull,_error] call bis_fnc_showCuratorFeedbackMessage; }; - deletevehicle _logic; + deleteVehicle _logic; }; diff --git a/addons/zeus/functions/fnc_getModuleDestination.sqf b/addons/zeus/functions/fnc_getModuleDestination.sqf index 10d7acae9e0..763f9b48cac 100644 --- a/addons/zeus/functions/fnc_getModuleDestination.sqf +++ b/addons/zeus/functions/fnc_getModuleDestination.sqf @@ -109,7 +109,7 @@ GVAR(moduleDestination_mapDrawEH) = [((findDisplay 312) displayCtrl 50), "draw", private _mousePosAGL = screenToWorld getMousePosition; [_object, AGLToASL _mousePosAGL] call _drawCode; drawIcon3D [_icon, _color, _mousePosAGL, 1.5, 1.5, _angle, _text]; - drawLine3D [_mousePosAGL, ASLtoAGL (getPosASL _object), _color];; + drawLine3D [_mousePosAGL, ASLToAGL (getPosASL _object), _color];; } else { TRACE_4("cleaning up",_this select 1,GVAR(moduleDestination_displayEHMouse),GVAR(moduleDestination_displayEHKeyboard),GVAR(moduleDestination_mapDrawEH)); (_this select 1) call CBA_fnc_removePerFrameHandler; diff --git a/addons/zeus/functions/fnc_moduleCaptive.sqf b/addons/zeus/functions/fnc_moduleCaptive.sqf index ad359575e96..e16a701f055 100644 --- a/addons/zeus/functions/fnc_moduleCaptive.sqf +++ b/addons/zeus/functions/fnc_moduleCaptive.sqf @@ -29,7 +29,7 @@ if (isNil QEFUNC(captives,setHandcuffed)) then { if ((_mouseOver select 0) != "OBJECT") then { [LSTRING(NothingSelected)] call FUNC(showMessage); } else { - private _unit = effectivecommander (_mouseOver select 1); + private _unit = effectiveCommander (_mouseOver select 1); if !(_unit isKindOf "CAManBase") then { [LSTRING(OnlyInfantry)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleCargoParadrop.sqf b/addons/zeus/functions/fnc_moduleCargoParadrop.sqf index 2aaffb37964..ed009832756 100644 --- a/addons/zeus/functions/fnc_moduleCargoParadrop.sqf +++ b/addons/zeus/functions/fnc_moduleCargoParadrop.sqf @@ -62,7 +62,7 @@ if ((_vehicle getVariable [QEGVAR(cargo,loaded), []]) isEqualTo []) exitWith { [_group] call CBA_fnc_clearWaypoints; - private _wp = _group addWaypoint [ASLtoAGL _mousePosASL, 0]; + private _wp = _group addWaypoint [ASLToAGL _mousePosASL, 0]; _wp setWaypointType "SCRIPTED"; _wp setWaypointScript QPATHTOF(functions\DOUBLES(fnc,moduleCargoParadropWaypoint).sqf); diff --git a/addons/zeus/functions/fnc_moduleSetMedic.sqf b/addons/zeus/functions/fnc_moduleSetMedic.sqf index d44dd56e593..2393de0ebfa 100644 --- a/addons/zeus/functions/fnc_moduleSetMedic.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedic.sqf @@ -29,7 +29,7 @@ if !(GETEGVAR(medical,enabled,false)) then { if ((_mouseOver select 0) != "OBJECT") then { [LSTRING(NothingSelected)] call FUNC(showMessage); } else { - private _unit = effectivecommander (_mouseOver select 1); + private _unit = effectiveCommander (_mouseOver select 1); if !(_unit isKindOf "CAManBase") then { [LSTRING(OnlyInfantry)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf b/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf index a624b7dded6..2860f624f22 100644 --- a/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf +++ b/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf @@ -59,7 +59,7 @@ if ([_unit] call EFUNC(common,isPlayer)) exitWith { } forEach getArtilleryAmmo [_vehicle]; TRACE_1("getArtilleryAmmo",_artilleryMag); if (_artilleryMag == "") exitWith {_targetASL = [];}; - private _eta = _vehicle getArtilleryETA [ASLtoAGL _targetASL, _artilleryMag]; + private _eta = _vehicle getArtilleryETA [ASLToAGL _targetASL, _artilleryMag]; TRACE_1("getArtilleryETA",_eta); if (_eta < 0) exitWith { [ELSTRING(Interaction,NotInRange)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleSuppressiveFireLocal.sqf b/addons/zeus/functions/fnc_moduleSuppressiveFireLocal.sqf index f09211b034b..39efec6d921 100644 --- a/addons/zeus/functions/fnc_moduleSuppressiveFireLocal.sqf +++ b/addons/zeus/functions/fnc_moduleSuppressiveFireLocal.sqf @@ -21,7 +21,7 @@ params ["_unit", "_targetASL", "_artilleryMag"]; TRACE_4("moduleSuppressiveFireLocal",_unit,local _unit,_targetASL,_artilleryMag); if (_artilleryMag != "") exitWith { - (vehicle _unit) doArtilleryFire [ASLtoAGL _targetASL, _artilleryMag, 4]; + (vehicle _unit) doArtilleryFire [ASLToAGL _targetASL, _artilleryMag, 4]; TRACE_3("doArtilleryFire",_unit,_targetASL,_artilleryMag); }; diff --git a/addons/zeus/functions/fnc_moduleSurrender.sqf b/addons/zeus/functions/fnc_moduleSurrender.sqf index 07517d7e710..b8071a8cd52 100644 --- a/addons/zeus/functions/fnc_moduleSurrender.sqf +++ b/addons/zeus/functions/fnc_moduleSurrender.sqf @@ -29,7 +29,7 @@ if (isNil QEFUNC(captives,setSurrendered)) then { if ((_mouseOver select 0) != "OBJECT") then { [LSTRING(NothingSelected)] call FUNC(showMessage); } else { - private _unit = effectivecommander (_mouseOver select 1); + private _unit = effectiveCommander (_mouseOver select 1); if !(_unit isKindOf "CAManBase") then { [LSTRING(OnlyInfantry)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleUnconscious.sqf b/addons/zeus/functions/fnc_moduleUnconscious.sqf index 7eede3cdece..7ca0a824c2d 100644 --- a/addons/zeus/functions/fnc_moduleUnconscious.sqf +++ b/addons/zeus/functions/fnc_moduleUnconscious.sqf @@ -29,7 +29,7 @@ if (isNil QEFUNC(medical,setUnconscious)) then { if ((_mouseOver select 0) != "OBJECT") then { [LSTRING(NothingSelected)] call FUNC(showMessage); } else { - private _unit = effectivecommander (_mouseOver select 1); + private _unit = effectiveCommander (_mouseOver select 1); if !(_unit isKindOf "CAManBase") then { [LSTRING(OnlyInfantry)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_ui_globalSetSkill.sqf b/addons/zeus/functions/fnc_ui_globalSetSkill.sqf index 5a7c5fc5e03..1586ce2f460 100644 --- a/addons/zeus/functions/fnc_ui_globalSetSkill.sqf +++ b/addons/zeus/functions/fnc_ui_globalSetSkill.sqf @@ -47,7 +47,7 @@ private _fnc_sliderMove = { (_display displayCtrl 16189) cbSetChecked (GVAR(GlobalSkillAI) select 5); private _fnc_onUnload = { - private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); if (isNull _logic) exitWith {}; deleteVehicle _logic; @@ -57,7 +57,7 @@ private _fnc_onConfirm = { params [["_ctrlButtonOK", controlNull, [controlNull]]]; TRACE_1("_fnc_onConfirm params",_this); - private _display = ctrlparent _ctrlButtonOK; + private _display = ctrlParent _ctrlButtonOK; if (isNull _display) exitWith {}; GVAR(GlobalSkillAI) = [ diff --git a/addons/zeus/functions/fnc_ui_groupSide.sqf b/addons/zeus/functions/fnc_ui_groupSide.sqf index 110e2e302da..9c243d5642a 100644 --- a/addons/zeus/functions/fnc_ui_groupSide.sqf +++ b/addons/zeus/functions/fnc_ui_groupSide.sqf @@ -105,7 +105,7 @@ private _fnc_onSelection = { } forEach IDCs; private _fnc_onUnload = { - private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); if (isNull _logic) exitWith {}; if (_this select 1 == 2) then { @@ -116,10 +116,10 @@ private _fnc_onUnload = { private _fnc_onConfirm = { params ["_ctrlButtonOK"]; - private _display = ctrlparent _ctrlButtonOK; + private _display = ctrlParent _ctrlButtonOK; if (isNull _display) exitWith {}; - private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); if (isNull _logic) exitWith {}; private _unit = effectiveCommander (attachedTo _logic); diff --git a/addons/zeus/functions/fnc_ui_setEngineer.sqf b/addons/zeus/functions/fnc_ui_setEngineer.sqf index 3f008403cc7..e19b04c04c0 100644 --- a/addons/zeus/functions/fnc_ui_setEngineer.sqf +++ b/addons/zeus/functions/fnc_ui_setEngineer.sqf @@ -64,7 +64,7 @@ private _fnc_onConfirm = { private _display = ctrlParent _ctrlButtonOK; if (isNull _display) exitWith {}; - private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); if (isNull _logic) exitWith {}; private _value = lbCurSel (_display displayCtrl 86947); diff --git a/addons/zeus/functions/fnc_ui_spectator.sqf b/addons/zeus/functions/fnc_ui_spectator.sqf index fe9b4a36687..04d2a067630 100644 --- a/addons/zeus/functions/fnc_ui_spectator.sqf +++ b/addons/zeus/functions/fnc_ui_spectator.sqf @@ -164,7 +164,7 @@ private _fnc_onVisionSelection = { params ["_ctrl", "_state"]; private _display = ctrlParent _ctrl; - if (isNull _display) exitwith {}; + if (isNull _display) exitWith {}; // Convert to boolean since EH returns state as 0 or 1 private _state = [false, true] select _state; diff --git a/addons/zeus/functions/fnc_ui_suicideBomber.sqf b/addons/zeus/functions/fnc_ui_suicideBomber.sqf index 26184518710..ab74b398745 100644 --- a/addons/zeus/functions/fnc_ui_suicideBomber.sqf +++ b/addons/zeus/functions/fnc_ui_suicideBomber.sqf @@ -65,7 +65,7 @@ private _fnc_onSelection = { params [["_activeCtrl", controlNull, [controlNull]]]; private _display = ctrlParent _activeCtrl; - if (isNUll _display) exitWith {}; + if (isNull _display) exitWith {}; // Update button colours and scales { diff --git a/addons/zeus/functions/fnc_ui_teleportPlayers.sqf b/addons/zeus/functions/fnc_ui_teleportPlayers.sqf index b7aab411268..9d32d8cfc02 100644 --- a/addons/zeus/functions/fnc_ui_teleportPlayers.sqf +++ b/addons/zeus/functions/fnc_ui_teleportPlayers.sqf @@ -66,7 +66,7 @@ private _fnc_onKeyUp = { private _fnc_onUnload = { params ["_display"]; - private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); if (isNull _logic) exitWith {}; // Store checkbox value for reopening @@ -76,10 +76,10 @@ private _fnc_onUnload = { private _fnc_onConfirm = { params [["_ctrlButtonOK", controlNull, [controlNull]]]; - private _display = ctrlparent _ctrlButtonOK; + private _display = ctrlParent _ctrlButtonOK; if (isNull _display) exitWith {}; - private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); if (isNull _logic) exitWith {}; private _lb = _display displayCtrl 16189; diff --git a/include/a3/ui_f/hpp/defineCommonGrids.inc b/include/a3/ui_f/hpp/defineCommonGrids.inc index 9574a6982c6..1900458d1e7 100644 --- a/include/a3/ui_f/hpp/defineCommonGrids.inc +++ b/include/a3/ui_f/hpp/defineCommonGrids.inc @@ -3,15 +3,15 @@ /////////////////////////////////////////////////////////////////////////// //--- Hack to avoid too large display upon first startup (fixed in engine) -//#define GUI_GRID_OLD_WAbs ((safezoneW / ((floor (safezoneW / safezoneH)) max 1)) min 1.2) +//#define GUI_GRID_OLD_WAbs ((safeZoneW / ((floor (safeZoneW / safeZoneH)) max 1)) min 1.2) //--- New grid for new A3 displays -#define GUI_GRID_WAbs ((safezoneW / safezoneH) min 1.2) +#define GUI_GRID_WAbs ((safeZoneW / safeZoneH) min 1.2) #define GUI_GRID_HAbs (GUI_GRID_WAbs / 1.2) #define GUI_GRID_W (GUI_GRID_WAbs / 40) #define GUI_GRID_H (GUI_GRID_HAbs / 25) -#define GUI_GRID_X (safezoneX) -#define GUI_GRID_Y (safezoneY + safezoneH - GUI_GRID_HAbs) +#define GUI_GRID_X (safeZoneX) +#define GUI_GRID_Y (safeZoneY + safeZoneH - GUI_GRID_HAbs) //--- MUF - Test grid used in MP #define GUI_GRID_MP_WAbs GUI_GRID_WAbs @@ -19,23 +19,23 @@ #define GUI_GRID_MP_W GUI_GRID_W #define GUI_GRID_MP_H GUI_GRID_H #define GUI_GRID_MP_X (SafezoneX) -#define GUI_GRID_MP_Y (safezoneY) +#define GUI_GRID_MP_Y (safeZoneY) //--- Screen Center #define GUI_GRID_CENTER_WAbs GUI_GRID_WAbs #define GUI_GRID_CENTER_HAbs GUI_GRID_HAbs #define GUI_GRID_CENTER_W GUI_GRID_W #define GUI_GRID_CENTER_H GUI_GRID_H -#define GUI_GRID_CENTER_X (safezoneX + (safezoneW - GUI_GRID_CENTER_WAbs)/2) -#define GUI_GRID_CENTER_Y (safezoneY + (safezoneH - GUI_GRID_CENTER_HAbs)/2) +#define GUI_GRID_CENTER_X (safeZoneX + (safeZoneW - GUI_GRID_CENTER_WAbs)/2) +#define GUI_GRID_CENTER_Y (safeZoneY + (safeZoneH - GUI_GRID_CENTER_HAbs)/2) //--- Bottom center position (used by Revive UI) #define GUI_GRID_CENTER_BOTTOM_WAbs GUI_GRID_WAbs #define GUI_GRID_CENTER_BOTTOM_HAbs GUI_GRID_HAbs #define GUI_GRID_CENTER_BOTTOM_W GUI_GRID_W #define GUI_GRID_CENTER_BOTTOM_H GUI_GRID_H -#define GUI_GRID_CENTER_BOTTOM_X (safezoneX + (safezoneW - GUI_GRID_CENTER_WAbs)/2) -#define GUI_GRID_CENTER_BOTTOM_Y (safezoneY + safezoneH - GUI_GRID_CENTER_HAbs) +#define GUI_GRID_CENTER_BOTTOM_X (safeZoneX + (safeZoneW - GUI_GRID_CENTER_WAbs)/2) +#define GUI_GRID_CENTER_BOTTOM_Y (safeZoneY + safeZoneH - GUI_GRID_CENTER_HAbs) //--- Screen Top Center #define GUI_GRID_TOPCENTER_WAbs GUI_GRID_WAbs @@ -43,7 +43,7 @@ #define GUI_GRID_TOPCENTER_W GUI_GRID_W #define GUI_GRID_TOPCENTER_H GUI_GRID_H #define GUI_GRID_TOPCENTER_X GUI_GRID_CENTER_X -#define GUI_GRID_TOPCENTER_Y safezoneY +#define GUI_GRID_TOPCENTER_Y safeZoneY //--- Screen Bottom Center #define GUI_GRID_BOTTOMCENTER_WAbs GUI_GRID_WAbs @@ -58,24 +58,24 @@ #define GUI_GRID_EDITOR_HAbs GUI_GRID_CENTER_HAbs #define GUI_GRID_EDITOR_W GUI_GRID_CENTER_W #define GUI_GRID_EDITOR_H GUI_GRID_CENTER_H -#define GUI_GRID_EDITOR_X (safezoneX) -#define GUI_GRID_EDITOR_Y (safezoneY) +#define GUI_GRID_EDITOR_X (safeZoneX) +#define GUI_GRID_EDITOR_Y (safeZoneY) //--- Diary #define GUI_GRID_DIARY_WAbs GUI_GRID_WAbs #define GUI_GRID_DIARY_HAbs GUI_GRID_HAbs #define GUI_GRID_DIARY_W GUI_GRID_W #define GUI_GRID_DIARY_H GUI_GRID_H -#define GUI_GRID_DIARY_X (safezoneX) -#define GUI_GRID_DIARY_Y (safezoneY) +#define GUI_GRID_DIARY_X (safeZoneX) +#define GUI_GRID_DIARY_Y (safeZoneY) //--- Top left #define GUI_GRID_TOPLEFT_WAbs GUI_GRID_WAbs #define GUI_GRID_TOPLEFT_HAbs GUI_GRID_HAbs #define GUI_GRID_TOPLEFT_W GUI_GRID_W #define GUI_GRID_TOPLEFT_H GUI_GRID_H -#define GUI_GRID_TOPLEFT_X (safezoneX) -#define GUI_GRID_TOPLEFT_Y (safezoneY) +#define GUI_GRID_TOPLEFT_X (safeZoneX) +#define GUI_GRID_TOPLEFT_Y (safeZoneY) /////////////////////////////////////////////////////////////////////////// @@ -85,8 +85,8 @@ //--- IGUI Vehicle #define IGUI_GRID_VEHICLE_WAbs (10 * GUI_GRID_W) #define IGUI_GRID_VEHICLE_HAbs (4.5 * GUI_GRID_H) -#define IGUI_GRID_VEHICLE_XDef (safezoneX + 0.5 * GUI_GRID_W) -#define IGUI_GRID_VEHICLE_YDef (safezoneY + 0.5 * GUI_GRID_H) +#define IGUI_GRID_VEHICLE_XDef (safeZoneX + 0.5 * GUI_GRID_W) +#define IGUI_GRID_VEHICLE_YDef (safeZoneY + 0.5 * GUI_GRID_H) #define IGUI_GRID_VEHICLE_X (profilenamespace getvariable ["IGUI_GRID_VEHICLE_X",IGUI_GRID_VEHICLE_XDef]) #define IGUI_GRID_VEHICLE_Y (profilenamespace getvariable ["IGUI_GRID_VEHICLE_Y",IGUI_GRID_VEHICLE_YDef]) #define IGUI_GRID_VEHICLE_W GUI_GRID_W @@ -95,8 +95,8 @@ //--- IGUI Radar #define IGUI_GRID_RADAR_WAbs (5.6 * GUI_GRID_W) #define IGUI_GRID_RADAR_HAbs (5.6 * GUI_GRID_H) -#define IGUI_GRID_RADAR_XDef (safezoneX + safezoneW / 2 - 2.8 * GUI_GRID_W) -#define IGUI_GRID_RADAR_YDef (safezoneY + 0.5 * GUI_GRID_H) +#define IGUI_GRID_RADAR_XDef (safeZoneX + safeZoneW / 2 - 2.8 * GUI_GRID_W) +#define IGUI_GRID_RADAR_YDef (safeZoneY + 0.5 * GUI_GRID_H) #define IGUI_GRID_RADAR_X (profilenamespace getvariable ["IGUI_GRID_RADAR_X",IGUI_GRID_RADAR_XDef]) #define IGUI_GRID_RADAR_Y (profilenamespace getvariable ["IGUI_GRID_RADAR_Y",IGUI_GRID_RADAR_YDef]) #define IGUI_GRID_RADAR_W GUI_GRID_W @@ -105,8 +105,8 @@ //--- IGUI Weapon #define IGUI_GRID_WEAPON_WAbs (10 * GUI_GRID_W) #define IGUI_GRID_WEAPON_HAbs (4.5 * GUI_GRID_H) -#define IGUI_GRID_WEAPON_XDef ((safezoneX + safezoneW) - IGUI_GRID_WEAPON_WAbs - 4.3 * GUI_GRID_W) -#define IGUI_GRID_WEAPON_YDef (safezoneY + 0.5 * GUI_GRID_H) +#define IGUI_GRID_WEAPON_XDef ((safeZoneX + safeZoneW) - IGUI_GRID_WEAPON_WAbs - 4.3 * GUI_GRID_W) +#define IGUI_GRID_WEAPON_YDef (safeZoneY + 0.5 * GUI_GRID_H) #define IGUI_GRID_WEAPON_X (profilenamespace getvariable ["IGUI_GRID_WEAPON_X",IGUI_GRID_WEAPON_XDef]) #define IGUI_GRID_WEAPON_Y (profilenamespace getvariable ["IGUI_GRID_WEAPON_Y",IGUI_GRID_WEAPON_YDef]) #define IGUI_GRID_WEAPON_W GUI_GRID_W @@ -115,8 +115,8 @@ //--- IGUI Stance indicator #define IGUI_GRID_STANCE_WAbs (3.7 * GUI_GRID_W) #define IGUI_GRID_STANCE_HAbs (3.7 * GUI_GRID_H) -#define IGUI_GRID_STANCE_XDef ((safezoneX + safezoneW) - IGUI_GRID_STANCE_WAbs - 0.5 * GUI_GRID_W) -#define IGUI_GRID_STANCE_YDef (safezoneY + 0.5 * GUI_GRID_H) +#define IGUI_GRID_STANCE_XDef ((safeZoneX + safeZoneW) - IGUI_GRID_STANCE_WAbs - 0.5 * GUI_GRID_W) +#define IGUI_GRID_STANCE_YDef (safeZoneY + 0.5 * GUI_GRID_H) #define IGUI_GRID_STANCE_X (profilenamespace getvariable ["IGUI_GRID_STANCE_X",IGUI_GRID_STANCE_XDef]) #define IGUI_GRID_STANCE_Y (profilenamespace getvariable ["IGUI_GRID_STANCE_Y",IGUI_GRID_STANCE_YDef]) #define IGUI_GRID_STANCE_W GUI_GRID_W @@ -126,7 +126,7 @@ #define IGUI_GRID_STAMINA_WAbs (10 * GUI_GRID_W) #define IGUI_GRID_STAMINA_HAbs (1 * GUI_GRID_H) #define IGUI_GRID_STAMINA_XDef IGUI_GRID_WEAPON_XDef -#define IGUI_GRID_STAMINA_YDef (safezoneY + 4.05 * GUI_GRID_H) +#define IGUI_GRID_STAMINA_YDef (safeZoneY + 4.05 * GUI_GRID_H) #define IGUI_GRID_STAMINA_X (profilenamespace getvariable ["IGUI_GRID_STAMINA_X",IGUI_GRID_STAMINA_XDef]) #define IGUI_GRID_STAMINA_Y (profilenamespace getvariable ["IGUI_GRID_STAMINA_Y",IGUI_GRID_STAMINA_YDef]) #define IGUI_GRID_STAMINA_W GUI_GRID_W @@ -136,7 +136,7 @@ #define IGUI_GRID_NOTIFICATION_WAbs (12 * GUI_GRID_W) #define IGUI_GRID_NOTIFICATION_HAbs (6 * GUI_GRID_H) #define IGUI_GRID_NOTIFICATION_XDef (0.5 - 6 * GUI_GRID_W) -#define IGUI_GRID_NOTIFICATION_YDef (safezoneY + 6.5 * GUI_GRID_H) +#define IGUI_GRID_NOTIFICATION_YDef (safeZoneY + 6.5 * GUI_GRID_H) #define IGUI_GRID_NOTIFICATION_X (profilenamespace getvariable ["IGUI_GRID_NOTIFICATION_X",IGUI_GRID_NOTIFICATION_XDef]) #define IGUI_GRID_NOTIFICATION_Y (profilenamespace getvariable ["IGUI_GRID_NOTIFICATION_Y",IGUI_GRID_NOTIFICATION_YDef]) #define IGUI_GRID_NOTIFICATION_W GUI_GRID_W @@ -145,8 +145,8 @@ //--- IGUI Action / Command Menu #define IGUI_GRID_MENU_WAbs (4.5 * GUI_GRID_W) #define IGUI_GRID_MENU_HAbs (13.5 * IGUI_TEXT_SIZE_MEDIUM) -#define IGUI_GRID_MENU_XDef (1.5 * GUI_GRID_W + safezoneX) -#define IGUI_GRID_MENU_YDef (5 * GUI_GRID_H + safezoneY) +#define IGUI_GRID_MENU_XDef (1.5 * GUI_GRID_W + safeZoneX) +#define IGUI_GRID_MENU_YDef (5 * GUI_GRID_H + safeZoneY) #define IGUI_GRID_MENU_X (profilenamespace getvariable ["IGUI_GRID_MENU_X",IGUI_GRID_MENU_XDef]) #define IGUI_GRID_MENU_Y (profilenamespace getvariable ["IGUI_GRID_MENU_Y",IGUI_GRID_MENU_YDef]) #define IGUI_GRID_MENU_W GUI_GRID_W @@ -155,8 +155,8 @@ //--- IGUI Communication menu icons #define IGUI_GRID_COMM_WAbs (1.5 * GUI_GRID_W) #define IGUI_GRID_COMM_HAbs (15 * GUI_GRID_H) -#define IGUI_GRID_COMM_XDef (0 * GUI_GRID_W + safezoneX) -#define IGUI_GRID_COMM_YDef (5 * GUI_GRID_H + safezoneY) +#define IGUI_GRID_COMM_XDef (0 * GUI_GRID_W + safeZoneX) +#define IGUI_GRID_COMM_YDef (5 * GUI_GRID_H + safeZoneY) #define IGUI_GRID_COMM_X (profilenamespace getvariable ["IGUI_GRID_COMM_X",IGUI_GRID_COMM_XDef]) #define IGUI_GRID_COMM_Y (profilenamespace getvariable ["IGUI_GRID_COMM_Y",IGUI_GRID_COMM_YDef]) #define IGUI_GRID_COMM_W GUI_GRID_W @@ -165,16 +165,16 @@ //--- IGUI Hint #define IGUI_GRID_HINT_WAbs (12 * GUI_GRID_W) #define IGUI_GRID_HINT_HAbs (8 * GUI_GRID_H) -#define IGUI_GRID_HINT_XDef ((safezoneX + safezoneW) - IGUI_GRID_HINT_WAbs - 1 * GUI_GRID_W) -#define IGUI_GRID_HINT_YDef (safezoneY + 6 * GUI_GRID_H) +#define IGUI_GRID_HINT_XDef ((safeZoneX + safeZoneW) - IGUI_GRID_HINT_WAbs - 1 * GUI_GRID_W) +#define IGUI_GRID_HINT_YDef (safeZoneY + 6 * GUI_GRID_H) #define IGUI_GRID_HINT_X (profilenamespace getvariable ["IGUI_GRID_HINT_X",IGUI_GRID_HINT_XDef]) #define IGUI_GRID_HINT_Y (profilenamespace getvariable ["IGUI_GRID_HINT_Y",IGUI_GRID_HINT_YDef]) #define IGUI_GRID_HINT_W GUI_GRID_W #define IGUI_GRID_HINT_H GUI_GRID_H //--- IGUI GPS -#define IGUI_GRID_GPS_XDef (safezoneX + safezoneW - 11 * GUI_GRID_W) -#define IGUI_GRID_GPS_YDef (safezoneY + safezoneH - 20.5 * GUI_GRID_H) +#define IGUI_GRID_GPS_XDef (safeZoneX + safeZoneW - 11 * GUI_GRID_W) +#define IGUI_GRID_GPS_YDef (safeZoneY + safeZoneH - 20.5 * GUI_GRID_H) #define IGUI_GRID_GPS_WDef (10 * GUI_GRID_W) #define IGUI_GRID_GPS_HDef (10 * GUI_GRID_H) #define IGUI_GRID_GPS_X (profilenamespace getvariable ['IGUI_GRID_GPS_X',IGUI_GRID_GPS_XDef]) @@ -183,8 +183,8 @@ #define IGUI_GRID_GPS_HAbs (profilenamespace getvariable ['IGUI_GRID_GPS_H',IGUI_GRID_GPS_HDef]) //--- IGUI AV Camera -#define IGUI_GRID_AVCAMERA_XDef (safezoneX + safezoneW - 11.6 * GUI_GRID_W) -#define IGUI_GRID_AVCAMERA_YDef (safezoneY + safezoneH - 17.2 * GUI_GRID_H) +#define IGUI_GRID_AVCAMERA_XDef (safeZoneX + safeZoneW - 11.6 * GUI_GRID_W) +#define IGUI_GRID_AVCAMERA_YDef (safeZoneY + safeZoneH - 17.2 * GUI_GRID_H) #define IGUI_GRID_AVCAMERA_WDef (10.6 * GUI_GRID_W) #define IGUI_GRID_AVCAMERA_HDef (6.7 * GUI_GRID_H) #define IGUI_GRID_AVCAMERA_X (profilenamespace getvariable ['IGUI_GRID_AVCAMERA_X',IGUI_GRID_AVCAMERA_XDef]) @@ -193,8 +193,8 @@ #define IGUI_GRID_AVCAMERA_HAbs (profilenamespace getvariable ['IGUI_GRID_AVCAMERA_H',IGUI_GRID_AVCAMERA_HDef]) //--- IGUI IGUI Chat Log -#define IGUI_GRID_CHAT_XDef (safezoneX + 1 * GUI_GRID_W) -#define IGUI_GRID_CHAT_YDef (safezoneY + safezoneH - 10.5 * GUI_GRID_H) +#define IGUI_GRID_CHAT_XDef (safeZoneX + 1 * GUI_GRID_W) +#define IGUI_GRID_CHAT_YDef (safeZoneY + safeZoneH - 10.5 * GUI_GRID_H) #define IGUI_GRID_CHAT_WDef (20 * GUI_GRID_W) #define IGUI_GRID_CHAT_HDef (5 * GUI_GRID_H) #define IGUI_GRID_CHAT_X (profilenamespace getvariable ["IGUI_GRID_CHAT_X",IGUI_GRID_CHAT_XDef]) @@ -205,8 +205,8 @@ //--- IGUI Command Bar #define IGUI_GRID_BAR_WAbs (36 * GUI_GRID_W) #define IGUI_GRID_BAR_HAbs (4 * GUI_GRID_H) -#define IGUI_GRID_BAR_XDef (safezoneX + 1 * GUI_GRID_W) -#define IGUI_GRID_BAR_YDef (safezoneY + safezoneH - 4.5 * GUI_GRID_H) +#define IGUI_GRID_BAR_XDef (safeZoneX + 1 * GUI_GRID_W) +#define IGUI_GRID_BAR_YDef (safeZoneY + safeZoneH - 4.5 * GUI_GRID_H) #define IGUI_GRID_BAR_X (profilenamespace getvariable ["IGUI_GRID_BAR_X",IGUI_GRID_BAR_XDef]) #define IGUI_GRID_BAR_Y (profilenamespace getvariable ["IGUI_GRID_BAR_Y",IGUI_GRID_BAR_YDef]) #define IGUI_GRID_BAR_W GUI_GRID_W @@ -215,8 +215,8 @@ //--- IGUI MP Progress #define IGUI_GRID_MP_WAbs (2.5 * GUI_GRID_W) #define IGUI_GRID_MP_HAbs (15 * GUI_GRID_H) -#define IGUI_GRID_MP_XDef (safezoneX + safezoneW - 2 * GUI_GRID_W) -#define IGUI_GRID_MP_YDef (5 * GUI_GRID_H + safezoneY) +#define IGUI_GRID_MP_XDef (safeZoneX + safeZoneW - 2 * GUI_GRID_W) +#define IGUI_GRID_MP_YDef (5 * GUI_GRID_H + safeZoneY) #define IGUI_GRID_MP_X (profilenamespace getvariable ["IGUI_GRID_MP_X",IGUI_GRID_MP_XDef]) #define IGUI_GRID_MP_Y (profilenamespace getvariable ["IGUI_GRID_MP_Y",IGUI_GRID_MP_YDef]) #define IGUI_GRID_MP_W GUI_GRID_W @@ -225,8 +225,8 @@ //--- IGUI Custom Mission Display #define IGUI_GRID_MISSION_WAbs (20 * GUI_GRID_W) #define IGUI_GRID_MISSION_HAbs (5 * GUI_GRID_H) -#define IGUI_GRID_MISSION_XDef (safezoneX + safezoneW - 21 * GUI_GRID_W) -#define IGUI_GRID_MISSION_YDef (safezoneY + safezoneH - 10.5 * GUI_GRID_H) +#define IGUI_GRID_MISSION_XDef (safeZoneX + safeZoneW - 21 * GUI_GRID_W) +#define IGUI_GRID_MISSION_YDef (safeZoneY + safeZoneH - 10.5 * GUI_GRID_H) #define IGUI_GRID_MISSION_X (profilenamespace getvariable ["IGUI_GRID_MISSION_X",IGUI_GRID_MISSION_XDef]) #define IGUI_GRID_MISSION_Y (profilenamespace getvariable ["IGUI_GRID_MISSION_Y",IGUI_GRID_MISSION_YDef]) #define IGUI_GRID_MISSION_W GUI_GRID_W @@ -235,10 +235,10 @@ //--- IGUI Custom Info #define IGUI_GRID_CUSTOMINFO_WDef (10 * GUI_GRID_W) #define IGUI_GRID_CUSTOMINFO_HDef (10 * GUI_GRID_H) -#define IGUI_GRID_CUSTOMINFOLEFT_XDef (safezoneX + 0.5 * GUI_GRID_W) -#define IGUI_GRID_CUSTOMINFOLEFT_YDef (safezoneY + safezoneH - 21 * GUI_GRID_H) -#define IGUI_GRID_CUSTOMINFORIGHT_XDef ((safezoneX + safezoneW) - (IGUI_GRID_CUSTOMINFO_WDef + 0.5 * GUI_GRID_W)) -#define IGUI_GRID_CUSTOMINFORIGHT_YDef (safezoneY + safezoneH - 21 * GUI_GRID_H) +#define IGUI_GRID_CUSTOMINFOLEFT_XDef (safeZoneX + 0.5 * GUI_GRID_W) +#define IGUI_GRID_CUSTOMINFOLEFT_YDef (safeZoneY + safeZoneH - 21 * GUI_GRID_H) +#define IGUI_GRID_CUSTOMINFORIGHT_XDef ((safeZoneX + safeZoneW) - (IGUI_GRID_CUSTOMINFO_WDef + 0.5 * GUI_GRID_W)) +#define IGUI_GRID_CUSTOMINFORIGHT_YDef (safeZoneY + safeZoneH - 21 * GUI_GRID_H) #define IGUI_GRID_CUSTOMINFOLEFT_X (profilenamespace getvariable ["IGUI_GRID_CUSTOMINFOLEFT_X",IGUI_GRID_CUSTOMINFOLEFT_XDef]) #define IGUI_GRID_CUSTOMINFOLEFT_Y (profilenamespace getvariable ["IGUI_GRID_CUSTOMINFOLEFT_Y",IGUI_GRID_CUSTOMINFOLEFT_YDef]) @@ -255,21 +255,21 @@ /////////////////////////////////////////////////////////////////////////// //--- Old grid, that is used for old A3 and TKOH displays -#define GUI_GRID_OLD_WAbs ((safezoneW / safezoneH) min 1.2) +#define GUI_GRID_OLD_WAbs ((safeZoneW / safeZoneH) min 1.2) #define GUI_GRID_OLD_HAbs (GUI_GRID_OLD_WAbs / 1.2) #define GUI_GRID_OLD_W (GUI_GRID_OLD_WAbs / 32) #define GUI_GRID_OLD_H (GUI_GRID_OLD_HAbs / 20) -#define GUI_GRID_OLD_X (safezoneX) -#define GUI_GRID_OLD_Y (safezoneY + safezoneH - GUI_GRID_OLD_HAbs) +#define GUI_GRID_OLD_X (safeZoneX) +#define GUI_GRID_OLD_Y (safeZoneY + safeZoneH - GUI_GRID_OLD_HAbs) //--- Centered -//#define GUI_GRID_OLD_X (safezoneX + (safezoneW - GUI_GRID_OLD_CENTER_WAbs)/2) +//#define GUI_GRID_OLD_X (safeZoneX + (safeZoneW - GUI_GRID_OLD_CENTER_WAbs)/2) //--- Dark magic -//#define GUI_GRID_OLD_X (profilenamespace getvariable ['GUI_GRID_OLD_X',(safezoneX + (safezoneW - GUI_GRID_OLD_CENTER_WAbs)/2)]) -//#define GUI_GRID_OLD_Y (profilenamespace getvariable ['GUI_GRID_OLD_Y',(safezoneY + safezoneH - GUI_GRID_OLD_HAbs)]) +//#define GUI_GRID_OLD_X (profilenamespace getvariable ['GUI_GRID_OLD_X',(safeZoneX + (safeZoneW - GUI_GRID_OLD_CENTER_WAbs)/2)]) +//#define GUI_GRID_OLD_Y (profilenamespace getvariable ['GUI_GRID_OLD_Y',(safeZoneY + safeZoneH - GUI_GRID_OLD_HAbs)]) //MUF-TEST: Anchor near the right edge of the screen - when changing Interface size, this point doesn't change its X position -#define GUI_ANCHOR_RIGHT (0.983 * safezoneW + safezoneX) +#define GUI_ANCHOR_RIGHT (0.983 * safeZoneW + safeZoneX) #define GUI_ANCHOR_LEFT 0 //--- Screen Center @@ -277,8 +277,8 @@ #define GUI_GRID_OLD_CENTER_HAbs GUI_GRID_OLD_HAbs #define GUI_GRID_OLD_CENTER_W GUI_GRID_OLD_W #define GUI_GRID_OLD_CENTER_H GUI_GRID_OLD_H -#define GUI_GRID_OLD_CENTER_X (safezoneX + (safezoneW - GUI_GRID_OLD_CENTER_WAbs)/2) -#define GUI_GRID_OLD_CENTER_Y (safezoneY + (safezoneH - GUI_GRID_OLD_CENTER_HAbs)/2) +#define GUI_GRID_OLD_CENTER_X (safeZoneX + (safeZoneW - GUI_GRID_OLD_CENTER_WAbs)/2) +#define GUI_GRID_OLD_CENTER_Y (safeZoneY + (safeZoneH - GUI_GRID_OLD_CENTER_HAbs)/2) //--- 2D Editor #define GUI_GRID_OLD_EDITOR_WAbs GUI_GRID_OLD_CENTER_WAbs @@ -286,76 +286,76 @@ #define GUI_GRID_OLD_EDITOR_W GUI_GRID_OLD_CENTER_W #define GUI_GRID_OLD_EDITOR_H GUI_GRID_OLD_CENTER_H #define GUI_GRID_OLD_EDITOR_X GUI_GRID_OLD_CENTER_X -#define GUI_GRID_OLD_EDITOR_Y (safezoneY) +#define GUI_GRID_OLD_EDITOR_Y (safeZoneY) //--- Debug console (center down) #define GUI_GRID_OLD_DEBUG_WAbs GUI_GRID_OLD_WAbs #define GUI_GRID_OLD_DEBUG_HAbs GUI_GRID_OLD_HAbs #define GUI_GRID_OLD_DEBUG_W GUI_GRID_OLD_W #define GUI_GRID_OLD_DEBUG_H GUI_GRID_OLD_H -#define GUI_GRID_OLD_DEBUG_X (safezoneX + (safezoneW - GUI_GRID_OLD_DEBUG_WAbs)/2) -#define GUI_GRID_OLD_DEBUG_Y (safezoneY + safezoneH - GUI_GRID_OLD_DEBUG_HAbs) +#define GUI_GRID_OLD_DEBUG_X (safeZoneX + (safeZoneW - GUI_GRID_OLD_DEBUG_WAbs)/2) +#define GUI_GRID_OLD_DEBUG_Y (safeZoneY + safeZoneH - GUI_GRID_OLD_DEBUG_HAbs) //--- IGUI Common #define IGUI_GRID_OLD_WAbs GUI_GRID_OLD_WAbs #define IGUI_GRID_OLD_HAbs GUI_GRID_OLD_HAbs #define IGUI_GRID_OLD_W GUI_GRID_OLD_W #define IGUI_GRID_OLD_H GUI_GRID_OLD_H -#define IGUI_GRID_OLD_X (safezoneX + (safezoneW - IGUI_GRID_OLD_WAbs) / 2) -#define IGUI_GRID_OLD_Y (safezoneY + safezoneH - IGUI_GRID_OLD_HAbs) +#define IGUI_GRID_OLD_X (safeZoneX + (safeZoneW - IGUI_GRID_OLD_WAbs) / 2) +#define IGUI_GRID_OLD_Y (safeZoneY + safeZoneH - IGUI_GRID_OLD_HAbs) //--- IGUI Bottom #define IGUI_GRID_OLD_BOTTOM_WAbs IGUI_GRID_OLD_WAbs #define IGUI_GRID_OLD_BOTTOM_HAbs IGUI_GRID_OLD_HAbs #define IGUI_GRID_OLD_BOTTOM_W IGUI_GRID_OLD_W #define IGUI_GRID_OLD_BOTTOM_H IGUI_GRID_OLD_H -#define IGUI_GRID_OLD_BOTTOM_X (safezoneX + (safezoneW - IGUI_GRID_OLD_BOTTOM_WAbs) / 2) -#define IGUI_GRID_OLD_BOTTOM_Y (safezoneY + safezoneH - IGUI_GRID_OLD_BOTTOM_HAbs) +#define IGUI_GRID_OLD_BOTTOM_X (safeZoneX + (safeZoneW - IGUI_GRID_OLD_BOTTOM_WAbs) / 2) +#define IGUI_GRID_OLD_BOTTOM_Y (safeZoneY + safeZoneH - IGUI_GRID_OLD_BOTTOM_HAbs) //--- IGUI Analogue Gauges ----------------------------------------------------------------------------------------------------- //--- Analogue gauge - Speed -#define IGUI_GRID_GAUGESPEED_XDef (safezoneX + (safezoneW / 2) - 19.75 * GUI_GRID_W) -#define IGUI_GRID_GAUGESPEED_YDef (safezoneY + safezoneH - 11.7 * GUI_GRID_H) +#define IGUI_GRID_GAUGESPEED_XDef (safeZoneX + (safeZoneW / 2) - 19.75 * GUI_GRID_W) +#define IGUI_GRID_GAUGESPEED_YDef (safeZoneY + safeZoneH - 11.7 * GUI_GRID_H) #define IGUI_GRID_GAUGESPEED_X (profilenamespace getvariable ['IGUI_GRID_GAUGESPEED_X',IGUI_GRID_GAUGESPEED_XDef]) #define IGUI_GRID_GAUGESPEED_Y (profilenamespace getvariable ['IGUI_GRID_GAUGESPEED_Y',IGUI_GRID_GAUGESPEED_YDef]) #define IGUI_GRID_GAUGESPEED_WAbs (7.5 * GUI_GRID_W) #define IGUI_GRID_GAUGESPEED_HAbs (7.5 * GUI_GRID_H) //--- Analogue gauge - Alt -#define IGUI_GRID_GAUGEALT_XDef (safezoneX + (safezoneW / 2) - 11.75 * GUI_GRID_W) -#define IGUI_GRID_GAUGEALT_YDef (safezoneY + safezoneH - 11.7 * GUI_GRID_H) +#define IGUI_GRID_GAUGEALT_XDef (safeZoneX + (safeZoneW / 2) - 11.75 * GUI_GRID_W) +#define IGUI_GRID_GAUGEALT_YDef (safeZoneY + safeZoneH - 11.7 * GUI_GRID_H) #define IGUI_GRID_GAUGEALT_X (profilenamespace getvariable ['IGUI_GRID_GAUGEALT_X',IGUI_GRID_GAUGEALT_XDef]) #define IGUI_GRID_GAUGEALT_Y (profilenamespace getvariable ['IGUI_GRID_GAUGEALT_Y',IGUI_GRID_GAUGEALT_YDef]) #define IGUI_GRID_GAUGEALT_WAbs (7.5 * GUI_GRID_W) #define IGUI_GRID_GAUGEALT_HAbs (7.5 * GUI_GRID_H) //--- Analogue gauge - Horizon -#define IGUI_GRID_GAUGEHORIZON_XDef (safezoneX + ((safezoneW - 7.5 * GUI_GRID_W) / 2)) -#define IGUI_GRID_GAUGEHORIZON_YDef (safezoneY + safezoneH - 11.7 * GUI_GRID_H) +#define IGUI_GRID_GAUGEHORIZON_XDef (safeZoneX + ((safeZoneW - 7.5 * GUI_GRID_W) / 2)) +#define IGUI_GRID_GAUGEHORIZON_YDef (safeZoneY + safeZoneH - 11.7 * GUI_GRID_H) #define IGUI_GRID_GAUGEHORIZON_X (profilenamespace getvariable ['IGUI_GRID_GAUGEHORIZON_X',IGUI_GRID_GAUGEHORIZON_XDef]) #define IGUI_GRID_GAUGEHORIZON_Y (profilenamespace getvariable ['IGUI_GRID_GAUGEHORIZON_Y',IGUI_GRID_GAUGEHORIZON_YDef]) #define IGUI_GRID_GAUGEHORIZON_WAbs (7.5 * GUI_GRID_W) #define IGUI_GRID_GAUGEHORIZON_HAbs (7.5 * GUI_GRID_H) //--- Analogue gauge - Stability -#define IGUI_GRID_GAUGESTABILITY_XDef (safezoneX + (safezoneW / 2) + 4.25 * GUI_GRID_W) -#define IGUI_GRID_GAUGESTABILITY_YDef (safezoneY + safezoneH - 11.7 * GUI_GRID_H) +#define IGUI_GRID_GAUGESTABILITY_XDef (safeZoneX + (safeZoneW / 2) + 4.25 * GUI_GRID_W) +#define IGUI_GRID_GAUGESTABILITY_YDef (safeZoneY + safeZoneH - 11.7 * GUI_GRID_H) #define IGUI_GRID_GAUGESTABILITY_X (profilenamespace getvariable ['IGUI_GRID_GAUGESTABILITY_X',IGUI_GRID_GAUGESTABILITY_XDef]) #define IGUI_GRID_GAUGESTABILITY_Y (profilenamespace getvariable ['IGUI_GRID_GAUGESTABILITY_Y',IGUI_GRID_GAUGESTABILITY_YDef]) #define IGUI_GRID_GAUGESTABILITY_WAbs (7.5 * GUI_GRID_W) #define IGUI_GRID_GAUGESTABILITY_HAbs (7.5 * GUI_GRID_H) //--- Analogue gauge - Compass -#define IGUI_GRID_GAUGECOMPASS_XDef (safezoneX + (safezoneW / 2) + 12.25 * GUI_GRID_W) -#define IGUI_GRID_GAUGECOMPASS_YDef (safezoneY + safezoneH - 11.7 * GUI_GRID_H) +#define IGUI_GRID_GAUGECOMPASS_XDef (safeZoneX + (safeZoneW / 2) + 12.25 * GUI_GRID_W) +#define IGUI_GRID_GAUGECOMPASS_YDef (safeZoneY + safeZoneH - 11.7 * GUI_GRID_H) #define IGUI_GRID_GAUGECOMPASS_X (profilenamespace getvariable ['IGUI_GRID_GAUGECOMPASS_X',IGUI_GRID_GAUGECOMPASS_XDef]) #define IGUI_GRID_GAUGECOMPASS_Y (profilenamespace getvariable ['IGUI_GRID_GAUGECOMPASS_Y',IGUI_GRID_GAUGECOMPASS_YDef]) #define IGUI_GRID_GAUGECOMPASS_WAbs (7.5 * GUI_GRID_W) #define IGUI_GRID_GAUGECOMPASS_HAbs (7.5 * GUI_GRID_H) //--- Analogue gauge - Damage indicators -// #define IGUI_GRID_GAUGEDAMAGE_XDef (safezoneX + (safezoneW / 2) - 19 * GUI_GRID_W) -// #define IGUI_GRID_GAUGEDAMAGE_YDef (safezoneY + safezoneH - 7 * GUI_GRID_H) +// #define IGUI_GRID_GAUGEDAMAGE_XDef (safeZoneX + (safeZoneW / 2) - 19 * GUI_GRID_W) +// #define IGUI_GRID_GAUGEDAMAGE_YDef (safeZoneY + safeZoneH - 7 * GUI_GRID_H) // #define IGUI_GRID_GAUGEDAMAGE_X (profilenamespace getvariable ['IGUI_GRID_GAUGEDAMAGE_X',IGUI_GRID_GAUGEDAMAGE_XDef]) // #define IGUI_GRID_GAUGEDAMAGE_Y (profilenamespace getvariable ['IGUI_GRID_GAUGEDAMAGE_Y',IGUI_GRID_GAUGEDAMAGE_YDef]) // #define IGUI_GRID_GAUGEDAMAGE_WAbs (9.6 * GUI_GRID_W) @@ -363,8 +363,8 @@ //--- IGUI Analogue Gauges ----------------------------------------------------------------------------------------------------- //--- Sling Load Assistant -#define IGUI_GRID_SLINGLOADASSISTANT_XDef (safezoneX + safezoneW - 8 * GUI_GRID_W) -#define IGUI_GRID_SLINGLOADASSISTANT_YDef (safezoneY + safezoneH - 19.5 * GUI_GRID_H) +#define IGUI_GRID_SLINGLOADASSISTANT_XDef (safeZoneX + safeZoneW - 8 * GUI_GRID_W) +#define IGUI_GRID_SLINGLOADASSISTANT_YDef (safeZoneY + safeZoneH - 19.5 * GUI_GRID_H) #define IGUI_GRID_SLINGLOADASSISTANT_WDef (7 * GUI_GRID_W) #define IGUI_GRID_SLINGLOADASSISTANT_HDef (9.5 * GUI_GRID_H) #define IGUI_GRID_SLINGLOADASSISTANT_X (profilenamespace getvariable ['IGUI_GRID_SLINGLOADASSISTANT_X',IGUI_GRID_SLINGLOADASSISTANT_XDef]) @@ -373,8 +373,8 @@ #define IGUI_GRID_SLINGLOADASSISTANT_HAbs (profilenamespace getvariable ['IGUI_GRID_SLINGLOADASSISTANT_H',IGUI_GRID_SLINGLOADASSISTANT_HDef]) //--- Squad Radar -// #define IGUI_GRID_SQUADRADAR_XDef (safezoneX + (safezoneW / 2) - 3 * GUI_GRID_W) -// #define IGUI_GRID_SQUADRADAR_YDef (safezoneY + safezoneH - 10.9 * GUI_GRID_H) +// #define IGUI_GRID_SQUADRADAR_XDef (safeZoneX + (safeZoneW / 2) - 3 * GUI_GRID_W) +// #define IGUI_GRID_SQUADRADAR_YDef (safeZoneY + safeZoneH - 10.9 * GUI_GRID_H) // #define IGUI_GRID_SQUADRADAR_X (profilenamespace getvariable ['IGUI_GRID_SQUADRADAR_X',IGUI_GRID_SQUADRADAR_XDef]) // #define IGUI_GRID_SQUADRADAR_Y (profilenamespace getvariable ['IGUI_GRID_SQUADRADAR_Y',IGUI_GRID_SQUADRADAR_YDef]) // #define IGUI_GRID_SQUADRADAR_WAbs (6 * GUI_GRID_W) @@ -397,8 +397,8 @@ //--- IGUI Action / Command Menu #define IGUI_GRID_OLD_MENU_WAbs (4.5 * IGUI_GRID_OLD_W) #define IGUI_GRID_OLD_MENU_HAbs (10 * (IGUI_TEXT_SIZE_MEDIUM * 1.3)) -#define IGUI_GRID_OLD_MENU_XDef (1 * IGUI_GRID_OLD_W + safezoneX) -#define IGUI_GRID_OLD_MENU_YDef (5 * IGUI_GRID_OLD_H + safezoneY) +#define IGUI_GRID_OLD_MENU_XDef (1 * IGUI_GRID_OLD_W + safeZoneX) +#define IGUI_GRID_OLD_MENU_YDef (5 * IGUI_GRID_OLD_H + safeZoneY) #define IGUI_GRID_OLD_MENU_X (profilenamespace getvariable ["IGUI_GRID_OLD_MENU_X",IGUI_GRID_OLD_MENU_XDef]) #define IGUI_GRID_OLD_MENU_Y (profilenamespace getvariable ["IGUI_GRID_OLD_MENU_Y",IGUI_GRID_OLD_MENU_YDef]) #define IGUI_GRID_OLD_MENU_W IGUI_GRID_OLD_W @@ -420,14 +420,14 @@ #define IGUI_GRID_OLD_TASK_WAbs (12 * IGUI_GRID_OLD_W) #define IGUI_GRID_OLD_TASK_HAbs (2 * IGUI_GRID_OLD_H) #define IGUI_GRID_OLD_TASK_XDef (10 * IGUI_GRID_OLD_W + IGUI_GRID_OLD_X) -#define IGUI_GRID_OLD_TASK_YDef (1 * IGUI_GRID_OLD_H + safezoneY) +#define IGUI_GRID_OLD_TASK_YDef (1 * IGUI_GRID_OLD_H + safeZoneY) #define IGUI_GRID_OLD_TASK_X IGUI_GRID_OLD_TASK_XDef #define IGUI_GRID_OLD_TASK_Y IGUI_GRID_OLD_TASK_YDef #define IGUI_GRID_OLD_TASK_W IGUI_GRID_OLD_W #define IGUI_GRID_OLD_TASK_H IGUI_GRID_OLD_H //--- IGUI PIP -#define IGUI_GRID_OLD_PIP_XDef (safezoneX + safezoneW - 6.8 * IGUI_GRID_OLD_W) +#define IGUI_GRID_OLD_PIP_XDef (safeZoneX + safeZoneW - 6.8 * IGUI_GRID_OLD_W) #define IGUI_GRID_OLD_PIP_YDef (7 * IGUI_GRID_OLD_H + IGUI_GRID_OLD_Y) #define IGUI_GRID_OLD_PIP_WDef (6 * IGUI_GRID_OLD_W) #define IGUI_GRID_OLD_PIP_HDef (IGUI_GRID_OLD_PIP_WDef) @@ -456,9 +456,9 @@ #define GUI_GRID_OLD_OPTICS_HAbs (SafezoneH) //--- MUF - experimental AV Terminal grid -#define GUI_GRID_OLD_AV_TERMINAL_X (safezoneX) -#define GUI_GRID_OLD_AV_TERMINAL_Y (safezoneY) -#define GUI_GRID_OLD_AV_TERMINAL_W (safezoneW / 64) -#define GUI_GRID_OLD_AV_TERMINAL_H (safezoneH / 40) -#define GUI_GRID_OLD_AV_TERMINAL_WAbs (safezoneW) -#define GUI_GRID_OLD_AV_TERMINAL_HAbs (safezoneH) +#define GUI_GRID_OLD_AV_TERMINAL_X (safeZoneX) +#define GUI_GRID_OLD_AV_TERMINAL_Y (safeZoneY) +#define GUI_GRID_OLD_AV_TERMINAL_W (safeZoneW / 64) +#define GUI_GRID_OLD_AV_TERMINAL_H (safeZoneH / 40) +#define GUI_GRID_OLD_AV_TERMINAL_WAbs (safeZoneW) +#define GUI_GRID_OLD_AV_TERMINAL_HAbs (safeZoneH) diff --git a/include/a3/ui_f_curator/ui/displays/RscDisplayAttributes.sqf b/include/a3/ui_f_curator/ui/displays/RscDisplayAttributes.sqf index 09aba83b06e..45ba7c87ff8 100644 --- a/include/a3/ui_f_curator/ui/displays/RscDisplayAttributes.sqf +++ b/include/a3/ui_f_curator/ui/displays/RscDisplayAttributes.sqf @@ -8,130 +8,130 @@ switch _mode do { case "onLoad": { _display = _params select 0; - _displayConfig = configfile >> _class; - - _ctrlBackground = _display displayctrl IDC_RSCDISPLAYATTRIBUTES_BACKGROUND; - _ctrlTitle = _display displayctrl IDC_RSCDISPLAYATTRIBUTES_TITLE; - _ctrlContent = _display displayctrl IDC_RSCDISPLAYATTRIBUTES_CONTENT; - _ctrlButtonOK = _display displayctrl IDC_OK; - _ctrlButtonCancel = _display displayctrl IDC_CANCEL; - _ctrlButtonCustom = _display displayctrl IDC_RSCDISPLAYATTRIBUTES_BUTTONCUSTOM; - - _ctrlBackgroundPos = ctrlposition _ctrlBackground; - _ctrlTitlePos = ctrlposition _ctrlTitle; - _ctrlContentPos = ctrlposition _ctrlContent; - _ctrlButtonOKPos = ctrlposition _ctrlButtonOK; - _ctrlButtonCancelPos = ctrlposition _ctrlButtonCancel; - _ctrlButtonCustomPos = ctrlposition _ctrlButtonCustom; + _displayConfig = configFile >> _class; + + _ctrlBackground = _display displayCtrl IDC_RSCDISPLAYATTRIBUTES_BACKGROUND; + _ctrlTitle = _display displayCtrl IDC_RSCDISPLAYATTRIBUTES_TITLE; + _ctrlContent = _display displayCtrl IDC_RSCDISPLAYATTRIBUTES_CONTENT; + _ctrlButtonOK = _display displayCtrl IDC_OK; + _ctrlButtonCancel = _display displayCtrl IDC_CANCEL; + _ctrlButtonCustom = _display displayCtrl IDC_RSCDISPLAYATTRIBUTES_BUTTONCUSTOM; + + _ctrlBackgroundPos = ctrlPosition _ctrlBackground; + _ctrlTitlePos = ctrlPosition _ctrlTitle; + _ctrlContentPos = ctrlPosition _ctrlContent; + _ctrlButtonOKPos = ctrlPosition _ctrlButtonOK; + _ctrlButtonCancelPos = ctrlPosition _ctrlButtonCancel; + _ctrlButtonCustomPos = ctrlPosition _ctrlButtonCustom; _ctrlTitleOffsetY = (_ctrlBackgroundPos select 1) - (_ctrlTitlePos select 1) - (_ctrlTitlePos select 3); _ctrlContentOffsetY = (_ctrlContentPos select 1) - (_ctrlBackgroundPos select 1); //--- Show fake map in the background - _ctrlMap = _display displayctrl IDC_RSCDISPLAYCURATOR_MAINMAP; - _ctrlMap ctrlenable false; - if (visiblemap) then { - _ctrlCuratorMap = (finddisplay IDD_RSCDISPLAYCURATOR) displayctrl IDC_RSCDISPLAYCURATOR_MAINMAP; - _ctrlMap ctrlmapanimadd [0,ctrlmapscale _ctrlCuratorMap,_ctrlCuratorMap ctrlmapscreentoworld [0.5,0.5]]; - ctrlmapanimcommit _ctrlMap; + _ctrlMap = _display displayCtrl IDC_RSCDISPLAYCURATOR_MAINMAP; + _ctrlMap ctrlEnable false; + if (visibleMap) then { + _ctrlCuratorMap = (findDisplay IDD_RSCDISPLAYCURATOR) displayCtrl IDC_RSCDISPLAYCURATOR_MAINMAP; + _ctrlMap ctrlMapAnimAdd [0,ctrlMapScale _ctrlCuratorMap,_ctrlCuratorMap ctrlMapScreenToWorld [0.5,0.5]]; + ctrlMapAnimCommit _ctrlMap; } else { - _ctrlMap ctrlshow false; + _ctrlMap ctrlShow false; }; //--- Load default attributes - _attributes = if (getnumber (_displayConfig >> "filterAttributes") > 0) then {missionnamespace getvariable ["BIS_fnc_initCuratorAttributes_attributes",[]]} else {["%ALL"]}; + _attributes = if (getNumber (_displayConfig >> "filterAttributes") > 0) then {missionNamespace getVariable ["BIS_fnc_initCuratorAttributes_attributes",[]]} else {["%ALL"]}; _allAttributes = "%ALL" in _attributes; //--- Initialize attributes _posY = _ctrlContentOffsetY; _contentControls = _displayConfig >> "Controls" >> "Content" >> "Controls"; - _enableDebugConsole = ["DebugConsole",getnumber (missionconfigfile >> "enableDebugConsole")] call bis_fnc_getParamValue; - _enableAdmin = (_enableDebugConsole == 1 && (isserver || serverCommandAvailable "#shutdown")) || _enableDebugConsole == 2; + _enableDebugConsole = ["DebugConsole",getNumber (missionConfigFile >> "enableDebugConsole")] call bis_fnc_getParamValue; + _enableAdmin = (_enableDebugConsole == 1 && (isServer || serverCommandAvailable "#shutdown")) || _enableDebugConsole == 2; for "_i" from 0 to (count _contentControls - 1) do { _cfgControl = _contentControls select _i; - if (isclass _cfgControl) then { - _idc = getnumber (_cfgControl >> "idc"); - _control = _display displayctrl _idc; + if (isClass _cfgControl) then { + _idc = getNumber (_cfgControl >> "idc"); + _control = _display displayCtrl _idc; //--- Admin specific attribute - _show = [true, _enableAdmin] select (getnumber (_cfgControl >> "adminOnly") > 0); + _show = [true, _enableAdmin] select (getNumber (_cfgControl >> "adminOnly") > 0); - if ((_allAttributes || {_x == configname _cfgControl} count _attributes > 0) && _show) then { - _controlPos = ctrlposition _control; + if ((_allAttributes || {_x == configName _cfgControl} count _attributes > 0) && _show) then { + _controlPos = ctrlPosition _control; _controlPos set [0,0]; _controlPos set [1,_posY]; - _control ctrlsetposition _controlPos; - _control ctrlcommit 0; + _control ctrlSetPosition _controlPos; + _control ctrlCommit 0; _posY = _posY + (_controlPos select 3) + 0.005; - ctrlsetfocus _control; + ctrlSetFocus _control; } else { - _control ctrlsetposition [0,0,0,0]; - _control ctrlcommit 0; - _control ctrlshow false; + _control ctrlSetPosition [0,0,0,0]; + _control ctrlCommit 0; + _control ctrlShow false; }; }; }; _posH = ((_posY + _ctrlContentOffsetY) min 0.9) * 0.5; - _target = missionnamespace getvariable ["BIS_fnc_initCuratorAttributes_target",objnull]; - _name = switch (typename _target) do { - case ("OBJECT"): {gettext (configfile >> "cfgvehicles" >> typeof _target >> "displayname")}; - case ("GROUP"): {groupid _target}; - case ("ARRAY"): {format ["%1: %3 #%2",groupid (_target select 0),_target select 1,localize "str_a3_cfgmarkers_waypoint_0"]}; - case ("STRING"): {markertext _target}; + _target = missionNamespace getVariable ["BIS_fnc_initCuratorAttributes_target",objNull]; + _name = switch (typeName _target) do { + case ("OBJECT"): {getText (configFile >> "cfgvehicles" >> typeOf _target >> "displayname")}; + case ("GROUP"): {groupId _target}; + case ("ARRAY"): {format ["%1: %3 #%2",groupId (_target select 0),_target select 1,localize "str_a3_cfgmarkers_waypoint_0"]}; + case ("STRING"): {markerText _target}; }; - _ctrlTitle ctrlsettext format [ctrltext _ctrlTitle,toupper _name]; + _ctrlTitle ctrlSetText format [ctrlText _ctrlTitle,toUpper _name]; _ctrlTitlePos set [1,(0.5 - _posH) - (_ctrlTitlePos select 3) - _ctrlTitleOffsetY]; - _ctrlTitle ctrlsetposition _ctrlTitlePos; - _ctrlTitle ctrlcommit 0; + _ctrlTitle ctrlSetPosition _ctrlTitlePos; + _ctrlTitle ctrlCommit 0; _ctrlContentPos set [1,0.5 - _posH]; _ctrlContentPos set [3,_posH * 2]; - _ctrlContent ctrlsetposition _ctrlContentPos; - _ctrlContent ctrlcommit 0; + _ctrlContent ctrlSetPosition _ctrlContentPos; + _ctrlContent ctrlCommit 0; _ctrlBackgroundPos set [1,0.5 - _posH]; _ctrlBackgroundPos set [3,_posH * 2]; - _ctrlBackground ctrlsetposition _ctrlBackgroundPos; - _ctrlBackground ctrlcommit 0; + _ctrlBackground ctrlSetPosition _ctrlBackgroundPos; + _ctrlBackground ctrlCommit 0; _ctrlButtonOKPos set [1,0.5 + _posH + _ctrlTitleOffsetY]; - _ctrlButtonOK ctrlsetposition _ctrlButtonOKPos; - _ctrlButtonOK ctrlcommit 0; - ctrlsetfocus _ctrlButtonOK; + _ctrlButtonOK ctrlSetPosition _ctrlButtonOKPos; + _ctrlButtonOK ctrlCommit 0; + ctrlSetFocus _ctrlButtonOK; _ctrlButtonCancelPos set [1,0.5 + _posH + _ctrlTitleOffsetY]; - _ctrlButtonCancel ctrlsetposition _ctrlButtonCancelPos; - _ctrlButtonCancel ctrlcommit 0; + _ctrlButtonCancel ctrlSetPosition _ctrlButtonCancelPos; + _ctrlButtonCancel ctrlCommit 0; _ctrlButtonCustomPos set [1,0.5 + _posH + _ctrlTitleOffsetY]; - _ctrlButtonCustom ctrlsetposition _ctrlButtonCustomPos; - _ctrlButtonCustom ctrlcommit 0; + _ctrlButtonCustom ctrlSetPosition _ctrlButtonCustomPos; + _ctrlButtonCustom ctrlCommit 0; //--- Close the display when entity is altered [_display] spawn { - disableserialization; + disableSerialization; _display = _this select 0; - _target = missionnamespace getvariable ["BIS_fnc_initCuratorAttributes_target",objnull]; - switch (typename _target) do { + _target = missionNamespace getVariable ["BIS_fnc_initCuratorAttributes_target",objNull]; + switch (typeName _target) do { case ("OBJECT"): { _isAlive = alive _target; - waituntil {isnull _display || (_isAlive && !alive _target)}; + waitUntil {isNull _display || (_isAlive && !alive _target)}; }; case ("GROUP"): { - waituntil {isnull _display || isnull _target}; + waitUntil {isNull _display || isNull _target}; }; case ("ARRAY"): { _grp = _target select 0; _wpCount = count waypoints _grp; - waituntil {isnull _display || (count waypoints _grp != _wpCount)}; + waitUntil {isNull _display || (count waypoints _grp != _wpCount)}; }; case ("STRING"): { - waituntil {isnull _display || markertype _target == ""}; + waitUntil {isNull _display || markerType _target == ""}; }; }; - _display closedisplay 2; + _display closeDisplay 2; }; }; case "onUnload": { From eeea98f63ee52ea8f327b7e81418cffc1ad251bc Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Tue, 3 Sep 2024 18:52:47 +0200 Subject: [PATCH 10/95] Docs - Misc fixes (#10289) Misc docs fixes --- docs/wiki/framework/disposables-framework.md | 6 ++++-- docs/wiki/framework/dragging-framework.md | 5 ----- docs/wiki/framework/grenades-framework.md | 4 ++-- docs/wiki/framework/javelin-framework.md | 2 +- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/docs/wiki/framework/disposables-framework.md b/docs/wiki/framework/disposables-framework.md index 78f609e3581..fcdcd5efdff 100644 --- a/docs/wiki/framework/disposables-framework.md +++ b/docs/wiki/framework/disposables-framework.md @@ -12,8 +12,10 @@ version: patch: 0 --- -Support for the ACE3 disposable framework will be dropped in 3.13.0! -Switch to the [CBA Disposable Framework](https://github.com/CBATeam/CBA_A3/wiki/Disposable-Launchers) +
+
Note:
+

Deprecated and replaced with CBA Disposable Framework in 3.13.0!

+
Old weapon configs that are no longer supported: ```cpp diff --git a/docs/wiki/framework/dragging-framework.md b/docs/wiki/framework/dragging-framework.md index da0be50da9d..56bfba2801a 100644 --- a/docs/wiki/framework/dragging-framework.md +++ b/docs/wiki/framework/dragging-framework.md @@ -35,11 +35,6 @@ class CfgVehicles { ## 2. Functions -
-
Note:
-

The following functions are NOT public and are likely to change in the future!

-
- You will **not** be able to carry / drag objects that are too heavy, the mass is also affected by what is inside the object. To bypass this empty the object. You can change the weight limits by setting `ACE_maxWeightDrag` (default 800) and `ACE_maxWeightCarry` (default 600). ### 2.1 Enabling / disabling dragging diff --git a/docs/wiki/framework/grenades-framework.md b/docs/wiki/framework/grenades-framework.md index 755773c1710..dcf1f60cd00 100644 --- a/docs/wiki/framework/grenades-framework.md +++ b/docs/wiki/framework/grenades-framework.md @@ -74,7 +74,7 @@ The average amount of time in seconds, after `explosionTime` has passed, between The amount of randomness in the fuse time. -### 2.1.5 ace_grenades_flashbangExplodeSound +#### 2.1.5 ace_grenades_flashbangExplodeSound The sounds that can be used when the flashbang detonates. It randomly selects an entry from this array (equal chances, there are no weights involved). If not defined, `[format ["A3\Sounds_F\arsenal\explosives\grenades\Explosion_HE_grenade_0%1.wss", floor (random 4) + 1], 5, 1.2, 400]` is used as a default instead (4 sounds total). @@ -108,7 +108,7 @@ class CfgAmmo { If set to zero or left undefined, the grenade is not treated as a flare. If it is set to 1, the grenade will be treated as a flare with the associated effects. -#### 2.3.1 ace_grenades_color +#### 2.3.2 ace_grenades_color Sets the color of the emitted light. The first 3 values of the array of the color, the last is the light intensity. diff --git a/docs/wiki/framework/javelin-framework.md b/docs/wiki/framework/javelin-framework.md index ba2a390f309..136066f4dbd 100644 --- a/docs/wiki/framework/javelin-framework.md +++ b/docs/wiki/framework/javelin-framework.md @@ -18,7 +18,7 @@ version: class CfgWeapons { class MyLauncher { ace_javelin_enabled = 1; // Enable Javelin-style locking (0-disabled, 1-enabled) - weaponInfoType = "ACE_RscOptics_javelin"; // Inteface + weaponInfoType = "ACE_RscOptics_javelin"; // Interface modelOptics = "\z\ace\addons\javelin\data\reticle_titan.p3d"; // Optics model canLock = 0; // Disable vanilla locking (0-disabled, 1-enabled) lockingTargetSound[] = {"", 0, 1}; // Locking sound From 808d22fd348f99159f07c46789154f510a22ddc3 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Tue, 3 Sep 2024 18:53:05 +0200 Subject: [PATCH 11/95] Towing - Fix dependencies (#10288) Update config.cpp --- addons/towing/config.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/towing/config.cpp b/addons/towing/config.cpp index d4d1b5e8540..7c98be1756c 100644 --- a/addons/towing/config.cpp +++ b/addons/towing/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_common", "ace_logistics_rope"}; + requiredAddons[] = {"ace_interaction", "ace_logistics_rope"}; author = ECSTRING(common,ACETeam); authors[] = {"tcvm"}; url = ECSTRING(main,URL); @@ -16,4 +16,3 @@ class CfgPatches { #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" - From 73ed46d36b5e5c1fc93cfd3e6fced9c5d8838017 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Tue, 3 Sep 2024 23:00:17 +0200 Subject: [PATCH 12/95] General - Removed silent Dragging dependencies (#10287) Move release string table entry to common --- addons/common/stringtable.xml | 17 +++++++++++++++++ .../dragging/functions/fnc_carryObjectPFH.sqf | 2 +- addons/dragging/functions/fnc_dragObject.sqf | 2 +- addons/dragging/functions/fnc_resumeDrag.sqf | 2 +- addons/dragging/functions/fnc_setCarryable.sqf | 2 +- addons/dragging/functions/fnc_setDraggable.sqf | 2 +- addons/rearm/functions/fnc_grabAmmo.sqf | 2 +- addons/rearm/functions/fnc_takeSuccess.sqf | 2 +- .../functions/fnc_startNozzleInHandsPFH.sqf | 2 +- addons/towing/functions/fnc_attachRopePFH.sqf | 2 +- 10 files changed, 26 insertions(+), 9 deletions(-) diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index 4593805846b..86f046de55f 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -1932,5 +1932,22 @@ Влияет на величину колебания прицела оружия при его развертывании. Afecta la cantidad de oscilación del arma cuando se está desplegado.
+ + Release + Отпустить + Soltar + Puść + Položit + Lâcher + Loslassen + Soltar + Lascia + Elengedés + 離す + 놓기 + 放開 + 放开 + Bırak + diff --git a/addons/dragging/functions/fnc_carryObjectPFH.sqf b/addons/dragging/functions/fnc_carryObjectPFH.sqf index e0a58a26eb8..a615d282521 100644 --- a/addons/dragging/functions/fnc_carryObjectPFH.sqf +++ b/addons/dragging/functions/fnc_carryObjectPFH.sqf @@ -91,7 +91,7 @@ private _previousHint = _unit getVariable [QGVAR(hint), []]; if (_previousHint isEqualType "") exitWith {}; // Mouse hint -private _hintLMB = LLSTRING(Drop); +private _hintLMB = LELSTRING(common,Drop); private _cursorObject = cursorObject; if ( diff --git a/addons/dragging/functions/fnc_dragObject.sqf b/addons/dragging/functions/fnc_dragObject.sqf index e7bf706f9f9..a8053b8dfee 100644 --- a/addons/dragging/functions/fnc_dragObject.sqf +++ b/addons/dragging/functions/fnc_dragObject.sqf @@ -57,7 +57,7 @@ GVAR(releaseActionID) = [0xF1, [false, false, false], { }, "keydown", "", false, 0] call CBA_fnc_addKeyHandler; // Show mouse hint -["", LLSTRING(Drop)] call EFUNC(interaction,showMouseHint); +["", LELSTRING(common,Drop)] call EFUNC(interaction,showMouseHint); // Block firing if (!GVAR(dragAndFire)) then { diff --git a/addons/dragging/functions/fnc_resumeDrag.sqf b/addons/dragging/functions/fnc_resumeDrag.sqf index d0fea988fb8..7ae7c1a8f3c 100644 --- a/addons/dragging/functions/fnc_resumeDrag.sqf +++ b/addons/dragging/functions/fnc_resumeDrag.sqf @@ -29,4 +29,4 @@ GVAR(releaseActionID) = [0xF1, [false, false, false], { }, "keydown", "", false, 0] call CBA_fnc_addKeyHandler; // Show mouse hint -["", LLSTRING(Drop)] call EFUNC(interaction,showMouseHint); +["", LELSTRING(common,Drop)] call EFUNC(interaction,showMouseHint); diff --git a/addons/dragging/functions/fnc_setCarryable.sqf b/addons/dragging/functions/fnc_setCarryable.sqf index c9850d6f579..977d88aff88 100644 --- a/addons/dragging/functions/fnc_setCarryable.sqf +++ b/addons/dragging/functions/fnc_setCarryable.sqf @@ -99,7 +99,7 @@ private _carryAction = [ private _dropAction = [ QGVAR(drop_carry), - LLSTRING(Drop), + LELSTRING(common,Drop), "", { [_player, _target] call FUNC(dropObject_carry) diff --git a/addons/dragging/functions/fnc_setDraggable.sqf b/addons/dragging/functions/fnc_setDraggable.sqf index 8ff6cecf35e..a568543958e 100644 --- a/addons/dragging/functions/fnc_setDraggable.sqf +++ b/addons/dragging/functions/fnc_setDraggable.sqf @@ -99,7 +99,7 @@ private _dragAction = [ private _dropAction = [ QGVAR(drop), - LLSTRING(Drop), + LELSTRING(common,Drop), "", { [_player, _target] call FUNC(dropObject); diff --git a/addons/rearm/functions/fnc_grabAmmo.sqf b/addons/rearm/functions/fnc_grabAmmo.sqf index b8c53371d8d..b7f87a69ba4 100644 --- a/addons/rearm/functions/fnc_grabAmmo.sqf +++ b/addons/rearm/functions/fnc_grabAmmo.sqf @@ -35,7 +35,7 @@ REARM_HOLSTER_WEAPON; _unit removeAction _actionID; }; _actionID = _unit addAction [ - format ["%1", localize ELSTRING(dragging,Drop)], + format ["%1", LELSTRING(common,Drop)], '(_this select 0) call FUNC(dropAmmo)', nil, 20, diff --git a/addons/rearm/functions/fnc_takeSuccess.sqf b/addons/rearm/functions/fnc_takeSuccess.sqf index 1d112f26459..214713c80d6 100644 --- a/addons/rearm/functions/fnc_takeSuccess.sqf +++ b/addons/rearm/functions/fnc_takeSuccess.sqf @@ -42,7 +42,7 @@ private _dummy = [_unit, _magazineClass] call FUNC(createDummy); [_dummy, _unit] call FUNC(pickUpAmmo); private _actionID = _unit addAction [ - format ["%1", localize ELSTRING(dragging,Drop)], + format ["%1", LELSTRING(common,Drop)], '(_this select 0) call FUNC(dropAmmo)', nil, 20, diff --git a/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf b/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf index 3e4dc23afbb..da47bc3c725 100644 --- a/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf +++ b/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf @@ -89,7 +89,7 @@ TRACE_2("start",_unit,_nozzle); }; private _hintLMB = ""; - private _hintRMB = localize ELSTRING(dragging,Drop); + private _hintRMB = LELSTRING(common,Drop); getCursorObjectParams params ["_cursorObject", "", "_distance"]; if (!isNull _cursorObject && {_distance < REFUEL_NOZZLE_ACTION_DISTANCE}) then { diff --git a/addons/towing/functions/fnc_attachRopePFH.sqf b/addons/towing/functions/fnc_attachRopePFH.sqf index 37f626e0a92..31def8dcb83 100644 --- a/addons/towing/functions/fnc_attachRopePFH.sqf +++ b/addons/towing/functions/fnc_attachRopePFH.sqf @@ -21,7 +21,7 @@ private _viewDirection = getCameraViewDirection _unit; GVAR(attachHelper) setPosASL (_unit modelToWorldVisualWorld [0, 1, 1.5]); private _hintLMB = ""; -private _hintRMB = localize ELSTRING(dragging,Drop); +private _hintRMB = LELSTRING(common,Drop); private _startPos = eyePos _unit; private _endPos = _startPos vectorAdd (_viewDirection vectorMultiply TOW_ACTION_DISTANCE); From 00178ceb0b5868797ec2848f7057903c51420e75 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Thu, 5 Sep 2024 07:59:24 +0200 Subject: [PATCH 13/95] Explosives - Remove unnecessary info from RPT (#10291) --- addons/explosives/functions/fnc_openTimerUI.sqf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/explosives/functions/fnc_openTimerUI.sqf b/addons/explosives/functions/fnc_openTimerUI.sqf index c8d3707ed19..391c71b3b24 100644 --- a/addons/explosives/functions/fnc_openTimerUI.sqf +++ b/addons/explosives/functions/fnc_openTimerUI.sqf @@ -64,14 +64,14 @@ _display displayAddEventHandler ["MouseZChanged", { [{ params ["_display", "_pfhID"]; - // Make sure explosive still exists and is near player - if ((!isNull _display) && {!alive ACE_player} || {!alive GVAR(explosive)} || {(ACE_player distance GVAR(explosive)) > 5}) exitWith { - INFO_2("%1's explosive %2 became invalid",ACE_player,GVAR(explosive)); - closeDialog 0; + if (isNull _display || {!alive ACE_player}) exitWith { _pfhID call CBA_fnc_removePerFrameHandler; }; - if (isNull _display) exitWith { + // Make sure explosive still exists and is near player + if (!alive GVAR(explosive) || {(ACE_player distance GVAR(explosive)) > 5}) exitWith { + INFO_2("%1's explosive %2 became invalid",ACE_player,GVAR(explosive)); + closeDialog 0; _pfhID call CBA_fnc_removePerFrameHandler; }; From 2f72c77c0c10f1030a85ba6b46c743df31994d30 Mon Sep 17 00:00:00 2001 From: Dart <59131299+DartRuffian@users.noreply.github.com> Date: Thu, 5 Sep 2024 01:01:31 -0500 Subject: [PATCH 14/95] Fortify - Add item/weapon/backpack fortify tool property (#10290) Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> --- addons/fortify/CfgWeapons.hpp | 1 + addons/fortify/XEH_preInit.sqf | 2 ++ addons/fortify/XEH_preStart.sqf | 6 ++++++ addons/fortify/functions/fnc_canFortify.sqf | 6 +++++- docs/wiki/framework/fortify-framework.md | 16 ++++++++++++++-- 5 files changed, 28 insertions(+), 3 deletions(-) diff --git a/addons/fortify/CfgWeapons.hpp b/addons/fortify/CfgWeapons.hpp index 66ff7f52d88..82396288721 100644 --- a/addons/fortify/CfgWeapons.hpp +++ b/addons/fortify/CfgWeapons.hpp @@ -10,6 +10,7 @@ class CfgWeapons { picture = QPATHTOF(UI\hammer_ca.paa); scope = 2; ACE_isTool = 1; + GVAR(fortifyTool) = 1; class ItemInfo: CBA_MiscItem_ItemInfo { mass = 0; }; diff --git a/addons/fortify/XEH_preInit.sqf b/addons/fortify/XEH_preInit.sqf index 382fc805660..50f641f9cf7 100644 --- a/addons/fortify/XEH_preInit.sqf +++ b/addons/fortify/XEH_preInit.sqf @@ -13,6 +13,8 @@ GVAR(locations) = []; // Custom deploy handlers GVAR(deployHandlers) = []; +GVAR(fortifyTools) = keys (uiNamespace getVariable QGVAR(fortifyTools)); + #include "initSettings.inc.sqf" ADDON = true; diff --git a/addons/fortify/XEH_preStart.sqf b/addons/fortify/XEH_preStart.sqf index 022888575ed..4da9eeb40da 100644 --- a/addons/fortify/XEH_preStart.sqf +++ b/addons/fortify/XEH_preStart.sqf @@ -1,3 +1,9 @@ #include "script_component.hpp" #include "XEH_PREP.hpp" + +private _fortifyTools = (QUOTE(getNumber (_x >> QQGVAR(fortifyTool)) > 0) configClasses (configFile >> "CfgWeapons") apply {configName _x}); +_fortifyTools append (QUOTE(getNumber (_x >> QQGVAR(fortifyTool)) > 0) configClasses (configFile >> "CfgVehicles") apply {configName _x}); +TRACE_1("",_fortifyTools); + +uiNamespace setVariable [QGVAR(fortifyTools), compileFinal (_fortifyTools createHashMapFromArray [])]; diff --git a/addons/fortify/functions/fnc_canFortify.sqf b/addons/fortify/functions/fnc_canFortify.sqf index 3a382bc98c9..ad676a91031 100644 --- a/addons/fortify/functions/fnc_canFortify.sqf +++ b/addons/fortify/functions/fnc_canFortify.sqf @@ -19,8 +19,12 @@ params ["_player", ["_cost", 0]]; (missionNamespace getVariable [QGVAR(fortifyAllowed), true]) && -{"ACE_Fortify" in (_player call EFUNC(common,uniqueItems))} && { + private _items = _player call EFUNC(common,uniqueItems); + _items append weapons _player; + _items pushBack backpack _player; + GVAR(fortifyTools) findAny _items != -1 +} && { private _budget = [side group _player] call FUNC(getBudget); ((_budget == -1) || {_budget >= _cost}) } && { diff --git a/docs/wiki/framework/fortify-framework.md b/docs/wiki/framework/fortify-framework.md index 9de0fab35b3..19cdf45e6b9 100644 --- a/docs/wiki/framework/fortify-framework.md +++ b/docs/wiki/framework/fortify-framework.md @@ -109,10 +109,22 @@ The Fortify budget can be updated for any side using the function. * [west, -250, false] call ace_fortify_fnc_updateBudget ``` +## 2. Config Values -## 2. Events +### 2.1 Enabling fortify tools on an item or backpack +```cpp +class CfgWeapons { // same config also works on backpacks (CfgVehicles) + class yourBaseClass; + class yourFortifyToolClass: yourBaseClass { + ace_fortify_fortifyTool = 1; + }; +}; +``` + + +## 3. Events -### 2.1 Listenable +### 3.1 Listenable | Event Name | Passed Parameter(s) | Locality | Description | | ---------- | ----------- | ------------------- | -------- | From 391a81c0b8dd33bf54d981dd7abaf056f17f7162 Mon Sep 17 00:00:00 2001 From: Bailey Danyluk Date: Thu, 5 Sep 2024 00:02:31 -0600 Subject: [PATCH 15/95] Missileguidance - Fix Javelin flight profile (#10269) Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> Co-authored-by: PabstMirror --- .../compat_cup_weapons_javelin/CfgAmmo.hpp | 49 +++++++++++++++---- .../compat_rhs_usf3_javelin/CfgAmmo.hpp | 25 ++++++++-- .../functions/fnc_midCourseTransition.sqf | 1 + addons/missileguidance/CfgAmmo.hpp | 4 +- .../functions/fnc_attackProfile_JAV_DIR.sqf | 22 ++++++--- .../functions/fnc_attackProfile_JAV_TOP.sqf | 44 +++++++++++------ .../functions/fnc_guidancePFH.sqf | 2 +- .../fnc_javelin_midCourseTransition.sqf | 19 ++++++- .../functions/fnc_navigationType_direct.sqf | 21 ++++++-- 9 files changed, 145 insertions(+), 42 deletions(-) diff --git a/addons/compat_cup_weapons/compat_cup_weapons_javelin/CfgAmmo.hpp b/addons/compat_cup_weapons/compat_cup_weapons_javelin/CfgAmmo.hpp index 2632a43e61e..220af016575 100644 --- a/addons/compat_cup_weapons/compat_cup_weapons_javelin/CfgAmmo.hpp +++ b/addons/compat_cup_weapons/compat_cup_weapons_javelin/CfgAmmo.hpp @@ -7,20 +7,51 @@ class CfgAmmo { class ace_missileguidance { enabled = 1; - minDeflection = 0.00005; - maxDeflection = 0.025; - incDeflection = 0.00005; + + pitchRate = 120; // degrees per second + yawRate = 120; + stabilityCoefficient = 0.2; + bangBangGuidance = 0; + canVanillaLock = 0; + + // Guidance type for munitions defaultSeekerType = "Optic"; - seekerTypes[] = {"Optic"}; + seekerTypes[] = { "Optic" }; + defaultSeekerLockMode = "LOBL"; - seekerLockModes[] = {"LOBL"}; - seekerAngle = 180; - seekerAccuracy = 1; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "Direct"; + navigationTypes[] = { "Direct", "ZeroEffortMiss" }; + + navigationGain = 3; + + seekerAngle = 180; // Angle in front of the missile which can be searched + seekerAccuracy = 1; // seeker accuracy multiplier + seekerMinRange = 0; - seekerMaxRange = 2500; + seekerMaxRange = 2500; // Range from the missile which the seeker can visually search + + seekLastTargetPos = 1; // seek last target position [if seeker loses LOS of target, continue to last known pos] + + // Attack profile type selection defaultAttackProfile = "JAV_TOP"; - attackProfiles[] = {"JAV_TOP", "JAV_DIR"}; + attackProfiles[] = { "JAV_TOP", "JAV_DIR" }; + useModeForAttackProfile = 1; + + class navigationStates { + class initial { + transitionCondition = QEFUNC(missileguidance,javelin_midCourseTransition); + navigationType = "Direct"; + }; + class terminal { + transitionCondition = ""; + navigationType = "ZeroEffortMiss"; + }; + // transitions from initial -> termimal + states[] = {"initial", "terminal"}; + }; }; }; }; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_javelin/CfgAmmo.hpp b/addons/compat_rhs_usf3/compat_rhs_usf3_javelin/CfgAmmo.hpp index 65ca880587f..b0df767e3a0 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_javelin/CfgAmmo.hpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_javelin/CfgAmmo.hpp @@ -9,9 +9,10 @@ class CfgAmmo { class ace_missileguidance { enabled = 1; - minDeflection = 0.00005; // Minium flap deflection for guidance - maxDeflection = 0.025; // Maximum flap deflection for guidance - incDeflection = 0.00005; // The incrmeent in which deflection adjusts. + pitchRate = 120; // degrees per second + yawRate = 120; + stabilityCoefficient = 0.2; + bangBangGuidance = 0; canVanillaLock = 0; @@ -22,6 +23,11 @@ class CfgAmmo { defaultSeekerLockMode = "LOBL"; seekerLockModes[] = { "LOBL" }; + defaultNavigationType = "Direct"; + navigationTypes[] = { "Direct", "ZeroEffortMiss" }; + + navigationGain = 3; + seekerAngle = 180; // Angle in front of the missile which can be searched seekerAccuracy = 1; // seeker accuracy multiplier @@ -34,6 +40,19 @@ class CfgAmmo { defaultAttackProfile = "JAV_TOP"; attackProfiles[] = { "JAV_TOP", "JAV_DIR" }; useModeForAttackProfile = 1; + + class navigationStates { + class initial { + transitionCondition = QEFUNC(missileguidance,javelin_midCourseTransition); + navigationType = "Direct"; + }; + class terminal { + transitionCondition = ""; + navigationType = "ZeroEffortMiss"; + }; + // transitions from initial -> termimal + states[] = {"initial", "terminal"}; + }; }; }; }; diff --git a/addons/hellfire/functions/fnc_midCourseTransition.sqf b/addons/hellfire/functions/fnc_midCourseTransition.sqf index ee567734103..034bd25d61a 100644 --- a/addons/hellfire/functions/fnc_midCourseTransition.sqf +++ b/addons/hellfire/functions/fnc_midCourseTransition.sqf @@ -15,6 +15,7 @@ * Public: No */ +params ["_args", "_timestep"]; _args params ["_firedEH", "_launchParams", "_flightParams", "_seekerParams", "_stateParams", "_targetData", "_navigationStateData"]; _firedEH params ["_shooter","","","","_ammo","","_projectile"]; _launchParams params ["_shooter","_targetLaunchParams","_seekerType","_attackProfile","_lockMode","_laserInfo","_navigationType"]; diff --git a/addons/missileguidance/CfgAmmo.hpp b/addons/missileguidance/CfgAmmo.hpp index d9813fdf772..8f913e99656 100644 --- a/addons/missileguidance/CfgAmmo.hpp +++ b/addons/missileguidance/CfgAmmo.hpp @@ -71,8 +71,8 @@ class CfgAmmo { class ADDON { enabled = 1; - pitchRate = 100; // degrees per second - yawRate = 100; + pitchRate = 120; // degrees per second + yawRate = 120; stabilityCoefficient = 0.2; bangBangGuidance = 0; diff --git a/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf b/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf index 6b06c0dd915..64895a3e54a 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf @@ -22,6 +22,9 @@ #define STAGE_COAST 3 #define STAGE_TERMINAL 4 +#define CLIMB_ANGLE 12 +#define ATTACK_ANGLE 2 + params ["_seekerTargetPos", "_args", "_attackProfileStateParams"]; _args params ["_firedEH"]; _firedEH params ["_shooter","","","","","","_projectile"]; @@ -30,6 +33,7 @@ if (_seekerTargetPos isEqualTo [0,0,0]) exitWith {_seekerTargetPos}; if (_attackProfileStateParams isEqualTo []) then { _attackProfileStateParams set [0, STAGE_LAUNCH]; + _attackProfileStateParams set [1, 0]; }; private _shooterPos = getPosASL _shooter; @@ -44,24 +48,28 @@ TRACE_2("",_distanceToTarget,_distanceToShooter); // Add height depending on distance for compensate private _returnTargetPos = _seekerTargetPos; +private _attackDirection = _seekerTargetPos vectorDiff _projectilePos; +private _horizon = velocity _projectile; +_horizon set [2, 0]; +_horizon = vectorNormalized _horizon; +private _attackAngle = acos (_horizon vectorCos _attackDirection); + switch (_attackProfileStateParams select 0) do { case STAGE_LAUNCH: { TRACE_1("STAGE_LAUNCH",""); if (_distanceToShooter < 6) then { - _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*2]; + _returnTargetPos = _seekerTargetPos vectorAdd [0,0,5]; } else { _attackProfileStateParams set [0, STAGE_CLIMB]; }; }; case STAGE_CLIMB: { TRACE_1("STAGE_CLIMB",""); - // 65 is min range - private _cruisAlt = 60 * ((0 max (_distanceShooterToTarget - 65))/2000); - - if ( ((ASLToAGL _projectilePos) select 2) - ((ASLToAGL _seekerTargetPos) select 2) >= _cruisAlt) then { + if (_attackAngle >= ATTACK_ANGLE) then { _attackProfileStateParams set [0, STAGE_TERMINAL]; } else { - _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*1.5]; + private _height = _distanceShooterToTarget * tan CLIMB_ANGLE; + _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_height]; }; }; case STAGE_TERMINAL: { @@ -70,5 +78,7 @@ switch (_attackProfileStateParams select 0) do { }; }; +_attackProfileStateParams set [2, _returnTargetPos]; + TRACE_1("Adjusted target position",_returnTargetPos); _returnTargetPos; diff --git a/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf b/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf index 347d1449140..a3ae233eba0 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf @@ -22,6 +22,10 @@ #define STAGE_COAST 3 #define STAGE_TERMINAL 4 +#define CRUISE_ALT 160 +#define CLIMB_ANGLE 22 +#define ATTACK_ANGLE 12 + params ["_seekerTargetPos", "_args", "_attackProfileStateParams"]; _args params ["_firedEH"]; _firedEH params ["_shooter","","","","","","_projectile"]; @@ -30,6 +34,7 @@ if (_seekerTargetPos isEqualTo [0,0,0]) exitWith {_seekerTargetPos}; if (_attackProfileStateParams isEqualTo []) then { _attackProfileStateParams set [0, STAGE_LAUNCH]; + _attackProfileStateParams set [1, 0]; }; private _shooterPos = getPosASL _shooter; @@ -44,39 +49,44 @@ TRACE_2("",_distanceToTarget,_distanceToShooter); // Add height depending on distance for compensate private _returnTargetPos = _seekerTargetPos; +private _attackDirection = _seekerTargetPos vectorDiff _projectilePos; +private _horizon = velocity _projectile; +_horizon set [2, 0]; +_horizon = vectorNormalized _horizon; +private _attackAngle = acos (_horizon vectorCos _attackDirection); + switch( (_attackProfileStateParams select 0) ) do { case STAGE_LAUNCH: { TRACE_1("STAGE_LAUNCH",""); if (_distanceToShooter < 10) then { - _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*2]; + _returnTargetPos = _seekerTargetPos vectorAdd [0,0,5]; } else { _attackProfileStateParams set [0, STAGE_CLIMB]; }; }; case STAGE_CLIMB: { TRACE_1("STAGE_CLIMB",""); - private _cruisAlt = 140; - if (_distanceShooterToTarget < 1250) then { - _cruisAlt = 140 * ((0 max (_distanceShooterToTarget - 150))/1250); - TRACE_1("_cruisAlt",_cruisAlt); - }; - if ( ((ASLToAGL _projectilePos) select 2) - ((ASLToAGL _seekerTargetPos) select 2) >= _cruisAlt) then { - if (_cruisAlt < 140) then { - _attackProfileStateParams set [0, STAGE_TERMINAL]; - } else { + private _altitude = (ASLToAGL _projectilePos) select 2; + switch (true) do { + case (_altitude >= CRUISE_ALT): { _attackProfileStateParams set [0, STAGE_COAST]; }; - } else { - _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*1.5]; - }; + case (_attackAngle >= ATTACK_ANGLE): { + _attackProfileStateParams set [0, STAGE_TERMINAL]; + }; + default { + private _height = _distanceShooterToTarget * tan CLIMB_ANGLE; + _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_height]; + } + } }; case STAGE_COAST: { TRACE_1("STAGE_COAST",""); - TRACE_1("",((ASLToAGL _projectilePos) select 2) - (( ASLToAGL _seekerTargetPos) select 2)); - if (_distanceToTarget < ( ((ASLToAGL _projectilePos) select 2) - (( ASLToAGL _seekerTargetPos) select 2) ) * 2) then { + TRACE_1("",_attackAngle); + if (_attackAngle >= ATTACK_ANGLE) then { _attackProfileStateParams set [0, STAGE_TERMINAL]; } else { - _returnTargetPos = _seekerTargetPos vectorAdd [0,0,(_projectilePos select 2)]; + _returnTargetPos = _seekerTargetPos vectorAdd [0,0,(_projectilePos select 2) min CRUISE_ALT]; }; }; case STAGE_TERMINAL: { @@ -86,5 +96,7 @@ switch( (_attackProfileStateParams select 0) ) do { }; }; +_attackProfileStateParams set [2, _returnTargetPos]; + TRACE_1("Adjusted target position",_returnTargetPos); _returnTargetPos; diff --git a/addons/missileguidance/functions/fnc_guidancePFH.sqf b/addons/missileguidance/functions/fnc_guidancePFH.sqf index 2615d9061a7..8b8df3d5114 100644 --- a/addons/missileguidance/functions/fnc_guidancePFH.sqf +++ b/addons/missileguidance/functions/fnc_guidancePFH.sqf @@ -54,7 +54,7 @@ if ((_pitchRate != 0 || {_yawRate != 0})) then { private _navigationFunction = getText (configFile >> QGVAR(NavigationTypes) >> _navigationType >> "functionName"); if (_navigationStateData isNotEqualTo []) then { (_navigationStateData select _currentState) params ["_transitionCondition"]; - private _transition = (_args call (missionNamespace getVariable [_transitionCondition, { false }])); + private _transition = ([_args, _timestep] call (missionNamespace getVariable [_transitionCondition, { false }])); if (_transition) then { _currentState = _currentState + 1; _navigationStateParams set [0, _currentState]; diff --git a/addons/missileguidance/functions/fnc_javelin_midCourseTransition.sqf b/addons/missileguidance/functions/fnc_javelin_midCourseTransition.sqf index ad0eca65cba..58995dee31d 100644 --- a/addons/missileguidance/functions/fnc_javelin_midCourseTransition.sqf +++ b/addons/missileguidance/functions/fnc_javelin_midCourseTransition.sqf @@ -19,6 +19,10 @@ #define STAGE_COAST 3 #define STAGE_TERMINAL 4 +#define REQUIRED_STABLE_TIME 0.2 +#define REQUIRED_ANGLE 1 + +params ["_args", "_timestep"]; _args params ["_firedEH", "_launchParams", "_flightParams", "_seekerParams", "_stateParams", "_targetData", "_navigationStateData"]; _firedEH params ["_shooter","","","","_ammo","","_projectile"]; _launchParams params ["_shooter","_targetLaunchParams","_seekerType","_attackProfile","_lockMode","_laserInfo","_navigationType"]; @@ -28,6 +32,17 @@ _stateParams params ["_lastRunTime", "_seekerStateParams", "_attackProfileStateP _seekerParams params ["_seekerAngle", "_seekerAccuracy", "_seekerMaxRange", "_seekerMinRange"]; _targetData params ["_targetDirection", "_attackProfileDirection", "_targetRange", "_targetVelocity", "_targetAcceleration"]; -_attackProfileStateParams params ["_state"]; -_state isEqualTo STAGE_TERMINAL +_attackProfileStateParams params ["_state", "_stableTime", "_target"]; +private _projectileDirection = vectorNormalized velocity _projectile; +private _targetDistance = _target vectorDistance getPosASLVisual _projectile; +private _targetDirection = (getPosASLVisual _projectile) vectorFromTo _target; +private _angle = _projectileDirection vectorCos _targetDirection; +if (_angle > cos REQUIRED_ANGLE) then { + _stableTime = _stableTime + _timestep; +} else { + _stableTime = 0; +}; + +_attackProfileStateParams set [1, _stableTime]; +_state isEqualTo STAGE_TERMINAL && _stableTime > REQUIRED_STABLE_TIME diff --git a/addons/missileguidance/functions/fnc_navigationType_direct.sqf b/addons/missileguidance/functions/fnc_navigationType_direct.sqf index 7b4763b44ef..5681c85b9ae 100644 --- a/addons/missileguidance/functions/fnc_navigationType_direct.sqf +++ b/addons/missileguidance/functions/fnc_navigationType_direct.sqf @@ -14,8 +14,23 @@ * * Public: No */ -params ["_args", "", "", "_profileAdjustedTargetPos"]; -_args params ["_firedEH"]; +params ["_args", "_timestep", "", "_profileAdjustedTargetPos"]; +_args params ["_firedEH", "", "_flightParams"]; +_flightParams params ["_pitchRate", "_yawRate"]; _firedEH params ["","","","","","","_projectile"]; -_profileAdjustedTargetPos vectorDiff getPosASLVisual _projectile +private _projectilePos = getPosASLVisual _projectile; + +private _targetDirection = _projectilePos vectorFromTo _profileAdjustedTargetPos; +private _projectileDirection = vectorNormalized velocity _projectile; + +private _deltaDirection = _targetDirection vectorDiff _projectileDirection; +_deltaDirection = _projectile vectorWorldToModelVisual _deltaDirection; +_deltaDirection = _deltaDirection vectorMultiply [_yawRate, 0, _pitchRate]; +_deltaDirection = _projectile vectorModelToWorldVisual _deltaDirection; + +private _iTimestep = 0; +if (_timestep != 0) then { + _iTimestep = 1 / _timestep; +}; +_deltaDirection vectorMultiply _iTimestep // return From e23a26da1c0ca940b5e4c03aa9661cf3868b91c0 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Thu, 5 Sep 2024 20:07:39 +0200 Subject: [PATCH 16/95] General - Use `findAny` where possible (#10292) Use `findAny` --- addons/medical_treatment/functions/fnc_hasItem.sqf | 2 +- addons/trenches/functions/fnc_hasEntrenchingTool.sqf | 2 +- addons/vehiclelock/functions/fnc_hasKeyForVehicle.sqf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/medical_treatment/functions/fnc_hasItem.sqf b/addons/medical_treatment/functions/fnc_hasItem.sqf index e0ef4c8a4fe..8faea65652f 100644 --- a/addons/medical_treatment/functions/fnc_hasItem.sqf +++ b/addons/medical_treatment/functions/fnc_hasItem.sqf @@ -31,7 +31,7 @@ private _fnc_checkItems = { _unitItems append (itemCargo _unitVehicle); _unitItems append (magazineCargo _unitVehicle); }; - _items findIf {_x in _unitItems} != -1 + _items findAny _unitItems != -1 }; _medic call _fnc_checkItems || {GVAR(allowSharedEquipment) != 2 && {_patient call _fnc_checkItems}} diff --git a/addons/trenches/functions/fnc_hasEntrenchingTool.sqf b/addons/trenches/functions/fnc_hasEntrenchingTool.sqf index 5a1127d0072..1568801fdb8 100644 --- a/addons/trenches/functions/fnc_hasEntrenchingTool.sqf +++ b/addons/trenches/functions/fnc_hasEntrenchingTool.sqf @@ -23,4 +23,4 @@ private _uniqueItems = _unit call EFUNC(common,uniqueItems); _uniqueItems append weapons _unit; _uniqueItems pushBack backpack _unit; -GVAR(entrenchingTools) findIf {_x in _uniqueItems} != -1 // return +GVAR(entrenchingTools) findAny _uniqueItems != -1 // return diff --git a/addons/vehiclelock/functions/fnc_hasKeyForVehicle.sqf b/addons/vehiclelock/functions/fnc_hasKeyForVehicle.sqf index c5f7e0e35a0..ec58a6fa2c5 100644 --- a/addons/vehiclelock/functions/fnc_hasKeyForVehicle.sqf +++ b/addons/vehiclelock/functions/fnc_hasKeyForVehicle.sqf @@ -34,4 +34,4 @@ if (_sideKeyName in _items) exitWith {true}; private _customKeys = _veh getVariable [QGVAR(customKeys), []]; private _magazines = magazinesDetail _unit; -(_customKeys findIf {_x in _magazines}) != -1 +_customKeys findAny _magazines != -1 From e4d09689e3339c9671498c7d0a46975378a1205e Mon Sep 17 00:00:00 2001 From: Timi007 Date: Sat, 7 Sep 2024 05:42:50 +0200 Subject: [PATCH 17/95] CI - Fix HEMTT CI artifacts not uploaded (#10294) * Fix HEMTT CI annotations not shown * Fix HEMTT artifacts not uploaded * Revert "Fix HEMTT CI annotations not shown" This reverts commit 278ddba68e7ebd3fe017132491e8d55ba592ee5c. * Bump up actions/upload-artifact to v4 --- .github/workflows/arma.yml | 1 + .github/workflows/extensions.yml | 2 +- .github/workflows/hemtt.yml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/arma.yml b/.github/workflows/arma.yml index 3ddfefd63fa..1af2e7e0602 100644 --- a/.github/workflows/arma.yml +++ b/.github/workflows/arma.yml @@ -43,3 +43,4 @@ jobs: with: name: ace3-${{ github.sha }}-nobin path: .hemttout/@* + include-hidden-files: true # Because .hemttout is a hidden directory diff --git a/.github/workflows/extensions.yml b/.github/workflows/extensions.yml index 8cafd847e26..ce475e5a006 100644 --- a/.github/workflows/extensions.yml +++ b/.github/workflows/extensions.yml @@ -57,7 +57,7 @@ jobs: - name: Build run: cargo build --verbose - name: Upload - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: ${{ matrix.arrays.os.target }} path: target/debug/ace.dll diff --git a/.github/workflows/hemtt.yml b/.github/workflows/hemtt.yml index 23fad275602..79286fc45c3 100644 --- a/.github/workflows/hemtt.yml +++ b/.github/workflows/hemtt.yml @@ -44,3 +44,4 @@ jobs: with: name: ace3-${{ github.sha }} path: .hemttout/@* + include-hidden-files: true # Because .hemttout is a hidden directory From e560036e2cc4a324715ef011e0ba54c729b3a565 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 7 Sep 2024 13:49:44 -0500 Subject: [PATCH 18/95] Reload - Change "Check Ammo" anim to not block movement (#10293) --- addons/reload/functions/fnc_checkAmmo.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/reload/functions/fnc_checkAmmo.sqf b/addons/reload/functions/fnc_checkAmmo.sqf index f558d917699..8039c9527ca 100644 --- a/addons/reload/functions/fnc_checkAmmo.sqf +++ b/addons/reload/functions/fnc_checkAmmo.sqf @@ -23,7 +23,7 @@ if (_unit == _target) then { _target = vehicle _target; }; - [_unit, "Gear", 1] call EFUNC(common,doGesture); + [_unit, "reloadMagazine", 0] call EFUNC(common,doGesture); }; [FUNC(displayAmmo), _target, 1] call CBA_fnc_waitAndExecute; From e2335c9333e47cc39b1c98cd7dab6098440abc0e Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Sat, 7 Sep 2024 20:54:21 +0200 Subject: [PATCH 19/95] Dragging - Corpse carrying and dragging - continued (#9273) Co-authored-by: Dystopian Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> Co-authored-by: Joko Co-authored-by: PabstMirror Co-authored-by: BaerMitUmlaut Co-authored-by: LinkIsGrim --- addons/dragging/CfgVehicles.hpp | 3 + addons/dragging/XEH_PREP.hpp | 2 + addons/dragging/XEH_postInit.sqf | 66 ++++++++++++ addons/dragging/functions/fnc_canCarry.sqf | 20 ++-- addons/dragging/functions/fnc_canDrag.sqf | 20 ++-- addons/dragging/functions/fnc_createClone.sqf | 101 ++++++++++++++++++ addons/dragging/functions/fnc_deleteClone.sqf | 80 ++++++++++++++ .../dragging/functions/fnc_dragObjectPFH.sqf | 5 + addons/dragging/functions/fnc_dropObject.sqf | 8 +- .../functions/fnc_dropObject_carry.sqf | 9 +- .../functions/fnc_handleAnimChanged.sqf | 2 +- addons/dragging/functions/fnc_startCarry.sqf | 1 + .../functions/fnc_startCarryLocal.sqf | 5 + addons/dragging/functions/fnc_startDrag.sqf | 1 + .../dragging/functions/fnc_startDragLocal.sqf | 5 + .../fnc_displayPatientInformation.sqf | 1 + addons/medical_gui/functions/fnc_menuPFH.sqf | 2 + .../functions/fnc_addInventoryActions.sqf | 1 + docs/wiki/feature/dragging.md | 4 +- docs/wiki/framework/dragging-framework.md | 24 +++++ docs/wiki/framework/events-framework.md | 9 +- 21 files changed, 348 insertions(+), 21 deletions(-) create mode 100644 addons/dragging/functions/fnc_createClone.sqf create mode 100644 addons/dragging/functions/fnc_deleteClone.sqf diff --git a/addons/dragging/CfgVehicles.hpp b/addons/dragging/CfgVehicles.hpp index 395133e9464..bd9758447bf 100644 --- a/addons/dragging/CfgVehicles.hpp +++ b/addons/dragging/CfgVehicles.hpp @@ -3,6 +3,9 @@ class CBA_Extended_EventHandlers; class CfgVehicles { + class C_man_1; + class GVAR(clone): C_man_1 {}; + // Static weapons class LandVehicle; class StaticWeapon: LandVehicle { diff --git a/addons/dragging/XEH_PREP.hpp b/addons/dragging/XEH_PREP.hpp index 0861c9533d2..aeba3135ab5 100644 --- a/addons/dragging/XEH_PREP.hpp +++ b/addons/dragging/XEH_PREP.hpp @@ -5,6 +5,8 @@ PREP(canDrop_carry); PREP(canRun_carry); PREP(carryObject); PREP(carryObjectPFH); +PREP(createClone); +PREP(deleteClone); PREP(dragObject); PREP(dragObjectPFH); PREP(dropObject); diff --git a/addons/dragging/XEH_postInit.sqf b/addons/dragging/XEH_postInit.sqf index 5c66fe692c8..48655c5833a 100644 --- a/addons/dragging/XEH_postInit.sqf +++ b/addons/dragging/XEH_postInit.sqf @@ -1,9 +1,62 @@ // by PabstMirror, commy2 #include "script_component.hpp" +[QGVAR(moveCorpse), { + params ["_corpse", "_dir", "_posATL"]; + + if (isNull _corpse) exitWith {}; + + // Check if the corpse is already close to the target + // If so, don't teleport + if ((getPosATL _corpse) distance _posATL > 0.25) then { + // Set direction before position + _corpse setDir _dir; + + // Bring corpse back to clone's position + _corpse setPosATL _posATL; + }; + + // Sync the corpse with its position + [{ + _this awake true; + + [{ + _this awake false; + }, _this] call CBA_fnc_execNextFrame; + }, _corpse] call CBA_fnc_execNextFrame; + + // Allow the corpse to be synced for JIP players + if (isServer) exitWith { + GVAR(movedCorpses) pushBackUnique _corpse; + }; +}] call CBA_fnc_addEventHandler; + if (isServer) then { // Release object on disconnection. Function is identical to killed addMissionEventHandler ["HandleDisconnect", LINKFUNC(handleKilled)]; + + GVAR(movedCorpses) = []; + + ["CAManBase", "Deleted", { + GVAR(movedCorpses) deleteAt (GVAR(movedCorpses) find (_this select 0)); + }, true, [], true] call CBA_fnc_addClassEventHandler; + + [QGVAR(disableSyncMovedCorpseOnJIP), { + params ["_corpse"]; + + GVAR(movedCorpses) deleteAt (GVAR(movedCorpses) find _corpse); + }] call CBA_fnc_addEventHandler; + + // Sync position of dead corpse for JIP unit (prevents weird invisible hitboxes on corpses) + [QGVAR(requestSyncMovedCorpsesJIP), { + params ["_clientOwner"]; + + { + [QGVAR(moveCorpse), [_x, getDir _x, getPosATL _x], _clientOwner] call CBA_fnc_ownerEvent; + } forEach GVAR(movedCorpses); + }] call CBA_fnc_addEventHandler; +} else { + [QGVAR(requestSyncMovedCorpsesJIP), clientOwner] call CBA_fnc_serverEvent; }; if (!hasInterface) exitWith {}; @@ -20,6 +73,11 @@ if (isNil QGVAR(maxWeightCarryRun)) then { GVAR(maxWeightCarryRun) = 50; }; +// Extended EH doesn't fire for dead units, so add interactions manually +{ + _x call FUNC(initPerson); +} forEach allDeadMen; + ["isNotDragging", {!((_this select 0) getVariable [QGVAR(isDragging), false])}] call EFUNC(common,addCanInteractWithCondition); ["isNotCarrying", {!((_this select 0) getVariable [QGVAR(isCarrying), false])}] call EFUNC(common,addCanInteractWithCondition); @@ -57,6 +115,14 @@ if (isNil QGVAR(maxWeightCarryRun)) then { // Display event handler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}] call CBA_fnc_addDisplayHandler; +// Handle local effect commands for clones +[QGVAR(setCloneFace), { + params ["_clone", "_corpse"]; + + _clone setFace face _corpse; + _clone setMimic "unconscious"; +}] call CBA_fnc_addEventHandler; + // Handle surrendering and handcuffing ["ace_captiveStatusChanged", { params ["_unit", "_state"]; diff --git a/addons/dragging/functions/fnc_canCarry.sqf b/addons/dragging/functions/fnc_canCarry.sqf index be3015868b5..a38f37a02ee 100644 --- a/addons/dragging/functions/fnc_canCarry.sqf +++ b/addons/dragging/functions/fnc_canCarry.sqf @@ -18,7 +18,10 @@ params ["_unit", "_target"]; -if !(alive _target && {_target getVariable [QGVAR(canCarry), false]} && {isNull objectParent _target}) exitWith {false}; +private _alive = alive _target; +private _isPerson = _target isKindOf "CAManBase"; + +if !((_alive || _isPerson) && {_target getVariable [QGVAR(canCarry), false]} && {isNull objectParent _target}) exitWith {false}; if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false}; @@ -26,18 +29,19 @@ if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false}; // The fireman carry animation does not slow down for injured legs, so you could carry and run if ((_unit getHitPointDamage "HitLegs") >= 0.5) exitWith {false}; +// Units need to be unconscious or limping; Units also need to not be in ragdoll if alive, as that causes desync issues +if (_isPerson) exitWith { + ((!_alive) && {missionNamespace getVariable [QGVAR(canMoveDead), true]}) || + {(isAwake _target) && // not ragdolled if alive + {!(_target call EFUNC(common,isAwake)) || + {_target getHitPointDamage "HitLegs" >= 0.5}}} +}; + // Static weapons need to be empty for carrying (ignore UAV AI) if (_target isKindOf "StaticWeapon") exitWith { (crew _target) findIf {!unitIsUAV _x} == -1 }; -// Units need to be unconscious or limping; Units also need to not be in ragdoll, as that causes desync issues -if (_target isKindOf "CAManBase") exitWith { - isAwake _target && // not ragdolled - {lifeState _target == "INCAPACITATED" || - {_target getHitPointDamage "HitLegs" >= 0.5}} -}; - // Check max items for WeaponHolders if (["WeaponHolder", "WeaponHolderSimulated"] findIf {_target isKindOf _x} != -1) exitWith { (count (weaponCargo _target + magazineCargo _target + itemCargo _target)) <= MAX_DRAGGED_ITEMS diff --git a/addons/dragging/functions/fnc_canDrag.sqf b/addons/dragging/functions/fnc_canDrag.sqf index 586e23feaf8..2616d6d1447 100644 --- a/addons/dragging/functions/fnc_canDrag.sqf +++ b/addons/dragging/functions/fnc_canDrag.sqf @@ -18,22 +18,26 @@ params ["_unit", "_target"]; -if !(alive _target && {_target getVariable [QGVAR(canDrag), false]} && {isNull objectParent _target}) exitWith {false}; +private _alive = alive _target; +private _isPerson = _target isKindOf "CAManBase"; + +if !((_alive || _isPerson) && {_target getVariable [QGVAR(canDrag), false]} && {isNull objectParent _target}) exitWith {false}; if !([_unit, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false}; +// Units need to be unconscious or limping; Units also need to not be in ragdoll if alive, as that causes desync issues +if (_isPerson) exitWith { + ((!_alive) && {missionNamespace getVariable [QGVAR(canMoveDead), true]}) || + {(isAwake _target) && // not ragdolled if alive + {!(_target call EFUNC(common,isAwake)) || + {_target getHitPointDamage "HitLegs" >= 0.5}}} +}; + // Static weapons need to be empty for dragging (ignore UAV AI) if (_target isKindOf "StaticWeapon") exitWith { (crew _target) findIf {!unitIsUAV _x} == -1 }; -// Units need to be unconscious or limping; Units also need to not be in ragdoll, as that causes desync issues -if (_target isKindOf "CAManBase") exitWith { - isAwake _target && // not ragdolled - {lifeState _target == "INCAPACITATED" || - {_target getHitPointDamage "HitLegs" >= 0.5}} -}; - // Check max items for WeaponHolders if (["WeaponHolder", "WeaponHolderSimulated"] findIf {_target isKindOf _x} != -1) exitWith { (count (weaponCargo _target + magazineCargo _target + itemCargo _target)) <= MAX_DRAGGED_ITEMS diff --git a/addons/dragging/functions/fnc_createClone.sqf b/addons/dragging/functions/fnc_createClone.sqf new file mode 100644 index 00000000000..6cb4aa0ec69 --- /dev/null +++ b/addons/dragging/functions/fnc_createClone.sqf @@ -0,0 +1,101 @@ +#include "..\script_component.hpp" +/* + * Author: BaerMitUmlaut, johnb43 + * Creates a draggable / carryable clone of a dead unit. + * + * Arguments: + * 0: Unit dragging/carrying + * 1: Dead unit + * + * Return Value: + * Cloned unit + * + * Example: + * [player, cursorObject] call ace_dragging_fnc_createClone; + * + * Public: No + */ + +params ["_unit", "_target"]; + +// Don't sync corpse when a player joins in progress until the corpse is in its proper position +[QGVAR(disableSyncMovedCorpseOnJIP), _target] call CBA_fnc_serverEvent; + +private _posATL = getPosATL _target; + +// Create clone +private _clone = createVehicle [[configOf _target >> QGVAR(cloneClass), "TEXT", QGVAR(clone)] call CBA_fnc_getConfigEntry, _posATL, [], 0, "CAN_COLLIDE"]; + +// Claim the clone +[_unit, _clone] call EFUNC(common,claim); + +// Move unit -10 m below terrain in order to hide it and remove its inventory access +_posATL set [2, -10]; + +// Corpse is desynced, but it doesn't matter here +_target setPosATL _posATL; + +// Hide unit until it can be moved below terrain +private _isObjectHidden = isObjectHidden _target; + +if (!_isObjectHidden) then { + [QEGVAR(common,hideObjectGlobal), [_target, true]] call CBA_fnc_serverEvent; +}; + +// Prevents unit from falling when below terrain +private _simulationEnabled = simulationEnabled _target; + +if (_simulationEnabled) then { + [QEGVAR(common,enableSimulationGlobal), [_target, false]] call CBA_fnc_serverEvent; +}; + +private _isInRemainsCollector = isInRemainsCollector _target; + +// Make sure corpse isn't deleted by engine's garbage collector +if (_isInRemainsCollector) then { + removeFromRemainsCollector [_target]; +}; + +// Make sure clone has the same wound textures as the corpse +_clone setDamage ((damage _target) min 0.99); // Don't kill the clone + +{ + _clone setHitPointDamage [_x, (_target getHitPointDamage _x) min 0.99]; +} forEach ["HitHead", "HitBody", "HitHands", "HitLegs"]; // Relevant hitpoints + +// Disable all damage +_clone allowDamage false; +_clone setVariable [QGVAR(original), [_target, _isInRemainsCollector, _isObjectHidden, _simulationEnabled], true]; + +[_clone, _target call CBA_fnc_getLoadout] call CBA_fnc_setLoadout; + +// Sets the facial expression +[[QGVAR(setCloneFace), [_clone, _target]] call CBA_fnc_globalEventJIP, _clone] call CBA_fnc_removeGlobalEventJIP; + +// API +[QGVAR(cloneCreated), [_clone, _target]] call CBA_fnc_localEvent; + +[{ + params ["_clone", "_target"]; + + // Remove clone from all zeuses + if (["ace_zeus"] call EFUNC(common,isModLoaded)) then { + [QEGVAR(zeus,removeObjects), [[_clone]]] call CBA_fnc_serverEvent; + }; + + // Release claim on corpse + [objNull, _target] call EFUNC(common,claim); +}, [_clone, _target], 0.25] call CBA_fnc_waitAndExecute; + +// Save which curators had this object as editable +if (["ace_zeus"] call EFUNC(common,isModLoaded)) then { + private _objectCurators = objectCurators _target; + + _target setVariable [QGVAR(objectCurators), _objectCurators, true]; + + if (_objectCurators isEqualTo []) exitWith {}; + + [QEGVAR(zeus,removeObjects), [[_target], _objectCurators]] call CBA_fnc_serverEvent; +}; + +_clone diff --git a/addons/dragging/functions/fnc_deleteClone.sqf b/addons/dragging/functions/fnc_deleteClone.sqf new file mode 100644 index 00000000000..148b88a3a31 --- /dev/null +++ b/addons/dragging/functions/fnc_deleteClone.sqf @@ -0,0 +1,80 @@ +#include "..\script_component.hpp" +/* + * Author: BaerMitUmlaut, johnb43 + * Drops a draggable / carryable clone of a dead unit. + * + * Arguments: + * 0: Unit dragging / carrying + * 1: Clone + * 2: If unit is in building + * + * Return Value: + * Original unit + * + * Example: + * [player, cursorObject, false] call ace_dragging_fnc_deleteClone; + * + * Public: No + */ + +params ["_unit", "_clone", "_inBuilding"]; + +(_clone getVariable [QGVAR(original), []]) params [ + ["_target", objNull], + ["_isInRemainsCollector", true], + ["_isObjectHidden", false], + ["_simulationEnabled", true] +]; + +// API +[QGVAR(cloneDeleted), [_clone, _target]] call CBA_fnc_localEvent; + +// Check if unit was deleted +if (!isNull _target) then { + private _posATL = getPosATL _clone; + + if (_inBuilding) then { + _posATL = _posATL vectorAdd [0, 0, 0.05]; + }; + + // Make sure position isn't underground + if (_posATL select 2 < 0.05) then { + _posATL set [2, 0.05]; + }; + + // Move the unit globally (important, as it desyncs the corpse position otherwise) + [QGVAR(moveCorpse), [_target, getDir _unit + 180, _posATL]] call CBA_fnc_globalEvent; + + // Unhide unit + if (!_isObjectHidden) then { + [QEGVAR(common,hideObjectGlobal), [_target, false]] call CBA_fnc_serverEvent; + }; + + // Enable simulation again + if (_simulationEnabled) then { + [QEGVAR(common,enableSimulationGlobal), [_target, true]] call CBA_fnc_serverEvent; + }; + + // Detach first to prevent objNull in attachedObjects + detach _clone; + deleteVehicle _clone; + + // Get which curators had this object as editable + if (["ace_zeus"] call EFUNC(common,isModLoaded)) then { + private _objectCurators = _target getVariable [QGVAR(objectCurators), []]; + + if (_objectCurators isEqualTo []) exitWith {}; + + [QEGVAR(zeus,addObjects), [[_target], _objectCurators]] call CBA_fnc_serverEvent; + }; + + if (_isInRemainsCollector) then { + addToRemainsCollector [_target]; + }; +} else { + // Detach first to prevent objNull in attachedObjects + detach _clone; + deleteVehicle _clone; +}; + +_target diff --git a/addons/dragging/functions/fnc_dragObjectPFH.sqf b/addons/dragging/functions/fnc_dragObjectPFH.sqf index 249f3866bb5..13400aa349f 100644 --- a/addons/dragging/functions/fnc_dragObjectPFH.sqf +++ b/addons/dragging/functions/fnc_dragObjectPFH.sqf @@ -62,3 +62,8 @@ if (_target isKindOf "StaticWeapon" && {((crew _target) - (_target getVariable [ _idPFH call CBA_fnc_removePerFrameHandler; }; + +// Clones can die of drowning if oxygen is under 0.5, so refill their oxygen from time to time +if (_target isKindOf QGVAR(clone) && {getOxygenRemaining _target < 0.8}) then { + _target setOxygenRemaining 1; +}; diff --git a/addons/dragging/functions/fnc_dropObject.sqf b/addons/dragging/functions/fnc_dropObject.sqf index 119eaf415af..965e3b9efa3 100644 --- a/addons/dragging/functions/fnc_dropObject.sqf +++ b/addons/dragging/functions/fnc_dropObject.sqf @@ -31,6 +31,12 @@ if (!GVAR(dragAndFire)) then { }; private _inBuilding = _unit call FUNC(isObjectOnObject); +private _isClone = _target isKindOf QGVAR(clone); + +// Drop cloned dead units +if (_isClone) then { + _target = [_unit, _target, _inBuilding] call FUNC(deleteClone); +}; // Play release animation if (_unit call EFUNC(common,isAwake)) then { @@ -57,7 +63,7 @@ _unit removeWeapon "ACE_FakePrimaryWeapon"; [_unit, "blockThrow", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); // Prevent object from flipping inside buildings -if (_inBuilding) then { +if (_inBuilding && {!_isClone}) then { _target setPosASL (getPosASL _target vectorAdd [0, 0, 0.05]); TRACE_2("setPos",getPosASL _unit,getPosASL _target); }; diff --git a/addons/dragging/functions/fnc_dropObject_carry.sqf b/addons/dragging/functions/fnc_dropObject_carry.sqf index d244d93a2ee..ba8cbd09f12 100644 --- a/addons/dragging/functions/fnc_dropObject_carry.sqf +++ b/addons/dragging/functions/fnc_dropObject_carry.sqf @@ -25,6 +25,12 @@ TRACE_1("params",_this); _unit setVariable [QGVAR(releaseActionID), nil]; private _inBuilding = _unit call FUNC(isObjectOnObject); +private _isClone = _target isKindOf QGVAR(clone); + +// Drop cloned dead units +if (_isClone) then { + _target = [_unit, _target, _inBuilding] call FUNC(deleteClone); +}; // Prevent collision damage [QEGVAR(common,fixCollision), _unit] call CBA_fnc_localEvent; @@ -72,8 +78,9 @@ if (!isNil "_previousWeaponState") then { [_unit, "blockThrow", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); // Prevent object from flipping inside buildings -if (_inBuilding) then { +if (_inBuilding && {!_isClone}) then { _target setPosASL (getPosASL _target vectorAdd [0, 0, 0.05]); + TRACE_2("setPos",getPosASL _unit,getPosASL _target); }; _unit setVariable [QGVAR(isCarrying), false, true]; diff --git a/addons/dragging/functions/fnc_handleAnimChanged.sqf b/addons/dragging/functions/fnc_handleAnimChanged.sqf index 24b8f582057..f89790d2e61 100644 --- a/addons/dragging/functions/fnc_handleAnimChanged.sqf +++ b/addons/dragging/functions/fnc_handleAnimChanged.sqf @@ -5,7 +5,7 @@ * * Arguments: * 0: Unit - * 1: Animaion + * 1: Animation * * Return Value: * None diff --git a/addons/dragging/functions/fnc_startCarry.sqf b/addons/dragging/functions/fnc_startCarry.sqf index 3e2cc17efde..99652fc263d 100644 --- a/addons/dragging/functions/fnc_startCarry.sqf +++ b/addons/dragging/functions/fnc_startCarry.sqf @@ -15,6 +15,7 @@ * * Public: No */ + params ["_unit", "_target"]; // Try to claim the object diff --git a/addons/dragging/functions/fnc_startCarryLocal.sqf b/addons/dragging/functions/fnc_startCarryLocal.sqf index 0f679f2d499..e7d102825aa 100644 --- a/addons/dragging/functions/fnc_startCarryLocal.sqf +++ b/addons/dragging/functions/fnc_startCarryLocal.sqf @@ -41,6 +41,11 @@ private _timer = CBA_missionTime + 5; // Handle objects vs. persons if (_target isKindOf "CAManBase") then { + // Create clone for dead units + if (!alive _target) then { + _target = [_unit, _target] call FUNC(createClone); + }; + private _primaryWeapon = primaryWeapon _unit; // Add a primary weapon if the unit has none diff --git a/addons/dragging/functions/fnc_startDrag.sqf b/addons/dragging/functions/fnc_startDrag.sqf index 8dd6db6dee5..d65f218acd7 100644 --- a/addons/dragging/functions/fnc_startDrag.sqf +++ b/addons/dragging/functions/fnc_startDrag.sqf @@ -15,6 +15,7 @@ * * Public: No */ + params ["_unit", "_target"]; // Try to claim the object diff --git a/addons/dragging/functions/fnc_startDragLocal.sqf b/addons/dragging/functions/fnc_startDragLocal.sqf index 20d5e007dbe..3abcef44305 100644 --- a/addons/dragging/functions/fnc_startDragLocal.sqf +++ b/addons/dragging/functions/fnc_startDragLocal.sqf @@ -90,6 +90,11 @@ if !(_unit call EFUNC(common,isSwimming)) then { // Move a bit closer and adjust direction when trying to pick up a person if (_target isKindOf "CAManBase") then { + // Create clone for dead units + if (!alive _target) then { + _target = [_unit, _target] call FUNC(createClone); + }; + [QEGVAR(common,setDir), [_target, getDir _unit + 180], _target] call CBA_fnc_targetEvent; _target setPosASL (getPosASL _unit vectorAdd (vectorDir _unit vectorMultiply 1.5)); diff --git a/addons/medical_gui/functions/fnc_displayPatientInformation.sqf b/addons/medical_gui/functions/fnc_displayPatientInformation.sqf index 65660eec798..abea0ec07bb 100644 --- a/addons/medical_gui/functions/fnc_displayPatientInformation.sqf +++ b/addons/medical_gui/functions/fnc_displayPatientInformation.sqf @@ -40,6 +40,7 @@ if (isNull _display) then { if (ACE_player distance _target > MAX_DISTANCE && {vehicle _target != vehicle ACE_player}) exitWith { [_pfhID] call CBA_fnc_removePerFrameHandler; QGVAR(RscPatientInfo) cutFadeOut 0.3; + if (((getPosATL _target) # 2) < -9) exitWith {}; // handle dragging corpse/clone [[ELSTRING(medical,DistanceToFar), _target call EFUNC(common,getName)], 2] call EFUNC(common,displayTextStructured); }; diff --git a/addons/medical_gui/functions/fnc_menuPFH.sqf b/addons/medical_gui/functions/fnc_menuPFH.sqf index b3d51c2dc9c..0e213eaf5ec 100644 --- a/addons/medical_gui/functions/fnc_menuPFH.sqf +++ b/addons/medical_gui/functions/fnc_menuPFH.sqf @@ -23,6 +23,8 @@ if !( closeDialog 0; // Show hint if distance condition failed if ((ACE_player distance GVAR(target) > GVAR(maxDistance)) && {vehicle ACE_player != vehicle GVAR(target)}) then { + if (((getPosATL GVAR(target)) # 2) < -9) exitWith {}; // handle dragging corpse/clone + [[ELSTRING(medical,DistanceToFar), GVAR(target) call EFUNC(common,getName)], 2] call EFUNC(common,displayTextStructured); }; }; diff --git a/addons/medical_status/functions/fnc_addInventoryActions.sqf b/addons/medical_status/functions/fnc_addInventoryActions.sqf index 8041eb06135..e4e65a31649 100644 --- a/addons/medical_status/functions/fnc_addInventoryActions.sqf +++ b/addons/medical_status/functions/fnc_addInventoryActions.sqf @@ -46,5 +46,6 @@ _unit addAction ["OpenBag", { {!lockedInventory _backpackContainer} && {maxLoad _backpackContainer > 0} && {getNumber (_backpackConfig >> "disableInventory") != 1} && + {!(_target isKindOf QEGVAR(dragging,clone))} && {_target setUserActionText [_actionId, format [localize "STR_ACTION_OPEN_BAG", getText (_backpackConfig >> "displayName")]]; true} }, 2]; diff --git a/docs/wiki/feature/dragging.md b/docs/wiki/feature/dragging.md index 0d42240a238..aa462d2e64d 100644 --- a/docs/wiki/feature/dragging.md +++ b/docs/wiki/feature/dragging.md @@ -20,7 +20,9 @@ This adds the option to drag or carry units or objects. ## 2. Usage ### 2.1 Dragging / Carrying units and objects -- You can only drag or carry an unconscious unit. +- You can drag or carry dead or unconscious units. These units can't be in a ragdoll state. +- You can drag or carry units whose legs are broken. +- You can't carry if you have broken legs. - Interact with the unit or object ⊞ Win (ACE3 default key bind `Interact Key`). - Select `Drag` or `Carry`. - To release, use the mouse wheel and select `Release` or use Self Interaction Ctrl+⊞ Win and select `Release`. diff --git a/docs/wiki/framework/dragging-framework.md b/docs/wiki/framework/dragging-framework.md index 56bfba2801a..256d41570d4 100644 --- a/docs/wiki/framework/dragging-framework.md +++ b/docs/wiki/framework/dragging-framework.md @@ -98,3 +98,27 @@ You will **not** be able to carry / drag objects that are too heavy, the mass is | 1 | `true`| Carrying is enabled | | 2 | `[0,2,0]` | 0 meters sideways, 3 meters forward, 1 meter upwards | | 3 | `10` | Rotated by 10° | + +## 3. Corpse moving +Added in 3.18.0, ACE allows you to drag and carry corpses. + +### 3.1 Config Values + +```cpp +class CfgVehicles { + class MyUnit { + ace_dragging_cloneClass = "MyClone"; // Allows you to define what type of clone is used for moving the corpse (default: "ace_dragging_clone") + }; + + class ace_dragging_clone; + class MyClone: ace_dragging_clone {}; // Custom clones must inherit from ace_dragging_clone +}; +``` + +### 3.2 Enabling / disabling corpse moving + +By default, corpse moving is enabled. If you wish to disable it, you can set the variable below to `false`: + +```sqf +ace_dragging_canMoveDead = false; +``` diff --git a/docs/wiki/framework/events-framework.md b/docs/wiki/framework/events-framework.md index 4aad8f16741..c0aa43a5739 100644 --- a/docs/wiki/framework/events-framework.md +++ b/docs/wiki/framework/events-framework.md @@ -167,7 +167,14 @@ MenuType: 0 = Interaction, 1 = Self Interaction | `ace_headless_groupTransferPre` | [_group, _HC (OBJECT), _previousOwner, _idHC] | Target | Listen | Called just before a group is transferred from any machine to a HC. Called where group currently is local and on the HC, where group is going to be local. | `ace_headless_groupTransferPost` | [_group, _HC (OBJECT), _previousOwner, _idHC, _transferredSuccessfully] | Target | Listen | Called just after a group is transferred from a machine to a HC. Called where group was local and on the HC, where group is now local. `_transferredSuccessfully` is passed so mods can actually check if the locality was properly transferred, as ownership transfer is not guaranteed. -### 2.18 HuntIR (`ace_huntir`) +### 2.18 Dragging (`ace_dragging`) + +| Event Key | Parameters | Locality | Type | Description | +|---------- |------------|----------|------|-------------| +| `ace_dragging_cloneCreated` | [_clone, _corpse] | Local | Listen | Called when a clone used for dragging/carrying corpses is created +| `ace_dragging_cloneDeleted` | [_clone, _corpse] | Local | Listen | Called when a clone used for dragging/carrying corpses is deleted + +### 2.19 HuntIR (`ace_huntir`) | Event Key | Parameters | Locality | Type | Description | |---------- |------------|----------|------|-------------| From d4ffdd7d89182c36f584b01cf79e2d474950737b Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 7 Sep 2024 18:04:37 -0500 Subject: [PATCH 20/95] Common - Add `ace_common_fnc_addExplosionEventHandler` (#10243) * Common - Add `ace_common_fnc_addExplosionEventHandler` * Update addons/hearing/XEH_postInit.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * make non-public, use netID directly * Update addons/common/functions/fnc_addExplosionEventHandler.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update fnc_addExplosionEventHandler.sqf * Update addons/hearing/XEH_postInit.sqf Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> --------- Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> --- addons/common/XEH_PREP.hpp | 1 + .../fnc_addExplosionEventHandler.sqf | 48 +++++++++++++++++++ addons/hearing/XEH_postInit.sqf | 23 +++++---- addons/hearing/functions/fnc_explosion.sqf | 3 +- 4 files changed, 63 insertions(+), 12 deletions(-) create mode 100644 addons/common/functions/fnc_addExplosionEventHandler.sqf diff --git a/addons/common/XEH_PREP.hpp b/addons/common/XEH_PREP.hpp index 36147753459..529da07da2b 100644 --- a/addons/common/XEH_PREP.hpp +++ b/addons/common/XEH_PREP.hpp @@ -269,6 +269,7 @@ PREP(_handleRequestAllSyncedEvents); // other eventhandlers PREP(addActionEventHandler); PREP(addActionMenuEventHandler); +PREP(addExplosionEventHandler); PREP(addMapMarkerCreatedEventHandler); PREP(addPlayerEH); diff --git a/addons/common/functions/fnc_addExplosionEventHandler.sqf b/addons/common/functions/fnc_addExplosionEventHandler.sqf new file mode 100644 index 00000000000..9fb5ef80f24 --- /dev/null +++ b/addons/common/functions/fnc_addExplosionEventHandler.sqf @@ -0,0 +1,48 @@ +#include "..\script_component.hpp" +/* + * Author: johnb432, PabstMirror + * Adds event hander for explosions (for local projectiles) + * Warning: For shots that are tracers and explosive the event will trigger on all machines in range + * This function may be changed after 2.18! + * + * Arguments: + * 0: Code to execute + * + * Return Value: + * The CBA Event Handler Index + * + * Example: + * [{systemChat "boom"}] call ace_common_fnc_addExplosionEventHandler + * + * Public: No (maybe after 2.18) + */ + +params [["_code", {}, [{}]]]; + +if !(missionNamespace getVariable [QGVAR(addExplosionEventHandlerActive), false]) then { + GVAR(addExplosionEventHandlerActive) = true; + + // Add EH to existing projectiles and mines + { + TRACE_2("existing",typeOf _x,local _x); + // Rockets only explode on local clients + _x addEventHandler ["Explode", { + TRACE_1("exp (existing)",_this); + [QGVAR(explosion), _this] call CBA_fnc_localEvent; + }]; + } forEach ((8 allObjects 2) select {local _x}); + + addMissionEventHandler ["ProjectileCreated", { + params ["_projectile"]; + TRACE_2("pc",typeOf _projectile,local _projectile); + + if (!local _projectile) exitWith {}; // Rockets only explode on local clients + + _projectile addEventHandler ["Explode", { + TRACE_1("exp",_this); + [QGVAR(explosion), _this] call CBA_fnc_localEvent; + }]; + }]; +}; + +[QGVAR(explosion), _code] call CBA_fnc_addEventHandler diff --git a/addons/hearing/XEH_postInit.sqf b/addons/hearing/XEH_postInit.sqf index 93a86f73497..f9fb2043334 100644 --- a/addons/hearing/XEH_postInit.sqf +++ b/addons/hearing/XEH_postInit.sqf @@ -16,16 +16,19 @@ if (isServer) then { // Only install event handler if combat deafness is enabled if (!GVAR(enableCombatDeafness)) exitWith {}; - addMissionEventHandler ["ProjectileCreated", { - params ["_projectile"]; - - if (!local _projectile) exitWith {}; - - // Rockets only explode on local clients - _projectile addEventHandler ["Explode", { - [QGVAR(explosion), _this] call CBA_fnc_globalEvent; - }]; - }]; + [{ // Convert ace_common's local explosion to a hearing global explosion event + params ["_projectile", "_pos"]; + TRACE_1("Explode",_this); + + // If projectile is local only, don't raise event globally + // TODO: netId always returns valid after 2.18 + // use _projectile getShotInfo 5 (https://community.bistudio.com/wiki/getShotInfo) + if (isMultiplayer && {(netId _projectile) == "0:0"}) then { + [QGVAR(explosion), [_projectile, _pos]] call CBA_fnc_localEvent; + } else { + [QGVAR(explosion), [_projectile, _pos]] call CBA_fnc_globalEvent; + }; + }] call EFUNC(common,addExplosionEventHandler); }] call CBA_fnc_addEventHandler; if (!hasInterface) exitWith {}; diff --git a/addons/hearing/functions/fnc_explosion.sqf b/addons/hearing/functions/fnc_explosion.sqf index 159f6660114..b5a6f14a69c 100644 --- a/addons/hearing/functions/fnc_explosion.sqf +++ b/addons/hearing/functions/fnc_explosion.sqf @@ -6,13 +6,12 @@ * Arguments: * 0: Projectile * 1: Explosion position ASL - * 2: Velocity (unused) * * Return Value: * None * * Example: - * [_projectile, [0, 0, 0], [0, 0, 0]] call ace_hearing_fnc_explosion + * [_projectile, [0, 0, 0]] call ace_hearing_fnc_explosion * * Public: No */ From e77861a7973cf94f6250bd57857bdeb0cabdeb17 Mon Sep 17 00:00:00 2001 From: Bailey Danyluk Date: Sat, 7 Sep 2024 17:07:04 -0600 Subject: [PATCH 21/95] Missileguidance - Add common configs for many missiles (#10275) * Add base classes for a bunch of misisles * change all default missiles to use types * update presets --- addons/dragon/CfgAmmo.hpp | 64 +- addons/hellfire/CfgAmmo.hpp | 42 +- addons/hot/CfgAmmo.hpp | 39 +- addons/maverick/CfgAmmo.hpp | 63 +- addons/metis/CfgAmmo.hpp | 71 +- addons/missileguidance/CfgAmmo.hpp | 78 +- .../missileguidance/CfgMissileTypesNato.hpp | 716 ++++++++++++++ .../missileguidance/CfgMissileTypesWarsaw.hpp | 901 ++++++++++++++++++ addons/missileguidance/config.cpp | 2 + addons/nlaw/CfgAmmo.hpp | 34 +- 10 files changed, 1642 insertions(+), 368 deletions(-) create mode 100644 addons/missileguidance/CfgMissileTypesNato.hpp create mode 100644 addons/missileguidance/CfgMissileTypesWarsaw.hpp diff --git a/addons/dragon/CfgAmmo.hpp b/addons/dragon/CfgAmmo.hpp index 22630e03b00..3a5a4a1ed6d 100644 --- a/addons/dragon/CfgAmmo.hpp +++ b/addons/dragon/CfgAmmo.hpp @@ -1,3 +1,4 @@ +class ace_missileguidance_type_Dragon; class CfgAmmo { class ammo_Penetrator_Base; class M_Scalpel_AT; @@ -37,41 +38,7 @@ class CfgAmmo { EGVAR(vehicle_damage,incendiary) = 1.0; - class ace_missileguidance { - pitchRate = 0; - yawRate = 0; - - canVanillaLock = 0; - - // Guidance type for munitions - defaultSeekerType = "SACLOS"; - seekerTypes[] = { "SACLOS" }; - - defaultSeekerLockMode = "LOAL"; - seekerLockModes[] = { "LOAL", "LOBL" }; - - defaultNavigationType = "LineOfSight"; - navigationTypes[] = { "LineOfSight" }; - - seekLastTargetPos = 0; - seekerAngle = 30; - seekerAccuracy = 1; - - seekerMinRange = 65; - seekerMaxRange = 1000; - - correctionDistance = 30; - missileLeadDistance = 0; - offsetFromCrosshair[] = { 0, 0, 0 }; - - serviceInterval = 0.33; // how many seconds between pops - serviceCharges = 32; // how many charges are in this missile - serviceChargeAcceleration = 6.5; - dragonSpeed = 100; // meters per second - - defaultAttackProfile = "DRAGON"; - attackProfiles[] = {"DRAGON"}; - }; + class ace_missileguidance: ace_missileguidance_type_Dragon {}; }; class GVAR(super): GVAR(dragonBase) { @@ -81,36 +48,11 @@ class CfgAmmo { submunitionParentSpeedCoef = 0; submunitionInitialOffset[] = { 0, 0, -0.2 }; - class ace_missileguidance { + class ace_missileguidance: ace_missileguidance { enabled = 1; - - pitchRate = 0; - yawRate = 0; - - // Guidance type for munitions - defaultSeekerType = "SACLOS"; - seekerTypes[] = { "SACLOS" }; - - defaultSeekerLockMode = "LOAL"; - seekerLockModes[] = { "LOAL", "LOBL" }; - - seekLastTargetPos = 0; - seekerAngle = 30; - seekerAccuracy = 1; - seekerMinRange = 30; seekerMaxRange = 1500; - - correctionDistance = 30; - missileLeadDistance = 0; - - serviceInterval = 0.33; // how many seconds between pops serviceCharges = 60; // how many charges are in this missile - serviceChargeAcceleration = 6.5; - dragonSpeed = 100; // meters per second - - defaultAttackProfile = "DRAGON"; - attackProfiles[] = {"DRAGON"}; }; }; diff --git a/addons/hellfire/CfgAmmo.hpp b/addons/hellfire/CfgAmmo.hpp index 02346deac3d..8789be711ce 100644 --- a/addons/hellfire/CfgAmmo.hpp +++ b/addons/hellfire/CfgAmmo.hpp @@ -1,3 +1,4 @@ +class ace_missileguidance_type_Hellfire; class CfgAmmo { class M_Scalpel_AT; @@ -23,47 +24,8 @@ class CfgAmmo { EGVAR(rearm,caliber) = 178; - class ace_missileguidance { + class ace_missileguidance: ace_missileguidance_type_Hellfire { enabled = 1; - - pitchRate = 30; // degrees per second - yawRate = 30; - - canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode - - // Guidance type for munitions - defaultSeekerType = "SALH"; - seekerTypes[] = { "SALH", "LIDAR", "SARH", "Optic", "Thermal", "GPS", "SACLOS", "MCLOS" }; - - defaultSeekerLockMode = "LOAL"; - seekerLockModes[] = { "LOAL", "LOBL" }; - - defaultNavigationType = "Direct"; - navigationTypes[] = { "Direct", "ZeroEffortMiss" }; - - seekLastTargetPos = 1; // seek last target position [if seeker loses LOS of target, continue to last known pos] - seekerAngle = 70; // Angle in front of the missile which can be searched - seekerAccuracy = 1; // seeker accuracy multiplier - - seekerMinRange = 1; - seekerMaxRange = 8000; // Range from the missile which the seeker can visually search - - // Attack profile type selection - defaultAttackProfile = "hellfire"; - attackProfiles[] = {"hellfire", "hellfire_hi", "hellfire_lo"}; - - class navigationStates { - class initial { - transitionCondition = QFUNC(midCourseTransition); - navigationType = "Direct"; - }; - class terminal { - transitionCondition = ""; - navigationType = "ZeroEffortMiss"; - }; - // transitions from initial -> termimal - states[] = {"initial", "terminal"}; - }; }; }; class ACE_Hellfire_AGM114N: ACE_Hellfire_AGM114K { diff --git a/addons/hot/CfgAmmo.hpp b/addons/hot/CfgAmmo.hpp index c5978b6d923..6f91d241fb9 100644 --- a/addons/hot/CfgAmmo.hpp +++ b/addons/hot/CfgAmmo.hpp @@ -1,3 +1,4 @@ +class ace_missileguidance_type_Hot; class CfgAmmo { class M_Scalpel_AT; class ammo_Penetrator_Base; @@ -55,43 +56,8 @@ class CfgAmmo { EGVAR(rearm,caliber) = 178; EGVAR(vehicle_damage,incendiary) = 1.0; - class ace_missileguidance { + class ace_missileguidance: ace_missileguidance_type_Hot { enabled = 1; - - pitchRate = 45; // Minium flap deflection for guidance - yawRate = 45; // Maximum flap deflection for guidance - - canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode - - showTrail = 1; - - // Guidance type for munitions - defaultSeekerType = "SACLOS"; - seekerTypes[] = { "SACLOS" }; - - defaultSeekerLockMode = "LOAL"; - seekerLockModes[] = { "LOAL", "LOBL" }; - - defaultNavigationType = "Line"; - navigationTypes[] = { "Line" }; - - lineGainP = 7; - lineGainD = 6; - - initialPitch = 2; - - seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] - seekerAngle = 30; // Angle from the shooter's view that can track the missile - seekerAccuracy = 1; // seeker accuracy multiplier - - seekerMinRange = 75; - seekerMaxRange = 4000; // Range from the missile which the seeker can visually search - - offsetFromCrosshair[] = { 0, 0, 0.5 }; // where the missile wants to stay in relation to the center of the crosshair. - - // Attack profile type selection - defaultAttackProfile = "WIRE"; - attackProfiles[] = {"WIRE"}; }; }; @@ -143,6 +109,7 @@ class CfgAmmo { class ace_missileguidance: ace_missileguidance { enabled = 1; seekerMaxRange = 4300; + offsetFromCrosshair[] = { 0, 0, 0.5 }; // where the missile wants to stay in relation to the center of the crosshair. }; }; }; diff --git a/addons/maverick/CfgAmmo.hpp b/addons/maverick/CfgAmmo.hpp index 7e66e2edee0..dbf847b10d6 100644 --- a/addons/maverick/CfgAmmo.hpp +++ b/addons/maverick/CfgAmmo.hpp @@ -1,3 +1,4 @@ +class ace_missileguidance_type_Maverick; class CfgAmmo { class MissileCore; class MissileBase: MissileCore { @@ -9,32 +10,8 @@ class CfgAmmo { author = "Dani (TCVM)"; missileLockMaxDistance = 14000; maneuvrability = 0; - class ace_missileguidance { + class ace_missileguidance: ace_missileguidance_type_Maverick { enabled = 1; - - pitchRate = 15; - yawRate = 15; - - canVanillaLock = 1; - - defaultSeekerType = "Optic"; - seekerTypes[] = {"Optic"}; - - defaultSeekerLockMode = "LOBL"; - seekerLockModes[] = {"LOBL"}; - - defaultNavigationType = "AugmentedProportionalNavigation"; - navigationTypes[] = { "AugmentedProportionalNavigation" }; - - seekLastTargetPos = 1; - seekerAngle = 60; - seekerAccuracy = 1; - - seekerMinRange = 1; - seekerMaxRange = 14000; - - defaultAttackProfile = "maverick"; - attackProfiles[] = {"maverick"}; }; }; @@ -52,32 +29,15 @@ class CfgAmmo { manualControl = 0; missileLockMaxDistance = 16000; weaponLockSystem = 4; - class ace_missileguidance { + class ace_missileguidance: ace_missileguidance_type_Maverick { enabled = 1; - - pitchRate = 15; - yawRate = 15; - - canVanillaLock = 0; - defaultSeekerType = "SALH"; seekerTypes[] = {"SALH"}; defaultSeekerLockMode = "LOAL"; - seekerLockModes[] = {"LOAL","LOBL"}; - - defaultNavigationType = "AugmentedProportionalNavigation"; - navigationTypes[] = { "AugmentedProportionalNavigation" }; - - seekLastTargetPos = 1; - seekerAngle = 60; - seekerAccuracy = 1; + seekerLockModes[] = {"LOAL"}; - seekerMinRange = 1; seekerMaxRange = 16000; - - defaultAttackProfile = "maverick"; - attackProfiles[] = {"maverick"}; }; }; @@ -87,32 +47,19 @@ class CfgAmmo { irLock = 0; missileLockMaxDistance = 10000; weaponLockSystem = 4; - class ace_missileguidance { + class ace_missileguidance: ace_missileguidance_type_Maverick { enabled = 1; - pitchRate = 20; yawRate = 20; - canVanillaLock = 0; - defaultSeekerType = "SALH"; seekerTypes[] = {"SALH"}; defaultSeekerLockMode = "LOAL"; seekerLockModes[] = {"LOAL"}; - defaultNavigationType = "AugmentedProportionalNavigation"; - navigationTypes[] = { "AugmentedProportionalNavigation" }; - - seekLastTargetPos = 1; seekerAngle = 40; - seekerAccuracy = 1; - - seekerMinRange = 1; seekerMaxRange = 10000; - - defaultAttackProfile = "maverick"; - attackProfiles[] = {"maverick"}; }; }; }; diff --git a/addons/metis/CfgAmmo.hpp b/addons/metis/CfgAmmo.hpp index c070343253a..4a6fe513d23 100644 --- a/addons/metis/CfgAmmo.hpp +++ b/addons/metis/CfgAmmo.hpp @@ -1,3 +1,4 @@ +class ace_missileguidance_type_Metis; class CfgAmmo { class M_Vorona_HEAT; class GVAR(HEAT): M_Vorona_HEAT { @@ -7,42 +8,8 @@ class CfgAmmo { airLock = 0; lockType = 0; - class ace_missileguidance { + class ace_missileguidance: ace_missileguidance_type_Metis { enabled = 1; - - pitchRate = 50; // Minium flap deflection for guidance - yawRate = 50; // Maximum flap deflection for guidance - initialPitch = 2; - - canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode - - showTrail = 1; - - // Guidance type for munitions - defaultSeekerType = "SACLOS"; - seekerTypes[] = { "SACLOS" }; - - defaultSeekerLockMode = "LOAL"; - seekerLockModes[] = { "LOAL", "LOBL" }; - - defaultNavigationType = "Line"; - navigationTypes[] = { "Line" }; - - lineGainP = 10; - lineGainD = 9; - - seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] - seekerAngle = 15; // Angle from the shooter's view that can track the missile - seekerAccuracy = 1; // seeker accuracy multiplier - - seekerMinRange = 80; - seekerMaxRange = 2000; // Range from the missile which the seeker can visually search - - offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. - - // Attack profile type selection - defaultAttackProfile = "WIRE"; - attackProfiles[] = {"WIRE"}; }; }; @@ -54,40 +21,8 @@ class CfgAmmo { airLock = 0; lockType = 0; - class ace_missileguidance { + class ace_missileguidance: ace_missileguidance_type_Metis { enabled = 1; - - pitchRate = 25; // Minium flap deflection for guidance - yawRate = 25; // Maximum flap deflection for guidance - - canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode - - // Guidance type for munitions - defaultSeekerType = "SACLOS"; - seekerTypes[] = { "SACLOS" }; - - defaultSeekerLockMode = "LOAL"; - seekerLockModes[] = { "LOAL", "LOBL" }; - - defaultNavigationType = "Line"; - navigationTypes[] = { "Line" }; - - lineGainP = 21; - lineGainD = 18; - - seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] - seekerAngle = 15; // Angle from the shooter's view that can track the missile - seekerAccuracy = 1; // seeker accuracy multiplier - - seekerMinRange = 80; - seekerMaxRange = 2000; // Range from the missile which the seeker can visually search - - correctionDistance = 1; // distance from center of crosshair where missile slows down - offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. - - // Attack profile type selection - defaultAttackProfile = "WIRE"; - attackProfiles[] = {"WIRE"}; }; }; }; diff --git a/addons/missileguidance/CfgAmmo.hpp b/addons/missileguidance/CfgAmmo.hpp index 8f913e99656..44e35d40811 100644 --- a/addons/missileguidance/CfgAmmo.hpp +++ b/addons/missileguidance/CfgAmmo.hpp @@ -17,33 +17,8 @@ class CfgAmmo { EGVAR(rearm,caliber) = 70; - class ADDON { + class ADDON: GVAR(type_Dagr) { enabled = 1; - - pitchRate = 40; // degrees per second - yawRate = 40; - - canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode - - // Guidance type for munitions - defaultSeekerType = "SALH"; - seekerTypes[] = { "SALH" }; - - defaultSeekerLockMode = "LOAL"; - seekerLockModes[] = { "LOAL", "LOBL" }; - - defaultNavigationType = "AugmentedProportionalNavigation"; - navigationTypes[] = { "AugmentedProportionalNavigation" }; - - seekerAngle = 90; // Angle in front of the missile which can be searched - seekerAccuracy = 1; // seeker accuracy multiplier - - seekerMinRange = 1; - seekerMaxRange = 2500; // Range from the missile which the seeker can visually search - - // Attack profile type selection - defaultAttackProfile = "LIN"; - attackProfiles[] = { "LIN", "DIR", "MID", "HI" }; }; }; @@ -68,53 +43,8 @@ class CfgAmmo { initTime = 0.5; // Begin ACE guidance Configs - class ADDON { + class ADDON: GVAR(type_Javelin) { enabled = 1; - - pitchRate = 120; // degrees per second - yawRate = 120; - stabilityCoefficient = 0.2; - bangBangGuidance = 0; - - canVanillaLock = 0; - - // Guidance type for munitions - defaultSeekerType = "Optic"; - seekerTypes[] = { "Optic" }; - - defaultSeekerLockMode = "LOBL"; - seekerLockModes[] = { "LOBL" }; - - defaultNavigationType = "Direct"; - navigationTypes[] = { "Direct", "ZeroEffortMiss" }; - - navigationGain = 3; - - seekerAngle = 180; // Angle in front of the missile which can be searched - seekerAccuracy = 1; // seeker accuracy multiplier - - seekerMinRange = 0; - seekerMaxRange = 2500; // Range from the missile which the seeker can visually search - - seekLastTargetPos = 1; // seek last target position [if seeker loses LOS of target, continue to last known pos] - - // Attack profile type selection - defaultAttackProfile = "JAV_TOP"; - attackProfiles[] = { "JAV_TOP", "JAV_DIR" }; - useModeForAttackProfile = 1; - - class navigationStates { - class initial { - transitionCondition = QFUNC(javelin_midCourseTransition); - navigationType = "Direct"; - }; - class terminal { - transitionCondition = ""; - navigationType = "ZeroEffortMiss"; - }; - // transitions from initial -> termimal - states[] = {"initial", "terminal"}; - }; }; }; class ACE_Javelin_FGM148_static: ACE_Javelin_FGM148 { @@ -123,6 +53,8 @@ class CfgAmmo { effectsMissileInit = "RocketBackEffectsStaticRPG"; //Explicity add guidance config - class ADDON: ADDON {}; + class ADDON: ADDON { + enabled = 1; + }; }; }; diff --git a/addons/missileguidance/CfgMissileTypesNato.hpp b/addons/missileguidance/CfgMissileTypesNato.hpp new file mode 100644 index 00000000000..ee4c76890e9 --- /dev/null +++ b/addons/missileguidance/CfgMissileTypesNato.hpp @@ -0,0 +1,716 @@ +class GVAR(type_AMRAAM) { + enabled = 0; + + pitchRate = 30; // Minium flap deflection for guidance + yawRate = 30; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "DopplerRadar"; + seekerTypes[] = { "DopplerRadar" }; + lockableTypes[] = {"Air"}; + + minimumSpeedFilter = 25; // filter out targets that have a closing velocity less than this + minimumTimeFilter = 0.0001; // filter out targets that are this close to the ground (speed of light) + maxTerrainCheck = 16000; // How far we should check for terrain + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "ZeroEffortMiss"; + navigationTypes[] = { "ZeroEffortMiss" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 50; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 2500; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR", "LOFT"}; + useModeForAttackProfile = 1; +}; + +class GVAR(type_ASRAAM) { + enabled = 0; + + pitchRate = 100; // Minium flap deflection for guidance + yawRate = 100; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "IR"; + seekerTypes[] = { "IR" }; + + flareDistanceFilter = 50; + flareAngleFilter = 0.8; // can filter out flares that are >= flareAngleFilter to known target velocity + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "ZeroEffortMiss"; + navigationTypes[] = { "ZeroEffortMiss" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 120; // Angle from the shooter's view that can track the missile + seekerAccuracy = 0.98; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 8000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_Dagr) { + enabled = 0; + + pitchRate = 40; // degrees per second + yawRate = 40; + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "SALH"; + seekerTypes[] = { "SALH" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "AugmentedProportionalNavigation"; + navigationTypes[] = { "AugmentedProportionalNavigation" }; + + seekerAngle = 90; // Angle in front of the missile which can be searched + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 1; + seekerMaxRange = 2500; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "LIN"; + attackProfiles[] = { "LIN", "DIR", "MID", "HI" }; +}; + +class GVAR(type_Dragon) { + enabled = 0; + + pitchRate = 0; + yawRate = 0; + + canVanillaLock = 0; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "LineOfSight"; + navigationTypes[] = { "LineOfSight" }; + + seekLastTargetPos = 0; + seekerAngle = 30; + seekerAccuracy = 1; + + seekerMinRange = 65; + seekerMaxRange = 1000; + + correctionDistance = 30; + missileLeadDistance = 0; + offsetFromCrosshair[] = { 0, 0, 0 }; + + serviceInterval = 0.33; // how many seconds between pops + serviceCharges = 32; // how many charges are in this missile + serviceChargeAcceleration = 6.5; + dragonSpeed = 100; // meters per second + + defaultAttackProfile = "DRAGON"; + attackProfiles[] = {"DRAGON"}; +}; + +class GVAR(type_ESSM) { + enabled = 0; + + pitchRate = 15; // Minium flap deflection for guidance + yawRate = 15; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "DopplerRadar"; + seekerTypes[] = { "DopplerRadar" }; + lockableTypes[] = {"Air"}; + + minimumSpeedFilter = 20; // filter out targets that have a closing velocity less than this + minimumTimeFilter = 0.00001; // filter out targets that are this close to the ground (speed of light) + maxTerrainCheck = 16000; // How far we should check for terrain + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "ZeroEffortMiss"; + navigationTypes[] = { "ZeroEffortMiss" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 50; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 2500; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_Hellfire) { + enabled = 0; + + pitchRate = 30; // degrees per second + yawRate = 30; + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "SALH"; + seekerTypes[] = { "SALH" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Direct"; + navigationTypes[] = { "Direct", "ZeroEffortMiss" }; + + seekLastTargetPos = 1; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 70; // Angle in front of the missile which can be searched + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 1; + seekerMaxRange = 8000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "hellfire"; + attackProfiles[] = {"hellfire", "hellfire_hi", "hellfire_lo"}; + + class navigationStates { + class initial { + transitionCondition = QEFUNC(hellfire,midCourseTransition); + navigationType = "Direct"; + }; + class terminal { + transitionCondition = ""; + navigationType = "ZeroEffortMiss"; + }; + // transitions from initial -> termimal + states[] = {"initial", "terminal"}; + }; +}; + +class GVAR(type_Hot) { + enabled = 0; + + pitchRate = 45; // Minium flap deflection for guidance + yawRate = 45; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 7; + lineGainD = 6; + + initialPitch = 2; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 4000; // Range from the missile which the seeker can visually search + + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "WIRE"; + attackProfiles[] = {"WIRE"}; +}; + +class GVAR(type_Javelin) { + enabled = 0; + + pitchRate = 120; // degrees per second + yawRate = 120; + stabilityCoefficient = 0.2; + bangBangGuidance = 0; + + canVanillaLock = 0; + + // Guidance type for munitions + defaultSeekerType = "Optic"; + seekerTypes[] = { "Optic" }; + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "Direct"; + navigationTypes[] = { "Direct", "ZeroEffortMiss" }; + + navigationGain = 3; + + seekerAngle = 180; // Angle in front of the missile which can be searched + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 0; + seekerMaxRange = 2500; // Range from the missile which the seeker can visually search + + seekLastTargetPos = 1; // seek last target position [if seeker loses LOS of target, continue to last known pos] + + // Attack profile type selection + defaultAttackProfile = "JAV_TOP"; + attackProfiles[] = { "JAV_TOP", "JAV_DIR" }; + useModeForAttackProfile = 1; + + class navigationStates { + class initial { + transitionCondition = QFUNC(javelin_midCourseTransition); + navigationType = "Direct"; + }; + class terminal { + transitionCondition = ""; + navigationType = "ZeroEffortMiss"; + }; + // transitions from initial -> termimal + states[] = {"initial", "terminal"}; + }; +}; + +class GVAR(type_Jdam) { + enabled = 0; + + pitchRate = 15; + yawRate = 20; + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "GPS"; + seekerTypes[] = { "GPS" }; + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "LINE"; + navigationTypes[] = { "LINE" }; + + lineGainP = 50; + lineGainD = 0; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 60; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 5; + seekerMaxRange = 4000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "JDAM"; + attackProfiles[] = {"JDAM"}; +}; + +class GVAR(type_Maverick) { + enabled = 0; + + pitchRate = 15; + yawRate = 15; + + canVanillaLock = 1; + + defaultSeekerType = "Optic"; + seekerTypes[] = {"Optic"}; + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = {"LOBL"}; + + defaultNavigationType = "AugmentedProportionalNavigation"; + navigationTypes[] = { "AugmentedProportionalNavigation" }; + + seekLastTargetPos = 1; + seekerAngle = 60; + seekerAccuracy = 1; + + seekerMinRange = 1; + seekerMaxRange = 14000; + + defaultAttackProfile = "maverick"; + attackProfiles[] = {"maverick"}; +}; + +class GVAR(type_Milan) { + enabled = 0; + + pitchRate = 60; // Minium flap deflection for guidance + yawRate = 60; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 0; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 25; + lineGainD = 12; + + initialPitch = -0.4; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 5; // Angle from the shooter's view that can track the missile, implemented + seekerAccuracy = 1; // seeker accuracy multiplier, not implemented? + + seekerMinRange = 100; + seekerMaxRange = 2000; // Range from the missile which the seeker can visually search + + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "WIRE"; + attackProfiles[] = {"WIRE"}; +}; + +class GVAR(type_Nlaw) { + enabled = 0; + + pitchRate = 5; // Minium flap deflection for guidance + yawRate = 10; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = QEGVAR(nlaw,seeker); + seekerTypes[] = {QEGVAR(nlaw,seeker)}; + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = {"LOBL"}; + + defaultNavigationType = QEGVAR(nlaw,PLOS); + navigationTypes[] = { QEGVAR(nlaw,PLOS) }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 45; // Angle in front of the missile which can be searched + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 0; + seekerMaxRange = 10; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = QEGVAR(nlaw,directAttack); + attackProfiles[] = {QEGVAR(nlaw,directAttack), QEGVAR(nlaw,overflyTopAttack)}; + useModeForAttackProfile = 1; + showHintOnCycle = 1; + + // Run once at fired event + onFired = QEFUNC(nlaw,onFired); +}; + +class GVAR(type_Patriot) { + enabled = 0; + + pitchRate = 30; // Minium flap deflection for guidance + yawRate = 30; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "DopplerRadar"; + seekerTypes[] = { "DopplerRadar" }; + lockableTypes[] = {"Air"}; + + minimumSpeedFilter = 10; // filter out targets that have a closing velocity less than this + minimumTimeFilter = 0.00001; // filter out targets that are this close to the ground (speed of light) + maxTerrainCheck = 16000; // How far we should check for terrain + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "ZeroEffortMiss"; + navigationTypes[] = { "ZeroEffortMiss" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 50; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 2500; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_Paveway) { + enabled = 0; + + pitchRate = 5; + yawRate = 5; + + bangBangGuidance = 1; + stabilityCoefficient = 0.4; // how much this projectile likes to "weathervane" (keep direction toward velocity) + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "SALH"; + seekerTypes[] = { "SALH" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL" }; + + defaultNavigationType = "ProportionalNavigation"; + navigationTypes[] = { "ProportionalNavigation" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 60; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 5; + seekerMaxRange = 4000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_RAM) { + enabled = 0; + + pitchRate = 50; // Minium flap deflection for guidance + yawRate = 50; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "IR"; + seekerTypes[] = { "IR" }; + + flareDistanceFilter = 100; + flareAngleFilter = 0.5; // can filter out flares that are >= flareAngleFilter to known target velocity + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "ZeroEffortMiss"; + navigationTypes[] = { "ZeroEffortMiss" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 45; // Angle from the shooter's view that can track the missile + seekerAccuracy = 0.8; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 5000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_RBS70) { + enabled = 0; + + pitchRate = 45; // Minium flap deflection for guidance + yawRate = 45; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 20; + lineGainD = 16; + + initialPitch = 2; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 5000; // Range from the missile which the seeker can visually search + + correctionDistance = 30; // distance from center of crosshair where missile slows down + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "BEAM"; + attackProfiles[] = {"BEAM"}; +}; + +class GVAR(type_Redeye) { + enabled = 0; + + pitchRate = 27; // Minium flap deflection for guidance + yawRate = 27; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "IR"; + seekerTypes[] = { "IR" }; + + flareDistanceFilter = 100; + flareAngleFilter = 2.0; // can filter out flares that are >= flareAngleFilter to known target velocity + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "ProportionalNavigation"; + navigationTypes[] = { "ProportionalNavigation" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 45; // Angle from the shooter's view that can track the missile + seekerAccuracy = 0.4; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 4500; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_Sidewinder) { + enabled = 0; + + pitchRate = 25; // Minium flap deflection for guidance + yawRate = 25; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "IR"; + seekerTypes[] = { "IR" }; + + flareDistanceFilter = 100; + flareAngleFilter = 1.6; // can filter out flares that are >= flareAngleFilter to known target velocity + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "AugmentedProportionalNavigation"; + navigationTypes[] = { "AugmentedProportionalNavigation" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 45; // Angle from the shooter's view that can track the missile + seekerAccuracy = 0.8; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 5000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_Stinger) { + enabled = 0; + + pitchRate = 42; // Minium flap deflection for guidance + yawRate = 42; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "IR"; + seekerTypes[] = { "IR" }; + + flareDistanceFilter = 100; + flareAngleFilter = 1.3; // can filter out flares that are >= flareAngleFilter to known target velocity + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "AugmentedProportionalNavigation"; + navigationTypes[] = { "AugmentedProportionalNavigation" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 45; // Angle from the shooter's view that can track the missile + seekerAccuracy = 0.8; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 5000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_TOW) { + enabled = 0; + + pitchRate = 45; // Minium flap deflection for guidance + yawRate = 45; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 20; + lineGainD = 7; + + initialPitch = 2; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 65; + seekerMaxRange = 3750; // Range from the missile which the seeker can visually search + + correctionDistance = 30; // distance from center of crosshair where missile slows down + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "WIRE"; + attackProfiles[] = {"WIRE"}; +}; \ No newline at end of file diff --git a/addons/missileguidance/CfgMissileTypesWarsaw.hpp b/addons/missileguidance/CfgMissileTypesWarsaw.hpp new file mode 100644 index 00000000000..4dbe81bbbf5 --- /dev/null +++ b/addons/missileguidance/CfgMissileTypesWarsaw.hpp @@ -0,0 +1,901 @@ +class GVAR(type_Ataka) { + enabled = 0; + + pitchRate = 45; // Minium flap deflection for guidance + yawRate = 45; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 16; + lineGainD = 10.44; + + initialPitch = 2; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 6000; // Range from the missile which the seeker can visually search + + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "BEAM"; + attackProfiles[] = {"BEAM"}; +}; + +class GVAR(type_Bastion) { + enabled = 0; + + pitchRate = 45; // Minium flap deflection for guidance + yawRate = 45; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 16; + lineGainD = 10.44; + + initialPitch = 2; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 6000; // Range from the missile which the seeker can visually search + + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "BEAM"; + attackProfiles[] = {"BEAM"}; +}; + +class GVAR(type_Drakon) { + enabled = 0; + + pitchRate = 25; // Minium flap deflection for guidance + yawRate = 25; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 16; + lineGainD = 9.5; + + initialPitch = 2; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 3300; // Range from the missile which the seeker can visually search + + correctionDistance = 30; // distance from center of crosshair where missile slows down + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "BEAM"; + attackProfiles[] = {"BEAM"}; +}; + +class GVAR(type_Fagot) { + enabled = 0; + + pitchRate = 45; // Minium flap deflection for guidance + yawRate = 45; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 16; + lineGainD = 10.44; + + initialPitch = 2; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 2000; // Range from the missile which the seeker can visually search + + correctionDistance = 30; // distance from center of crosshair where missile slows down + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "BEAM"; + attackProfiles[] = {"BEAM"}; +}; + +class GVAR(type_Falanga) { + enabled = 0; + + pitchRate = 15; // Minium flap deflection for guidance + yawRate = 15; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "MCLOS"; + seekerTypes[] = { "MCLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 5; + lineGainD = 0; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 0; + seekerMaxRange = 2500; // Range from the missile which the seeker can visually search + + correctionDistance = 0; // distance from center of crosshair where missile slows down + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "WIRE"; + attackProfiles[] = {"WIRE"}; +}; + +class GVAR(type_Fleyta) { + enabled = 0; + + pitchRate = 15; // Minium flap deflection for guidance + yawRate = 15; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "MCLOS"; + seekerTypes[] = { "MCLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 5; + lineGainD = 0; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 0; + seekerMaxRange = 3000; // Range from the missile which the seeker can visually search + + correctionDistance = 0; // distance from center of crosshair where missile slows down + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "WIRE"; + attackProfiles[] = {"WIRE"}; +}; + +class GVAR(type_Igla) { + enabled = 0; + + pitchRate = 30; // Minium flap deflection for guidance + yawRate = 43; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "IR"; + seekerTypes[] = { "IR" }; + + flareDistanceFilter = 100; + flareAngleFilter = 1.1; // can filter out flares that are >= flareAngleFilter to known target velocity + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "AugmentedProportionalNavigation"; + navigationTypes[] = { "AugmentedProportionalNavigation" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 45; // Angle from the shooter's view that can track the missile + seekerAccuracy = 0.76; // seeker accuracy multiplier + + seekerMinRange = 5; + seekerMaxRange = 5200; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_KAB) { + enabled = 0; + + pitchRate = 8; + yawRate = 8; + + bangBangGuidance = 1; + stabilityCoefficient = 0.4; // how much this projectile likes to "weathervane" (keep direction toward velocity) + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "SALH"; + seekerTypes[] = { "SALH" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL" }; + + defaultNavigationType = "ProportionalNavigation"; + navigationTypes[] = { "ProportionalNavigation" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 60; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 5; + seekerMaxRange = 4000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_KH25) { + enabled = 0; + + pitchRate = 20; + yawRate = 20; + + canVanillaLock = 0; + + defaultSeekerType = "SALH"; + seekerTypes[] = {"SALH"}; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = {"LOAL"}; + + defaultNavigationType = "AugmentedProportionalNavigation"; + navigationTypes[] = { "AugmentedProportionalNavigation" }; + + seekLastTargetPos = 1; + seekerAngle = 40; + seekerAccuracy = 1; + + seekerMinRange = 1; + seekerMaxRange = 10000; + + defaultAttackProfile = "maverick"; + attackProfiles[] = {"maverick"}; +}; + +class GVAR(type_KH29) { + enabled = 0; + + pitchRate = 20; + yawRate = 20; + + canVanillaLock = 0; + + defaultSeekerType = "SALH"; + seekerTypes[] = {"SALH"}; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = {"LOAL"}; + + defaultNavigationType = "AugmentedProportionalNavigation"; + navigationTypes[] = { "AugmentedProportionalNavigation" }; + + seekLastTargetPos = 1; + seekerAngle = 40; + seekerAccuracy = 1; + + seekerMinRange = 1; + seekerMaxRange = 10000; + + defaultAttackProfile = "maverick"; + attackProfiles[] = {"maverick"}; +}; + +class GVAR(type_Kobra) { + enabled = 0; + + pitchRate = 45; // Minium flap deflection for guidance + yawRate = 45; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 16; + lineGainD = 9.5; + + initialPitch = 2; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 5000; // Range from the missile which the seeker can visually search + + correctionDistance = 30; // distance from center of crosshair where missile slows down + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "BEAM"; + attackProfiles[] = {"BEAM"}; +}; + +class GVAR(type_Konkurs) { + enabled = 0; + + pitchRate = 45; // Minium flap deflection for guidance + yawRate = 45; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 10; + lineGainD = 8.5; + + initialPitch = 2; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 4000; // Range from the missile which the seeker can visually search + + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "WIRE"; + attackProfiles[] = {"WIRE"}; +}; + +class GVAR(type_Kornet) { + enabled = 0; + + pitchRate = 45; // Minium flap deflection for guidance + yawRate = 45; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 16; + lineGainD = 10.44; + + initialPitch = 2; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 5000; // Range from the missile which the seeker can visually search + + correctionDistance = 30; // distance from center of crosshair where missile slows down + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "BEAM"; + attackProfiles[] = {"BEAM"}; +}; + +class GVAR(type_Malyutka) { + enabled = 0; + + pitchRate = 15; // Minium flap deflection for guidance + yawRate = 15; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "MCLOS"; + seekerTypes[] = { "MCLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 5; + lineGainD = 0; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 0; + seekerMaxRange = 2500; // Range from the missile which the seeker can visually search + + correctionDistance = 0; // distance from center of crosshair where missile slows down + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "WIRE"; + attackProfiles[] = {"WIRE"}; +}; + +class GVAR(type_Metis) { + enabled = 0; + + pitchRate = 50; // Minium flap deflection for guidance + yawRate = 50; // Maximum flap deflection for guidance + initialPitch = 2; + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 16; + lineGainD = 10.44; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 15; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 80; + seekerMaxRange = 1000; // Range from the missile which the seeker can visually search + + correctionDistance = 3; // distance from center of crosshair where missile slows down + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "WIRE"; + attackProfiles[] = {"WIRE"}; +}; + +class GVAR(type_Molniya) { + enabled = 0; + + pitchRate = 45; // Minium flap deflection for guidance + yawRate = 45; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "IR"; + seekerTypes[] = { "IR" }; + + flareDistanceFilter = 50; + flareAngleFilter = 0.8; // can filter out flares that are >= flareAngleFilter to known target velocity + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "AugmentedProportionalNavigation"; + navigationTypes[] = { "AugmentedProportionalNavigation" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 40; // Angle from the shooter's view that can track the missile + seekerAccuracy = 0.85; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 5000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_R73) { + enabled = 0; + + pitchRate = 35; // Minium flap deflection for guidance + yawRate = 35; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "IR"; + seekerTypes[] = { "IR" }; + + flareDistanceFilter = 50; + flareAngleFilter = 0.8; // can filter out flares that are >= flareAngleFilter to known target velocity + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "AugmentedProportionalNavigation"; + navigationTypes[] = { "AugmentedProportionalNavigation" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 40; // Angle from the shooter's view that can track the missile + seekerAccuracy = 0.85; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 5000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_R74) { + enabled = 1; + + pitchRate = 50; // Minium flap deflection for guidance + yawRate = 50; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "IR"; + seekerTypes[] = { "IR" }; + + flareDistanceFilter = 50; + flareAngleFilter = 0.8; // can filter out flares that are >= flareAngleFilter to known target velocity + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "AugmentedProportionalNavigation"; + navigationTypes[] = { "AugmentedProportionalNavigation" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 75; // Angle from the shooter's view that can track the missile + seekerAccuracy = 0.95; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 8000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_R77) { + enabled = 0; + + pitchRate = 40; // Minium flap deflection for guidance + yawRate = 40; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "DopplerRadar"; + seekerTypes[] = { "DopplerRadar" }; + lockableTypes[] = {"Air"}; + + minimumSpeedFilter = 15; // filter out targets that have a closing velocity less than this + minimumTimeFilter = 0.00005; // filter out targets that are this close to the ground (speed of light) + maxTerrainCheck = 16000; // How far we should check for terrain + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "ZeroEffortMiss"; + navigationTypes[] = { "ZeroEffortMiss" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 50; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 2500; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR", "LOFT"}; + useModeForAttackProfile = 1; +}; + +class GVAR(type_Refleks) { + enabled = 0; + + pitchRate = 45; // Minium flap deflection for guidance + yawRate = 45; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 16; + lineGainD = 10.44; + + initialPitch = 2; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 5000; // Range from the missile which the seeker can visually search + + correctionDistance = 30; // distance from center of crosshair where missile slows down + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "BEAM"; + attackProfiles[] = {"BEAM"}; +}; + +class GVAR(type_S400) { + enabled = 0; + + pitchRate = 25; // Minium flap deflection for guidance + yawRate = 25; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "DopplerRadar"; + seekerTypes[] = { "DopplerRadar" }; + lockableTypes[] = {"Air"}; + + minimumSpeedFilter = 5; // filter out targets that have a closing velocity less than this + minimumTimeFilter = 0.000001; // filter out targets that are this close to the ground (speed of light) + maxTerrainCheck = 16000; // How far we should check for terrain + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "ZeroEffortMiss"; + navigationTypes[] = { "ZeroEffortMiss" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 50; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 2500; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_Shturm) { + enabled = 0; + + pitchRate = 45; // Minium flap deflection for guidance + yawRate = 45; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 16; + lineGainD = 10.44; + + initialPitch = 2; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 4000; // Range from the missile which the seeker can visually search + + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "BEAM"; + attackProfiles[] = {"BEAM"}; +}; + +class GVAR(type_Strela) { + enabled = 0; + + pitchRate = 30; // Minium flap deflection for guidance + yawRate = 30; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "IR"; + seekerTypes[] = { "IR" }; + + flareDistanceFilter = 100; + flareAngleFilter = 1.6; // can filter out flares that are >= flareAngleFilter to known target velocity + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "ProportionalNavigation"; + navigationTypes[] = { "ProportionalNavigation" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 45; // Angle from the shooter's view that can track the missile + seekerAccuracy = 0.6; // seeker accuracy multiplier + + seekerMinRange = 10; + seekerMaxRange = 3700; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_Vikhr) { + enabled = 0; + showTrail = 1; + + pitchRate = 60; // Minium flap deflection for guidance + yawRate = 60; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 20; + lineGainD = 16; + correctionDistance = 5; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 15; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 30; + seekerMaxRange = 12000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "BEAM"; + attackProfiles[] = {"BEAM"}; +}; + +class GVAR(type_Vympel) { + enabled = 0; + + pitchRate = 35; // Minium flap deflection for guidance + yawRate = 35; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "IR"; + seekerTypes[] = { "IR" }; + + flareDistanceFilter = 50; + flareAngleFilter = 0.8; // can filter out flares that are >= flareAngleFilter to known target velocity + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "AugmentedProportionalNavigation"; + navigationTypes[] = { "AugmentedProportionalNavigation" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 40; // Angle from the shooter's view that can track the missile + seekerAccuracy = 0.85; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 5000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; \ No newline at end of file diff --git a/addons/missileguidance/config.cpp b/addons/missileguidance/config.cpp index e98d99ebcbb..4e1f2e3e1f1 100644 --- a/addons/missileguidance/config.cpp +++ b/addons/missileguidance/config.cpp @@ -15,6 +15,8 @@ class CfgPatches { #include "ACE_GuidanceConfig.hpp" +#include "CfgMissileTypesNato.hpp" +#include "CfgMissileTypesWarsaw.hpp" #include "CfgEventhandlers.hpp" #include "CfgAmmo.hpp" #include "CfgMagazines.hpp" diff --git a/addons/nlaw/CfgAmmo.hpp b/addons/nlaw/CfgAmmo.hpp index f572678d20b..650fa148873 100644 --- a/addons/nlaw/CfgAmmo.hpp +++ b/addons/nlaw/CfgAmmo.hpp @@ -1,41 +1,11 @@ +class ace_missileguidance_type_Nlaw; class CfgAmmo { class M_NLAW_AT_F; class ACE_NLAW: M_NLAW_AT_F { hit = 400; // Default was 500 indirectHit = 20; // Default was 15 - class ace_missileguidance { + class ace_missileguidance: ace_missileguidance_type_Nlaw { enabled = 1; - - pitchRate = 5; // Minium flap deflection for guidance - yawRate = 10; // Maximum flap deflection for guidance - - canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode - - // Guidance type for munitions - defaultSeekerType = QGVAR(seeker); - seekerTypes[] = {QGVAR(seeker)}; - - defaultSeekerLockMode = "LOBL"; - seekerLockModes[] = {"LOBL"}; - - defaultNavigationType = QGVAR(PLOS); - navigationTypes[] = { QGVAR(PLOS) }; - - seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] - seekerAngle = 45; // Angle in front of the missile which can be searched - seekerAccuracy = 1; // seeker accuracy multiplier - - seekerMinRange = 0; - seekerMaxRange = 10; // Range from the missile which the seeker can visually search - - // Attack profile type selection - defaultAttackProfile = QGVAR(directAttack); - attackProfiles[] = {QGVAR(directAttack), QGVAR(overflyTopAttack)}; - useModeForAttackProfile = 1; - showHintOnCycle = 1; - - // Run once at fired event - onFired = QFUNC(onFired); }; }; From 6bc3277c542f5300e90ee017346d70a61beeffe3 Mon Sep 17 00:00:00 2001 From: Dart <59131299+DartRuffian@users.noreply.github.com> Date: Sat, 7 Sep 2024 18:07:37 -0500 Subject: [PATCH 22/95] Trenches - Make entrenching tool cache use hashMap (#10298) Save entrenching tools to hashmap instead of code --- addons/trenches/XEH_preInit.sqf | 2 +- addons/trenches/XEH_preStart.sqf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/trenches/XEH_preInit.sqf b/addons/trenches/XEH_preInit.sqf index 94decd550af..c8c9a3451f9 100644 --- a/addons/trenches/XEH_preInit.sqf +++ b/addons/trenches/XEH_preInit.sqf @@ -8,6 +8,6 @@ PREP_RECOMPILE_END; #include "initSettings.inc.sqf" -GVAR(entrenchingTools) = call (uiNamespace getVariable QGVAR(entrenchingTools)); +GVAR(entrenchingTools) = keys (uiNamespace getVariable QGVAR(entrenchingTools)); ADDON = true; diff --git a/addons/trenches/XEH_preStart.sqf b/addons/trenches/XEH_preStart.sqf index c966b2c9b6d..05065910397 100644 --- a/addons/trenches/XEH_preStart.sqf +++ b/addons/trenches/XEH_preStart.sqf @@ -6,4 +6,4 @@ private _entrenchingTools = (QUOTE(getNumber (_x >> QQGVAR(entrenchingTool)) > 0 _entrenchingTools append (QUOTE(getNumber (_x >> QQGVAR(entrenchingTool)) > 0) configClasses (configFile >> "CfgVehicles") apply {configName _x}); TRACE_1("",_entrenchingTools); -uiNamespace setVariable [QGVAR(entrenchingTools), compileFinal str _entrenchingTools]; +uiNamespace setVariable [QGVAR(entrenchingTools), compileFinal (_entrenchingTools createHashMapFromArray [])]; From 067f5f8cf2801c93c8cc58be6b1a4c64a1d178b2 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Sun, 8 Sep 2024 09:15:50 +0200 Subject: [PATCH 23/95] CSW - Add primary weapon support (#10284) * Add primary weapon support for CSW * Update addons/csw/functions/fnc_assemble_deployWeapon.sqf Co-authored-by: PabstMirror * Update crew-served-weapons-framework.md --------- Co-authored-by: PabstMirror --- .../fnc_assemble_canDeployWeapon.sqf | 5 ++++- .../functions/fnc_assemble_deployWeapon.sqf | 21 ++++++++++++------- .../fnc_assemble_deployWeaponModifier.sqf | 13 ++++++++---- .../functions/fnc_assemble_pickupWeapon.sqf | 17 +++++++++++++-- .../fnc_reload_getVehicleMagazine.sqf | 2 +- .../crew-served-weapons-framework.md | 1 + 6 files changed, 43 insertions(+), 16 deletions(-) diff --git a/addons/csw/functions/fnc_assemble_canDeployWeapon.sqf b/addons/csw/functions/fnc_assemble_canDeployWeapon.sqf index 6dd58fe4fba..12d00ca44e9 100644 --- a/addons/csw/functions/fnc_assemble_canDeployWeapon.sqf +++ b/addons/csw/functions/fnc_assemble_canDeployWeapon.sqf @@ -20,4 +20,7 @@ params ["_target", "_player"]; // If the current launcher has a config-value that defines the tripod, it is a CSW (alive _target) && -{(getText (configFile >> "CfgWeapons" >> secondaryWeapon _player >> QUOTE(ADDON) >> "assembleTo" >> typeOf _target)) != ""} +{ + (getText (configFile >> "CfgWeapons" >> secondaryWeapon _player >> QUOTE(ADDON) >> "assembleTo" >> typeOf _target)) != "" || + {(getText (configFile >> "CfgWeapons" >> primaryWeapon _player >> QUOTE(ADDON) >> "assembleTo" >> typeOf _target)) != ""} +} diff --git a/addons/csw/functions/fnc_assemble_deployWeapon.sqf b/addons/csw/functions/fnc_assemble_deployWeapon.sqf index ee0b3156eae..f852a1954af 100644 --- a/addons/csw/functions/fnc_assemble_deployWeapon.sqf +++ b/addons/csw/functions/fnc_assemble_deployWeapon.sqf @@ -21,8 +21,19 @@ [{ params ["_tripod", "_player"]; + private _tripodClassname = typeOf _tripod; + private _assembledClassname = getText (configFile >> "CfgWeapons" >> secondaryWeapon _player >> QUOTE(ADDON) >> "assembleTo" >> _tripodClassname); + private _index = 1; + + if (_assembledClassname == "") then { + _assembledClassname = getText (configFile >> "CfgWeapons" >> primaryWeapon _player >> QUOTE(ADDON) >> "assembleTo" >> _tripodClassname); + _index = 0; + }; + + if (!isClass (configFile >> "CfgVehicles" >> _assembledClassname)) exitWith {ERROR_1("bad static classname [%1]",_assembledClassname);}; + // Save magazines and attachments (handle loaded launchers which can become csw like CUP Metis) - private _carryWeaponInfo = (getUnitLoadout _player) select 1; + private _carryWeaponInfo = (getUnitLoadout _player) select _index; private _carryWeaponClassname = _carryWeaponInfo deleteAt 0; // Remove empty entries @@ -30,15 +41,9 @@ TRACE_3("assemble_deployWeapon_carryWeaponClassname",_tripod,_player,_carryWeaponClassname); - private _tripodClassname = typeOf _tripod; - private _weaponConfig = configFile >> "CfgWeapons" >> _carryWeaponClassname >> QUOTE(ADDON); - private _assembledClassname = getText (_weaponConfig >> "assembleTo" >> _tripodClassname); - - if (!isClass (configFile >> "CfgVehicles" >> _assembledClassname)) exitWith {ERROR_1("bad static classname [%1]",_assembledClassname);}; - _player removeWeaponGlobal _carryWeaponClassname; - private _deployTime = getNumber (_weaponConfig >> "deployTime"); + private _deployTime = getNumber (configFile >> "CfgWeapons" >> _carryWeaponClassname >> QUOTE(ADDON) >> "deployTime"); TRACE_4("",_carryWeaponClassname,_tripodClassname,_assembledClassname,_deployTime); diff --git a/addons/csw/functions/fnc_assemble_deployWeaponModifier.sqf b/addons/csw/functions/fnc_assemble_deployWeaponModifier.sqf index f98978195d9..f3f1fd7bfcb 100644 --- a/addons/csw/functions/fnc_assemble_deployWeaponModifier.sqf +++ b/addons/csw/functions/fnc_assemble_deployWeaponModifier.sqf @@ -20,9 +20,14 @@ params ["_target", "_player", "", "_actionData"]; -private _carryWeaponClassname = secondaryWeapon _player; -private _assembleTo = getText (configFile >> "CfgWeapons" >> _carryWeaponClassname >> QUOTE(ADDON) >> "assembleTo" >> typeOf _target); -private _icon = getText (configFile >> "CfgVehicles" >> _assembleTo >> "picture"); -TRACE_2("",_assembleTo,_icon); +private _tripodClassname = typeOf _target; +private _assembledClassname = getText (configFile >> "CfgWeapons" >> secondaryWeapon _player >> QUOTE(ADDON) >> "assembleTo" >> _tripodClassname); + +if (_assembledClassname == "") then { + _assembledClassname = getText (configFile >> "CfgWeapons" >> primaryWeapon _player >> QUOTE(ADDON) >> "assembleTo" >> _tripodClassname); +}; + +private _icon = getText (configFile >> "CfgVehicles" >> _assembledClassname >> "picture"); +TRACE_2("",_assembledClassname,_icon); _actionData set [2, _icon]; diff --git a/addons/csw/functions/fnc_assemble_pickupWeapon.sqf b/addons/csw/functions/fnc_assemble_pickupWeapon.sqf index 65dc5fa7403..867c151d278 100644 --- a/addons/csw/functions/fnc_assemble_pickupWeapon.sqf +++ b/addons/csw/functions/fnc_assemble_pickupWeapon.sqf @@ -58,7 +58,9 @@ if (_carryWeaponMag isEqualTo [] && {_carryMag in _carryWeaponMags}) then { TRACE_3("Adding mag to secondary weapon",_xMag,_xAmmo,_carryMag); _carryWeaponMag = [_carryMag, _xAmmo]; - DEC(_xAmmo); + + // Do not return this magazine, as it will be put into the weapon + continue; }; if ((_xAmmo > 0) && {_carryMag != ""}) then { TRACE_2("Removing ammo",_xMag,_carryMag); @@ -82,8 +84,19 @@ [{ params ["_player", "_weaponPos", "_carryWeaponClassname", "_carryWeaponMag", "_turretClassname"]; + private _carryWeaponType = _carryWeaponClassname call EFUNC(common,getWeaponType); + + if !(_carryWeaponType in [1, 2]) exitWith { + ERROR_1("bad carry weapon type [%1]",_carryWeaponClassname); + + if (_carryWeaponMag isEqualTo []) exitWith {}; + + // Return the ammo, so it doesn't vanish + [_player, _carryWeaponMag select 0, _carryWeaponMag select 1] call FUNC(reload_handleReturnAmmo); + }; + // Give the weapon to the player if possible - if ((alive _player) && {(secondaryWeapon _player) == ""}) exitWith { + if ((alive _player) && {([primaryWeapon _player, secondaryWeapon _player] select (_carryWeaponType - 1)) == ""}) exitWith { [_player, _carryWeaponClassname] call CBA_fnc_addWeaponWithoutItems; if (_carryWeaponMag isNotEqualTo []) then { diff --git a/addons/csw/functions/fnc_reload_getVehicleMagazine.sqf b/addons/csw/functions/fnc_reload_getVehicleMagazine.sqf index 3682651aac6..24d21534ee2 100644 --- a/addons/csw/functions/fnc_reload_getVehicleMagazine.sqf +++ b/addons/csw/functions/fnc_reload_getVehicleMagazine.sqf @@ -37,7 +37,7 @@ private _bestMagCount = -1; _bestMagCount = _xAmmo; }; }; - } forEach (getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines")); + } forEach (compatibleMagazines _weapon); } forEach (_vehicle weaponsTurret _turret); TRACE_3("best fit",_desiredAmmo,_bestMag,_bestMagCount); diff --git a/docs/wiki/framework/crew-served-weapons-framework.md b/docs/wiki/framework/crew-served-weapons-framework.md index 9b3ef28d4fb..a2f8e74ae65 100644 --- a/docs/wiki/framework/crew-served-weapons-framework.md +++ b/docs/wiki/framework/crew-served-weapons-framework.md @@ -39,6 +39,7 @@ class CfgWeapons { ### 1.2 Carryable Weapon Carried CSW weapons are technically rocket launchers. This allows the player to carry both a CSW weapon and a backpack with magazines for the CSW. +ACE 3.18.0 added support for primary weapons to be used as CSW weapons, but not tripods. ```cpp class CfgWeapons { From 36b9835e1916c59c7e8f64b5764bd0ae136cc117 Mon Sep 17 00:00:00 2001 From: OverlordZorn <56258612+OverlordZorn@users.noreply.github.com> Date: Mon, 9 Sep 2024 01:07:18 +0200 Subject: [PATCH 24/95] Compat RF - Field Rations - Watersource Offsets (#10282) * Update config.cpp * Create CfgVehicles.hpp * Update CfgVehicles.hpp * Update CfgVehicles.hpp * remove empty line2 * macro'fied * Update config.cpp * Update addons/compat_rf/CfgVehicles.hpp Co-authored-by: PabstMirror * Update addons/compat_rf/CfgVehicles.hpp Co-authored-by: PabstMirror * Update addons/compat_rf/CfgVehicles.hpp Co-authored-by: PabstMirror * Update addons/compat_rf/CfgVehicles.hpp Co-authored-by: PabstMirror * Update addons/compat_rf/CfgVehicles.hpp Co-authored-by: Mike-MF * Update addons/compat_rf/CfgVehicles.hpp Co-authored-by: Mike-MF * Update addons/compat_rf/CfgVehicles.hpp Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/compat_rf/CfgVehicles.hpp Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/compat_rf/CfgVehicles.hpp Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> --------- Co-authored-by: PabstMirror Co-authored-by: Mike-MF Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> --- addons/compat_rf/CfgVehicles.hpp | 25 +++++++++++++++++++++++++ addons/compat_rf/config.cpp | 3 ++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 addons/compat_rf/CfgVehicles.hpp diff --git a/addons/compat_rf/CfgVehicles.hpp b/addons/compat_rf/CfgVehicles.hpp new file mode 100644 index 00000000000..fa0343908a9 --- /dev/null +++ b/addons/compat_rf/CfgVehicles.hpp @@ -0,0 +1,25 @@ +class CfgVehicles { + // Applies the offset to all RF Offroads which can have the optional tank in the back + class Offroad_01_unarmed_base_F; + class Pickup_01_base_rf: Offroad_01_unarmed_base_F { + EXGVAR(field_rations,offset)[] = {-0.04, -2.45, -0.9}; + }; + + // Enable Water Source by Default + class C_IDAP_Pickup_rf; + class C_IDAP_Pickup_water_rf: C_IDAP_Pickup_rf { + EXGVAR(field_rations,waterSupply) = 500; + }; + + class O_Truck_03_fuel_F; + class C_Truck_03_water_rf: O_Truck_03_fuel_F { + EXGVAR(field_rations,waterSupply) = 10000; + EXGVAR(field_rations,offset)[] = {0, -5.05, -0.3}; + }; + + class B_Truck_01_fuel_F; + class C_Truck_01_water_rf: B_Truck_01_fuel_F { + EXGVAR(field_rations,waterSupply) = 10000; + EXGVAR(field_rations,offset)[] = {-0.41, -5.15, -0.3}; + }; +}; diff --git a/addons/compat_rf/config.cpp b/addons/compat_rf/config.cpp index ab6fb942751..52ef83c1b74 100644 --- a/addons/compat_rf/config.cpp +++ b/addons/compat_rf/config.cpp @@ -9,10 +9,11 @@ class CfgPatches { requiredAddons[] = {"RF_Data_Loadorder"}; skipWhenMissingDependencies = 1; author = ECSTRING(common,ACETeam); - authors[] = {"Mike"}; + authors[] = {"Mike", "OverlordZorn[CVO]"}; url = ECSTRING(main,URL); VERSION_CONFIG; }; }; #include "CfgWeapons.hpp" +#include "CfgVehicles.hpp" From 8c582f1fe0b9929ee883da8859255df96902e99d Mon Sep 17 00:00:00 2001 From: Dart <59131299+DartRuffian@users.noreply.github.com> Date: Sun, 8 Sep 2024 19:12:43 -0500 Subject: [PATCH 25/95] Arsenal Stats - Add support for multiline text (#9856) Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> Co-authored-by: Walthzer <19926813+Walthzer@users.noreply.github.com> --- addons/arsenal/defines.hpp | 2 + addons/arsenal/functions/fnc_handleStats.sqf | 54 +++++++++++++++++--- addons/arsenal/ui/RscAttributes.hpp | 14 ++--- docs/wiki/framework/arsenal-framework.md | 2 +- 4 files changed, 57 insertions(+), 15 deletions(-) diff --git a/addons/arsenal/defines.hpp b/addons/arsenal/defines.hpp index 6967c3f0401..ecd50f7a479 100644 --- a/addons/arsenal/defines.hpp +++ b/addons/arsenal/defines.hpp @@ -154,6 +154,8 @@ #define IDC_statsPreviousPage 52 #define IDC_statsNextPage 53 #define IDC_statsCurrentPage 54 +#define IDC_statsBoxTitleBackground 55 +#define IDC_statsBoxBackground 56 #define IDC_actionsBox 90 #define IDC_actionsBackground1 90010 #define IDC_actionsBackground2 90011 diff --git a/addons/arsenal/functions/fnc_handleStats.sqf b/addons/arsenal/functions/fnc_handleStats.sqf index 3fd92d64f0f..0511c05a25a 100644 --- a/addons/arsenal/functions/fnc_handleStats.sqf +++ b/addons/arsenal/functions/fnc_handleStats.sqf @@ -19,6 +19,8 @@ params ["_display", "_control", "_curSel", ["_itemCfg", configNull]]; private _statsBoxCtrl = _display displayCtrl IDC_statsBox; +private _statsBoxTitleBackgroundCtrl = _display displayCtrl IDC_statsBoxTitleBackground; +private _statsBoxBackgroundCtrl = _display displayCtrl IDC_statsBoxBackground; private _statsPreviousPageCtrl = _display displayCtrl IDC_statsPreviousPage; private _statsNextPageCtrl = _display displayCtrl IDC_statsNextPage; private _statsCurrentPageCtrl = _display displayCtrl IDC_statsCurrentPage; @@ -111,6 +113,7 @@ private _fnc_handleStats = { private _statsBarCtrl = controlNull; private _statsTextCtrl = controlNull; private _textStatementResult = ""; + private _lastCtrl = _statsBoxTitleBackgroundCtrl; { _x params ["", "_configEntry", "_title", "_bools", "_statements"]; @@ -127,6 +130,17 @@ private _fnc_handleStats = { _statsTitleCtrl ctrlSetText _title; _statsTitleCtrl ctrlSetFade 0; + // Vertical Position + ctrlPosition _lastCtrl params ["", "_lastPosY", "", "_lastPosH"]; + _statsTitleCtrl ctrlSetPositionY (_lastPosY + _lastPosH + GRID_H); + { + _x ctrlSetPositionY (_lastPosY + _lastPosH + GRID_H + (5 * GRID_H)); + } forEach [ + _statsBackgroundCtrl, + _statsBarCtrl, + _statsTextCtrl + ]; + // Handle bars if (_showBar) then { _statsBarCtrl progressSetPosition ([_configEntry, _itemCfg] call _barStatement); @@ -140,18 +154,39 @@ private _fnc_handleStats = { // Handle text entries if (_showText) then { _textStatementResult = [_configEntry, _itemCfg] call _textStatement; - - if !(_textStatementResult isEqualType "") then { - _textStatementResult = str _textStatementResult; + if (_textStatementResult isEqualType []) then { + _textStatementResult = _textStatementResult joinString endl; + } else { + if !(_textStatementResult isEqualType "") then { + _textStatementResult = str _textStatementResult; + }; }; _statsTextCtrl ctrlSetText _textStatementResult; _statsTextCtrl ctrlSetTextColor ([[1, 1, 1, 1], [0, 0, 0, 1]] select (_showBar)); + + //Height based on Text lines + { + _x ctrlSetPositionH (ctrlTextHeight _statsTextCtrl); + } forEach [ + _statsBackgroundCtrl, + _statsBarCtrl, + _statsTextCtrl + ]; + _statsTextCtrl ctrlSetFade 0; } else { _statsTextCtrl ctrlSetFade 1; + //Ensure default height + { + _x ctrlSetPositionH (5 * GRID_H); + } forEach [ + _statsBackgroundCtrl, + _statsBarCtrl, + _statsTextCtrl + ]; }; - + { _x ctrlCommit 0; } forEach [ @@ -160,24 +195,29 @@ private _fnc_handleStats = { _statsBarCtrl, _statsTextCtrl ]; + + _lastCtrl = _statsTextCtrl; + } forEach _statsToDisplay; // Resize the window (5 - _statsCount) call _fnc_hideUnused; - private _height = 10 * _statsCount + 5; + ctrlPosition _lastCtrl params ["", "_lastPosY", "", "_lastPosH"]; _statsBoxCtrl ctrlSetPosition [ (0.5 - WIDTH_TOTAL / 2) + WIDTH_GAP, safeZoneY + 1.8 * GRID_H, 47 * GRID_W, - _height * GRID_H + _lastPosY + _lastPosH + GRID_H ]; + _statsBoxBackgroundCtrl ctrlSetPositionH (_lastPosY + _lastPosH + GRID_H); + _statsBoxBackgroundCtrl ctrlCommit 0; _statsBoxCtrl ctrlCommit 0; // Move the actions box private _ctrl = _display displayCtrl IDC_actionsBox; private _pos = ctrlPosition _ctrl; - _pos set [1, safeZoneY + (_height + 3.6) * GRID_H]; + _pos set [1, safeZoneY + (_lastPosY + _lastPosH + GRID_H + (3.6 * GRID_H))]; _ctrl ctrlSetPosition _pos; _ctrl ctrlCommit 0; diff --git a/addons/arsenal/ui/RscAttributes.hpp b/addons/arsenal/ui/RscAttributes.hpp index 6ec69223355..b487cffd617 100644 --- a/addons/arsenal/ui/RscAttributes.hpp +++ b/addons/arsenal/ui/RscAttributes.hpp @@ -283,7 +283,7 @@ class GVAR(display) { h = QUOTE(55 * GRID_H); class controls { class statsStaticBackground1: ctrlStaticBackground { - idc = -1; + idc = IDC_statsBoxBackground; x = QUOTE(0); y = QUOTE(0); w = QUOTE(47 * GRID_W); @@ -291,7 +291,7 @@ class GVAR(display) { colorBackground[] = {0.1,0.1,0.1,0.5}; }; class statsStaticBackground2: ctrlStaticBackground { - idc = -1; + idc = IDC_statsBoxTitleBackground; x = QUOTE(0); y = QUOTE(0); w = QUOTE(47 * GRID_W); @@ -316,7 +316,7 @@ class GVAR(display) { x = QUOTE(1 * GRID_W); y = QUOTE(10 * GRID_H); w = QUOTE(45 * GRID_W); - h = QUOTE(4 * GRID_H); + h = QUOTE(5 * GRID_H); colorBackground[] = {1,1,1,0.15}; }; class statsBar1: ctrlProgress { @@ -329,9 +329,9 @@ class GVAR(display) { x = QUOTE(1 * GRID_W); y = QUOTE(10 * GRID_H); w = QUOTE(45 * GRID_W); - h = QUOTE(4 * GRID_H); + h = QUOTE(5 * GRID_H); }; - class statsText1: RscText { + class statsText1: RscTextMulti { idc = IDC_statsText1; shadow = 0; fade = 1; @@ -340,7 +340,7 @@ class GVAR(display) { x = QUOTE(0 * GRID_W); y = QUOTE(10 * GRID_H); w = QUOTE(45 * GRID_W); - h = QUOTE(4 * GRID_H); + h = QUOTE(5 * GRID_H); sizeEx = QUOTE(5 * GRID_H); text = ""; }; @@ -482,7 +482,7 @@ class GVAR(display) { x = QUOTE(1 * GRID_W); y = QUOTE(6 * GRID_H); w = QUOTE(45 * GRID_W); - h = QUOTE(4 * GRID_H); + h = QUOTE(5 * GRID_H); }; class actionsText2: actionsText1 { idc = IDC_actionsText2; diff --git a/docs/wiki/framework/arsenal-framework.md b/docs/wiki/framework/arsenal-framework.md index a02dcdf646a..330e7fa99b1 100644 --- a/docs/wiki/framework/arsenal-framework.md +++ b/docs/wiki/framework/arsenal-framework.md @@ -214,7 +214,7 @@ class ace_arsenal_stats { showBar = 1; // 0 disabled; 1 enabled; showText = 1; // 0 disabled; 1 enabled; barStatement = "1"; // Statement evaluated to set the bar progress, needs to return a NUMBER. - textStatement = "test entry"; // statement evaluated to set the text entry, can return anything. + textStatement = "test entry"; // statement evaluated to set the text entry, can return anything. Arrays will have a linebreak added after each element. condition = "true"; // Condition for the stats to be displayed, default is true if not defined, needs to return a BOOL. tabs[] = { {0,1,2}, { } }; // Arrays of tabs, left array is left tabs, right array is right tabs. }; From 4092dddcbe9543ad689484740ed84be226bff2ea Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Tue, 10 Sep 2024 09:25:36 +0200 Subject: [PATCH 26/95] SPE Compat - Make 50Rnd M1919 & M2 100Rnd belts linkable (#10301) Tweaked SPE belts --- addons/compat_spe/CfgMagazines/csw.hpp | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/addons/compat_spe/CfgMagazines/csw.hpp b/addons/compat_spe/CfgMagazines/csw.hpp index 404156bd8f8..9fa46140899 100644 --- a/addons/compat_spe/CfgMagazines/csw.hpp +++ b/addons/compat_spe/CfgMagazines/csw.hpp @@ -2,43 +2,29 @@ class CA_Magazine; // M1919A4/A6 class SPE_50Rnd_762x63: CA_Magazine { - ACE_isBelt = 0; -}; - -class SPE_100Rnd_762x63: SPE_50Rnd_762x63 { ACE_isBelt = 1; }; -class SPE_100Rnd_762x63_M1: SPE_100Rnd_762x63 { +// M2 +class VehicleMagazine; +class SPE_100Rnd_127x99_M2: VehicleMagazine { ACE_isBelt = 1; }; -class SPE_100Rnd_762x63_M2_AP: SPE_100Rnd_762x63 { - ACE_isBelt = 1; -}; - -//MG34/42 - +// MG34/42 class SPE_50Rnd_792x57: CA_Magazine { ACE_isBelt = 0; }; - -class SPE_50Rnd_792x57_sS: SPE_50Rnd_792x57 { - ACE_isBelt = 0; -}; - -class SPE_50Rnd_792x57_SMK: SPE_50Rnd_792x57_sS { - ACE_isBelt = 0; -}; - class SPE_100Rnd_792x57: SPE_50Rnd_792x57 { ACE_isBelt = 1; }; +class SPE_50Rnd_792x57_sS; class SPE_100Rnd_792x57_sS: SPE_50Rnd_792x57_sS { ACE_isBelt = 1; }; +class SPE_50Rnd_792x57_SMK; class SPE_100Rnd_792x57_SMK: SPE_50Rnd_792x57_SMK { ACE_isBelt = 1; }; From 4abae0fcb53b2a48c8794faeaca20e0e7d6b45f1 Mon Sep 17 00:00:00 2001 From: OverlordZorn <56258612+OverlordZorn@users.noreply.github.com> Date: Wed, 11 Sep 2024 23:43:20 +0200 Subject: [PATCH 27/95] Nightvision - Fixes Exploit with FogScaling (#10299) Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> --- addons/nightvision/functions/fnc_pfeh.sqf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/nightvision/functions/fnc_pfeh.sqf b/addons/nightvision/functions/fnc_pfeh.sqf index dbd101631cd..9d5f6e93bb8 100644 --- a/addons/nightvision/functions/fnc_pfeh.sqf +++ b/addons/nightvision/functions/fnc_pfeh.sqf @@ -163,7 +163,9 @@ if (CBA_missionTime < GVAR(nextEffectsUpdate)) then { }; _fogApply = linearConversion [0, 1, GVAR(priorFog) select 0, (GVAR(fogScaling) * _fogApply), 1]; // mix in old fog if present - GVAR(nvgFog) = [_fogApply, 0, 0]; + GVAR(nvgFog) = fogParams; + GVAR(nvgFog) set [0, _fogApply]; + 0 setFog GVAR(nvgFog) }; From 5d4f1cd1c7f172d0bfab4abfa748930cdc46d375 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 11 Sep 2024 16:43:31 -0500 Subject: [PATCH 28/95] General - Optimize some if statements (#10302) --- addons/common/functions/fnc_claim.sqf | 6 +++--- addons/common/functions/fnc_getDeathAnim.sqf | 6 +++--- .../functions/fnc_getActionOffset.sqf | 8 ++++---- .../functions/fnc_getRemainingWater.sqf | 8 ++++---- .../functions/fnc_applyRotorWashEffect.sqf | 10 +++++----- addons/interact_menu/functions/fnc_keyDown.sqf | 14 +++++++------- .../functions/fnc_renderActionPoints.sqf | 15 ++++++++------- addons/laser/XEH_postInit.sqf | 6 +++--- .../medical_engine/functions/fnc_handleDamage.sqf | 10 +++++----- .../functions/fnc_showApplicationPage.sqf | 2 +- addons/missileguidance/functions/fnc_checkLos.sqf | 6 +++--- .../functions/fnc_seekerType_SACLOS.sqf | 8 ++++---- addons/nametags/functions/fnc_drawNameTagIcon.sqf | 6 +++--- addons/nametags/functions/fnc_onDraw3d.sqf | 6 +++--- .../functions/fnc_addFreeSeatsActions.sqf | 8 ++++---- .../fnc_calculateZeroAngleCorrection.sqf | 6 +++--- addons/spectator/functions/fnc_cam_tick.sqf | 6 +++--- .../functions/fnc_handleVehicleDamage.sqf | 6 +++--- addons/volume/XEH_postInitClient.sqf | 6 +++--- 19 files changed, 72 insertions(+), 71 deletions(-) diff --git a/addons/common/functions/fnc_claim.sqf b/addons/common/functions/fnc_claim.sqf index 997d54f33b8..170c2c6a8f3 100644 --- a/addons/common/functions/fnc_claim.sqf +++ b/addons/common/functions/fnc_claim.sqf @@ -30,10 +30,10 @@ _target setVariable [QGVAR(owner), _unit, true]; // lock target object if (_lockTarget) then { - if (!isNull _unit) then { - [QGVAR(lockVehicle), _target, _target] call CBA_fnc_targetEvent; - } else { + if (isNull _unit) then { [QGVAR(unlockVehicle), _target, _target] call CBA_fnc_targetEvent; + } else { + [QGVAR(lockVehicle), _target, _target] call CBA_fnc_targetEvent; }; }; diff --git a/addons/common/functions/fnc_getDeathAnim.sqf b/addons/common/functions/fnc_getDeathAnim.sqf index 18c6c93c074..4e0b0578729 100644 --- a/addons/common/functions/fnc_getDeathAnim.sqf +++ b/addons/common/functions/fnc_getDeathAnim.sqf @@ -29,7 +29,9 @@ private _unitActionsCfg = configFile >> "CfgMovesBasic" >> "Actions" >> getText TRACE_2("Animation/Action",configName _unitAnimationCfg,configName _unitActionsCfg); -if (!isNull objectParent _unit) then { +if (isNull objectParent _unit) then { + _returnAnimation = getText (_unitActionsCfg >> "die"); +} else { private _interpolateArray = getArray (_unitAnimationCfg >> "interpolateTo"); for "_index" from 0 to (count _interpolateArray - 1) step 2 do { @@ -42,8 +44,6 @@ if (!isNull objectParent _unit) then { _returnAnimation = _indexAnimation; }; }; -} else { - _returnAnimation = getText (_unitActionsCfg >> "die"); }; //Fallback if nothing valid found: diff --git a/addons/field_rations/functions/fnc_getActionOffset.sqf b/addons/field_rations/functions/fnc_getActionOffset.sqf index dd7658dfda1..763654c6559 100644 --- a/addons/field_rations/functions/fnc_getActionOffset.sqf +++ b/addons/field_rations/functions/fnc_getActionOffset.sqf @@ -18,11 +18,11 @@ params ["_object"]; private _configOf = configOf _object; -if !(isNull _configOf) then { +if (isNull _configOf) then { + // Check for offset corresponding to p3d list + GVAR(waterSourceOffsets) param [GVAR(waterSourceP3ds) find (getModelInfo _object select 0), [0, 0, 0], [[]]]; +} else { // Check for offset in config since we have valid typeOf private _offset = getArray (_configOf >> QXGVAR(offset)); if (_offset isEqualTo []) then {[0, 0, 0]} else {_offset}; -} else { - // Check for offset corresponding to p3d list - GVAR(waterSourceOffsets) param [GVAR(waterSourceP3ds) find (getModelInfo _object select 0), [0, 0, 0], [[]]]; }; diff --git a/addons/field_rations/functions/fnc_getRemainingWater.sqf b/addons/field_rations/functions/fnc_getRemainingWater.sqf index 253fd62285d..1011136e0ce 100644 --- a/addons/field_rations/functions/fnc_getRemainingWater.sqf +++ b/addons/field_rations/functions/fnc_getRemainingWater.sqf @@ -23,7 +23,10 @@ private _water = _source getVariable QGVAR(currentWaterSupply); if (isNil "_water") then { private _configOf = configOf _source; - if !(isNull _configOf) then { + if (isNull _configOf) then { + // Check the p3d name against list + _water = if ((getModelInfo _source select 0) in GVAR(waterSourceP3ds)) then {REFILL_WATER_INFINITE} else {REFILL_WATER_DISABLED}; + } else { // Check for waterSupply entry since we have valid typeOf _water = getNumber (_configOf >> QXGVAR(waterSupply)); if (_water == 0) then {_water = REFILL_WATER_DISABLED}; @@ -35,9 +38,6 @@ if (isNil "_water") then { _source setVariable [QGVAR(currentWaterSupply), _water, true]; }; }; - } else { - // Check the p3d name against list - _water = if ((getModelInfo _source select 0) in GVAR(waterSourceP3ds)) then {REFILL_WATER_INFINITE} else {REFILL_WATER_DISABLED}; }; }; diff --git a/addons/goggles/functions/fnc_applyRotorWashEffect.sqf b/addons/goggles/functions/fnc_applyRotorWashEffect.sqf index 341adcecdde..5a77a16ce91 100644 --- a/addons/goggles/functions/fnc_applyRotorWashEffect.sqf +++ b/addons/goggles/functions/fnc_applyRotorWashEffect.sqf @@ -64,14 +64,14 @@ if !(_safe) then { if !([_unit] call FUNC(isGogglesVisible)) exitWith {}; if (GETDUSTT(DAMOUNT) < 2) then { - if !(GETDUSTT(DACTIVE)) then { - SETDUST(DACTIVE,true); - - call FUNC(applyDustEffect); - } else { + if (GETDUSTT(DACTIVE)) then { if (_rotorWash select 1 > 0.5) then { call FUNC(applyDustEffect); }; + } else { + SETDUST(DACTIVE,true); + + call FUNC(applyDustEffect); }; }; diff --git a/addons/interact_menu/functions/fnc_keyDown.sqf b/addons/interact_menu/functions/fnc_keyDown.sqf index 2d15715b953..d87f6cfa3ba 100644 --- a/addons/interact_menu/functions/fnc_keyDown.sqf +++ b/addons/interact_menu/functions/fnc_keyDown.sqf @@ -116,13 +116,7 @@ GVAR(selfMenuOffset) = (AGLToASL (positionCameraToWorld [0, 0, 2])) vectorDiff ( //Auto expand the first level when self, mounted vehicle or zeus (skips the first animation as there is only one choice) if (GVAR(openedMenuType) == 0) then { if (isNull curatorCamera) then { - if !(isNull (ACE_controlledUAV select 0)) then { - GVAR(menuDepthPath) = [["ACE_SelfActions", (ACE_controlledUAV select 0)]]; - GVAR(expanded) = true; - GVAR(expandedTime) = diag_tickTime; - GVAR(lastPath) = +GVAR(menuDepthPath); - GVAR(startHoverTime) = -1000; - } else { + if (isNull (ACE_controlledUAV select 0)) then { if (vehicle ACE_player != ACE_player) then { GVAR(menuDepthPath) = [["ACE_SelfActions", (vehicle ACE_player)]]; GVAR(expanded) = true; @@ -130,6 +124,12 @@ if (GVAR(openedMenuType) == 0) then { GVAR(lastPath) = +GVAR(menuDepthPath); GVAR(startHoverTime) = -1000; }; + } else { + GVAR(menuDepthPath) = [["ACE_SelfActions", (ACE_controlledUAV select 0)]]; + GVAR(expanded) = true; + GVAR(expandedTime) = diag_tickTime; + GVAR(lastPath) = +GVAR(menuDepthPath); + GVAR(startHoverTime) = -1000; }; } else { GVAR(menuDepthPath) = [["ACE_ZeusActions", (getAssignedCuratorLogic player)]]; diff --git a/addons/interact_menu/functions/fnc_renderActionPoints.sqf b/addons/interact_menu/functions/fnc_renderActionPoints.sqf index 492f8b73c9a..502e4de6f94 100644 --- a/addons/interact_menu/functions/fnc_renderActionPoints.sqf +++ b/addons/interact_menu/functions/fnc_renderActionPoints.sqf @@ -97,11 +97,11 @@ private _fnc_renderSelfActions = { // Iterate through base level class actions and render them if appropiate private _classActions = GVAR(ActSelfNamespace) get typeOf _target; - private _pos = if !(GVAR(useCursorMenu)) then { + private _pos = if (GVAR(useCursorMenu)) then { + [0.5, 0.5] + } else { //Convert to ASL, add offset and then convert back to AGL (handles waves when over water) ASLToAGL ((AGLToASL (positionCameraToWorld [0, 0, 0])) vectorAdd GVAR(selfMenuOffset)); - } else { - [0.5, 0.5] }; { @@ -123,10 +123,7 @@ GVAR(collectedActionPoints) resize 0; // Render nearby actions, unit self actions or vehicle self actions as appropiate if (GVAR(openedMenuType) == 0) then { if (isNull curatorCamera) then { - if !(isNull (ACE_controlledUAV select 0)) then { - // Render UAV self actions when in control of UAV AI - (ACE_controlledUAV select 0) call _fnc_renderSelfActions; - } else { + if (isNull (ACE_controlledUAV select 0)) then { if (vehicle ACE_player == ACE_player) then { if (diag_tickTime > GVAR(lastTimeSearchedActions) + 0.20) then { // Once every 0.2 secs, collect nearby objects active and visible action points and render them @@ -139,6 +136,10 @@ if (GVAR(openedMenuType) == 0) then { // Render vehicle self actions when in vehicle (vehicle ACE_player) call _fnc_renderSelfActions; }; + } else { + // Render UAV self actions when in control of UAV AI + (ACE_controlledUAV select 0) call _fnc_renderSelfActions; + }; } else { // Render zeus actions when zeus open diff --git a/addons/laser/XEH_postInit.sqf b/addons/laser/XEH_postInit.sqf index 768752bee2e..eb4cb247ed7 100644 --- a/addons/laser/XEH_postInit.sqf +++ b/addons/laser/XEH_postInit.sqf @@ -21,10 +21,10 @@ if (hasInterface) then { ["ACE_controlledUAV", { params ["_UAV", "_seatAI", "_turret", "_position"]; TRACE_4("ACE_controlledUAV EH",_UAV,_seatAI,_turret,_position); - if (!isNull _seatAI) then { - [_seatAI] call FUNC(showVehicleHud); - } else { + if (isNull _seatAI) then { [ace_player] call FUNC(showVehicleHud); + } else { + [_seatAI] call FUNC(showVehicleHud); }; }] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler; diff --git a/addons/medical_engine/functions/fnc_handleDamage.sqf b/addons/medical_engine/functions/fnc_handleDamage.sqf index 95e48fcc3e4..591e68e2533 100644 --- a/addons/medical_engine/functions/fnc_handleDamage.sqf +++ b/addons/medical_engine/functions/fnc_handleDamage.sqf @@ -165,7 +165,11 @@ if (_context == 2) then { if (_environmentDamage) then { // Any collision with terrain/vehicle/object has a shooter // Check this first because burning can happen at any velocity - if !(isNull _shooter) then { + if (isNull _shooter) then { + // Anything else is almost guaranteed to be fire damage + _ammo = "fire"; + TRACE_5("Fire Damage",_unit,_shooter,_instigator,_damage,_allDamages); + } else { /* If shooter != unit then they hit unit, otherwise it could be: - Unit hitting anything at speed @@ -180,10 +184,6 @@ if (_context == 2) then { _ammo = "collision"; TRACE_5("Collision",_unit,_shooter,_instigator,_damage,_allDamages); }; - } else { - // Anything else is almost guaranteed to be fire damage - _ammo = "fire"; - TRACE_5("Fire Damage",_unit,_shooter,_instigator,_damage,_allDamages); }; }; diff --git a/addons/microdagr/functions/fnc_showApplicationPage.sqf b/addons/microdagr/functions/fnc_showApplicationPage.sqf index 75f817ad3f3..e150bf2261a 100644 --- a/addons/microdagr/functions/fnc_showApplicationPage.sqf +++ b/addons/microdagr/functions/fnc_showApplicationPage.sqf @@ -57,7 +57,7 @@ if (GVAR(currentApplicationPage) == APP_MODE_INFODISPLAY) then { (_display displayCtrl IDC_MAPDETAILS) ctrlShow ((GVAR(currentApplicationPage) == APP_MODE_MAP) && {GVAR(mapShowTexture)}); if (GVAR(currentApplicationPage) == APP_MODE_MAP) then { - _theMap = if (!GVAR(mapShowTexture)) then {_display displayCtrl IDC_MAPPLAIN} else {_display displayCtrl IDC_MAPDETAILS}; + _theMap = if (GVAR(mapShowTexture)) then {_display displayCtrl IDC_MAPDETAILS} else {_display displayCtrl IDC_MAPPLAIN}; _mapSize = (ctrlPosition _theMap) select 3; _theMap ctrlMapAnimAdd [0, (GVAR(mapZoom) / _mapSize), GVAR(mapPosition)]; ctrlMapAnimCommit _theMap; diff --git a/addons/missileguidance/functions/fnc_checkLos.sqf b/addons/missileguidance/functions/fnc_checkLos.sqf index 242b595ab8f..152c7c24074 100644 --- a/addons/missileguidance/functions/fnc_checkLos.sqf +++ b/addons/missileguidance/functions/fnc_checkLos.sqf @@ -34,12 +34,12 @@ private _targetAimPos = aimPos _target; private _seekerPos = getPosASL _seeker; private _return = true; -if (!((terrainIntersectASL [_seekerPos, _targetPos]) && {terrainIntersectASL [_seekerPos, _targetAimPos]})) then { +if ((terrainIntersectASL [_seekerPos, _targetPos]) && {terrainIntersectASL [_seekerPos, _targetAimPos]}) then { + _return = false; +} else { if (lineIntersects [_seekerPos, _targetPos, _seeker, _target]) then { _return = false; }; -} else { - _return = false; }; _return diff --git a/addons/missileguidance/functions/fnc_seekerType_SACLOS.sqf b/addons/missileguidance/functions/fnc_seekerType_SACLOS.sqf index 1641ff4a7df..d9fd444043f 100644 --- a/addons/missileguidance/functions/fnc_seekerType_SACLOS.sqf +++ b/addons/missileguidance/functions/fnc_seekerType_SACLOS.sqf @@ -25,7 +25,10 @@ _seekerStateParams params ["_memoryPointGunnerOptics", "_animationSourceBody", " private _shooterPos = AGLToASL (_shooter modelToWorldVisual (_shooter selectionPosition _memoryPointGunnerOptics)); private _projPos = getPosASL _projectile; -private _lookDirection = if !(_shooter isKindOf "CAManBase" || {_shooter isKindOf "StaticWeapon"}) then { +private _lookDirection = if (_shooter isKindOf "CAManBase" || {_shooter isKindOf "StaticWeapon"}) then { + _shooterPos = eyePos _shooter; + _shooter weaponDirection _weapon +} else { private _finalLookDirection = if (_usePilotCamera) then { _shooterPos = _shooter modelToWorldVisualWorld getPilotCameraPosition _shooter; private _trackingTarget = getPilotCameraTarget _shooter; @@ -43,9 +46,6 @@ private _lookDirection = if !(_shooter isKindOf "CAManBase" || {_shooter isKindO _shooter vectorModelToWorldVisual ([1, _gBody, _gGun] call CBA_fnc_polar2vect); }; _finalLookDirection -} else { - _shooterPos = eyePos _shooter; - _shooter weaponDirection _weapon }; private _distanceToProj = _shooterPos vectorDistance _projPos; diff --git a/addons/nametags/functions/fnc_drawNameTagIcon.sqf b/addons/nametags/functions/fnc_drawNameTagIcon.sqf index efe0c6bf157..26ef2584ead 100644 --- a/addons/nametags/functions/fnc_drawNameTagIcon.sqf +++ b/addons/nametags/functions/fnc_drawNameTagIcon.sqf @@ -44,11 +44,11 @@ _fnc_parameters = { private _targetFaction = _target getVariable [QGVAR(faction), faction _target]; private _customRankIcons = GVAR(factionRanks) get _targetFaction; - if (!isNil "_customRankIcons") then { - _customRankIcons param [ALL_RANKS find rank _target, ""] // return - } else { + if (isNil "_customRankIcons") then { // default rank icons format ["\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa", rank _target] // return + } else { + _customRankIcons param [ALL_RANKS find rank _target, ""] // return }; }; }; diff --git a/addons/nametags/functions/fnc_onDraw3d.sqf b/addons/nametags/functions/fnc_onDraw3d.sqf index 4fbbc7ee1c7..e169eb72692 100644 --- a/addons/nametags/functions/fnc_onDraw3d.sqf +++ b/addons/nametags/functions/fnc_onDraw3d.sqf @@ -44,10 +44,10 @@ if (_enabledTagsCursor) then { private _target = cursorTarget; if !(_target isKindOf "CAManBase") then { // When cursorTarget is on a vehicle show the nametag for the commander. - if !(_target in allUnitsUAV) then { - _target = effectiveCommander _target; - } else { + if (_target in allUnitsUAV) then { _target = objNull; + } else { + _target = effectiveCommander _target; }; }; if (isNull _target) exitWith {}; diff --git a/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf b/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf index 0a3a7a2dc1a..efb40d2ac1a 100644 --- a/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf +++ b/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf @@ -202,15 +202,15 @@ private _cargoNumber = -1; if (_vehicle lockedTurret _turretPath) then {breakTo "crewLoop"}; if (_role == "gunner" && {unitIsUAV _vehicle}) then {breakTo "crewLoop"}; private _turretConfig = [_vehicleConfig, _turretPath] call CBA_fnc_getTurret; - if (!_isInVehicle) then { - _params = ["GetInTurret", _vehicle, _turretPath]; - _statement = {_player action (_this select 2)}; - } else { + if (_isInVehicle) then { private _gunnerCompartments = (_turretConfig >> "gunnerCompartments") call BIS_fnc_getCfgData; TO_COMPARTMENT_STRING(_gunnerCompartments); if (_compartment != _gunnerCompartments) then {breakTo "crewLoop"}; _params = [{MOVE_IN_CODE(moveInTurret)}, [_vehicle, _turretPath], _currentTurret, _moveBackCode, _moveBackParams]; _statement = _fnc_move; + } else { + _params = ["GetInTurret", _vehicle, _turretPath]; + _statement = {_player action (_this select 2)}; }; _name = getText (_turretConfig >> "gunnerName"); _icon = switch true do { diff --git a/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf b/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf index ed1222e3bbc..670a119f839 100644 --- a/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf +++ b/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf @@ -42,9 +42,7 @@ private _vanillaZero = parseNumber (("ace" callExtension ["ballistics:replicate_ _vanillaZero = 0; #endif -private _trueZero = if (!_advancedBallistics) then { - parseNumber (("ace" callExtension ["ballistics:zero_vanilla", [_newZeroRange, _initSpeed, _airFriction, _boreHeight]]) select 0) -} else { +private _trueZero = if (_advancedBallistics) then { // Get Weapon and Ammo Configurations private _AmmoCacheEntry = uiNamespace getVariable format[QEGVAR(advanced_ballistics,%1), _ammo]; if (isNil "_AmmoCacheEntry") then { @@ -81,6 +79,8 @@ private _trueZero = if (!_advancedBallistics) then { _atmosphereModel ]]) select 0 ) +} else { + parseNumber (("ace" callExtension ["ballistics:zero_vanilla", [_newZeroRange, _initSpeed, _airFriction, _boreHeight]]) select 0) }; private _zeroAngleCorrection = _trueZero - _vanillaZero; diff --git a/addons/spectator/functions/fnc_cam_tick.sqf b/addons/spectator/functions/fnc_cam_tick.sqf index 1e7e1b99137..11f257b7d5a 100644 --- a/addons/spectator/functions/fnc_cam_tick.sqf +++ b/addons/spectator/functions/fnc_cam_tick.sqf @@ -58,7 +58,9 @@ if (_cameraMode != MODE_FREE) then { _camTarget = GVAR(camFocus); // Focus get in / out of vehicle state -if !(isNull _camTarget) then { +if (isNull _camTarget) then { + GVAR(camTargetInVehicle) = false; +} else { private _targetInVeh = GVAR(camTargetInVehicle); if (GVAR(camHasTarget)) then { @@ -72,8 +74,6 @@ if !(isNull _camTarget) then { GVAR(camTargetInVehicle) = false; }; }; -} else { - GVAR(camTargetInVehicle) = false; }; // Camera lights diff --git a/addons/vehicle_damage/functions/fnc_handleVehicleDamage.sqf b/addons/vehicle_damage/functions/fnc_handleVehicleDamage.sqf index 4654b616d06..b0540de484f 100644 --- a/addons/vehicle_damage/functions/fnc_handleVehicleDamage.sqf +++ b/addons/vehicle_damage/functions/fnc_handleVehicleDamage.sqf @@ -75,14 +75,14 @@ if (isNil "_multHit") then { _ignoreHit = true; } else { // If the hitpoint isnt in the old array then that means that the time expired and a new array should be generated - if (!_hitPointInOldArray) then { + if (_hitPointInOldArray) then { + _vehicle setVariable [QGVAR(hitTime), [CBA_missionTime, _source, [_hitPoint]]]; + } else { private _oldHitPoints = _multHit select 2; _oldHitPoints pushBack _hitPoint; _vehicle setVariable [QGVAR(hitTime), [CBA_missionTime, _source, _oldHitPoints]]; _ignoreBailCheck = true; - } else { - _vehicle setVariable [QGVAR(hitTime), [CBA_missionTime, _source, [_hitPoint]]]; }; }; }; diff --git a/addons/volume/XEH_postInitClient.sqf b/addons/volume/XEH_postInitClient.sqf index 896bb718f8d..ae774f2f51d 100644 --- a/addons/volume/XEH_postInitClient.sqf +++ b/addons/volume/XEH_postInitClient.sqf @@ -23,10 +23,10 @@ if (!hasInterface) exitWith {}; if (!XGVAR(lowerInVehicles)) exitWith {}; - if (!isNull objectParent _unit) then { - call FUNC(lowerVolume); - } else { + if (isNull objectParent _unit) then { call FUNC(restoreVolume); + } else { + call FUNC(lowerVolume); }; }] call CBA_fnc_addPlayerEventHandler; From 07f10b976a73bd23b52e7c87229bf28d70f18f5f Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Wed, 11 Sep 2024 23:43:50 +0200 Subject: [PATCH 29/95] Medical Engine - Fix limping not applying with open wounds (#10307) --- addons/medical_engine/functions/fnc_updateDamageEffects.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/medical_engine/functions/fnc_updateDamageEffects.sqf b/addons/medical_engine/functions/fnc_updateDamageEffects.sqf index 7dc73e04f47..f4a18094a60 100644 --- a/addons/medical_engine/functions/fnc_updateDamageEffects.sqf +++ b/addons/medical_engine/functions/fnc_updateDamageEffects.sqf @@ -67,7 +67,7 @@ if (!_isLimping && {EGVAR(medical,limping) > 0}) then { (_xAmountOf > 0) && {_xDamage > LIMPING_DAMAGE_THRESHOLD} // select _causeLimping from woundDetails - && {(EGVAR(medical_damage,woundDetails) get (_xClassID / 10)) select 3} + && {(EGVAR(medical_damage,woundDetails) get (floor (_xClassID / 10))) select 3} ) exitWith { TRACE_1("limping because of wound",_x); _isLimping = true; From 39ad959ad545c4098a2060eb1a3e39f3c1195815 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Wed, 11 Sep 2024 23:46:07 +0200 Subject: [PATCH 30/95] CSW - Take individual components into account for disassembly (#10300) --- addons/csw/functions/fnc_assemble_deployWeapon.sqf | 11 ++++++----- addons/csw/functions/fnc_assemble_pickupWeapon.sqf | 10 +++++++--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/addons/csw/functions/fnc_assemble_deployWeapon.sqf b/addons/csw/functions/fnc_assemble_deployWeapon.sqf index f852a1954af..a0cdc102ca8 100644 --- a/addons/csw/functions/fnc_assemble_deployWeapon.sqf +++ b/addons/csw/functions/fnc_assemble_deployWeapon.sqf @@ -49,7 +49,7 @@ private _onFinish = { params ["_args"]; - _args params ["_tripod", "_player", "_assembledClassname", "", "_carryWeaponInfo"]; + _args params ["_tripod", "_player", "_assembledClassname", "_tripodClassname", "_carryWeaponClassname", "_carryWeaponInfo"]; TRACE_3("deployWeapon finish",_tripod,_player,_assembledClassname); private _secondaryWeaponMagazines = _tripod getVariable [QGVAR(secondaryWeaponMagazines), []]; @@ -61,10 +61,11 @@ _tripodPos set [2, (_tripodPos select 2) + 0.1]; // Delay a frame so tripod has a chance to be deleted [{ - params ["_assembledClassname", "_tripodDir", "_tripodPos", "_player", "_carryWeaponInfo", "_secondaryWeaponMagazines"]; + params ["_assembledClassname", "_componentClasses", "_tripodDir", "_tripodPos", "_player", "_carryWeaponInfo", "_secondaryWeaponMagazines"]; private _csw = createVehicle [_assembledClassname, [0, 0, 0], [], 0, "NONE"]; // Assembly mode: [0=disabled, 1=enabled, 2=enabled&unload, 3=default] _csw setVariable [QGVAR(assemblyMode), 2, true]; // Explicitly set advanced assembly mode + unload, and broadcast + _csw setVariable [QGVAR(componentClasses), _componentClasses, true]; { // Magazines @@ -91,12 +92,12 @@ }; [QGVAR(deployWeaponSucceeded), [_csw]] call CBA_fnc_localEvent; TRACE_2("csw placed",_csw,_assembledClassname); - }, [_assembledClassname, _tripodDir, _tripodPos, _player, _carryWeaponInfo, _secondaryWeaponMagazines]] call CBA_fnc_execNextFrame; + }, [_assembledClassname, [_tripodClassname, _carryWeaponClassname], _tripodDir, _tripodPos, _player, _carryWeaponInfo, _secondaryWeaponMagazines]] call CBA_fnc_execNextFrame; }; private _onFailure = { params ["_args"]; - _args params ["", "_player", "", "_carryWeaponClassname", "_carryWeaponInfo"]; + _args params ["", "_player", "", "", "_carryWeaponClassname", "_carryWeaponInfo"]; TRACE_2("deployWeapon failure",_player,_carryWeaponClassname); // Add weapon back @@ -115,5 +116,5 @@ alive _tripod }; - [TIME_PROGRESSBAR(_deployTime), [_tripod, _player, _assembledClassname, _carryWeaponClassname, _carryWeaponInfo], _onFinish, _onFailure, LLSTRING(AssembleCSW_progressBar), _condition] call EFUNC(common,progressBar); + [TIME_PROGRESSBAR(_deployTime), [_tripod, _player, _assembledClassname, _tripodClassname, _carryWeaponClassname, _carryWeaponInfo], _onFinish, _onFailure, LLSTRING(AssembleCSW_progressBar), _condition] call EFUNC(common,progressBar); }, _this] call CBA_fnc_execNextFrame; diff --git a/addons/csw/functions/fnc_assemble_pickupWeapon.sqf b/addons/csw/functions/fnc_assemble_pickupWeapon.sqf index 867c151d278..023143710b6 100644 --- a/addons/csw/functions/fnc_assemble_pickupWeapon.sqf +++ b/addons/csw/functions/fnc_assemble_pickupWeapon.sqf @@ -21,14 +21,18 @@ TRACE_2("assemble_pickupWeapon",_vehicle,_player); private _weaponConfig = configOf _vehicle >> QUOTE(ADDON); - private _carryWeaponClassname = getText (_weaponConfig >> "disassembleWeapon"); + private _componentClasses = _vehicle getVariable QGVAR(componentClasses); + + (if (!isNil "_componentClasses") then { + _componentClasses + } else { + [getText (_weaponConfig >> "disassembleTurret"), getText (_weaponConfig >> "disassembleWeapon")] + }) params ["_turretClassname", "_carryWeaponClassname"]; if (!isClass (configFile >> "CfgWeapons" >> _carryWeaponClassname)) exitWith { ERROR_1("bad weapon classname [%1]",_carryWeaponClassname); }; - private _turretClassname = getText (_weaponConfig >> "disassembleTurret"); - // Turret classname can equal nothing if the deploy bag is the "whole" weapon. e.g Kornet, Metis, other ATGMs if ((_turretClassname != "") && {!isClass (configFile >> "CfgVehicles" >> _turretClassname)}) exitWith { ERROR_1("bad turret classname [%1]",_turretClassname); From 0f756dc18a2c161e08de5445156a8deffe191fbf Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Wed, 11 Sep 2024 23:46:37 +0200 Subject: [PATCH 31/95] SPE Compat - Make all German belts linkable (#10305) --- addons/compat_spe/CfgMagazines/csw.hpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/addons/compat_spe/CfgMagazines/csw.hpp b/addons/compat_spe/CfgMagazines/csw.hpp index 9fa46140899..6b4c385a42a 100644 --- a/addons/compat_spe/CfgMagazines/csw.hpp +++ b/addons/compat_spe/CfgMagazines/csw.hpp @@ -13,18 +13,5 @@ class SPE_100Rnd_127x99_M2: VehicleMagazine { // MG34/42 class SPE_50Rnd_792x57: CA_Magazine { - ACE_isBelt = 0; -}; -class SPE_100Rnd_792x57: SPE_50Rnd_792x57 { - ACE_isBelt = 1; -}; - -class SPE_50Rnd_792x57_sS; -class SPE_100Rnd_792x57_sS: SPE_50Rnd_792x57_sS { - ACE_isBelt = 1; -}; - -class SPE_50Rnd_792x57_SMK; -class SPE_100Rnd_792x57_SMK: SPE_50Rnd_792x57_SMK { ACE_isBelt = 1; }; From c5935dc843d04718e94b975f699f53afe9210bdb Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Wed, 11 Sep 2024 23:49:22 +0200 Subject: [PATCH 32/95] CSW - Rework settings (#9901) --- addons/csw/XEH_postInit.sqf | 24 +++++++++--- addons/csw/functions/fnc_ai_handleFired.sqf | 2 + addons/csw/functions/fnc_ai_handleGetIn.sqf | 2 + addons/csw/functions/fnc_initVehicle.sqf | 12 +++++- addons/csw/initSettings.inc.sqf | 43 ++++++++++----------- 5 files changed, 53 insertions(+), 30 deletions(-) diff --git a/addons/csw/XEH_postInit.sqf b/addons/csw/XEH_postInit.sqf index 87196f33772..419e7013809 100644 --- a/addons/csw/XEH_postInit.sqf +++ b/addons/csw/XEH_postInit.sqf @@ -8,18 +8,32 @@ GVAR(vehicleMagCache) = createHashMap; // needs a small delay for network syncing, or we end up with duplicate mags with ammo handling [LINKFUNC(initVehicle), _this, 1] call CBA_fnc_waitAndExecute; }, true, [], true] call CBA_fnc_addClassEventHandler; - - GVAR(quickmountEnabled) = ( - missionNamespace getVariable [QEGVAR(quickmount,enabled), false] && - {(missionNamespace getVariable [QEGVAR(quickmount,enableMenu), -1]) in [1,3]} - ); }] call CBA_fnc_addEventHandler; +// Also triggered at mission start ["CBA_SettingChanged", { GVAR(quickmountEnabled) = ( missionNamespace getVariable [QEGVAR(quickmount,enabled), false] && {(missionNamespace getVariable [QEGVAR(quickmount,enableMenu), -1]) in [1,3]} ); + + // Do not allow no ammo handling when advanced assembly is enabled + // Reason: When using advanced assembly, the amount of ammo is not stored anywhere, so when you reassemble a static, it will spawn full ammo + if (GVAR(defaultAssemblyMode) && GVAR(ammoHandling) == 0) then { + if (isServer) then { + [QGVAR(ammoHandling), 2, 2, "server"] call CBA_settings_fnc_set; + }; + + // Notify everyone about change + [QEGVAR(common,displayTextStructured), [composeText [ + lineBreak, + parseText format [ + "%1", format ["%1 requires %2 to be set higher than 0.", QGVAR(defaultAssemblyMode), QGVAR(ammoHandling)] + ], + lineBreak, + parseText format ["%1", "No mission restart is required."] + ], 4]] call CBA_fnc_localEvent; + }; }] call CBA_fnc_addEventHandler; // Event handlers: diff --git a/addons/csw/functions/fnc_ai_handleFired.sqf b/addons/csw/functions/fnc_ai_handleFired.sqf index 6f7a6452579..4a6615f4043 100644 --- a/addons/csw/functions/fnc_ai_handleFired.sqf +++ b/addons/csw/functions/fnc_ai_handleFired.sqf @@ -12,6 +12,8 @@ * Public: No */ +if (GVAR(ammoHandling) != 2) exitWith {}; + params ["_vehicle", "_weapon", "", "", "", "_magazine", "", "_gunner"]; TRACE_4("firedEH:",_vehicle,_weapon,_magazine,_gunner); diff --git a/addons/csw/functions/fnc_ai_handleGetIn.sqf b/addons/csw/functions/fnc_ai_handleGetIn.sqf index 14b4453f530..bbbddaf537f 100644 --- a/addons/csw/functions/fnc_ai_handleGetIn.sqf +++ b/addons/csw/functions/fnc_ai_handleGetIn.sqf @@ -12,6 +12,8 @@ * Public: No */ +if (GVAR(ammoHandling) != 2) exitWith {}; + params ["_vehicle", "", "_gunner"]; TRACE_2("getInEH:",_vehicle,_gunner); diff --git a/addons/csw/functions/fnc_initVehicle.sqf b/addons/csw/functions/fnc_initVehicle.sqf index bde31b41d06..f9cd10dbb1c 100644 --- a/addons/csw/functions/fnc_initVehicle.sqf +++ b/addons/csw/functions/fnc_initVehicle.sqf @@ -97,9 +97,17 @@ if (hasInterface && {!(_typeOf in GVAR(initializedStaticTypes))}) then { }; if (["ace_reload"] call EFUNC(common,isModLoaded)) then { - // move reload's check ammo action to the ammo handling point (remove and re-add) [_typeOf, 0, ["ACE_MainActions", QEGVAR(reload,CheckAmmo)]] call EFUNC(interact_menu,removeActionFromClass); - private _checkAmmoAction = [QGVAR(checkAmmo), LELSTRING(reload,checkAmmo), "", EFUNC(reload,checkAmmo), EFUNC(reload,canCheckAmmo)] call EFUNC(interact_menu,createAction); + + // Replace existing check ammo interaction with one that takes into account if the magazine actions are available + private _checkAmmoAction = [QEGVAR(reload,CheckAmmo), LELSTRING(reload,checkAmmo), "", EFUNC(reload,checkAmmo), { + if !((GVAR(ammoHandling) == 0) && {!([false, true, true, GVAR(defaultAssemblyMode)] select (_target getVariable [QGVAR(assemblyMode), 3]))}) exitWith { false }; + _this call EFUNC(reload,canCheckAmmo) + }] call ace_interact_menu_fnc_createAction; + [_typeOf, 0, ["ACE_MainActions"], _checkAmmoAction] call EFUNC(interact_menu,addActionToClass); + + // Add another check ammo action to the ammo handling point + _checkAmmoAction = [QGVAR(checkAmmo), LELSTRING(reload,checkAmmo), "", EFUNC(reload,checkAmmo), EFUNC(reload,canCheckAmmo)] call EFUNC(interact_menu,createAction); [_typeOf, 0, _ammoActionPath, _checkAmmoAction] call EFUNC(interact_menu,addActionToClass); }; }; diff --git a/addons/csw/initSettings.inc.sqf b/addons/csw/initSettings.inc.sqf index bc157e1164b..4a58ed80b03 100644 --- a/addons/csw/initSettings.inc.sqf +++ b/addons/csw/initSettings.inc.sqf @@ -1,56 +1,53 @@ -private _categoryArray = [format ["ACE %1", localize LSTRING(DisplayName)]]; +private _categoryArray = [format ["ACE %1", LLSTRING(DisplayName)]]; [ - QGVAR(defaultAssemblyMode), "CHECKBOX", + QGVAR(defaultAssemblyMode), + "CHECKBOX", [LSTRING(defaultAssemblyMode_displayName), LSTRING(defaultAssemblyMode_description)], _categoryArray, false, // default value - true, // isGlobal - {[QGVAR(defaultAssemblyMode), _this] call EFUNC(common,cbaSettings_settingChanged)}, - true // Needs mission restart + 1 // isGlobal ] call CBA_fnc_addSetting; [ - QGVAR(handleExtraMagazines), "CHECKBOX", + QGVAR(handleExtraMagazines), + "CHECKBOX", [LSTRING(handleExtraMagazines_displayName), LSTRING(handleExtraMagazines_description)], _categoryArray, true, // default value - true, // isGlobal - {[QGVAR(handleExtraMagazines), _this] call EFUNC(common,cbaSettings_settingChanged)}, - true // Needs mission restart + 1 // isGlobal ] call CBA_fnc_addSetting; [ - QGVAR(handleExtraMagazinesType), "LIST", + QGVAR(handleExtraMagazinesType), + "LIST", [LSTRING(handleExtraMagazinesType_displayName), LSTRING(handleExtraMagazinesType_description)], _categoryArray, [[0, 1], [LSTRING(handleExtraMagazinesType_weaponHolder), LSTRING(handleExtraMagazinesType_ammoBox)], 0], - true, // isGlobal - {[QGVAR(handleExtraMagazinesType), _this] call EFUNC(common,cbaSettings_settingChanged)}, - true // Needs mission restart + 1 // isGlobal ] call CBA_fnc_addSetting; [ - QGVAR(ammoHandling), "LIST", + QGVAR(ammoHandling), + "LIST", [LSTRING(ammoHandling_displayName), LSTRING(ammoHandling_description)], _categoryArray, [[0, 1, 2], [LELSTRING(common,Disabled), LELSTRING(common,playerOnly), LELSTRING(common,playersAndAI)], 2], // [_values, _valueTitles, _defaultIndex] - true, // isGlobal - {[QGVAR(ammoHandling), _this] call EFUNC(common,cbaSettings_settingChanged)}, - true // Needs mission restart + 1 // isGlobal ] call CBA_fnc_addSetting; [ - QGVAR(progressBarTimeCoefficent), "SLIDER", + QGVAR(progressBarTimeCoefficent), + "SLIDER", [LSTRING(progressBarTimeCoefficent_displayName), LSTRING(progressBarTimeCoefficent_description)], _categoryArray, - [0,2,1,2], // [min, max, default value, trailing decimals (-1 for whole numbers only)] - true // isGlobal + [0, 2, 1, 2], // [min, max, default value, trailing decimals (-1 for whole numbers only)] + 1 // isGlobal ] call CBA_fnc_addSetting; [ - QGVAR(dragAfterDeploy), "CHECKBOX", + QGVAR(dragAfterDeploy), + "CHECKBOX", [LSTRING(dragAfterDeploy_displayName), LSTRING(dragAfterDeploy_description)], - _categoryArray, - false // default value + _categoryArray ] call CBA_fnc_addSetting; From d4d87a13cecfa666c11f80e5350b61c66fa91b35 Mon Sep 17 00:00:00 2001 From: Fabio Schick <58027418+mrschick@users.noreply.github.com> Date: Wed, 11 Sep 2024 23:57:14 +0200 Subject: [PATCH 33/95] Scopes - Setting to show Adjustment UI while sighted in (#10241) --- .../functions/fnc_applyScopeAdjustment.sqf | 4 ++++ addons/scopes/initSettings.inc.sqf | 16 ++++++++++++---- addons/scopes/stringtable.xml | 5 +++++ 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/addons/scopes/functions/fnc_applyScopeAdjustment.sqf b/addons/scopes/functions/fnc_applyScopeAdjustment.sqf index b813dde9ef8..d356343099d 100644 --- a/addons/scopes/functions/fnc_applyScopeAdjustment.sqf +++ b/addons/scopes/functions/fnc_applyScopeAdjustment.sqf @@ -43,6 +43,10 @@ if (cameraView == "GUNNER") then { _yaw = _yaw + _windageDifference; [_unit, _pitch, _bank, _yaw] call EFUNC(common,setPitchBankYaw); }; + + if (GVAR(inScopeAdjustment)) then { + [] call FUNC(showZeroing); + }; } else { [] call FUNC(showZeroing); }; diff --git a/addons/scopes/initSettings.inc.sqf b/addons/scopes/initSettings.inc.sqf index 40ed62cbcc2..e74bcb4c073 100644 --- a/addons/scopes/initSettings.inc.sqf +++ b/addons/scopes/initSettings.inc.sqf @@ -76,18 +76,26 @@ private _category = format ["ACE %1", localize LSTRING(DisplayName)]; true // Needs mission restart ] call CBA_fnc_addSetting; +[ + QGVAR(simplifiedZeroing), "CHECKBOX", + [LSTRING(simplifiedZeroing_displayName), LSTRING(simplifiedZeroing_description)], + _category, + false, + 1 +] call CBA_fnc_addSetting; + [ QGVAR(useLegacyUI), "CHECKBOX", [LSTRING(useLegacyUI_displayName), LSTRING(useLegacyUI_description)], _category, false, - 0 + 2 ] call CBA_fnc_addSetting; [ - QGVAR(simplifiedZeroing), "CHECKBOX", - [LSTRING(simplifiedZeroing_displayName), LSTRING(simplifiedZeroing_description)], + QGVAR(inScopeAdjustment), "CHECKBOX", + LSTRING(inScopeAdjustment_displayName), _category, false, - 1 + 0 ] call CBA_fnc_addSetting; diff --git a/addons/scopes/stringtable.xml b/addons/scopes/stringtable.xml index 9a47f657cc0..4174a91d02e 100644 --- a/addons/scopes/stringtable.xml +++ b/addons/scopes/stringtable.xml @@ -347,6 +347,11 @@ Replikuje systém naměřování puškohledů ze základní hry. Replica en los visores el sistema de homogeneizado de vanilla + + Show adjustment UI in scope + Zeige Absehenverstellungs-UI im Zielfernrohr + Mostra UI delle manopole nel mirino + Minor adjustment up Kleine Korrektur hoch From fdf3198855eab9387b5f525027d1412fbb1aeb57 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 11 Sep 2024 17:36:42 -0500 Subject: [PATCH 34/95] Advanced Fatigue - Fix stamina costs when not touching ground (#10297) --- .../advanced_fatigue/functions/fnc_mainLoop.sqf | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/addons/advanced_fatigue/functions/fnc_mainLoop.sqf b/addons/advanced_fatigue/functions/fnc_mainLoop.sqf index 16d355a424d..e6327a3fa56 100644 --- a/addons/advanced_fatigue/functions/fnc_mainLoop.sqf +++ b/addons/advanced_fatigue/functions/fnc_mainLoop.sqf @@ -27,9 +27,18 @@ if (!alive ACE_player) exitWith { private _velocity = velocity ACE_player; private _normal = surfaceNormal (getPosWorld ACE_player); private _movementVector = vectorNormalized _velocity; -private _sideVector = vectorNormalized (_movementVector vectorCrossProduct _normal); private _fwdAngle = asin (_movementVector select 2); -private _sideAngle = asin (_sideVector select 2); +private _sideAngle = if ((getPosATL ACE_player) select 2 > 0.01) then { + 0 // ignore terrain normal if not touching it +} else { + private _sideVector = vectorNormalized (_movementVector vectorCrossProduct _normal); + asin (_sideVector select 2); +}; +if (GVAR(isSwimming)) then { // ignore when floating + _fwdAngle = 0; + _sideAngle = 0; +}; + private _currentWork = REE; private _currentSpeed = (vectorMagnitude _velocity) min 6; @@ -62,7 +71,7 @@ if (isNull objectParent ACE_player && {_currentSpeed > 0.1} && {isTouchingGround }; // Used to simulate the unevenness/roughness of the terrain - if ((getPosATL ACE_player) select 2 < 0.01) then { + if (_sideAngle != 0) then { private _sideGradient = abs (_sideAngle / 45) min 1; _terrainFactor = 1 + _sideGradient ^ 4; From 33f2143019588d54c17d671fa45d9257866f3769 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Thu, 12 Sep 2024 00:54:19 +0200 Subject: [PATCH 35/95] Docs - Update CSW proxy weapon information (#10309) --- docs/wiki/framework/crew-served-weapons-framework.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/wiki/framework/crew-served-weapons-framework.md b/docs/wiki/framework/crew-served-weapons-framework.md index a2f8e74ae65..0213e42a5e9 100644 --- a/docs/wiki/framework/crew-served-weapons-framework.md +++ b/docs/wiki/framework/crew-served-weapons-framework.md @@ -16,7 +16,7 @@ version: To convert a static weapon into a crew served weapon, you need to create the following: -- A proxy weapon +- A proxy weapon (optional) - A carryable weapon that can be mounted on a tripod - Carryable weapon magazines - The CSW config in the static weapon @@ -27,6 +27,8 @@ For the following examples, we are going to assume you are modifying your existi Because the magazine loading time is already handled by the ACE interaction, a proxy weapon with a very low loading time is used. It automatically replaces the default weapon of the turret when CSW is enabled. +A proxy weapon isn't required for a CSW to work. If a CSW uses the default weapons, the reload times will just be longer. + ```cpp class CfgWeapons { class prefix_hmg_weapon; @@ -136,7 +138,7 @@ class CfgVehicles { class prefix_hmg: StaticMGWeapon { class ACE_CSW { enabled = 1; // Enables ACE CSW for this weapon - proxyWeapon = "prefix_hmg_weapon_proxy"; // The proxy weapon created above + proxyWeapon = "prefix_hmg_weapon_proxy"; // The proxy weapon created above. This can also be a function name that returns a proxy weapon - passed [_vehicle, _turret, _currentWeapon, _needed, _emptyWeapon] magazineLocation = "_target selectionPosition 'magazine'"; // Ammo handling interaction point location disassembleWeapon = "prefix_hmg_carry"; // Carryable weapon created above disassembleTurret = "ace_csw_m3Tripod"; // Which static tripod will appear when weapon is disassembled From fef34a82dc51d640ba3df82ccfcb228647998cb4 Mon Sep 17 00:00:00 2001 From: some-evil-kitty <106408180+some-evil-kitty@users.noreply.github.com> Date: Wed, 11 Sep 2024 19:54:51 -0400 Subject: [PATCH 36/95] Carrying - Add hookable events to dropping objects (#10304) Co-authored-by: PabstMirror Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> --- addons/dragging/functions/fnc_carryObject.sqf | 3 +++ addons/dragging/functions/fnc_dragObject.sqf | 3 +++ addons/dragging/functions/fnc_dropObject.sqf | 3 +++ addons/dragging/functions/fnc_dropObject_carry.sqf | 6 ++++++ addons/dragging/functions/fnc_startCarryLocal.sqf | 3 +++ addons/dragging/functions/fnc_startDragLocal.sqf | 3 +++ docs/wiki/framework/events-framework.md | 6 ++++++ 7 files changed, 27 insertions(+) diff --git a/addons/dragging/functions/fnc_carryObject.sqf b/addons/dragging/functions/fnc_carryObject.sqf index 7b2b4faa6b0..d765020f96e 100644 --- a/addons/dragging/functions/fnc_carryObject.sqf +++ b/addons/dragging/functions/fnc_carryObject.sqf @@ -71,3 +71,6 @@ if (_UAVCrew isNotEqualTo []) then { // Check everything [LINKFUNC(carryObjectPFH), 0.5, [_unit, _target, CBA_missionTime]] call CBA_fnc_addPerFrameHandler; + +// API +[QGVAR(startedCarry), [_unit, _target]] call CBA_fnc_localEvent; diff --git a/addons/dragging/functions/fnc_dragObject.sqf b/addons/dragging/functions/fnc_dragObject.sqf index a8053b8dfee..3169db26795 100644 --- a/addons/dragging/functions/fnc_dragObject.sqf +++ b/addons/dragging/functions/fnc_dragObject.sqf @@ -87,3 +87,6 @@ if (_UAVCrew isNotEqualTo []) then { // Fixes not being able to move when in combat pace [_unit, "forceWalk", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); + +// API +[QGVAR(startedDrag), [_unit, _target]] call CBA_fnc_localEvent; diff --git a/addons/dragging/functions/fnc_dropObject.sqf b/addons/dragging/functions/fnc_dropObject.sqf index 965e3b9efa3..049f8228168 100644 --- a/addons/dragging/functions/fnc_dropObject.sqf +++ b/addons/dragging/functions/fnc_dropObject.sqf @@ -107,3 +107,6 @@ private _mass = _target getVariable [QGVAR(originalMass), 0]; if (_mass != 0) then { [QEGVAR(common,setMass), [_target, _mass]] call CBA_fnc_globalEvent; // Force global sync }; + +// API +[QGVAR(stoppedDrag), [_unit, _target]] call CBA_fnc_localEvent; diff --git a/addons/dragging/functions/fnc_dropObject_carry.sqf b/addons/dragging/functions/fnc_dropObject_carry.sqf index ba8cbd09f12..525a150bcff 100644 --- a/addons/dragging/functions/fnc_dropObject_carry.sqf +++ b/addons/dragging/functions/fnc_dropObject_carry.sqf @@ -129,6 +129,12 @@ if (_loadCargo) then { } else { [_unit, _target, _cursorObject] call EFUNC(common,loadPerson); }; + + // Repurpose variable for flag used in event below + _loadCargo = true; }; }; }; + +// API +[QGVAR(stoppedCarry), [_unit, _target, _loadCargo]] call CBA_fnc_localEvent; diff --git a/addons/dragging/functions/fnc_startCarryLocal.sqf b/addons/dragging/functions/fnc_startCarryLocal.sqf index e7d102825aa..cf17dfb311d 100644 --- a/addons/dragging/functions/fnc_startCarryLocal.sqf +++ b/addons/dragging/functions/fnc_startCarryLocal.sqf @@ -99,3 +99,6 @@ if (_mass > 1) then { _target setVariable [QGVAR(originalMass), _mass, true]; [QEGVAR(common,setMass), [_target, 1e-12]] call CBA_fnc_globalEvent; // Force global sync }; + +// API +[QGVAR(setupCarry), [_unit, _target]] call CBA_fnc_localEvent; diff --git a/addons/dragging/functions/fnc_startDragLocal.sqf b/addons/dragging/functions/fnc_startDragLocal.sqf index 3abcef44305..f0468f133ba 100644 --- a/addons/dragging/functions/fnc_startDragLocal.sqf +++ b/addons/dragging/functions/fnc_startDragLocal.sqf @@ -116,3 +116,6 @@ if (_mass > 1) then { _target setVariable [QGVAR(originalMass), _mass, true]; [QEGVAR(common,setMass), [_target, 1e-12]] call CBA_fnc_globalEvent; // Force global sync }; + +// API +[QGVAR(setupDrag), [_unit, _target]] call CBA_fnc_localEvent; diff --git a/docs/wiki/framework/events-framework.md b/docs/wiki/framework/events-framework.md index c0aa43a5739..b531387ee79 100644 --- a/docs/wiki/framework/events-framework.md +++ b/docs/wiki/framework/events-framework.md @@ -173,6 +173,12 @@ MenuType: 0 = Interaction, 1 = Self Interaction |---------- |------------|----------|------|-------------| | `ace_dragging_cloneCreated` | [_clone, _corpse] | Local | Listen | Called when a clone used for dragging/carrying corpses is created | `ace_dragging_cloneDeleted` | [_clone, _corpse] | Local | Listen | Called when a clone used for dragging/carrying corpses is deleted +| `ace_dragging_setupCarry` | [_unit, _target] | Local | Listen | Called when the unit starts the carrying animation for the target +| `ace_dragging_startedCarry` | [_unit, _target] | Local | Listen | Called when the unit starts successfully carrying the target. This event is called after `ace_dragging_setupCarry`. +| `ace_dragging_stoppedCarry` | [_unit, _target, _loadCargo] | Local | Listen | Called when the unit stops carrying the target. `_loadCargo` says if the target is being loaded as cargo/person or not. +| `ace_dragging_setupDrag` | [_unit, _target] | Local | Listen | Called when the unit starts the dragging animation for the target +| `ace_dragging_startedDrag` | [_unit, _target] | Local | Listen | Called when the unit starts successfully dragging the target. This event is called after `ace_dragging_setupDrag`. +| `ace_dragging_stoppedDrag` | [_unit, _target] | Local | Listen | Called when the unit stops dragging the target ### 2.19 HuntIR (`ace_huntir`) From fcb6b00ceb48df512f6d45b096874eae1caf4f24 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Tue, 17 Sep 2024 18:56:58 +0200 Subject: [PATCH 37/95] General - Make `ace_csw` config names lowercase (#10316) --- .../compat_rhs_afrf3_csw/CfgVehicles.hpp | 18 +++--- .../compat_rhs_afrf3_csw/CfgWeapons.hpp | 16 ++--- .../compat_rhs_gref3_csw/CfgVehicles.hpp | 4 +- .../compat_rhs_gref3_csw/CfgWeapons.hpp | 2 +- .../compat_rhs_usf3_csw/CfgVehicles.hpp | 10 +-- .../compat_rhs_usf3_csw/CfgWeapons.hpp | 8 +-- addons/compat_sog/CfgVehicles/turrets.hpp | 64 +++++++++---------- addons/compat_sog/CfgWeapons/csw.hpp | 34 +++++----- addons/dragon/CfgVehicles.hpp | 2 +- addons/dragon/CfgWeapons.hpp | 4 +- 10 files changed, 81 insertions(+), 81 deletions(-) diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/CfgVehicles.hpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/CfgVehicles.hpp index 6a3bb0a083e..fb52cc6373c 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/CfgVehicles.hpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/CfgVehicles.hpp @@ -5,7 +5,7 @@ class CfgVehicles { class StaticGrenadeLauncher; class rhs_SPG9_base: AT_01_base_F { - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = QGVAR(rhs_weap_SPG9); magazineLocation = "_target selectionPosition 'breach'"; @@ -18,14 +18,14 @@ class CfgVehicles { }; class rhs_SPG9M_base: rhs_SPG9_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; disassembleWeapon = QGVAR(spg9m_carry); }; }; class rhs_Kornet_Base: AT_01_base_F { - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = QGVAR(rhs_weap_9K133_launcher); magazineLocation = "_target selectionPosition 'gun'"; @@ -38,7 +38,7 @@ class CfgVehicles { }; class rhs_Metis_Base: AT_01_base_F { - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = QGVAR(rhs_weap_9K115_2_launcher); magazineLocation = "_target selectionPosition 'gun'"; @@ -51,7 +51,7 @@ class CfgVehicles { }; class rhs_2b14_82mm_Base: StaticMortar { - class ACE_CSW { + class ace_csw { enabled = 1; magazineLocation = ""; proxyWeapon = QGVAR(rhs_weap_2b14); @@ -64,7 +64,7 @@ class CfgVehicles { }; class rhs_nsv_tripod_base: StaticMGWeapon { - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = QGVAR(rhs_weap_nsvt_effects); magazineLocation = "_target selectionPosition 'magazine'"; @@ -77,7 +77,7 @@ class CfgVehicles { }; class RHS_KORD_Base: rhs_nsv_tripod_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; proxyWeapon = QGVAR(rhs_weap_KORD); disassembleWeapon = QGVAR(kord_carry); @@ -86,7 +86,7 @@ class CfgVehicles { }; class RHS_KORD_high_base: RHS_KORD_Base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; proxyWeapon = QGVAR(rhs_weap_KORD); disassembleWeapon = QGVAR(kord_carry); @@ -95,7 +95,7 @@ class CfgVehicles { }; class RHS_AGS30_TriPod_base: StaticGrenadeLauncher { - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = QGVAR(rhs_weap_AGS30); magazineLocation = "_target selectionPosition 'magazine'"; diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/CfgWeapons.hpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/CfgWeapons.hpp index 1e8f4dbdfd1..e444a2aa32f 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/CfgWeapons.hpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/CfgWeapons.hpp @@ -14,7 +14,7 @@ class CfgWeapons { class GVAR(2b14_carry): Launcher_Base_F { dlc = "ace"; - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 20; pickupTime = 25; @@ -40,7 +40,7 @@ class CfgWeapons { class GVAR(nsv_carry): Launcher_Base_F { dlc = "ace"; - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -64,7 +64,7 @@ class CfgWeapons { class GVAR(kord_carry): Launcher_Base_F { dlc = "ace"; - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -89,7 +89,7 @@ class CfgWeapons { class GVAR(ags30_carry): Launcher_Base_F { dlc = "ace"; - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -113,7 +113,7 @@ class CfgWeapons { class GVAR(spg9_carry): Launcher_Base_F { dlc = "ace"; - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -136,7 +136,7 @@ class CfgWeapons { }; class GVAR(spg9m_carry): GVAR(spg9_carry) { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { class assembleTo { EGVAR(csw,spg9Tripod) = "rhs_SPG9M_MSV"; }; @@ -147,7 +147,7 @@ class CfgWeapons { class GVAR(metis_carry): Launcher_Base_F { dlc = "ace"; - class ACE_CSW { + class ace_csw { type = "mount"; deployTime = 4; pickupTime = 4; @@ -169,7 +169,7 @@ class CfgWeapons { class GVAR(kornet_carry): Launcher_Base_F { dlc = "ace"; - class ACE_CSW { + class ace_csw { type = "mount"; deployTime = 4; pickupTime = 4; diff --git a/addons/compat_rhs_gref3/compat_rhs_gref3_csw/CfgVehicles.hpp b/addons/compat_rhs_gref3/compat_rhs_gref3_csw/CfgVehicles.hpp index 7e58387dabc..1a15fc03f40 100644 --- a/addons/compat_rhs_gref3/compat_rhs_gref3_csw/CfgVehicles.hpp +++ b/addons/compat_rhs_gref3/compat_rhs_gref3_csw/CfgVehicles.hpp @@ -1,7 +1,7 @@ class CfgVehicles { class StaticMGWeapon; class rhs_DSHKM_base: StaticMGWeapon { - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = QGVAR(rhs_weap_DSHKM); magazineLocation = "_target selectionPosition 'otocvez'"; @@ -13,7 +13,7 @@ class CfgVehicles { }; }; class rhs_DSHkM_Mini_TriPod_base: rhs_DSHKM_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; disassembleTurret = QEGVAR(csw,kordTripodLow); }; diff --git a/addons/compat_rhs_gref3/compat_rhs_gref3_csw/CfgWeapons.hpp b/addons/compat_rhs_gref3/compat_rhs_gref3_csw/CfgWeapons.hpp index 15ff9488cad..279ec98eaa4 100644 --- a/addons/compat_rhs_gref3/compat_rhs_gref3_csw/CfgWeapons.hpp +++ b/addons/compat_rhs_gref3/compat_rhs_gref3_csw/CfgWeapons.hpp @@ -7,7 +7,7 @@ class CfgWeapons { }; class GVAR(dshkm_carry): Launcher_Base_F { - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_csw/CfgVehicles.hpp b/addons/compat_rhs_usf3/compat_rhs_usf3_csw/CfgVehicles.hpp index cbca20cce76..bfe157c6099 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_csw/CfgVehicles.hpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_csw/CfgVehicles.hpp @@ -14,7 +14,7 @@ class CfgVehicles { }; }; - class ACE_CSW { + class ace_csw { enabled = 1; magazineLocation = ""; proxyWeapon = QGVAR(rhs_mortar_81mm); @@ -28,7 +28,7 @@ class CfgVehicles { class StaticMGWeapon; class rhs_m2staticmg_base: StaticMGWeapon { - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = QGVAR(rhs_M2); magazineLocation = "_target selectionPosition 'magazine'"; @@ -41,7 +41,7 @@ class CfgVehicles { }; class RHS_M2StaticMG_MiniTripod_base: rhs_m2staticmg_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; disassembleTurret = QEGVAR(csw,m3TripodLow); }; @@ -49,7 +49,7 @@ class CfgVehicles { class StaticGrenadeLauncher; class RHS_MK19_TriPod_base: StaticGrenadeLauncher { - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = QGVAR(rhs_MK19); magazineLocation = "_target selectionPosition 'magazine'"; @@ -63,7 +63,7 @@ class CfgVehicles { class StaticATWeapon; class RHS_TOW_TriPod_base: StaticATWeapon { - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = QGVAR(rhs_weap_TOW_Launcher_static); magazineLocation = "_target selectionPosition 'tube'"; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_csw/CfgWeapons.hpp b/addons/compat_rhs_usf3/compat_rhs_usf3_csw/CfgWeapons.hpp index d373e7fe673..fa939ea80e0 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_csw/CfgWeapons.hpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_csw/CfgWeapons.hpp @@ -11,7 +11,7 @@ class CfgWeapons { class GVAR(m252_carry): Launcher_Base_F { dlc = "ace"; - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 20; pickupTime = 25; @@ -37,7 +37,7 @@ class CfgWeapons { class GVAR(m2_carry): Launcher_Base_F { dlc = "ace"; - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -62,7 +62,7 @@ class CfgWeapons { class GVAR(mk19_carry): Launcher_Base_F { dlc = "ace"; - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -86,7 +86,7 @@ class CfgWeapons { class GVAR(tow_carry): Launcher_Base_F { dlc = "ace"; - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; diff --git a/addons/compat_sog/CfgVehicles/turrets.hpp b/addons/compat_sog/CfgVehicles/turrets.hpp index 6142a018e81..928b80716a4 100644 --- a/addons/compat_sog/CfgVehicles/turrets.hpp +++ b/addons/compat_sog/CfgVehicles/turrets.hpp @@ -17,7 +17,7 @@ class vn_static_m2_high_base: StaticMGWeapon { }; }; - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = "vn_m2_v_01"; magazineLocation = "_target selectionPosition 'mg1_magazine'"; @@ -31,7 +31,7 @@ class vn_static_m2_high_base: StaticMGWeapon { // M2 Browning - Low class vn_static_m2_low_base: vn_static_m2_high_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { disassembleTurret = QEGVAR(csw,m3TripodLow); }; }; @@ -45,7 +45,7 @@ class vn_static_m1919a6_base: vn_static_m2_low_base { }; }; - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; proxyWeapon = "vn_m1919_v_01"; magazineLocation = "_target selectionPosition 'mg1_magazine' vectorAdd [-0.3, 0, 0]"; @@ -66,7 +66,7 @@ class vn_static_m1919a4_high_base: vn_static_m1919a6_base { }; }; - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; proxyWeapon = "vn_m1919_v_01"; magazineLocation = "_target selectionPosition 'mg1_magazine'"; @@ -80,7 +80,7 @@ class vn_static_m1919a4_high_base: vn_static_m1919a6_base { // M1919A4 - Low class vn_static_m1919a4_low_base: vn_static_m1919a4_high_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { disassembleTurret = QEGVAR(csw,m3TripodLow); }; }; @@ -93,7 +93,7 @@ class vn_static_m60_high_base: vn_static_m2_low_base { }; }; - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; proxyWeapon = "vn_m60_v_01"; magazineLocation = "_target selectionPosition 'mg1_trigger'"; @@ -113,7 +113,7 @@ class vn_static_m60_low_base: vn_static_m60_high_base { }; }; - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { magazineLocation = "_target selectionPosition 'mg1_otochlaven_recoil'"; disassembleTurret = QEGVAR(csw,m3TripodLow); }; @@ -131,7 +131,7 @@ class vn_static_tow_base: vn_static_at3_base { }; }; - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = "vn_missile_tow_launcher"; magazineLocation = "_target selectionPosition 'magazine'"; @@ -145,7 +145,7 @@ class vn_static_tow_base: vn_static_at3_base { // DShKM - High class vn_static_dp28_high_base: vn_static_m2_high_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 0; }; }; @@ -156,7 +156,7 @@ class vn_static_dshkm_high_01_base: vn_static_dp28_high_base { }; }; - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; proxyWeapon = "vn_dshkm_v_01"; magazineLocation = "_target selectionPosition 'mg1_boxmag'"; @@ -170,7 +170,7 @@ class vn_static_dshkm_high_01_base: vn_static_dp28_high_base { // DShKM - High, with AA sight class vn_static_dshkm_high_02_base: vn_static_dshkm_high_01_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { disassembleWeapon = QGVAR(dshkm_AA_carry); }; }; @@ -185,7 +185,7 @@ class vn_static_dshkm_low_01_base: vn_static_dshkm_high_01_base { }; }; - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { disassembleWeapon = QGVAR(dshkm_shield_carry); disassembleTurret = QEGVAR(csw,kordTripodLow); }; @@ -193,7 +193,7 @@ class vn_static_dshkm_low_01_base: vn_static_dshkm_high_01_base { // DShKM - Low class vn_static_dshkm_low_02_base: vn_static_dshkm_low_01_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { disassembleWeapon = QGVAR(dshkm_carry); }; }; @@ -206,7 +206,7 @@ class vn_static_rpd_high_base: vn_static_dp28_high_base { }; }; - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; proxyWeapon = "vn_rpd_v_01"; magazineLocation = "_target selectionPosition 'mg1_otochlaven_recoil'"; @@ -226,7 +226,7 @@ class vn_static_pk_high_base: vn_static_rpd_high_base { }; }; - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; proxyWeapon = "vn_pk_v_01"; magazineLocation = "_target selectionPosition 'mg1_otochlaven_recoil'"; @@ -246,7 +246,7 @@ class vn_static_pk_low_base: vn_static_pk_high_base { }; }; - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { disassembleTurret = QEGVAR(csw,kordTripodLow); }; }; @@ -259,7 +259,7 @@ class vn_static_mg42_high_base: vn_static_rpd_high_base { }; }; - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = "vn_mg42_v_01"; magazineLocation = "_target selectionPosition 'mg1_otochlaven_recoil'"; @@ -278,7 +278,7 @@ class vn_static_mg42_low_base: vn_static_mg42_high_base { }; }; - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { disassembleTurret = ""; }; }; @@ -294,7 +294,7 @@ class vn_static_sgm_high_base: vn_static_sgm_base { }; }; - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = "vn_sgm_v_01"; magazineLocation = "_target selectionPosition 'mg1_otochlaven_recoil'"; @@ -308,7 +308,7 @@ class vn_static_sgm_high_base: vn_static_sgm_base { // SGM - Low class vn_static_sgm_low_base: vn_static_sgm_high_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { disassembleWeapon = QGVAR(sgm_carry); disassembleTurret = QEGVAR(csw,kordTripodLow); }; @@ -316,25 +316,25 @@ class vn_static_sgm_low_base: vn_static_sgm_high_base { // SGM - Shield class vn_o_pl_static_sgm_low_01: vn_static_sgm_low_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { disassembleWeapon = QGVAR(sgm_shield_carry); disassembleTurret = QEGVAR(csw,kordTripodLow); }; }; class vn_o_nva_65_static_sgm_low_01: vn_static_sgm_low_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { disassembleWeapon = QGVAR(sgm_shield_carry); disassembleTurret = QEGVAR(csw,kordTripodLow); }; }; class vn_o_nva_static_sgm_low_01: vn_static_sgm_low_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { disassembleWeapon = QGVAR(sgm_shield_carry); disassembleTurret = QEGVAR(csw,kordTripodLow); }; }; class vn_o_nva_navy_static_sgm_low_01: vn_static_sgm_low_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { disassembleWeapon = QGVAR(sgm_shield_carry); disassembleTurret = QEGVAR(csw,kordTripodLow); }; @@ -351,7 +351,7 @@ class vn_static_mk18_base: StaticCannon { }; }; - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = "vn_mk18_v_01"; magazineLocation = "_target selectionPosition 'mg1_magazine'"; @@ -378,7 +378,7 @@ class vn_static_mortar_m29_base: Mortar_01_base_F { }; }; - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = QGVAR(vn_mortar_m29); magazineLocation = "_target selectionPosition 'pohon'"; @@ -392,7 +392,7 @@ class vn_static_mortar_m29_base: Mortar_01_base_F { // M2 / Type 63 Mortar class vn_static_mortar_m2_base: vn_static_mortar_m29_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; proxyWeapon = QGVAR(vn_mortar_m2); magazineLocation = "_target selectionPosition 'pohon'"; @@ -406,7 +406,7 @@ class vn_static_mortar_m2_base: vn_static_mortar_m29_base { // Type 53 Mortar class vn_static_mortar_type53_base: vn_static_mortar_m29_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; proxyWeapon = QGVAR(vn_mortar_type53); magazineLocation = "_target selectionPosition 'pohon'"; @@ -430,7 +430,7 @@ class vn_static_h12_base: Mortar_01_base_F { }; }; - class ACE_CSW { + class ace_csw { enabled = 0; }; }; @@ -441,7 +441,7 @@ class vn_static_m45_base: vn_static_m2_high_base { EGVAR(dragging,canCarry) = 0; EGVAR(dragging,canDrag) = 0; - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 0; }; }; @@ -450,7 +450,7 @@ class vn_static_zpu4_base: vn_static_m2_high_base { EGVAR(dragging,canCarry) = 0; EGVAR(dragging,canDrag) = 0; - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 0; }; }; @@ -466,7 +466,7 @@ class vn_o_static_rsna75: StaticMGWeapon { }; }; - class ACE_CSW { + class ace_csw { enabled = 0; }; }; diff --git a/addons/compat_sog/CfgWeapons/csw.hpp b/addons/compat_sog/CfgWeapons/csw.hpp index 87b1b16c5ec..b5ca942f6e8 100644 --- a/addons/compat_sog/CfgWeapons/csw.hpp +++ b/addons/compat_sog/CfgWeapons/csw.hpp @@ -20,7 +20,7 @@ class GVAR(m2_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_m2b_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -48,7 +48,7 @@ class GVAR(m1919a4_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_m1919a4_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -76,7 +76,7 @@ class GVAR(m1919a6_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_m1919a6_ca.paa); - class ACE_CSW { + class ace_csw { type = "mount"; deployTime = 2; pickupTime = 2; @@ -100,7 +100,7 @@ class GVAR(m60_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_m60_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -128,7 +128,7 @@ class GVAR(tow_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_tow_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -155,7 +155,7 @@ class GVAR(dshkm_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_dshkm_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -183,7 +183,7 @@ class GVAR(dshkm_shield_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_dshkm_shield_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -210,7 +210,7 @@ class GVAR(dshkm_AA_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_dshkm_aa_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -237,7 +237,7 @@ class GVAR(rpd_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_rpd_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -264,7 +264,7 @@ class GVAR(pk_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_pk_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -292,7 +292,7 @@ class GVAR(mortar_m29_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_m29_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 20; pickupTime = 25; @@ -319,7 +319,7 @@ class GVAR(mg42_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_mg42_ca.paa); - class ACE_CSW { + class ace_csw { type = "mount"; deployTime = 4; pickupTime = 4; @@ -347,7 +347,7 @@ class GVAR(sgm_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_sgm_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -374,7 +374,7 @@ class GVAR(sgm_shield_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_sgm_shield_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -401,7 +401,7 @@ class GVAR(mk18_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_mk18_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -430,7 +430,7 @@ class GVAR(mortar_m2_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_m2_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 20; pickupTime = 25; @@ -457,7 +457,7 @@ class GVAR(mortar_type53_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_type53_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 20; pickupTime = 25; diff --git a/addons/dragon/CfgVehicles.hpp b/addons/dragon/CfgVehicles.hpp index 13441c6c26a..9cc60771b51 100644 --- a/addons/dragon/CfgVehicles.hpp +++ b/addons/dragon/CfgVehicles.hpp @@ -107,7 +107,7 @@ class CfgVehicles { soundGetIn[] = {"A3\sounds_f\dummysound",0.00031622776,1,5}; armorStructural = 10.0; - class ACE_CSW { + class ace_csw { disassembleTo = QGVAR(super); }; diff --git a/addons/dragon/CfgWeapons.hpp b/addons/dragon/CfgWeapons.hpp index 9cb58e2c1f4..0bdd53e34f2 100644 --- a/addons/dragon/CfgWeapons.hpp +++ b/addons/dragon/CfgWeapons.hpp @@ -19,7 +19,7 @@ class CfgWeapons { descriptionShort = CSTRING(dragonDescription); scope = 2; - class ACE_CSW { + class ace_csw { type = "mount"; deployTime = 2; pickupTime = 2; @@ -75,7 +75,7 @@ class CfgWeapons { opticsZoomMin = 0.055; opticsZoomMax = 0.055; scope = 2; - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 2; pickupTime = 1; From 8e15525f6a7ffbaf55521a679a499997b1f4d2c1 Mon Sep 17 00:00:00 2001 From: Fabio Schick <58027418+mrschick@users.noreply.github.com> Date: Tue, 17 Sep 2024 18:57:43 +0200 Subject: [PATCH 38/95] Aircraft - Fix Drone "Loiter" Waypoint Action (#10319) --- addons/aircraft/functions/fnc_droneSetWaypoint.sqf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/aircraft/functions/fnc_droneSetWaypoint.sqf b/addons/aircraft/functions/fnc_droneSetWaypoint.sqf index 953b99a357a..45c18c63da2 100644 --- a/addons/aircraft/functions/fnc_droneSetWaypoint.sqf +++ b/addons/aircraft/functions/fnc_droneSetWaypoint.sqf @@ -62,6 +62,8 @@ if (_type == "FOLLOW" && {["CAManBase", "LandVehicle", "Ship"] findIf {_target i _waypoint setWaypointPosition [getPosASL _target, -1]; }; }, 3, [_vehicle, _group, _waypoint, _target]] call CBA_fnc_addPerFrameHandler; +} else { + _waypoint setWaypointType _type; }; TRACE_3("",_currentHeight,_currentLoiterRadius,_currentLoiterType); From a8302ac20a0437c90c9761b818f0492c9617499c Mon Sep 17 00:00:00 2001 From: Drofseh Date: Tue, 17 Sep 2024 09:58:37 -0700 Subject: [PATCH 39/95] Overheating - Set ammo to ambientTemperature on reload (#10320) --- addons/overheating/XEH_postInit.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/overheating/XEH_postInit.sqf b/addons/overheating/XEH_postInit.sqf index a49030b1adb..4abe8d93ee5 100644 --- a/addons/overheating/XEH_postInit.sqf +++ b/addons/overheating/XEH_postInit.sqf @@ -71,7 +71,7 @@ if (hasInterface) then { ["CAManBase", "Reloaded", { params ["_unit", "_weapon", "_muzzle"]; if (_muzzle == _weapon) then { - _unit setVariable [format [QGVAR(%1_ammoTemp), _weapon], 0]; + _unit setVariable [format [QGVAR(%1_ammoTemp), _weapon], ambientTemperature select 0]; }; }] call CBA_fnc_addClassEventHandler; }; From 6c2eacc95416351e8ec0f4eeab7142692771cb4d Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Tue, 17 Sep 2024 18:59:11 +0200 Subject: [PATCH 40/95] CUP Weapons Compat - Use macros for CSW (#10317) --- .../compat_cup_weapons_csw/CfgVehicles.hpp | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgVehicles.hpp b/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgVehicles.hpp index 752745fb35e..c96253ec51c 100644 --- a/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgVehicles.hpp +++ b/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgVehicles.hpp @@ -19,7 +19,7 @@ class CfgVehicles { magazineLocation = "_target selectionPosition 'otochlaven'"; proxyWeapon = "CUP_proxy_mortar_82mm"; disassembleWeapon = "CUP_2b14_carry"; - disassembleTurret = "ace_csw_mortarBaseplate"; + disassembleTurret = QEGVAR(csw,mortarBaseplate); desiredAmmo = 1; ammoLoadTime = 3; ammoUnloadTime = 3; @@ -29,14 +29,14 @@ class CfgVehicles { class CUP_M252_base: CUP_2b14_82mm_Base { class ace_csw: ace_csw { disassembleWeapon = "CUP_m252_carry"; - disassembleTurret = "ace_csw_mortarBaseplate"; + disassembleTurret = QEGVAR(csw,mortarBaseplate); }; }; class CUP_L16A2_base: CUP_M252_base { class ace_csw: ace_csw { disassembleWeapon = "CUP_l16a2_carry"; - disassembleTurret = "ace_csw_mortarBaseplate"; + disassembleTurret = QEGVAR(csw,mortarBaseplate); }; }; @@ -47,7 +47,7 @@ class CfgVehicles { proxyWeapon = "CUP_proxy_m2"; magazineLocation = "_target selectionPosition 'magazine'"; disassembleWeapon = "CUP_m2_carry"; - disassembleTurret = "ace_csw_m3Tripod"; + disassembleTurret = QEGVAR(csw,m3Tripod); desiredAmmo = 100; ammoLoadTime = 10; ammoUnloadTime = 8; @@ -57,7 +57,7 @@ class CfgVehicles { class CUP_M2StaticMG_MiniTripod_base: CUP_M2StaticMG_base { class ace_csw: ace_csw { enabled = 1; - disassembleTurret = "ace_csw_m3TripodLow"; + disassembleTurret = QEGVAR(csw,m3TripodLow); }; }; @@ -67,7 +67,7 @@ class CfgVehicles { proxyWeapon = "CUP_proxy_DSHKM"; magazineLocation = "_target selectionPosition 'otocvez'"; disassembleWeapon = "CUP_DSHKM_carry"; - disassembleTurret = "ace_csw_kordTripod"; + disassembleTurret = QEGVAR(csw,kordTripod); desiredAmmo = 100; ammoLoadTime = 10; ammoUnloadTime = 8; @@ -87,7 +87,7 @@ class CfgVehicles { proxyWeapon = "CUP_proxy_KORD"; magazineLocation = "_target selectionPosition 'magazine'"; disassembleWeapon = "CUP_KORD_carry"; - disassembleTurret = "ace_csw_kordTripod"; + disassembleTurret = QEGVAR(csw,kordTripod); desiredAmmo = 100; ammoLoadTime = 10; ammoUnloadTime = 8; @@ -97,7 +97,7 @@ class CfgVehicles { class CUP_KORD_MiniTripod_Base: CUP_KORD_Base { class ace_csw: ace_csw { enabled = 1; - disassembleTurret = "ace_csw_kordTripodLow"; + disassembleTurret = QEGVAR(csw,kordTripodLow); }; }; @@ -108,7 +108,7 @@ class CfgVehicles { proxyWeapon = "CUP_proxy_AGS30"; magazineLocation = "_target selectionPosition 'otochlaven'"; disassembleWeapon = "CUP_AGS30_carry"; - disassembleTurret = "ace_csw_sag30Tripod"; + disassembleTurret = QEGVAR(csw,sag30Tripod); desiredAmmo = 29; ammoLoadTime = 10; ammoUnloadTime = 8; @@ -121,7 +121,7 @@ class CfgVehicles { proxyWeapon = "CUP_proxy_MK19"; magazineLocation = "_target selectionPosition 'otochlaven'"; disassembleWeapon = "CUP_MK19_carry"; - disassembleTurret = "ace_csw_m3TripodLow"; + disassembleTurret = QEGVAR(csw,m3TripodLow); desiredAmmo = 48; ammoLoadTime = 10; ammoUnloadTime = 8; @@ -148,7 +148,7 @@ class CfgVehicles { proxyWeapon = "CUP_proxy_TOW"; magazineLocation = "_target selectionPosition 'otochlaven'"; disassembleWeapon = "CUP_TOW_carry"; - disassembleTurret = "ace_csw_m220Tripod"; + disassembleTurret = QEGVAR(csw,m220Tripod); desiredAmmo = 1; ammoLoadTime = 8; ammoUnloadTime = 5; @@ -167,7 +167,7 @@ class CfgVehicles { proxyWeapon = "CUP_proxy_SPG9"; magazineLocation = "_target selectionPosition 'handle'"; disassembleWeapon = "CUP_SPG9_carry"; - disassembleTurret = "ace_csw_spg9Tripod"; + disassembleTurret = QEGVAR(csw,spg9Tripod); desiredAmmo = 1; ammoLoadTime = 5; ammoUnloadTime = 3; From 038dce8b3acb935a13fec9b3c9a79a039c971699 Mon Sep 17 00:00:00 2001 From: Bailey Danyluk Date: Tue, 17 Sep 2024 10:59:33 -0600 Subject: [PATCH 41/95] Cargo - Add object variable for custom interaction delay (#10308) --- addons/cargo/XEH_PREP.hpp | 1 + addons/cargo/functions/fnc_deployConfirm.sqf | 2 +- addons/cargo/functions/fnc_getDelayItem.sqf | 26 ++++++++++++++++++++ addons/cargo/functions/fnc_startLoadIn.sqf | 2 +- addons/cargo/functions/fnc_startUnload.sqf | 4 +-- docs/wiki/framework/cargo-framework.md | 20 +++++++++++---- 6 files changed, 46 insertions(+), 9 deletions(-) create mode 100644 addons/cargo/functions/fnc_getDelayItem.sqf diff --git a/addons/cargo/XEH_PREP.hpp b/addons/cargo/XEH_PREP.hpp index 10281e29674..4632a401f17 100644 --- a/addons/cargo/XEH_PREP.hpp +++ b/addons/cargo/XEH_PREP.hpp @@ -5,6 +5,7 @@ PREP(canUnloadItem); PREP(deployCancel); PREP(deployConfirm); PREP(getCargoSpaceLeft); +PREP(getDelayItem); PREP(getNameItem); PREP(getSelectedItem); PREP(getSizeItem); diff --git a/addons/cargo/functions/fnc_deployConfirm.sqf b/addons/cargo/functions/fnc_deployConfirm.sqf index 27674b0515b..e4c87342f04 100644 --- a/addons/cargo/functions/fnc_deployConfirm.sqf +++ b/addons/cargo/functions/fnc_deployConfirm.sqf @@ -24,7 +24,7 @@ if (!isNull GVAR(itemPreviewObject) && {[GVAR(selectedItem), GVAR(interactionVeh // Position is AGL for unloading event private _position = ASLToAGL getPosASL GVAR(itemPreviewObject); private _direction = getDir GVAR(itemPreviewObject); - private _duration = GVAR(loadTimeCoefficient) * (GVAR(selectedItem) call FUNC(getSizeItem)); + private _duration = [GVAR(selectedItem), false] call FUNC(getDelayItem); // If unload time is 0, don't show a progress bar if (_duration <= 0) exitWith { diff --git a/addons/cargo/functions/fnc_getDelayItem.sqf b/addons/cargo/functions/fnc_getDelayItem.sqf new file mode 100644 index 00000000000..7f1d6b4d401 --- /dev/null +++ b/addons/cargo/functions/fnc_getDelayItem.sqf @@ -0,0 +1,26 @@ +#include "..\script_component.hpp" +/* + * Author: tcvm + * Gets the delay duration an item should take to load/unload. + * + * Arguments: + * 0: Item or + * 1: If delay is for paradrop context + * + * Return Value: + * Item load/unload duration + * + * Example: + * [cursorObject, false] call ace_cargo_fnc_getDelayItem + * + * Public: No + */ + +params ["_item", "_isParadrop"]; + +if ((_item isEqualType objNull) && {_item getVariable [QGVAR(delay), -1] >= 0}) exitWith { + _item getVariable QGVAR(delay) // return +}; + +([GVAR(loadTimeCoefficient), GVAR(paradropTimeCoefficent)] select _isParadrop) * (_item call FUNC(getSizeItem)) // return + diff --git a/addons/cargo/functions/fnc_startLoadIn.sqf b/addons/cargo/functions/fnc_startLoadIn.sqf index 7212d89c229..23d62c7c01b 100644 --- a/addons/cargo/functions/fnc_startLoadIn.sqf +++ b/addons/cargo/functions/fnc_startLoadIn.sqf @@ -36,7 +36,7 @@ if (isNull _vehicle) exitWith { // Start progress bar if ([_item, _vehicle] call FUNC(canLoadItemIn)) then { - private _duration = GVAR(loadTimeCoefficient) * (_item call FUNC(getSizeItem)); + private _duration = [_item, false] call FUNC(getDelayItem); // If load time is 0, don't show a progress bar if (_duration <= 0) exitWith { diff --git a/addons/cargo/functions/fnc_startUnload.sqf b/addons/cargo/functions/fnc_startUnload.sqf index 39dbf59f48a..e5eaab76dc7 100644 --- a/addons/cargo/functions/fnc_startUnload.sqf +++ b/addons/cargo/functions/fnc_startUnload.sqf @@ -26,7 +26,7 @@ if (GVAR(interactionParadrop)) exitWith { // Close the cargo menu closeDialog 0; - private _duration = GVAR(paradropTimeCoefficent) * (_item call FUNC(getSizeItem)); + private _duration = [_item, true] call FUNC(getDelayItem); // If drop time is 0, don't show a progress bar if (_duration <= 0) exitWith { @@ -81,7 +81,7 @@ if ([_item, GVAR(interactionVehicle), _unit] call FUNC(canUnloadItem)) then { // Close the cargo menu closeDialog 0; - private _duration = GVAR(loadTimeCoefficient) * (_item call FUNC(getSizeItem)); + private _duration = [_item, false] call FUNC(getDelayItem); // If unload time is 0, don't show a progress bar if (_duration <= 0) exitWith { diff --git a/docs/wiki/framework/cargo-framework.md b/docs/wiki/framework/cargo-framework.md index a1d810ce9c4..2e3e695e688 100644 --- a/docs/wiki/framework/cargo-framework.md +++ b/docs/wiki/framework/cargo-framework.md @@ -114,7 +114,17 @@ Note that this function can be used to make objects loadable/unloadable (set to * [object, 3] call ace_cargo_fnc_setSize ``` -### 4.3 Adjusting cargo space of a vehicle +### 4.3 Setting Custom Load/Unload Time + +```sqf +object setVariable ["ace_cargo_delay",