diff --git a/AUTHORS.txt b/AUTHORS.txt index 2213cb24ad..bdefba63f0 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -1,4 +1,4 @@ -# ACE3 CONTRIBUTOR LIST +# ACE3 CONTRIBUTOR LIST # If you contributed, but are not listed here, contact me: # koffeinflummi@gmail.com # @@ -38,6 +38,7 @@ Aggr094 alef Aleksey EpMAK Yermakov Alganthe +Andrea "AtixNeon" Verano Anthariel Arcanum417 Arkhir @@ -84,6 +85,7 @@ Harakhti havena Hawkins Head +Hybrid V Karneck Kavinsky Kllrt diff --git a/README.md b/README.md index b885f22b23..733af4eaed 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@

- ACE3 Version + ACE3 Version ACE3 Issues diff --git a/ace_advanced_ballistics.dll b/ace_advanced_ballistics.dll index 09b93a543f..7b1d952b12 100644 Binary files a/ace_advanced_ballistics.dll and b/ace_advanced_ballistics.dll differ diff --git a/ace_advanced_ballistics_x64.dll b/ace_advanced_ballistics_x64.dll index e2dae5caab..d50c374fc7 100644 Binary files a/ace_advanced_ballistics_x64.dll and b/ace_advanced_ballistics_x64.dll differ diff --git a/addons/advanced_ballistics/stringtable.xml b/addons/advanced_ballistics/stringtable.xml index 606009a2c8..31b9b56bb9 100644 --- a/addons/advanced_ballistics/stringtable.xml +++ b/addons/advanced_ballistics/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -151,7 +151,7 @@ Active la balistique avancée pour tous les joueurs non locaux (activer cette option peut avoir un impact sur les performance en multi durant les grands échanges de tirs) Engedélyezi a fejlett ballisztikát az összes nem-helyi játékosnak (ez a funkció leronthatja a teljesítményt intenzív többjátékos tűzharcok alatt) Включает продвинутую баллистику для всех нелокальных игроков (включение этой опции может снизить производительность при массовых перестрелках в мультиплеере) - Abilita Balistica Avanzata per tutti i giocatori non locali (abilitare questo parametro potrebbe degradare le prestazioni durante scontri intensi in multiplayer) + Abilita Balistica Avanzata per tutti i giocatori non locali (abilitare questo parametro potrebbe ridurre le prestazioni durante scontri intensi in multiplayer) 非ローカルの全プレイヤーへアドバンスド バリスティックスを有効化します (マルチプレイで大規模な銃撃戦がおこなわれると、動作の低下を招きます) 고급 탄도학을 모든 비-로컬그룹에게도 적용합니다(적용 후 대규모 전투시 성능하락을 유발할 수 있습니다) @@ -179,7 +179,7 @@ Active tout le temps la balistique avancée quand un membre du groupe ouvre le feu Mindig engedélyezi a fejlett ballisztikát, ha egy csoporttag tüzel Всегда включает продвинутую баллистику когда стреляет член группы - Abilita sempre Balistica Avanzata quando un Membro del Gruppo spara + Abilita sempre Balistica Avanzata quando un membro del gruppo spara グループ メンバーが射撃した時、常にアドバンスド バリスティックスを有効化します 그룹 멤버가 발사시 항상 고급 탄도학을 적용합니다 @@ -235,7 +235,7 @@ La température de la munition influe sur la vélocité intiale A kezdősebesség a lőszer hőmérsékletétől függően változó Начальная скорость пули зависит от температуры - Velocità alla volata varia con la temperatura delle munizioni + La velocità dello sparo varia a seconda della temperatura delle munizioni 弾薬の温度により初速値を変化させます 탄약 온도에 비례해 총구 속도가 달라집니다 @@ -263,7 +263,7 @@ La longueur du canon influe sur la vélocité initale A kezdősebesség a cső hosszától függően változó Начальная скорость пули зависит от длины ствола - Velocità alla volata varia con la lunghezza della canna + La velocità di sparo varia a seconda della lunghezza della canna 銃身長により初速値を変化させます 총구 속도가 총열에 비례해 달라집니다 @@ -277,7 +277,7 @@ Activer l'effet balle traçante Nyomkövető-effekt engedélyezése Следы пуль - Abilita effetto di tracciatura dei proiettili + Abilita effetto dei Proiettili Traccianti 弾丸の痕跡表示を有効化 예광탄 효과 적용 @@ -291,7 +291,7 @@ Active une tracante pour les munitions de gros calibre (seulement visible en utilisant des optiques avancées) Engedélyezi a nagy kaliberű lövedékek nyomának vizuális követését (csak nagy teljesítményű optikán keresztül látható) Включает эффект следов пуль для больших калибров (видны только через мощную оптику) - Abilita effetto di tracciatura per proiettili di alto calibro (visibile solo attraverso ottiche ad alto potenziale) + Abilita effetto dei proiettili traccianti di alto calibro (visibile solo attraverso ottiche ad alto potenziale) 大口径の銃弾による弾丸の痕跡表示を有効化します (高倍率スコープを介してでしか見れません) 대구경 탄환에 예광탄 효과를 적용합니다(오직 고성능 조준경 사용시에만 보입니다) diff --git a/addons/advanced_fatigue/stringtable.xml b/addons/advanced_fatigue/stringtable.xml index 4a02cb07dd..02924c0ae9 100644 --- a/addons/advanced_fatigue/stringtable.xml +++ b/addons/advanced_fatigue/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -8,6 +8,7 @@ Współczynnik wydolności 성능 요인 Facteur de performance + Fattore Prestazione Influences the overall performance of all players with no custom factor. Higher means better. @@ -16,6 +17,7 @@ Wpływa na ogólną wydolność organizmu u wszystkich graczy bez ustawionego niestandardowego współczynnika. Więcej znaczy lepiej. 모든 성능이 임의로 설정된 값 없이 영향받습니다. 값이 클수록 더 나은 성능을 발휘합니다 Influence les performances générales de tous les joueurs sans facteurs personalisés. Une valeur plus élevée implique de meilleures performances. + Influenza qualsiasi prestazione di tutti i giocatori smuniti di un fattore personalizzato. Maggiore significa migliore. Influences the overall performance of this unit. Higher means better. @@ -24,6 +26,7 @@ Wpływa na ogólną wydolność tej jednostki. Więcej znaczy lepiej. 모든 성능이 이 단위로 영향을 받습니다. 값이 클수록 더 나은 성능을 발휘합니다 Influence les performances générales de cette unité. Une valeur plus élevée implique de meilleures performances. + Influenza qualsiasi prestazione di questa unità. Maggiore significa migliore. Recovery Factor @@ -32,6 +35,7 @@ Współczynnik regeneracji 회복 요인 Facteur de récupération + Fattore Recupero Changes how fast the player recovers when resting. Higher is faster. @@ -40,6 +44,7 @@ Wpływa na czas regeneracji podczas postoju. Więcej znaczy szybciej. 얼마나 빨리 회복하는지를 바꿉니다. 값이 클수록 더 나은 성능을 발휘합니다 Change la vitesse à laquelle les joueurs récupèrent leur endurance lorsqu'ils se reposent. Une valeur plus élevée implique une récupération plus rapide. + Determina in quanto tempo il giocatore recupera quando rilassato. Maggiore significa migliore. Load Factor @@ -48,6 +53,7 @@ Współczynnik masy ekwipunku 부담 요인 Facteur d'encombrement + Fattore Caricamento Increases or decreases how much weight influences the players performance. Zero means equipment weight has no performance influence. @@ -56,6 +62,7 @@ Zmniejsza lub zwiększa wpływ ciężaru ekwipunku na wydolność gracza. Zero oznacza kompletny brak wpływu na wydolność. 플레이어가 무게에 따라 얼마나 영향받는지를 증가시키거나 감소시킵니다. 0의 경우 플레이어가 장비 무게에 영향받지 않습니다. Augmente ou réduit l'influence que le poids à sur les performances des joueurs. Zéro implique que le poids de l'équipement n'a pas d'influence sur les performances. + Incrementa o decrementa quanto il peso influenza le prestazioni dei giocatori. Zero significa che il peso dell'equipaggiamento non ha alcuna influenza nelle prestazioni. Terrain Gradient Factor @@ -64,6 +71,7 @@ Współczynnik terenu 지형 경사도 요인 Facteur d'inclinaison du terrain + Fattore Pendenza Terreno Sets how much steep terrain increases stamina loss. Higher means higher stamina loss. @@ -72,6 +80,7 @@ Wpływa na to w jakim stopniu stromy teren wpływa na utratę wytrzymałości. Więcej oznacza szybszą utratę wytrzymałości. 경사도에 따라 얼마나 피로해지는지를 정합니다. 값이 클수록 더 많은 피로를 유발합니다. Configure l'influence de l'inclinaison du terrain sur la perte d'endurance. Une valeur plus élevée implique une perte d'endurance plus importante. + Stabilisce quanto la pendenza del terreno incrementa la perdita della stamina. Maggiore significa più stamina persa. Enabled @@ -80,6 +89,7 @@ Włączone 활성화 Activé + Abilitato Enables/disables Advanced Fatigue. @@ -88,6 +98,7 @@ Włącza/wyłącza zaawansowaną wytrzymałość 고급 피로도 활성화/비활성화 Active/désactive la fatigue avancée. + Abilita/disabilita la Fatica Avanzata. Show stamina bar @@ -96,6 +107,7 @@ Pokaż pasek wytrzymałości 피로도 막대 Afficher la barre d'endurance + Mostra barra stamina Shows the stamina bar. @@ -104,6 +116,7 @@ Pokazuje pasek wytrzymałości. 피로도 막대를 보여줍니다. Affiche la barre d'endurance. + Mostra la barra della stamina. diff --git a/addons/advanced_throwing/XEH_postInit.sqf b/addons/advanced_throwing/XEH_postInit.sqf index 3754be0e2d..0f5cb6983e 100644 --- a/addons/advanced_throwing/XEH_postInit.sqf +++ b/addons/advanced_throwing/XEH_postInit.sqf @@ -93,6 +93,7 @@ GVAR(ammoMagLookup) = call CBA_fnc_createNamespace; // Set last thrown time on Vanilla Throwing and Advanced Throwing ["ace_firedPlayer", { + //IGNORE_PRIVATE_WARNING ["_unit", "_weapon"]; if (_weapon == "Throw") then { _unit setVariable [QGVAR(lastThrownTime), CBA_missionTime]; }; diff --git a/addons/advanced_throwing/functions/fnc_drawThrowable.sqf b/addons/advanced_throwing/functions/fnc_drawThrowable.sqf index 226519b931..b4155ecfcd 100644 --- a/addons/advanced_throwing/functions/fnc_drawThrowable.sqf +++ b/addons/advanced_throwing/functions/fnc_drawThrowable.sqf @@ -36,6 +36,11 @@ if (_throwable isEqualTo [] && {!_primed}) exitWith { private _throwableMag = _throwable param [0, "#none"]; +// If not primed, double check we actually have the magazine in inventory +if ((!_primed) && {!(_throwableMag in (magazines ACE_player))}) exitWith { + [ACE_player, "No valid throwable (glitched currentThrowable)"] call FUNC(exitThrowMode); +}; + // Get correct throw power for primed grenade if (_primed) then { private _ammoType = typeOf _activeThrowable; diff --git a/addons/advanced_throwing/functions/fnc_exitThrowMode.sqf b/addons/advanced_throwing/functions/fnc_exitThrowMode.sqf index 359bd946a5..33ff556f6a 100644 --- a/addons/advanced_throwing/functions/fnc_exitThrowMode.sqf +++ b/addons/advanced_throwing/functions/fnc_exitThrowMode.sqf @@ -34,7 +34,8 @@ if !(_unit getVariable [QGVAR(primed), false]) then { _activeThrowable setVelocity [0, 0, -0.1]; // Set thrower - [QEGVAR(common,setShotParents), [_activeThrowable, _unit, (getShotParents _activeThrowable) select 1]] call CBA_fnc_serverEvent; + private _instigator = (getShotParents _activeThrowable) param [1, _unit]; // getShotParents could be [] on replaced grenades (like IR chemlight) + [QEGVAR(common,setShotParents), [_activeThrowable, _unit, _instigator]] call CBA_fnc_serverEvent; }; // Restore muzzle ammo (setAmmo 1 has no impact if no appliccable throwable in inventory) diff --git a/addons/advanced_throwing/stringtable.xml b/addons/advanced_throwing/stringtable.xml index 2cc7a9c8b6..2874570523 100644 --- a/addons/advanced_throwing/stringtable.xml +++ b/addons/advanced_throwing/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -9,6 +9,7 @@ Erweitertes Wurfsystem 고급 투척 Lancé amélioré + Lancio Avanzato Allows changing advanced throwing behaviour. @@ -18,6 +19,7 @@ Erlaubt es, das Verhalten des erweiterten Wurfsystems zu ändern. 고급 투척 행위를 허가합니다 Permet de changer la configuration du lancé amélioré. + Permette il cambiamento della modalità di tiro. Enable Advanced Throwing @@ -27,6 +29,7 @@ Aktiviere erweitertes Wurfsystem 고급 투척 활성화 Active le lancé amélioré + Abilita Lancio Avanzato Enables advanced throwing system. @@ -36,6 +39,7 @@ Aktiviert das erweiterte Wurfsystem. 고급 투척을 활성화 합니다 Active le système de lancé amélioré. + Abilita il sistema di lancio avanzato. Show Throw Arc @@ -45,6 +49,7 @@ Zeige Wurfbogen 투척 궤적 표시 Afficher l'arc de lancé + Mostra Arco di Tiro Enables visualization of the throw arc (where throwable will fly). @@ -54,6 +59,7 @@ Aktiviert die Visualisierung des Wurfbogens (wohin das Objekt geworfen werden wird). 투척 궤도를 시각화 합니다(투척물이 어디로 갈지) Active la visualisation de l'arc de lancé (où l'objet lancé va atterrir). + Abilita la visualizzazione dell'arco del tiro (dove l'oggetto lanciabile volerà). Show Throwing Mouse Controls @@ -63,6 +69,7 @@ Zeige Maussteuerung beim Werfen 마우스 조작 표시 Afficher les contrôles à la souris du lancé + Mostra Comandi Mouse Lancio Enables visual cues for mouse controls when throwable is prepared. @@ -72,6 +79,7 @@ Aktiviert visuelle Hinweise zur Maussteuerung, wenn ein Objekt zum Werfen vorbereitet wird. 투척물을 준비시 마우스 조작을 시각화해서 보여줍니다 Active les aides visuels pour les controles à la souris lorsqu'un lancé est préparé. + Abilita la visualizzazione dei controlli del mouse quando l'oggetto lanciabile è pronto. Enable Throwables Pick Up @@ -81,6 +89,7 @@ Aktiviere Aufheben von Wurfobjekten 투척물 줍기 활성화 Active la récupération des objets lancés + Abilita Raccogli Oggetti Enables ability to pick up throwables from the ground. @@ -90,6 +99,7 @@ Aktiviert die Möglichkeit, geworfene Objekte wieder vom Boden aufzuheben. 땅에 떨어진 투척물을 주울 수 있게 해줍니다. Active la capacité de récupérer les objets lancés sur le sol. + Abilita la possibilità di raccogliere un oggetto lanciabile da terra. Enable Attached Throwables Pick Up @@ -99,6 +109,7 @@ Aktiviere erneute Aufnahme befestigter Wurfobjekte 부착 투척물 줍기 활성화 Active le ramassage d'objets lançables attachés + Abilita Raccogli Oggetti Lanciabili da altri Oggetti Enables ability to pick up throwables from attached objects. @@ -108,6 +119,7 @@ Aktiviert die Möglichkeit, befestigte Wurfobjekte erneut aufzunehmen. 부착된 투척물을 주울 수 있게 해줍니다. Active la capacité à ramasser les objets lançables attaché à d'autres objets. + Abilita la possibilità di raccogliere gli oggetti lanciabili dagli altri oggetti. Prepare/Change Throwable @@ -117,6 +129,7 @@ Wurfobjekt vorbereiten/wechseln 투척물 준비/변경 Préparer/changer d'objet + Prepara/Cambia Oggetto lanciabile Throwable Drop Mode (Hold) @@ -126,6 +139,7 @@ Wurfobjekt Fallmodus (halten) 투척물 떨어뜨리기 모드(꾹눌러서) Mode de lancé de l'objet (Tenir) + Modalità Oggetto Gettabile (Mantenere) Throwable Drop Mode (Toggle) @@ -135,6 +149,7 @@ Wurfobjekt Fallmodus (umschalten) 투척물 떨어뜨리기 모드(토글) Mode de lancé de l'objet (Basculer) + Modalità Oggetto lanciabile Gettabile (Interruttore) Primed @@ -144,6 +159,7 @@ Scharf gemacht 뇌관 작동 Amorcer + Armato Throw @@ -153,6 +169,7 @@ Werfen 던지기 Lancer + Lanciare (Scroll) Change Mode @@ -162,6 +179,7 @@ (Scrollen) Modus wechseln (마우스 휠) 모드 변경 (Molette souris) Changer de mode + (Scorrere) Cambio Modalità (Scroll) Extend @@ -171,6 +189,7 @@ (Scrollen) Erweitern (마우스 휠) 연장 (Molette souris) Etendre + (Scorrere) Estendere (Click) Cook @@ -180,6 +199,7 @@ (Klicken) Abkochen (클릭) 예열 (Clique) Dégoupiller + (Click) Arma Pick Up @@ -189,6 +209,7 @@ Aufheben 줍기 Ramasser + Raccogli diff --git a/addons/aircraft/CfgAmmo.hpp b/addons/aircraft/CfgAmmo.hpp index ec7cfd6a54..0da9c7760f 100644 --- a/addons/aircraft/CfgAmmo.hpp +++ b/addons/aircraft/CfgAmmo.hpp @@ -39,29 +39,20 @@ class CfgAmmo { // also adjust tracer, "muh lightshow"; also adjust splash damage radius class Gatling_30mm_HE_Plane_CAS_01_F: BulletBase { - hit = 80; - indirectHit = 12; - indirectHitRange = 3; //2; - caliber = 1.4; - deflecting = 3; - fuseDistance = 3; - tracerStartTime = 0.02; - timeToLive = 40; + hit = 80; // default: 180 + indirectHit = 12; // default: 4 + indirectHitRange = 3; // default: 3 + caliber = 1.4; // default: 5 + deflecting = 3; // default: 5 + fuseDistance = 3; // default: 10 + tracerStartTime = 0.02; // default: 0.1 + timeToLive = 40; // default: 6 }; - // helper projectiles to simulate a rof > fps - class ACE_Gatling_30mm_HE_Plane_CAS_01_Deploy: Gatling_30mm_HE_Plane_CAS_01_F { - simulation = "shotSubmunitions"; - triggerTime = 0; - submunitionAmmo = "ACE_Gatling_30mm_HE_Plane_CAS_01_Sub"; - submunitionConeType[] = {"custom", {{0,0}, {0,0}, {0,0}} }; - }; - class ACE_Gatling_30mm_HE_Plane_CAS_01_Sub: Gatling_30mm_HE_Plane_CAS_01_F {}; - // adjust damage and splash damage, closer to bluefor gatling with same caliber class Cannon_30mm_HE_Plane_CAS_02_F: Gatling_30mm_HE_Plane_CAS_01_F { - hit = 70; //40; - indirectHit = 11; //14; - indirectHitRange = 3; + hit = 70; // default: 150 + indirectHit = 11; // default: 4 + indirectHitRange = 3; // default: 3 }; }; diff --git a/addons/aircraft/CfgMagazines.hpp b/addons/aircraft/CfgMagazines.hpp index 6d35e90255..19797b53d8 100644 --- a/addons/aircraft/CfgMagazines.hpp +++ b/addons/aircraft/CfgMagazines.hpp @@ -2,7 +2,6 @@ class CfgMagazines { // shoot helper object to tripple rof class VehicleMagazine; class 1000Rnd_Gatling_30mm_Plane_CAS_01_F: VehicleMagazine { - ammo = "ACE_Gatling_30mm_HE_Plane_CAS_01_Deploy"; count = 1170; }; diff --git a/addons/aircraft/CfgVehicles.hpp b/addons/aircraft/CfgVehicles.hpp index f5f496505e..3279d35f71 100644 --- a/addons/aircraft/CfgVehicles.hpp +++ b/addons/aircraft/CfgVehicles.hpp @@ -33,12 +33,10 @@ class CfgVehicles { class Turrets: Turrets { class CopilotTurret; }; - //class UserActions; }; class Heli_Light_01_base_F: Helicopter_Base_H { - lockDetectionSystem = 0; - incomingMissileDetectionSystem = 16; + incomingMissileDetectionSystem = 16; // Vanilla: 0 driverCanEject = 1; class Turrets: Turrets { @@ -49,16 +47,8 @@ class CfgVehicles { }; }; - class Heli_Light_01_unarmed_base_F: Heli_Light_01_base_F {}; - class B_Heli_Light_01_F: Heli_Light_01_unarmed_base_F { - /*class Turrets: Turrets { - class CopilotTurret: CopilotTurret {}; - };*/ - }; - class Heli_Light_01_armed_base_F: Heli_Light_01_base_F { - lockDetectionSystem = 0; - incomingMissileDetectionSystem = 16; + incomingMissileDetectionSystem = 16; // Vanilla: 0 driverCanEject = 1; class Turrets: Turrets { @@ -67,13 +57,10 @@ class CfgVehicles { }; }; }; - - class B_Heli_Light_01_armed_F: Heli_Light_01_armed_base_F {}; class Heli_Light_02_base_F: Helicopter_Base_H { driverCanEject = 1; - lockDetectionSystem = 12; - incomingMissileDetectionSystem = 16; - magazines[] = {"2000Rnd_762x51_Belt_T_Green", "12Rnd_PG_missiles", "168Rnd_CMFlare_Chaff_Magazine"}; + incomingMissileDetectionSystem = 16; // Vanilla: 24 + magazines[] = {"2000Rnd_762x51_Belt_T_Green", "12Rnd_PG_missiles", "168Rnd_CMFlare_Chaff_Magazine"}; // Switch gun magazine to 7.62mm from 6.5mm class Turrets: Turrets { class CopilotTurret: CopilotTurret { @@ -91,10 +78,8 @@ class CfgVehicles { #include "Heli_Attack_01_base_F.hpp" - class B_Heli_Attack_01_F: Heli_Attack_01_base_F {}; class Heli_Attack_02_base_F: Helicopter_Base_F { - lockDetectionSystem = 12; - incomingMissileDetectionSystem = 16; + incomingMissileDetectionSystem = 16; // Vanilla: 24 driverCanEject = 1; class Turrets: Turrets { @@ -105,8 +90,7 @@ class CfgVehicles { }; class Heli_Transport_01_base_F: Helicopter_Base_H { - lockDetectionSystem = 12; - incomingMissileDetectionSystem = 16; + incomingMissileDetectionSystem = 16; // Vanilla: 24 driverCanEject = 1; class Turrets: Turrets { @@ -116,35 +100,19 @@ class CfgVehicles { }; class MainTurret: MainTurret { - magazines[] = {"2000Rnd_762x51_Belt_T_Red"}; + magazines[] = {"2000Rnd_762x51_Belt_T_Red"}; // Switch gun magazine to 7.62mm from 6.5mm canEject = 1; }; class RightDoorGun: MainTurret { - magazines[] = {"2000Rnd_762x51_Belt_T_Red"}; + magazines[] = {"2000Rnd_762x51_Belt_T_Red"}; // Switch gun magazine to 7.62mm from 6.5mm canEject = 1; }; }; - /*class UserActions { - class DoorL1_Open { - available = 1; - condition = "((this doorPhase 'door_L') == 0) AND Alive(this) AND driver this != player AND gunner this != player"; - }; - class DoorR1_Open: DoorL1_Open { - condition = "((this doorPhase 'door_R') == 0) AND Alive(this) AND driver this != player AND gunner this != player"; - }; - class DoorL1_Close: DoorL1_Open { - condition = "((this doorPhase 'door_L') > 0) AND Alive(this) AND driver this != player AND gunner this != player"; - }; - class DoorR1_Close: DoorL1_Close { - condition = "((this doorPhase 'door_R') > 0) AND Alive(this) AND driver this != player AND gunner this != player"; - }; - };*/ }; class Heli_Transport_02_base_F: Helicopter_Base_H { - lockDetectionSystem = 12; - incomingMissileDetectionSystem = 16; + incomingMissileDetectionSystem = 16; // Vanilla: 24 driverCanEject = 1; class Turrets: Turrets { @@ -153,121 +121,51 @@ class CfgVehicles { showHMD = 1; }; }; - /*class UserActions: UserActions { - class DoorL1_Open { - available = 1; - condition = "this animationPhase ""door_back_L"" < 0.5 AND Alive(this)"; - }; - class DoorR1_Open: DoorL1_Open { - condition = "this animationPhase ""door_back_R"" < 0.5 AND Alive(this)"; - }; - class DoorL1_Close: DoorL1_Open { - condition = "this animationPhase ""door_back_L"" > 0.5 AND Alive(this)"; - }; - class DoorR1_Close: DoorL1_Close { - condition = "this animationPhase ""door_back_R"" > 0.5 AND Alive(this)"; - }; - class CargoRamp_Open: DoorL1_Open { - userActionID = 52; - displayName = CSTRING(OpenCargoRamp); - textToolTip = CSTRING(OpenCargoRamp); - position = "action_cargoramp"; - radius = 3.0; - condition = "this animationPhase ""cargoramp_open"" < 0.5 AND Alive(this)"; - statement = "this animateDoor ['cargoramp_open', 1]"; - }; - class CargoRamp_Close: DoorL1_Close { - userActionID = 55; - displayName = CSTRING(CloseCargoRamp); - textToolTip = CSTRING(CloseCargoRamp); - position = "action_cargoramp"; - radius = 3.0; - condition = "this animationPhase ""cargoramp_open"" > 0.5 AND Alive(this)"; - statement = "this animateDoor ['cargoramp_open', 0]"; - }; - };*/ }; class Heli_light_03_base_F: Helicopter_Base_F { + lockDetectionSystem = 0; // Vanilla: 12 + incomingMissileDetectionSystem = 16; // Vanilla: 24 driverCanEject = 1; class Turrets: Turrets { class MainTurret: MainTurret { canEject = 1; - }; - }; - }; - class I_Heli_light_03_F: Heli_light_03_base_F { - lockDetectionSystem = 0; - incomingMissileDetectionSystem = 16; - weapons[] = {"M134_minigun", "missiles_DAR", "CMFlareLauncher", "ACE_AIR_SAFETY" }; - magazines[] = {"5000Rnd_762x51_Yellow_Belt", "24Rnd_missiles", "168Rnd_CMFlare_Chaff_Magazine"}; - - class Turrets: Turrets { - class MainTurret: MainTurret { showHMD = 1; - gunBeg = "commanderview"; - gunEnd = "laserstart"; - memoryPointGun = "laserstart"; - stabilizedInAxes = 3; - weapons[] = {"Laserdesignator_mounted"}; - soundServo[] = {"", 0.01, 1, 30}; + weapons[] = {"Laserdesignator_mounted"}; // Add Laser Designator magazines[] = {"Laserbatteries"}; - inGunnerMayFire = 1; }; }; }; - class Heli_light_03_unarmed_base_F: Heli_light_03_base_F {}; - class I_Heli_light_03_unarmed_F: Heli_light_03_unarmed_base_F {}; - class Plane_CAS_01_base_F: Plane_Base_F { - lockDetectionSystem = 12; - incomingMissileDetectionSystem = 16; - class Turrets; - #include + class Plane_CAS_01_base_F: Plane_Base_F { + lockDetectionSystem = 12; // Vanilla: 8 + incomingMissileDetectionSystem = 16; // Vanilla: 24 }; class Plane_CAS_02_base_F: Plane_Base_F { - lockDetectionSystem = 12; - incomingMissileDetectionSystem = 16; - class Turrets; - - #include + lockDetectionSystem = 12; // Vanilla: 8 + incomingMissileDetectionSystem = 16; // Vanilla: 24 }; class Plane_Fighter_03_base_F: Plane_Base_F { - lockDetectionSystem = 12; - incomingMissileDetectionSystem = 16; - class Turrets; - - #include - }; - - class UAV_01_base_F: Helicopter_Base_F { - /*class Turrets: Turrets { - class MainTurret: MainTurret {}; - };*/ + lockDetectionSystem = 12; // Vanilla: 8 + incomingMissileDetectionSystem = 16; // Vanilla: 24 }; class UAV_02_base_F: UAV { - weapons[] = {}; + weapons[] = {}; // Remove flare launcher magazines[] = {}; - - class Turrets { - class MainTurret; - }; }; class UAV_02_CAS_base_F: UAV_02_base_F { - weapons[] = {}; + weapons[] = {}; // Remove flare launcher magazines[] = {}; - /*class Turrets: Turrets { - class MainTurret: MainTurret {}; - };*/ }; class Heli_Transport_03_base_F: Helicopter_Base_H { + incomingMissileDetectionSystem = 16; // Vanilla: 24 driverCanEject = 1; class Turrets: Turrets { @@ -276,14 +174,8 @@ class CfgVehicles { }; }; }; - class B_Heli_Transport_03_F: Heli_Transport_03_base_F { - lockDetectionSystem = 12; - incomingMissileDetectionSystem = 16; - }; - class Heli_Transport_04_base_F: Helicopter_Base_H { - lockDetectionSystem = 12; - incomingMissileDetectionSystem = 16; + incomingMissileDetectionSystem = 16; // Vanilla: 24 driverCanEject = 1; class Turrets: Turrets { @@ -296,28 +188,4 @@ class CfgVehicles { }; }; }; - - class O_Heli_Transport_04_bench_F: Heli_Transport_04_base_F { - class Turrets: Turrets { - class CopilotTurret: CopilotTurret { - canEject = 1; - }; - - class LoadmasterTurret: LoadmasterTurret { - canEject = 1; - }; - }; - }; - - class O_Heli_Transport_04_covered_F: Heli_Transport_04_base_F { - class Turrets: Turrets { - class CopilotTurret: CopilotTurret { - canEject = 1; - }; - - class LoadmasterTurret: LoadmasterTurret { - canEject = 1; - }; - }; - }; }; diff --git a/addons/aircraft/CfgWeapons.hpp b/addons/aircraft/CfgWeapons.hpp index b94d9f4940..2d16223e1d 100644 --- a/addons/aircraft/CfgWeapons.hpp +++ b/addons/aircraft/CfgWeapons.hpp @@ -1,5 +1,3 @@ -class Mode_SemiAuto; -class Mode_Burst; class Mode_FullAuto; class CfgWeapons { @@ -18,20 +16,6 @@ class CfgWeapons { magazineReloadTime = 0.1; }; - // Manual Switching Of Flare Mode - class SmokeLauncher; - class CMFlareLauncher: SmokeLauncher { - modes[] = {"Single", "Burst", "AIBurst"}; - - class Single: Mode_SemiAuto { - reloadTime = 0.1; - }; - - class Burst: Mode_Burst { - displayName = CSTRING(CMFlareLauncher_Burst_Name); - }; - }; - // bigger mag for comanche class CannonCore; class gatling_20mm: CannonCore { @@ -127,22 +111,4 @@ class CfgWeapons { class medium: LowROF {}; class far: medium {}; }; - - class Gatling_30mm_Plane_CAS_01_F: CannonCore { - autoFire = 1; - burst = 1; - - class LowROF: Mode_FullAuto { - autoFire = 0; - burst = 22; //65; - reloadTime = 0.0462; //0.0154; //0.034; - multiplier = 3; - }; - - class close: LowROF {}; - class near: close {}; - class short: close {}; - class medium: close {}; - class far: close {}; - }; }; diff --git a/addons/aircraft/Heli_Attack_01_base_F.hpp b/addons/aircraft/Heli_Attack_01_base_F.hpp index 5b774a3dc2..90a417000a 100644 --- a/addons/aircraft/Heli_Attack_01_base_F.hpp +++ b/addons/aircraft/Heli_Attack_01_base_F.hpp @@ -1,887 +1,13 @@ class Heli_Attack_01_base_F: Helicopter_Base_F { - lockDetectionSystem = 12; - incomingMissileDetectionSystem = 16; + incomingMissileDetectionSystem = 16; // Vanilla: 24 driverCanEject = 1; - class MFD { - class AirplaneHUD { - class Bones {}; - class Draw {}; - topLeft = "HUD_top_left"; - topRight = "HUD_top_right"; - bottomLeft = "HUD_bottom_left"; - borderLeft = 0; - borderRight = 0; - borderTop = 0; - borderBottom = 0; - color[] = {0.15, 1, 0.15, 1}; - enableParallax = 0; - helmetMountedDisplay = 1; - helmetPosition[] = {0, 0, 0}; - helmetRight[] = {0, 0, 0}; - helmetDown[] = {0, 0, 0}; - }; - - class ACE_HUD_1 { - topLeft = "HUD_top_left"; - topRight = "HUD_top_right"; - bottomLeft = "HUD_bottom_left"; - borderLeft = 0; - borderRight = 0; - borderTop = 0; - borderBottom = 0; - color[] = {0.15, 1, 0.15, 1}; - enableParallax = 0; - - class Bones { - class GunnerAim { - type = "vector"; - source = "weapon"; - pos0[] = {0.5, "0.9 - 0.04 + 0.012"}; - pos10[] = {"0.5 + 0.0111", "0.9 - 0.04 + 0.012 + 0.0133"}; - }; - - class Target { - source = "target"; - type = "vector"; - pos0[] = {0.5, 0.5}; - pos10[] = {0.85, 0.85}; - }; - - class Velocity { - type = "vector"; - source = "velocity"; - pos0[] = {0.5, 0.5}; - pos10[] = {0.65, 0.65}; - }; - - class Velocity_slip { - type = "vector"; - source = "velocity"; - pos0[] = {0.5, 0.845}; - pos10[] = {0.53, 0.845}; - }; - - class VspeedBone { - type = "linear"; - source = "vspeed"; - sourceScale = 1; - min = -10; - max = 10; - minPos[] = {0.93, 0.2}; - maxPos[] = {0.93, 0.8}; - }; - - class RadarAltitudeBone { - type = "linear"; - source = "altitudeAGL"; - sourceScale = 1; - min = 0; - max = 60; - minPos[] = {0.965, 0.2}; - maxPos[] = {0.965, 0.8}; - }; - - class HorizonBankRot { - type = "rotational"; - source = "horizonBank"; - center[] = {0.5, 0.5}; - min = -3.1416; - max = 3.1416; - minAngle = -180; - maxAngle = 180; - aspectRatio = 1; - }; - - class ForwardVec { - type = "vector"; - source = "forward"; - pos0[] = {0, 0}; - pos10[] = {0.25, 0.25}; - }; - - class WeaponAim { - type = "vector"; - source = "weapon"; - pos0[] = {0.5, 0.5}; - pos10[] = {0.75, 0.75}; - }; - - class Level0 { - type = "horizon"; - pos0[] = {0.5, 0.5}; - pos10[] = {0.78, 0.78}; - angle = 0; - }; - - class LevelP5: Level0 { - angle = 5; - }; - - class LevelM5: Level0 { - angle = -5; - }; - - class LevelP10: Level0 { - angle = 10; - }; - - class LevelM10: Level0 { - angle = -10; - }; - - class LevelP15: Level0 { - angle = 15; - }; - - class LevelM15: Level0 { - angle = -15; - }; - - class LevelP20: Level0 { - angle = 20; - }; - - class LevelM20: Level0 { - angle = -20; - }; - - class LevelP25: Level0 { - angle = 25; - }; - - class LevelM25: Level0 { - angle = -25; - }; - - class LevelP30: Level0 { - angle = 30; - }; - - class LevelM30: Level0 { - angle = -30; - }; - - class LevelP35: Level0 { - angle = 35; - }; - - class LevelM35: Level0 { - angle = -35; - }; - - class LevelP40: Level0 { - angle = 40; - }; - - class LevelM40: Level0 { - angle = -40; - }; - - class LevelP45: Level0 { - angle = 45; - }; - - class LevelM45: Level0 { - angle = -45; - }; - - class LevelP50: Level0 { - angle = 50; - }; - - class LevelM50: Level0 { - angle = -50; - }; - }; - - class Draw { - color[] = {0.18, 1, 0.18}; - alpha = 1; - condition = "on"; - - class Horizont { - clipTL[] = {0.15, 0.15}; - clipBR[] = {0.85, 0.85}; - - class Dimmed { - class Level0 { - type = "line"; - points[] = {{"Level0", {-0.42, 0}, 1}, {"Level0", {-0.38, 0}, 1}, {}, {"Level0", {-0.37, 0}, 1}, {"Level0", {-0.33, 0}, 1}, {}, {"Level0", {-0.32, 0}, 1}, {"Level0", {-0.28, 0}, 1}, {}, {"Level0", {-0.27, 0}, 1}, {"Level0", {-0.23, 0}, 1}, {}, {"Level0", {-0.22, 0}, 1}, {"Level0", {-0.18, 0}, 1}, {}, {"Level0", {-0.17, 0}, 1}, {"Level0", {-0.13, 0}, 1}, {}, {"Level0", {-0.12, 0}, 1}, {"Level0", {-0.08, 0}, 1}, {}, {"Level0", {0.42, 0}, 1}, {"Level0", {0.38, 0}, 1}, {}, {"Level0", {0.37, 0}, 1}, {"Level0", {0.33, 0}, 1}, {}, {"Level0", {0.32, 0}, 1}, {"Level0", {0.28, 0}, 1}, {}, {"Level0", {0.27, 0}, 1}, {"Level0", {0.23, 0}, 1}, {}, {"Level0", {0.22, 0}, 1}, {"Level0", {0.18, 0}, 1}, {}, {"Level0", {0.17, 0}, 1}, {"Level0", {0.13, 0}, 1}, {}, {"Level0", {0.12, 0}, 1}, {"Level0", {0.08, 0}, 1 }}; - }; - }; - }; - - class HorizonBankRot { - type = "line"; - width = 3; - points[] = {{"HorizonBankRot", {0, 0.25}, 1}, {"HorizonBankRot", {-0.01, 0.23}, 1}, {"HorizonBankRot", {0.01, 0.23}, 1}, {"HorizonBankRot", {0, 0.25}, 1 }}; - }; - - class Static_HAD_BOX { - clipTL[] = {0, 1}; - clipBR[] = {1, 0}; - type = "line"; - width = 5; - points[] = {{{"0.5-0.1", "0.9-0.04"}, 1}, {{"0.5-0.1", "0.9+0.04"}, 1}, {{"0.5+0.1", "0.9+0.04"}, 1}, {{"0.5+0.1", "0.9-0.04"}, 1}, {{"0.5-0.1", "0.9-0.04"}, 1}, {}, {{"0.5-0.1", "0.9-0.04+0.012"}, 1}, {{"0.5-0.092", "0.9-0.04+0.012"}, 1}, {}, {{"0.5+0.1", "0.9-0.04+0.012"}, 1}, {{"0.5+0.092", "0.9-0.04+0.012"}, 1}, {}, {{0.5, "0.9-0.04"}, 1}, {{0.5, "0.9-0.032"}, 1}, {}, {{0.5, "0.9+0.04"}, 1}, {{0.5, "0.9+0.032"}, 1}, { }}; - }; - - class Gunner_HAD { - type = "line"; - width = 6; - points[] = {{"GunnerAim", {-0.015, -0.008}, 1}, {"GunnerAim", {-0.015, 0.008}, 1}, {"GunnerAim", {0.015, 0.008}, 1}, {"GunnerAim", {0.015, -0.008}, 1}, {"GunnerAim", {-0.015, -0.008}, 1 }}; - }; - - class Slip_ball_group { - class Slip_bars { - type = "line"; - width = 4; - points[] = {{{"0.5-0.018", "0.9-0.04"}, 1}, {{"0.5-0.018", "0.9-0.075"}, 1}, {}, {{"0.5+0.018", "0.9-0.04"}, 1}, {{"0.5+0.018", "0.9-0.075"}, 1 }}; - }; - - class Slip_ball { - type = "line"; - width = 6; - points[] = {{"Velocity_slip", 1, {"0 * 0.75", "-0.02 * 0.75"}, 1}, {"Velocity_slip", 1, {"0.0099999998 * 0.75", "-0.01732 * 0.75"}, 1}, {"Velocity_slip", 1, {"0.01732 * 0.75", "-0.0099999998 * 0.75"}, 1}, {"Velocity_slip", 1, {"0.02 * 0.75", "0 * 0.75"}, 1}, {"Velocity_slip", 1, {"0.01732 * 0.75", "0.0099999998 * 0.75"}, 1}, {"Velocity_slip", 1, {"0.0099999998 * 0.75", "0.01732 * 0.75"}, 1}, {"Velocity_slip", 1, {"0 * 0.75", "0.02 * 0.75"}, 1}, {"Velocity_slip", 1, {"-0.0099999998 * 0.75", "0.01732 * 0.75"}, 1}, {"Velocity_slip", 1, {"-0.01732 * 0.75", "0.0099999998 * 0.75"}, 1}, {"Velocity_slip", 1, {"-0.02 * 0.75", "0 * 0.75"}, 1}, {"Velocity_slip", 1, {"-0.01732 * 0.75", "-0.0099999998 * 0.75"}, 1}, {"Velocity_slip", 1, {"-0.0099999998 * 0.75", "-0.01732 * 0.75"}, 1}, {"Velocity_slip", 1, {"0 * 0.75", "-0.02 * 0.75"}, 1}, {}, {"Velocity_slip", 1, {"0 * 0.6", "-0.02 * 0.6"}, 1}, {"Velocity_slip", 1, {"0.0099999998 * 0.6", "-0.01732 * 0.6"}, 1}, {"Velocity_slip", 1, {"0.01732 * 0.6", "-0.0099999998 * 0.6"}, 1}, {"Velocity_slip", 1, {"0.02 * 0.6", "0 * 0.6"}, 1}, {"Velocity_slip", 1, {"0.01732 * 0.6", "0.0099999998 * 0.6"}, 1}, {"Velocity_slip", 1, {"0.0099999998 * 0.6", "0.01732 * 0.6"}, 1}, {"Velocity_slip", 1, {"0 * 0.6", "0.02 * 0.6"}, 1}, {"Velocity_slip", 1, {"-0.0099999998 * 0.6", "0.01732 * 0.6"}, 1}, {"Velocity_slip", 1, {"-0.01732 * 0.6", "0.0099999998 * 0.6"}, 1}, {"Velocity_slip", 1, {"-0.02 * 0.6", "0 * 0.6"}, 1}, {"Velocity_slip", 1, {"-0.01732 * 0.6", "-0.0099999998 * 0.6"}, 1}, {"Velocity_slip", 1, {"-0.0099999998 * 0.6", "-0.01732 * 0.6"}, 1}, {"Velocity_slip", 1, {"0 * 0.6", "-0.02 * 0.6"}, 1}, {}, {"Velocity_slip", 1, {"0 * 0.5", "-0.02 * 0.5"}, 1}, {"Velocity_slip", 1, {"0.0099999998 * 0.5", "-0.01732 * 0.5"}, 1}, {"Velocity_slip", 1, {"0.01732 * 0.5", "-0.0099999998 * 0.5"}, 1}, {"Velocity_slip", 1, {"0.02 * 0.5", "0 * 0.5"}, 1}, {"Velocity_slip", 1, {"0.01732 * 0.5", "0.0099999998 * 0.5"}, 1}, {"Velocity_slip", 1, {"0.0099999998 * 0.5", "0.01732 * 0.5"}, 1}, {"Velocity_slip", 1, {"0 * 0.5", "0.02 * 0.5"}, 1}, {"Velocity_slip", 1, {"-0.0099999998 * 0.5", "0.01732 * 0.5"}, 1}, {"Velocity_slip", 1, {"-0.01732 * 0.5", "0.0099999998 * 0.5"}, 1}, {"Velocity_slip", 1, {"-0.02 * 0.5", "0 * 0.5"}, 1}, {"Velocity_slip", 1, {"-0.01732 * 0.5", "-0.0099999998 * 0.5"}, 1}, {"Velocity_slip", 1, {"-0.0099999998 * 0.5", "-0.01732 * 0.5"}, 1}, {"Velocity_slip", 1, {"0 * 0.5", "-0.02 * 0.5"}, 1}, {}, {"Velocity_slip", 1, {"0 * 0.4", "-0.02 * 0.4"}, 1}, {"Velocity_slip", 1, {"0.0099999998 * 0.4", "-0.01732 * 0.4"}, 1}, {"Velocity_slip", 1, {"0.01732 * 0.4", "-0.0099999998 * 0.4"}, 1}, {"Velocity_slip", 1, {"0.02 * 0.4", "0 * 0.4"}, 1}, {"Velocity_slip", 1, {"0.01732 * 0.4", "0.0099999998 * 0.4"}, 1}, {"Velocity_slip", 1, {"0.0099999998 * 0.4", "0.01732 * 0.4"}, 1}, {"Velocity_slip", 1, {"0 * 0.4", "0.02 * 0.4"}, 1}, {"Velocity_slip", 1, {"-0.0099999998 * 0.4", "0.01732 * 0.4"}, 1}, {"Velocity_slip", 1, {"-0.01732 * 0.4", "0.0099999998 * 0.4"}, 1}, {"Velocity_slip", 1, {"-0.02 * 0.4", "0 * 0.4"}, 1}, {"Velocity_slip", 1, {"-0.01732 * 0.4", "-0.0099999998 * 0.4"}, 1}, {"Velocity_slip", 1, {"-0.0099999998 * 0.4", "-0.01732 * 0.4"}, 1}, {"Velocity_slip", 1, {"0 * 0.4", "-0.02 * 0.4"}, 1}, {}, {"Velocity_slip", 1, {"0 * 0.30", "-0.02 * 0.30"}, 1}, {"Velocity_slip", 1, {"0.0099999998 * 0.30", "-0.01732 * 0.30"}, 1}, {"Velocity_slip", 1, {"0.01732 * 0.30", "-0.0099999998 * 0.30"}, 1}, {"Velocity_slip", 1, {"0.02 * 0.30", "0 * 0.30"}, 1}, {"Velocity_slip", 1, {"0.01732 * 0.30", "0.0099999998 * 0.30"}, 1}, {"Velocity_slip", 1, {"0.0099999998 * 0.30", "0.01732 * 0.30"}, 1}, {"Velocity_slip", 1, {"0 * 0.30", "0.02 * 0.30"}, 1}, {"Velocity_slip", 1, {"-0.0099999998 * 0.30", "0.01732 * 0.30"}, 1}, {"Velocity_slip", 1, {"-0.01732 * 0.30", "0.0099999998 * 0.30"}, 1}, {"Velocity_slip", 1, {"-0.02 * 0.30", "0 * 0.30"}, 1}, {"Velocity_slip", 1, {"-0.01732 * 0.30", "-0.0099999998 * 0.30"}, 1}, {"Velocity_slip", 1, {"-0.0099999998 * 0.30", "-0.01732 * 0.30"}, 1}, {"Velocity_slip", 1, {"0 * 0.30", "-0.02 * 0.30"}, 1}, {}, {"Velocity_slip", 1, {"0 * 0.20", "-0.02 * 0.20"}, 1}, {"Velocity_slip", 1, {"0.0099999998 * 0.20", "-0.01732 * 0.20"}, 1}, {"Velocity_slip", 1, {"0.01732 * 0.20", "-0.0099999998 * 0.20"}, 1}, {"Velocity_slip", 1, {"0.02 * 0.20", "0 * 0.20"}, 1}, {"Velocity_slip", 1, {"0.01732 * 0.20", "0.0099999998 * 0.20"}, 1}, {"Velocity_slip", 1, {"0.0099999998 * 0.20", "0.01732 * 0.20"}, 1}, {"Velocity_slip", 1, {"0 * 0.20", "0.02 * 0.20"}, 1}, {"Velocity_slip", 1, {"-0.0099999998 * 0.20", "0.01732 * 0.20"}, 1}, {"Velocity_slip", 1, {"-0.01732 * 0.20", "0.0099999998 * 0.20"}, 1}, {"Velocity_slip", 1, {"-0.02 * 0.20", "0 * 0.20"}, 1}, {"Velocity_slip", 1, {"-0.01732 * 0.20", "-0.0099999998 * 0.20"}, 1}, {"Velocity_slip", 1, {"-0.0099999998 * 0.20", "-0.01732 * 0.20"}, 1}, {"Velocity_slip", 1, {"0 * 0.20", "-0.02 * 0.20"}, 1}, {}, {"Velocity_slip", 1, {"0 * 0.1", "-0.02 * 0.1"}, 1}, {"Velocity_slip", 1, {"0.0099999998 * 0.1", "-0.01732 * 0.1"}, 1}, {"Velocity_slip", 1, {"0.01732 * 0.1", "-0.0099999998 * 0.1"}, 1}, {"Velocity_slip", 1, {"0.02 * 0.1", "0 * 0.1"}, 1}, {"Velocity_slip", 1, {"0.01732 * 0.1", "0.0099999998 * 0.1"}, 1}, {"Velocity_slip", 1, {"0.0099999998 * 0.1", "0.01732 * 0.1"}, 1}, {"Velocity_slip", 1, {"0 * 0.1", "0.02 * 0.1"}, 1}, {"Velocity_slip", 1, {"-0.0099999998 * 0.1", "0.01732 * 0.1"}, 1}, {"Velocity_slip", 1, {"-0.01732 * 0.1", "0.0099999998 * 0.1"}, 1}, {"Velocity_slip", 1, {"-0.02 * 0.1", "0 * 0.1"}, 1}, {"Velocity_slip", 1, {"-0.01732 * 0.1", "-0.0099999998 * 0.1"}, 1}, {"Velocity_slip", 1, {"-0.0099999998 * 0.1", "-0.01732 * 0.1"}, 1}, {"Velocity_slip", 1, {"0 * 0.1", "-0.02 * 0.1"}, 1 }}; - }; - }; - - class Centerline { - type = "line"; - width = 5; - points[] = {{{0.5, 0.48}, 1}, {{0.5, 0.45}, 1}, {}, {{0.5, 0.52}, 1}, {{0.5, 0.55}, 1}, {}, {{0.48, 0.5}, 1}, {{0.45, 0.5}, 1}, {}, {{0.52, 0.5}, 1}, {{0.55, 0.5}, 1}, { }}; - }; - - class WeaponName { - type = "text"; - source = "weapon"; - sourceScale = 1; - align = "right"; - scale = 1; - pos[] = {{0.61, 0.86}, 1}; - right[] = {{0.65, 0.86}, 1}; - down[] = {{0.61, 0.9}, 1}; - }; - - class Ammo_GUN { - type = "group"; - condition = "mgun"; - - class Ammo_count_GUN { - type = "text"; - source = "ammo"; - sourceScale = 1; - align = "right"; - scale = 1; - pos[] = {{0.61, 0.89}, 1}; - right[] = {{0.65, 0.89}, 1}; - down[] = {{0.61, 0.93}, 1}; - }; - }; - - class Ammo_RKT { - type = "group"; - condition = "rocket"; - - class Ammo_count_RKT { - type = "text"; - source = "ammo"; - sourceScale = 1; - align = "right"; - scale = 1; - pos[] = {{0.61, 0.89}, 1}; - right[] = {{0.65, 0.89}, 1}; - down[] = {{0.61, 0.93}, 1}; - }; - }; - - class Ammo_AGM { - type = "group"; - condition = "AAmissile"; - - class Ammo_count_AGM { - type = "text"; - source = "ammo"; - sourceScale = 1; - align = "right"; - scale = 1; - pos[] = {{0.61, 0.89}, 1}; - right[] = {{0.65, 0.89}, 1}; - down[] = {{0.61, 0.93}, 1}; - }; - }; - - class Ammo_AAM { - type = "group"; - condition = "ATmissile"; - - class Ammo_count_AAM { - type = "text"; - source = "ammo"; - sourceScale = 1; - align = "right"; - scale = 1; - pos[] = {{0.61, 0.89}, 1}; - right[] = {{0.65, 0.89}, 1}; - down[] = {{0.61, 0.93}, 1}; - }; - }; - - class Ammo_Bomb { - type = "group"; - condition = "Bomb"; - - class Ammo_count_Bomb { - type = "text"; - source = "ammo"; - sourceScale = 1; - align = "right"; - scale = 1; - pos[] = {{0.61, 0.89}, 1}; - right[] = {{0.65, 0.89}, 1}; - down[] = {{0.61, 0.93}, 1}; - }; - }; - - class LightsGroup { - type = "group"; - condition = "lights"; - - class LightsText { - type = "text"; - source = "static"; - text = "LIGHTS"; - align = "right"; - scale = 1; - pos[] = {{0.03, "0.53 + 0.055"}, 1}; - right[] = {{0.07, "0.53 + 0.055"}, 1}; - down[] = {{0.03, "0.53 + 0.095"}, 1}; - }; - }; - - class CollisionLightsGroup { - type = "group"; - condition = "collisionlights"; - - class CollisionLightsText { - type = "text"; - source = "static"; - text = "A-COL"; - align = "right"; - scale = 1; - pos[] = {{0.03, "0.53 + 0.105"}, 1}; - right[] = {{0.07, "0.53 + 0.105"}, 1}; - down[] = {{0.03, "0.53 + 0.145"}, 1}; - }; - }; - - class GearGroup { - type = "group"; - condition = "ils"; - - class GearText { - type = "text"; - source = "static"; - text = "GEAR"; - align = "right"; - scale = 1; - pos[] = {{0.03, "0.53 + 0.155"}, 1}; - right[] = {{0.07, "0.53 + 0.155"}, 1}; - down[] = {{0.03, "0.53 + 0.195"}, 1}; - }; - }; - - class ATMissileTOFGroup { - condition = "ATmissile"; - type = "group"; - - class TOFtext { - type = "text"; - align = "right"; - source = "static"; - text = "TOF="; - scale = 1; - pos[] = {{0.61, 0.92}, 1}; - right[] = {{0.65, 0.92}, 1}; - down[] = {{0.61, 0.96}, 1}; - }; - - class TOFnumber { - type = "text"; - source = "targetDist"; - sourcescale = 0.0025; - align = "right"; - scale = 1; - pos[] = {{0.69, 0.92}, 1}; - right[] = {{0.73, 0.92}, 1}; - down[] = {{0.69, 0.96}, 1}; - }; - }; - - class LaserTOFGroup { - condition = "Bomb"; - type = "group"; - - class TOFtext { - type = "text"; - align = "right"; - source = "static"; - text = "TOF="; - scale = 1; - pos[] = {{0.61, 0.92}, 1}; - right[] = {{0.65, 0.92}, 1}; - down[] = {{0.61, 0.96}, 1}; - }; - - class TOFnumber { - type = "text"; - source = "targetDist"; - sourcescale = 0.0025; - align = "right"; - scale = 1; - pos[] = {{0.69, 0.92}, 1}; - right[] = {{0.73, 0.92}, 1}; - down[] = {{0.69, 0.96}, 1}; - }; - }; - - class RocketTOFGroup { - condition = "Rocket"; - type = "group"; - - class TOFtext { - type = "text"; - align = "right"; - source = "static"; - text = "TOF="; - scale = 1; - pos[] = {{0.61, 0.92}, 1}; - right[] = {{0.65, 0.92}, 1}; - down[] = {{0.61, 0.96}, 1}; - }; - - class TOFnumber { - type = "text"; - source = "targetDist"; - sourcescale = 0.0025; - align = "right"; - scale = 1; - pos[] = {{0.69, 0.92}, 1}; - right[] = {{0.73, 0.92}, 1}; - down[] = {{0.69, 0.96}, 1}; - }; - }; - - class RangeNumber { - type = "text"; - source = "targetDist"; - sourceScale = 1; - align = "left"; - scale = 1; - pos[] = {{0.39, 0.89}, 1}; - right[] = {{0.43, 0.89}, 1}; - down[] = {{0.39, 0.93}, 1}; - }; - - class RangeText { - type = "text"; - source = "static"; - text = "RNG"; - align = "left"; - scale = 1; - pos[] = {{0.39, 0.86}, 1}; - right[] = {{0.43, 0.86}, 1}; - down[] = {{0.39, 0.9}, 1}; - }; - - class SpeedNumber { - type = "text"; - align = "right"; - scale = 1; - source = "speed"; - sourceScale = 3.6; - pos[] = {{0.03, 0.475}, 1}; - right[] = {{0.08, 0.475}, 1}; - down[] = {{0.03, 0.525}, 1}; - }; - - class TorqueNumber { - condition = "simulRTD"; - - class Torque_number { - type = "text"; - align = "left"; - scale = 1; - source = "rtdRotorTorque"; - sourceScale = 290; - pos[] = {{0.065, 0.175}, 1}; - right[] = {{0.115, 0.175}, 1}; - down[] = {{0.065, 0.225}, 1}; - }; - - class Torquetext { - type = "text"; - source = "static"; - text = "%"; - align = "right"; - scale = 1; - pos[] = {{0.07, 0.175}, 1}; - right[] = {{0.12, 0.175}, 1}; - down[] = {{0.07, 0.225}, 1}; - }; - }; - - class AltNumber: SpeedNumber { - align = "right"; - source = "altitudeAGL"; - sourceScale = 1; - pos[] = {{0.83, 0.475}, 1}; - right[] = {{0.88, 0.475}, 1}; - down[] = {{0.83, 0.525}, 1}; - }; - - class ASLNumber { - type = "text"; - source = "altitudeASL"; - sourceScale = 1; - align = "right"; - scale = 1; - pos[] = {{0.835, 0.18}, 1}; - right[] = {{0.875, 0.18}, 1}; - down[] = {{0.835, 0.22}, 1}; - }; - - class VspeedScalePosta { - type = "line"; - width = 5; - points[] = {{{0.98, 0.2}, 1}, {{1, 0.2}, 1}, {}, {{0.93, 0.2}, 1}, {{0.95, 0.2}, 1}, {}, {{0.98, 0.35}, 1}, {{1, 0.35}, 1}, {}, {{0.93, 0.35}, 1}, {{0.95, 0.35}, 1}, {}, {{0.94, 0.38}, 1}, {{0.95, 0.38}, 1}, {}, {{0.94, 0.41}, 1}, {{0.95, 0.41}, 1}, {}, {{0.94, 0.44}, 1}, {{0.95, 0.44}, 1}, {}, {{0.94, 0.47}, 1}, {{0.95, 0.47}, 1}, {}, {{0.98, 0.5}, 1}, {{1, 0.5}, 1}, {}, {{0.93, 0.5}, 1}, {{0.95, 0.5}, 1}, {}, {{0.94, 0.53}, 1}, {{0.95, 0.53}, 1}, {}, {{0.94, 0.56}, 1}, {{0.95, 0.56}, 1}, {}, {{0.94, 0.59}, 1}, {{0.95, 0.59}, 1}, {}, {{0.94, 0.62}, 1}, {{0.95, 0.62}, 1}, {}, {{0.98, 0.65}, 1}, {{1, 0.65}, 1}, {}, {{0.93, 0.65}, 1}, {{0.95, 0.65}, 1}, {}, {{0.99, 0.68}, 1}, {{0.98, 0.68}, 1}, {}, {{0.99, 0.71}, 1}, {{0.98, 0.71}, 1}, {}, {{0.99, 0.74}, 1}, {{0.98, 0.74}, 1}, {}, {{0.99, 0.77}, 1}, {{0.98, 0.77}, 1}, {}, {{0.98, 0.8}, 1}, {{1, 0.8}, 1}, {}, {{0.93, 0.8}, 1}, {{0.95, 0.8}, 1}, { }}; - }; - - class RadarAltitudeBand { - clipTL[] = {0, 0.2}; - clipBR[] = {1, 0.8}; - hideValue = 201; - - class radarbanda { - type = "line"; - width = 17; - points[] = {{"RadarAltitudeBone", {0, 0}, 1}, {"RadarAltitudeBone", {0, 0.6}, 1 }}; - }; - }; - - class VspeedBand { - type = "line"; - width = 3; - points[] = {{"VspeedBone", {-0.01, 0}, 1}, {"VspeedBone", {-0.025, -0.015}, 1}, {"VspeedBone", {-0.025, 0.015}, 1}, {"VspeedBone", {-0.01, 0}, 1}, { }}; - }; - - class HeadingNumber: SpeedNumber { - source = "heading"; - sourceScale = 1; - align = "center"; - pos[] = {{0.5, 0.045}, 1}; - right[] = {{0.56, 0.045}, 1}; - down[] = {{0.5, "0.045 + 0.06"}, 1}; - }; - - class Center_box { - type = "line"; - width = 1.5; - points[] = {{{0.45, "0.02 + 0.085 - 0.06"}, 1}, {{"0.45 + 0.10", "0.02 + 0.085 - 0.06"}, 1}, {{"0.45 + 0.10", "0.02 + 0.085"}, 1}, {{0.45, "0.02 + 0.085"}, 1}, {{0.45, "0.02 + 0.085 - 0.06"}, 1 }}; - }; - - class HeadingArrow { - type = "line"; - width = 7; - points[] = {{{"0.5", "0.128 + 0.03"}, 1}, {{0.5, 0.128}, 1 }}; - }; - - class HeadingScale_LEFT { - clipTL[] = {0, 0}; - clipBR[] = {0.45, 1}; - - class Heading_group { - type = "scale"; - horizontal = 1; - source = "heading"; - sourceScale = 1; - width = 5; - top = 0.12; - center = 0.5; - bottom = 0.88; - lineXleft = "0.03 + 0.085"; - lineYright = "0.02 + 0.085"; - lineXleftMajor = "0.04 + 0.085"; - lineYrightMajor = "0.02 + 0.085"; - majorLineEach = 3; - numberEach = 3; - step = 10; - stepSize = "0.05"; - align = "center"; - scale = 1; - pos[] = {0.12, "0.0 + 0.065"}; - right[] = {0.16, "0.0 + 0.065"}; - down[] = {0.12, "0.04 + 0.065"}; - }; - }; - - class HeadingScale_RIGHT { - clipTL[] = {0.55, 0}; - clipBR[] = {1, 1}; - - class Heading_group { - type = "scale"; - horizontal = 1; - source = "heading"; - sourceScale = 1; - width = 5; - top = 0.12; - center = 0.5; - bottom = 0.88; - lineXleft = "0.03 + 0.085"; - lineYright = "0.02 + 0.085"; - lineXleftMajor = "0.04 + 0.085"; - lineYrightMajor = "0.02 + 0.085"; - majorLineEach = 3; - numberEach = 3; - step = 10; - stepSize = "0.05"; - align = "center"; - scale = 1; - pos[] = {0.12, "0.0 + 0.065"}; - right[] = {0.16, "0.0 + 0.065"}; - down[] = {0.12, "0.04 + 0.065"}; - }; - }; - - class HeadingScale_BOTTOM { - clipTL[] = {0.45, "0.02 + 0.085"}; - clipBR[] = {"0.45 + 0.10", 1}; - - class Heading_group { - type = "scale"; - horizontal = 1; - source = "heading"; - sourceScale = 1; - width = 5; - top = 0.12; - center = 0.5; - bottom = 0.88; - lineXleft = "0.03 + 0.085"; - lineYright = "0.02 + 0.085"; - lineXleftMajor = "0.04 + 0.085"; - lineYrightMajor = "0.02 + 0.085"; - majorLineEach = 3; - numberEach = 3; - step = 10; - stepSize = "0.05"; - align = "center"; - scale = 1; - pos[] = {0.12, "0.0 + 0.065"}; - right[] = {0.16, "0.0 + 0.065"}; - down[] = {0.12, "0.04 + 0.065"}; - }; - }; - - class Fuel_Text { - type = "text"; - source = "static"; - text = "Fuel"; - align = "right"; - scale = 1; - pos[] = {{0.03, 0.9}, 1}; - right[] = {{0.07, 0.9}, 1}; - down[] = {{0.03, 0.94}, 1}; - }; - - class Fuel_Number { - type = "text"; - source = "fuel"; - sourceScale = 100; - align = "right"; - scale = 1; - pos[] = {{0.1, 0.9}, 1}; - right[] = {{0.14, 0.9}, 1}; - down[] = {{0.1, 0.94}, 1}; - }; - }; - helmetMountedDisplay = 1; - helmetPosition[] = {-0.04, 0.04, 0.1}; - helmetRight[] = {0.08, 0, 0}; - helmetDown[] = {0, -0.08, 0}; - }; - - class ACE_HUD_2 { - topLeft = "HUD_top_left"; - topRight = "HUD_top_right"; - bottomLeft = "HUD_bottom_left"; - borderLeft = 0; - borderRight = 0; - borderTop = 0; - borderBottom = 0; - color[] = {0.15, 1, 0.15, 1}; - enableParallax = 0; - - class Bones { - class Velocity { - type = "vector"; - source = "velocity"; - pos0[] = {0.5, 0.5}; - pos10[] = {0.75, 0.75}; - }; - - class ForwardVec1 { - type = "vector"; - source = "forward"; - pos0[] = {0, 0}; - pos10[] = {0.25, 0.25}; - }; - - class ForwardVec { - type = "vector"; - source = "forward"; - pos0[] = {0, 0}; - pos10[] = {0.253, 0.253}; - }; - - class WeaponAim { - type = "vector"; - source = "weapon"; - pos0[] = {0.5, 0.5}; - pos10[] = {0.753, 0.753}; - }; - - class WeaponAim1 { - type = "vector"; - source = "weapon"; - pos0[] = {0, 0}; - pos10[] = {0.253, 0.23}; - }; - - class Target { - type = "vector"; - source = "target"; - pos0[] = {0.5, 0.5}; - pos10[] = {0.753, 0.753}; - }; - - class RadarContact { - type = "fixed"; - pos[] = {0, 0}; - }; - }; - - class Draw { - color[] = {0.18, 1, 0.18}; - alpha = 1; - condition = "on"; - - class PlaneMovementCrosshair { - type = "line"; - width = 7; - points[] = {{"ForwardVec1", 1, "Velocity", 1, {0, -0.02}, 1}, {"ForwardVec1", 1, "Velocity", 1, {0.01, -0.01732}, 1}, {"ForwardVec1", 1, "Velocity", 1, {0.01732, -0.01}, 1}, {"ForwardVec1", 1, "Velocity", 1, {0.02, 0}, 1}, {"ForwardVec1", 1, "Velocity", 1, {0.01732, 0.01}, 1}, {"ForwardVec1", 1, "Velocity", 1, {0.01, 0.01732}, 1}, {"ForwardVec1", 1, "Velocity", 1, {0, 0.02}, 1}, {"ForwardVec1", 1, "Velocity", 1, {-0.01, 0.01732}, 1}, {"ForwardVec1", 1, "Velocity", 1, {-0.01732, 0.01}, 1}, {"ForwardVec1", 1, "Velocity", 1, {-0.02, 0}, 1}, {"ForwardVec1", 1, "Velocity", 1, {-0.01732, -0.01}, 1}, {"ForwardVec1", 1, "Velocity", 1, {-0.01, -0.01732}, 1}, {"ForwardVec1", 1, "Velocity", 1, {0, -0.02}, 1}, {}, {"ForwardVec1", 1, "Velocity", 1, {0.04, 0}, 1}, {"ForwardVec1", 1, "Velocity", 1, {0.02, 0}, 1}, {}, {"ForwardVec1", 1, "Velocity", 1, {-0.04, 0}, 1}, {"ForwardVec1", 1, "Velocity", 1, {-0.02, 0}, 1}, {}, {"ForwardVec1", 1, "Velocity", 1, {0, -0.04}, 1}, {"ForwardVec1", 1, "Velocity", 1, {0, -0.02}, 1 }}; - }; - - class Gunner_AIM { - type = "group"; - - class Circle { - type = "line"; - width = 6; - points[] = {{"ForwardVec", 1, "WeaponAim", 1, {0, -0.015}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {0, -0.03}, 1}, {}, {"ForwardVec", 1, "WeaponAim", 1, {0, -0.0325}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {0, -0.0475}, 1}, {}, {"ForwardVec", 1, "WeaponAim", 1, {0, 0.015}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {0, 0.03}, 1}, {}, {"ForwardVec", 1, "WeaponAim", 1, {0, 0.0325}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {0, 0.0475}, 1}, {}, {"ForwardVec", 1, "WeaponAim", 1, {-0.015, 0}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {-0.03, 0}, 1}, {}, {"ForwardVec", 1, "WeaponAim", 1, {-0.0325, 0}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {-0.0475, 0}, 1}, {}, {"ForwardVec", 1, "WeaponAim", 1, {0.015, 0}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {0.03, 0}, 1}, {}, {"ForwardVec", 1, "WeaponAim", 1, {0.0325, 0}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {0.0475, 0}, 1 }}; - }; - }; - - class GunCross { - condition = "mgun"; - - class Circle { - type = "line"; - width = 9; - points[] = {{"ForwardVec", 1, "WeaponAim", 1, {0, -0.05}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {0, -0.015}, 1}, {}, {"ForwardVec", 1, "WeaponAim", 1, {0, 0.015}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {0, 0.05}, 1}, {}, {"ForwardVec", 1, "WeaponAim", 1, {-0.05, 0}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {-0.015, 0}, 1}, {}, {"ForwardVec", 1, "WeaponAim", 1, {0.015, 0}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {0.05, 0}, 1}, { }}; - }; - }; - - class RocketCross { - condition = "rocket"; - width = 6; - - class Circle { - type = "line"; - width = 6; - points[] = {{"ForwardVec", 1, "WeaponAim", 1, {-0.05, -0.08}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {0.05, -0.08}, 1}, {}, {"ForwardVec", 1, "WeaponAim", 1, {0, -0.08}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {0, 0.08}, 1}, {}, {"ForwardVec", 1, "WeaponAim", 1, {-0.05, 0.08}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {0.05, 0.08}, 1}, { }}; - }; - }; - - class AT_Aim { - condition = "ATmissile"; - width = 2; - - class Circle - { - type = "line"; - width = 2; - points[] = {{"ForwardVec", 1, "WeaponAim", 1, {-0.1, -0.1}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {0.1, -0.1}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {0.1, 0.1}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {-0.1, 0.1}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {-0.1, -0.1}, 1 }}; - }; - }; - - class AA_aim { - condition = "AAmissile"; - - class Circle { - type = "line"; - width = 2.5; - points[] = {{"ForwardVec", 1, "WeaponAim", 1, {"0 / 4", "-0.248559 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.0434 / 4", "-0.244781 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.0855 / 4", "-0.233571 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.125 / 4", "-0.215252 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.1607 / 4", "-0.190396 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.1915 / 4", "-0.159774 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.2165 / 4", "-0.12428 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.234925 / 4", "-0.0850072 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.2462 / 4", "-0.0431499 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.25 / 4", "0 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.2462 / 4", "0.0431499 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.234925 / 4", "0.0850072 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.2165 / 4", "0.12428 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.1915 / 4", "0.159774 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.1607 / 4", "0.190396 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.125 / 4", "0.215252 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.0855 / 4", "0.233571 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.0434 / 4", "0.244781 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0 / 4", "0.248559 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.0434 / 4", "0.244781 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.0855 / 4", "0.233571 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.125 / 4", "0.215252 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.1607 / 4", "0.190396 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.1915 / 4", "0.159774 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.2165 / 4", "0.12428 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.234925 / 4", "0.0850072 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.2462 / 4", "0.0431499 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.25 / 4", "0 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.2462 / 4", "-0.0431499 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.234925 / 4", "-0.0850072 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.2165 / 4", "-0.12428 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.1915 / 4", "-0.159774 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.1607 / 4", "-0.190396 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.125 / 4", "-0.215252 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.0855 / 4", "-0.233571 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.0434 / 4", "-0.244781 / 4"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0 / 4", "-0.248559 / 4"}, 1}, {}, {"ForwardVec", 1, "WeaponAim", 1, {"0 / 2", "-0.248559 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.0434 / 2", "-0.244781 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.0855 / 2", "-0.233571 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.125 / 2", "-0.215252 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.1607 / 2", "-0.190396 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.1915 / 2", "-0.159774 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.2165 / 2", "-0.12428 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.234925 / 2", "-0.0850072 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.2462 / 2", "-0.0431499 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.25 / 2", "0 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.2462 / 2", "0.0431499 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.234925 / 2", "0.0850072 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.2165 / 2", "0.12428 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.1915 / 2", "0.159774 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.1607 / 2", "0.190396 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.125 / 2", "0.215252 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.0855 / 2", "0.233571 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0.0434 / 2", "0.244781 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0 / 2", "0.248559 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.0434 / 2", "0.244781 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.0855 / 2", "0.233571 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.125 / 2", "0.215252 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.1607 / 2", "0.190396 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.1915 / 2", "0.159774 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.2165 / 2", "0.12428 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.234925 / 2", "0.0850072 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.2462 / 2", "0.0431499 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.25 / 2", "0 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.2462 / 2", "-0.0431499 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.234925 / 2", "-0.0850072 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.2165 / 2", "-0.12428 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.1915 / 2", "-0.159774 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.1607 / 2", "-0.190396 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.125 / 2", "-0.215252 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.0855 / 2", "-0.233571 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"-0.0434 / 2", "-0.244781 / 2"}, 1}, {"ForwardVec", 1, "WeaponAim", 1, {"0 / 2", "-0.248559 / 2"}, 1 }}; - }; - }; - - class TargetACQ { - type = "line"; - width = 2; - points[] = {{"ForwardVec", 1, "target", {0, -0.06}, 1}, {"ForwardVec", 1, "target", {0, -0.055}, 1}, {}, {"ForwardVec", 1, "target", {0, -0.05}, 1}, {"ForwardVec", 1, "target", {0, -0.045}, 1}, {}, {"ForwardVec", 1, "target", {0, -0.04}, 1}, {"ForwardVec", 1, "target", {0, -0.035}, 1}, {}, {"ForwardVec", 1, "target", {0, -0.03}, 1}, {"ForwardVec", 1, "target", {0, -0.025}, 1}, {}, {"ForwardVec", 1, "target", {0, -0.02}, 1}, {"ForwardVec", 1, "target", {0, -0.015}, 1}, {}, {"ForwardVec", 1, "target", {0, -0.01}, 1}, {"ForwardVec", 1, "target", {0, -0.005}, 1}, {}, {"ForwardVec", 1, "target", {0, 0}, 1}, {"ForwardVec", 1, "target", {0, 0}, 1}, {}, {"ForwardVec", 1, "target", {0, 0.06}, 1}, {"ForwardVec", 1, "target", {0, 0.055}, 1}, {}, {"ForwardVec", 1, "target", {0, 0.05}, 1}, {"ForwardVec", 1, "target", {0, 0.045}, 1}, {}, {"ForwardVec", 1, "target", {0, 0.04}, 1}, {"ForwardVec", 1, "target", {0, 0.035}, 1}, {}, {"ForwardVec", 1, "target", {0, 0.03}, 1}, {"ForwardVec", 1, "target", {0, 0.025}, 1}, {}, {"ForwardVec", 1, "target", {0, 0.02}, 1}, {"ForwardVec", 1, "target", {0, 0.015}, 1}, {}, {"ForwardVec", 1, "target", {0, 0.01}, 1}, {"ForwardVec", 1, "target", {0, 0.005}, 1}, {}, {"ForwardVec", 1, "target", {-0.06, 0}, 1}, {"ForwardVec", 1, "target", {-0.055, 0}, 1}, {}, {"ForwardVec", 1, "target", {-0.05, 0}, 1}, {"ForwardVec", 1, "target", {-0.045, 0}, 1}, {}, {"ForwardVec", 1, "target", {-0.04, 0}, 1}, {"ForwardVec", 1, "target", {-0.035, 0}, 1}, {}, {"ForwardVec", 1, "target", {-0.03, 0}, 1}, {"ForwardVec", 1, "target", {-0.025, 0}, 1}, {}, {"ForwardVec", 1, "target", {-0.02, 0}, 1}, {"ForwardVec", 1, "target", {-0.015, 0}, 1}, {}, {"ForwardVec", 1, "target", {-0.01, 0}, 1}, {"ForwardVec", 1, "target", {-0.005, 0}, 1}, {}, {"ForwardVec", 1, "target", {0.06, 0}, 1}, {"ForwardVec", 1, "target", {0.055, 0}, 1}, {}, {"ForwardVec", 1, "target", {0.05, 0}, 1}, {"ForwardVec", 1, "target", {0.045, 0}, 1}, {}, {"ForwardVec", 1, "target", {0.04, 0}, 1}, {"ForwardVec", 1, "target", {0.035, 0}, 1}, {}, {"ForwardVec", 1, "target", {0.03, 0}, 1}, {"ForwardVec", 1, "target", {0.025, 0}, 1}, {}, {"ForwardVec", 1, "target", {0.02, 0}, 1}, {"ForwardVec", 1, "target", {0.015, 0}, 1}, {}, {"ForwardVec", 1, "target", {0.01, 0}, 1}, {"ForwardVec", 1, "target", {0.005, 0}, 1}, { }}; - }; - - class RadarTargets { - type = "radar"; - pos0[] = {0.5, 0.5}; - pos10[] = {0.753, 0.753}; - width = 2.5; - points[] = {{"ForwardVec", 1, "RadarContact", {-0.01, -0.01}, 1}, {"ForwardVec", 1, "RadarContact", {0.01, -0.01}, 1}, {"ForwardVec", 1, "RadarContact", {0.01, 0.01}, 1}, {"ForwardVec", 1, "RadarContact", {-0.01, 0.01}, 1}, {"ForwardVec", 1, "RadarContact", {-0.01, -0.01}, 1 }}; - }; - }; - helmetMountedDisplay = 1; - helmetPosition[] = {-0.035, 0.035, 0.1}; - helmetRight[] = {0.07, 0, 0}; - helmetDown[] = {0, -0.07, 0}; - }; - }; - class Turrets: Turrets { class MainTurret: MainTurret { - weapons[] = {"ACE_gatling_20mm_Comanche", "missiles_DAGR", "missiles_ASRAAM", "ACE_AIR_SAFETY"}; + weapons[] = {"ACE_gatling_20mm_Comanche", "missiles_DAGR", "missiles_ASRAAM"}; magazines[] = {"ACE_500Rnd_20mm_shells_Comanche", "4Rnd_AAA_missiles", "24Rnd_PG_missiles"}; - outGunnerMayFire = 1; - commanding = -1; - primaryGunner = 1; - gunnerOpticsModel = ""; - gunnerOpticsEffect[] = {"TankCommanderOptics1"}; - gunnerForceOptics = 0; turretInfoType = "Rsc_ACE_Helo_UI_Turret"; - showAllTargets = 2; - discretedistance[] = {100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000, 2100, 2200, 2300, 2400, 2500, 2600, 2700, 2800, 2900, 3000}; - discretedistanceinitindex = 3; - copilotHasFlares = 1; - directionStabilized = 1; - isCopilot = 1; - showHMD = 1; - CanEject = 1; - startEngine = 0; - minElev = -51; - maxElev = 9; - initElev = 6; - minTurn = -120; - maxTurn = 120; - initTurn = 0; + class OpticsIn { delete Narrow; @@ -957,7 +83,6 @@ class Heli_Attack_01_base_F: Helicopter_Base_F { directionStabilized = 1; horizontallyStabilized = 1; gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_narrow_F"; - }; }; @@ -991,3 +116,13 @@ class Heli_Attack_01_base_F: Helicopter_Base_F { }; }; }; + +class Heli_Attack_01_dynamicLoadout_base_F: Heli_Attack_01_base_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + weapons[] = {"ACE_gatling_20mm_Comanche"}; + magazines[] = {"ACE_500Rnd_20mm_shells_Comanche"}; + }; + }; +}; + diff --git a/addons/aircraft/README.md b/addons/aircraft/README.md index 3db71ca51a..c1bf72b3d7 100644 --- a/addons/aircraft/README.md +++ b/addons/aircraft/README.md @@ -1,7 +1,7 @@ ace_aircraft ============ -Changes to air weaponry, flight models and HUDs. +Changes to air weaponry, ejection and HUDs. - Contributions by Kimi (geraldbolso1899) for HUD updates diff --git a/addons/aircraft/flightmodel_alca.hpp b/addons/aircraft/flightmodel_alca.hpp deleted file mode 100644 index afe74ef9fd..0000000000 --- a/addons/aircraft/flightmodel_alca.hpp +++ /dev/null @@ -1,23 +0,0 @@ -acceleration = 300; -maxSpeed = 936; -irScanRangeMin = 500; -irScanRangeMax = 5000; -aileronSensitivity = 0.64; -elevatorSensitivity = 0.682; -rudderInfluence = 0.001; -aileronControlsSensitivityCoef = 3; -elevatorControlsSensitivity = 2; -rudderControlsSensitivityoef = 4; -elevatorCoef[] = {0.6, 0.73, 0.62, 0.52, 0.39, 0.33, 0.28}; -aileronCoef[] = {0.5, 0.68, 0.75, 0.86, 0.92, 0.96, 1}; -rudderCoef[] = {0.9, 0.75, 0.58, 0.45, 0.38, 0.35, 0.3}; -envelope[] = {0, 0.06, 1.2, 3, 3.6, 3.75, 3.65, 3.45, 3.3, 2.8, 2.4, 1.9, 1.5}; -angleOfIndicence = 0.0523599; //determines velocity vector behaviour, how quickly it catches up with where your nose is pointing, I think -draconicForceXCoef = 7.5; //max angle of attack, lower value gives higher aoa -draconicForceYCoef = 0.2198; //Something to do with bleed off of speed, low values seem to increase bleed off -draconicForceZCoef = 5.12; //???? -draconicTorqueXCoef = 0.18; //resistance to elevator input, also impacts speed degradation -draconicTorqueYCoef = 0.000017; -thrustCoef[] = {1.3, 1.27, 1.24, 1.2, 1.17, 1.15, 1.13, 1.1, 1.06, 1, 0.94, 0.72, 0.51, 0.4, 0.25, 0}; -gunAimDown = 0.029; -flapsFrictionCoef = 0.32; diff --git a/addons/aircraft/flightmodel_thunderbolt.hpp b/addons/aircraft/flightmodel_thunderbolt.hpp deleted file mode 100644 index 0f99f5ef91..0000000000 --- a/addons/aircraft/flightmodel_thunderbolt.hpp +++ /dev/null @@ -1,21 +0,0 @@ -maxSpeed = 736; -aileronSensitivity = 0.85; -elevatorSensitivity = 0.75; -rudderInfluence = 0.001; -aileronControlsSensitivityCoef = 3; -elevatorControlsSensitivity = 2; -rudderControlsSensitivityoef = 4; -elevatorCoef[] = {0.7, 0.75, 0.75, 0.65, 0.55, 0.45, 0.35}; -aileronCoef[] = {0.6, 0.85, 0.88, 0.92, 0.95, 0.97, 1}; -rudderCoef[] = {0.8, 0.75, 0.65, 0.5, 0.4, 0.33, 0.3}; -flapsFrictionCoef = 0.35; -angleOfIndicence = 0.0523599; -draconicForceXCoef = 9.5; -draconicForceYCoef = 0.56; -draconicForceZCoef = 0.1; -draconicTorqueXCoef = 0.58; -draconicTorqueYCoef = 0.00013; -envelope[] = {0, 0, 0.75, 2.4, 3.6, 3.8, 3.7, 3.2, 2.2, 1.7, 0.9}; -thrustCoef[] = {1, 1.2, 1.3, 1.25, 1.06, 1.01, 1, 0.92, 0.75, 0.65, 0.5, 0.25, 0}; -acceleration = 265; -landingSpeed = 220; diff --git a/addons/aircraft/flightmodel_yak.hpp b/addons/aircraft/flightmodel_yak.hpp deleted file mode 100644 index 9ba4c40c76..0000000000 --- a/addons/aircraft/flightmodel_yak.hpp +++ /dev/null @@ -1,20 +0,0 @@ -maxSpeed = 1059; -acceleration = 300; -aileronSensitivity = 0.635; -elevatorSensitivity = 0.814; -rudderInfluence = 0.001; -aileronControlsSensitivityCoef = 3; -elevatorControlsSensitivity = 2; -rudderControlsSensitivityoef = 4; -elevatorCoef[] = {0.6, 0.76, 0.7, 0.65, 0.58, 0.47, 0.43}; -aileronCoef[] = {0.5, 0.85, 0.87, 0.89, 0.92, 0.95, 1}; -rudderCoef[] = {0.8, 0.7, 0.6, 0.5, 0.4, 0.32, 0.27}; -angleOfIndicence = 0.0523599; -draconicForceXCoef = 7.6; -draconicForceYCoef = 0.75; -draconicForceZCoef = 0.085; -draconicTorqueXCoef = 0.815; -draconicTorqueYCoef = 0.000152; -envelope[] = {0, 0.446, 1.5, 3.9, 5.2, 4.8, 4.2, 3.5, 2, 1, 0.5}; -thrustCoef[] = {1, 1.2, 1.7, 1.7, 1.65, 1.54, 1.32, 1.1, 0.95, 0.75, 0.5, 0.35, 0}; -flapsFrictionCoef = 0.32; diff --git a/addons/aircraft/stringtable.xml b/addons/aircraft/stringtable.xml index 36012099b1..7e08f906ee 100644 --- a/addons/aircraft/stringtable.xml +++ b/addons/aircraft/stringtable.xml @@ -1,20 +1,6 @@ - - Burst - Feuerstoß - Ráfaga - Seria - Dávka - Rafale - Очередь - Sorozat - Rajada - Raffica - バースト - 점사 - XM301 XM301 diff --git a/addons/cargo/CfgEden.hpp b/addons/cargo/CfgEden.hpp new file mode 100644 index 0000000000..9144ba458b --- /dev/null +++ b/addons/cargo/CfgEden.hpp @@ -0,0 +1,37 @@ +class Cfg3DEN { + class Object { + class AttributeCategories { + class ace_attributes { + class Attributes { + class GVAR(space) { + displayName = CSTRING(space_edenName); + tooltip = CSTRING(space_edenDesc); + property = QGVAR(space); + control = "Edit"; + + expression = QUOTE([ARR_2(_this,_value)] call DFUNC(setSpace);); + defaultValue = QUOTE(GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(space),0)); + + validate = "number"; + condition = "objectHasInventoryCargo"; + typeName = "NUMBER"; + }; + class GVAR(size) { + displayName = CSTRING(size_edenName); + tooltip = CSTRING(size_edenDesc); + property = QGVAR(size); + control = "Edit"; + + // Expression only runs on the server, must handle actions for all machines and future JIPs (Why BI?!) + expression = QUOTE([ARR_2(_this,_value)] call DFUNC(setSize);); + defaultValue = QUOTE(GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(size),-1)); + + validate = "number"; + condition = "1-objectBrain"; + typeName = "NUMBER"; + }; + }; + }; + }; + }; +}; diff --git a/addons/cargo/CfgEventHandlers.hpp b/addons/cargo/CfgEventHandlers.hpp index 45f6d48997..823dc87470 100644 --- a/addons/cargo/CfgEventHandlers.hpp +++ b/addons/cargo/CfgEventHandlers.hpp @@ -24,52 +24,3 @@ class Extended_Killed_EventHandlers { }; }; }; - -//Need initPost or we have problems with setVariable with 'ACE_Cargo' -class Extended_InitPost_EventHandlers { - class ThingX { - class ADDON { - init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle)); - }; - }; - class Land_PaperBox_closed_F { - class ADDON { - init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle)); - }; - }; - class PlasticCase_01_base_F { - class ADDON { - init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle)); - }; - }; - class LandVehicle { - class ADDON { - init = QUOTE(_this call DFUNC(initVehicle)); - }; - }; - class Air { - class ADDON { - init = QUOTE(_this call DFUNC(initVehicle)); - }; - }; - class Ship_F { - class ADDON { - init = QUOTE(_this call DFUNC(initVehicle)); - }; - }; - class ACE_ConcertinaWireCoil { - class ADDON { - init = QUOTE(_this call DFUNC(initObject)); - }; - }; - class Land_PortableLight_single_F { - class ADDON { - init = QUOTE(_this call DFUNC(initObject)); - }; - }; - class StaticWeapon { - class ADDON { - init = QUOTE(_this call DFUNC(initObject)); - }; - }; -}; diff --git a/addons/cargo/CfgVehicles.hpp b/addons/cargo/CfgVehicles.hpp index 4c4647581e..5182190016 100644 --- a/addons/cargo/CfgVehicles.hpp +++ b/addons/cargo/CfgVehicles.hpp @@ -285,7 +285,7 @@ class CfgVehicles { GVAR(space) = 4; GVAR(hasCargo) = 1; }; - + // autonomus class UAV_01_base_F: Helicopter_Base_F { GVAR(space) = 0; @@ -346,7 +346,7 @@ class CfgVehicles { GVAR(space) = 8; GVAR(hasCargo) = 1; }; - + class StaticMortar; class Mortar_01_base_F: StaticMortar { GVAR(size) = 2; // 1 = small, 2 = large diff --git a/addons/cargo/XEH_PREP.hpp b/addons/cargo/XEH_PREP.hpp index 8224ec0029..8b7d3c5d4f 100644 --- a/addons/cargo/XEH_PREP.hpp +++ b/addons/cargo/XEH_PREP.hpp @@ -1,9 +1,8 @@ PREP(addCargoItem); -PREP(canLoad); +PREP(addCargoVehiclesActions); PREP(canLoadItemIn); PREP(canUnloadItem); -PREP(findNearestVehicle); PREP(getCargoSpaceLeft); PREP(getSizeItem); PREP(handleDestroyed); @@ -15,6 +14,8 @@ PREP(moduleMakeLoadable); PREP(moduleSettings); PREP(onMenuOpen); PREP(paradropItem); +PREP(setSize); +PREP(setSpace); PREP(startLoadIn); PREP(startUnload); PREP(unloadItem); diff --git a/addons/cargo/XEH_postInit.sqf b/addons/cargo/XEH_postInit.sqf index 6b7320d5ae..051c77ec9c 100644 --- a/addons/cargo/XEH_postInit.sqf +++ b/addons/cargo/XEH_postInit.sqf @@ -51,3 +51,28 @@ _item hideObjectGlobal false; _item setPosASL (AGLtoASL _emptyPosAGL); }] call CBA_fnc_addEventHandler; + +// Private events to handle adding actions globally via public functions +[QGVAR(initObject), DFUNC(initObject)] call CBA_fnc_addEventHandler; +[QGVAR(initVehicle), DFUNC(initVehicle)] call CBA_fnc_addEventHandler; + +// Add all the vehicle init EHs (require initPost for set/get variables) +["LandVehicle", "initPost", DFUNC(initVehicle), nil, nil, true] call CBA_fnc_addClassEventHandler; +["Air", "initPost", DFUNC(initVehicle), nil, nil, true] call CBA_fnc_addClassEventHandler; +["Ship_F", "initPost", DFUNC(initVehicle), nil, nil, true] call CBA_fnc_addClassEventHandler; + +// Add all the object init EHs +["StaticWeapon", "initPost", DFUNC(initObject), nil, nil, true] call CBA_fnc_addClassEventHandler; +["Land_PortableLight_single_F", "initPost", DFUNC(initObject), nil, nil, true] call CBA_fnc_addClassEventHandler; +["ACE_ConcertinaWireCoil", "initPost", DFUNC(initObject), nil, nil, true] call CBA_fnc_addClassEventHandler; + +// Add all the vehicle/object init EHs +["ThingX", "initPost", { + _this call DFUNC(initObject); _this call DFUNC(initVehicle); +}, nil, nil, true] call CBA_fnc_addClassEventHandler; +["Land_PaperBox_closed_F", "initPost", { + _this call DFUNC(initObject); _this call DFUNC(initVehicle); +}, nil, nil, true] call CBA_fnc_addClassEventHandler; +["PlasticCase_01_base_F", "initPost", { + _this call DFUNC(initObject); _this call DFUNC(initVehicle); +}, nil, nil, true] call CBA_fnc_addClassEventHandler; diff --git a/addons/cargo/config.cpp b/addons/cargo/config.cpp index 1912740903..31f01ffd72 100644 --- a/addons/cargo/config.cpp +++ b/addons/cargo/config.cpp @@ -15,6 +15,7 @@ class CfgPatches { }; #include "ACE_Settings.hpp" +#include "CfgEden.hpp" #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" #include "menu.hpp" diff --git a/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf b/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf new file mode 100644 index 0000000000..aeace6960b --- /dev/null +++ b/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf @@ -0,0 +1,45 @@ +/* + * Author: Dystopian + * Create actions for nearest vehicles with cargo. + * + * Arguments: + * 0: Target + * 1: Player + * + * Return Value: + * Children actions + * + * Example: + * [target, player] call ace_cargo_fnc_addCargoVehiclesActions + * + * Public: No + */ +#include "script_component.hpp" + +params ["_target", "_player"]; + +private _statement = { + params ["_target", "_player", "_params"]; + _params params ["_vehicle"]; + [_player, _target, _vehicle] call FUNC(startLoadIn); +}; + +private _actions = []; + +{ + private _config = configFile >> "CfgVehicles" >> typeOf _x; + private _hasCargoPublic = _x getVariable [QGVAR(hasCargo), false]; + private _hasCargoConfig = getNumber (_config >> QGVAR(hasCargo)) == 1; + if ((_hasCargoPublic || _hasCargoConfig) && {_x != _target}) then { + private _name = getText (_config >> "displayName"); + private _ownerName = [_x, true] call EFUNC(common,getName); + if ("" != _ownerName) then { + _name = format ["%1 (%2)", _name, _ownerName]; + }; + private _icon = (getText (_config >> "icon")) call BIS_fnc_textureVehicleIcon; + private _action = [format ["%1", _x], _name, _icon, _statement, {true}, {}, [_x]] call EFUNC(interact_menu,createAction); + _actions pushBack [_action, [], _target]; + }; +} forEach (nearestObjects [_player, CARGO_VEHICLE_CLASSES, MAX_LOAD_DISTANCE]); + +_actions diff --git a/addons/cargo/functions/fnc_canLoad.sqf b/addons/cargo/functions/fnc_canLoad.sqf deleted file mode 100644 index e0fd172eef..0000000000 --- a/addons/cargo/functions/fnc_canLoad.sqf +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Author: Glowbal - * Check if player can load an item into the nearest vehicle. - * - * Arguments: - * 0: Player - * 1: Object to load - * - * Return Value: - * Can load - * - * Example: - * [player, object] call ace_cargo_fnc_canLoad - * - * Public: No - */ -#include "script_component.hpp" - -params ["_player", "_object"]; -TRACE_2("params",_player,_object); - -if (!([_player, _object, []] call EFUNC(common,canInteractWith))) exitWith {false}; - -private _nearestVehicle = [_player, _object] call FUNC(findNearestVehicle); - -if (_nearestVehicle isKindOf "Cargo_Base_F" || isNull _nearestVehicle) then { - { - if ([_object, _x] call FUNC(canLoadItemIn)) exitWith {_nearestVehicle = _x}; - } forEach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]); -}; - -if (isNull _nearestVehicle) exitWith {false}; - -if ((locked _nearestVehicle) >= 2) exitWith {false}; - -[_object, _nearestVehicle] call FUNC(canLoadItemIn) diff --git a/addons/cargo/functions/fnc_findNearestVehicle.sqf b/addons/cargo/functions/fnc_findNearestVehicle.sqf deleted file mode 100644 index 7981782255..0000000000 --- a/addons/cargo/functions/fnc_findNearestVehicle.sqf +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Author: Glowbal - * Get nearest vehicle from unit that is not excluded, priority: Car-Air-Tank-Ship. - * - * Arguments: - * 0: Unit - * 1: Object to exclude - * - * Return Value: - * Vehicle in Distance - * - * Example: - * [unit, object] call ace_cargo_fnc_findNearestVehicle - * - * Public: No - */ -#include "script_component.hpp" - -params ["_unit","_object"]; - -private _loadCar = nearestObjects [_unit, ["car"], MAX_LOAD_DISTANCE]; -_loadCar deleteAt (_loadCar find _object); -if !(_loadCar isEqualTo []) exitWith {_loadCar select 0}; - -private _loadHelicopter = nearestObjects [_unit, ["air"], MAX_LOAD_DISTANCE]; -_loadHelicopter deleteAt (_loadHelicopter find _object); -if !(_loadHelicopter isEqualTo []) exitWith {_loadHelicopter select 0}; - -private _loadTank = nearestObjects [_unit, ["tank"], MAX_LOAD_DISTANCE]; -_loadTank deleteAt (_loadTank find _object); -if !(_loadTank isEqualTo []) exitWith {_loadTank select 0}; - -private _loadShip = nearestObjects [_unit, ["ship"], MAX_LOAD_DISTANCE]; -_loadShip deleteAt (_loadShip find _object);; -if !(_loadShip isEqualTo []) exitWith {_loadShip select 0}; - -private _loadContainer = nearestObjects [_unit, ["Cargo_base_F"], MAX_LOAD_DISTANCE]; -_loadContainer deleteAt (_loadContainer find _object); -if !(_loadContainer isEqualTo []) exitWith {_loadContainer select 0}; - -objNull diff --git a/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf b/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf index 7e8594ffe4..dc5f3ab073 100644 --- a/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf +++ b/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf @@ -18,4 +18,4 @@ params ["_object"]; // TRACE_1("params",_object); -_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(space))] +(_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(space))]) max 0 diff --git a/addons/cargo/functions/fnc_getSizeItem.sqf b/addons/cargo/functions/fnc_getSizeItem.sqf index c53c05ee28..32ec92a550 100644 --- a/addons/cargo/functions/fnc_getSizeItem.sqf +++ b/addons/cargo/functions/fnc_getSizeItem.sqf @@ -1,5 +1,5 @@ /* - * Author: Glowbal + * Author: Glowbal, SilentSpike * Get the cargo size of an object. * * Arguments: @@ -17,23 +17,13 @@ params ["_item"]; -scopeName "return"; - -private _isVirtual = (_item isEqualType ""); -private _itemClass = if (_isVirtual) then {_item} else {typeOf _item}; -private _config = (configFile >> "CfgVehicles" >> _itemClass >> QGVAR(size)); - -if (_isVirtual) then { - if (isNumber _config) then { - (getNumber _config) breakOut "return"; - }; +// Virtual items are much easier to deal with +if (_item isEqualType "") then { + CARGO_SIZE(_item) } else { - if (!isNil {_item getVariable QGVAR(size)}) then { - (_item getVariable QGVAR(size)) breakOut "return"; - }; - if (isNumber _config) then { - (getNumber _config) breakOut "return"; + if (isNil {_item getVariable QGVAR(size)}) then { + CARGO_SIZE(typeOf _item) + } else { + _item getVariable QGVAR(size) }; }; - --1 diff --git a/addons/cargo/functions/fnc_initObject.sqf b/addons/cargo/functions/fnc_initObject.sqf index 92403b8dd9..3ab2061b0d 100644 --- a/addons/cargo/functions/fnc_initObject.sqf +++ b/addons/cargo/functions/fnc_initObject.sqf @@ -1,5 +1,5 @@ /* - * Author: Glowbal + * Author: Glowbal, SilentSpike * Initializes variables for loadable objects. Called from init EH. * * Arguments: @@ -19,20 +19,44 @@ params ["_object"]; private _type = typeOf _object; TRACE_2("params",_object,_type); -if ((_object getVariable [QGVAR(canLoad), getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(canLoad))]) != 1) exitWith {}; +// If object had size given to it via eden/public then override config canLoad setting +private _canLoadPublic = _object getVariable [QGVAR(canLoad), false]; +private _canLoadConfig = getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(canLoad)) == 1; -// do nothing if the class is already initialized +// Nothing to do here if object can't be loaded +if !(_canLoadConfig || _canLoadPublic) exitWith {}; + +// Servers and HCs do not require action menus (beyond this point) +if !(hasInterface) exitWith {}; + +// Unnecessary to add actions to an object class that's already got them if (_type in GVAR(initializedItemClasses)) exitWith {}; -GVAR(initializedItemClasses) pushBack _type; +if (_object getVariable [QGVAR(initObject),false]) exitWith {}; -TRACE_1("Adding load cargo action to class", _type); +// Objects given size via eden have their actions added to the object +// So this function may run for multiple of the same class in that case +if (_canLoadConfig) then { + GVAR(initializedItemClasses) pushBack _type; + TRACE_1("Adding load cargo action to class", _type); +} else { + _object setVariable [QGVAR(initObject),true]; + TRACE_1("Adding load cargo action to object", _object); +}; +// Vehicles with passengers inside are prevented from being loaded in `fnc_canLoadItemIn` private _condition = { + //IGNORE_PRIVATE_WARNING ["_target", "_player"]; GVAR(enable) && - {(_target getVariable [QGVAR(canLoad), getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(canLoad))]) == 1} && + {(_target getVariable [QGVAR(canLoad), getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(canLoad)) == 1])} && {locked _target < 2} && {alive _target} && - {[_player, _target, []] call EFUNC(common,canInteractWith)} + {[_player, _target, []] call EFUNC(common,canInteractWith)} && + {0 < { + private _type = typeOf _x; + private _hasCargoPublic = _x getVariable [QGVAR(hasCargo), false]; + private _hasCargoConfig = getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) == 1; + (_hasCargoPublic || _hasCargoConfig) && {_x != _target} + } count (nearestObjects [_player, CARGO_VEHICLE_CLASSES, MAX_LOAD_DISTANCE])} }; private _statement = { params ["_target", "_player"]; @@ -41,6 +65,10 @@ private _statement = { private _text = localize LSTRING(loadObject); private _icon = QPATHTOF(UI\Icon_load.paa); -private _action = [QGVAR(load), _text, _icon, _statement, _condition] call EFUNC(interact_menu,createAction); -[_type, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToClass); +private _action = [QGVAR(load), _text, _icon, _statement, _condition, {call FUNC(addCargoVehiclesActions)}] call EFUNC(interact_menu,createAction); +if (_canLoadConfig) then { + [_type, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToClass); +} else { + [_object, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToObject); +}; diff --git a/addons/cargo/functions/fnc_initVehicle.sqf b/addons/cargo/functions/fnc_initVehicle.sqf index c65a9bddbc..f27f289ad5 100644 --- a/addons/cargo/functions/fnc_initVehicle.sqf +++ b/addons/cargo/functions/fnc_initVehicle.sqf @@ -20,8 +20,14 @@ TRACE_1("params", _vehicle); private _type = typeOf _vehicle; -if (getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) != 1) exitWith {}; +// If vehicle had space given to it via eden/public then override config hasCargo setting +private _hasCargoPublic = _vehicle getVariable [QGVAR(hasCargo), false]; +private _hasCargoConfig = getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) == 1; +// Nothing to do here if vehicle has no cargo space +if !(_hasCargoConfig || _hasCargoPublic) exitWith {}; + +// Vehicle can have default ace cargo in its config if (isServer) then { { if (isClass _x) then { @@ -33,19 +39,33 @@ if (isServer) then { } count ("true" configClasses (configFile >> "CfgVehicles" >> _type >> "ACE_Cargo" >> "Cargo")); }; -// do nothing if the class is already initialized +// Servers and HCs do not require action menus (beyond this point) +if !(hasInterface) exitWith {}; + +// Unnecessary to add actions to a vehicle class that's already got them if (_type in GVAR(initializedVehicleClasses)) exitWith {}; -// set class as initialized -GVAR(initializedVehicleClasses) pushBack _type; +if (_vehicle getVariable [QGVAR(initVehicle),false]) exitWith {}; -if (!hasInterface) exitWith {}; - -TRACE_1("Adding unload cargo action to class", _type); +// Vehicles given cargo via eden have their actions added to the object +// So this function may run for multiple of the same class in that case +if (_hasCargoConfig) then { + GVAR(initializedVehicleClasses) pushBack _type; + TRACE_1("Adding unload cargo action to class", _type); +} else { + _vehicle setVariable [QGVAR(initVehicle),true]; + TRACE_1("Adding unload cargo action to object", _vehicle); +}; private _condition = { - GVAR(enable) && {locked _target < 2} && {alive _target} && {[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)} + //IGNORE_PRIVATE_WARNING ["_target", "_player"]; + GVAR(enable) && + {(_target getVariable [QGVAR(hasCargo), getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(hasCargo)) == 1])} && + {locked _target < 2} && + {alive _target} && + {[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)} }; private _statement = { + //IGNORE_PRIVATE_WARNING ["_target", "_player"]; GVAR(interactionVehicle) = _target; GVAR(interactionParadrop) = false; createDialog QGVAR(menu); @@ -54,11 +74,16 @@ private _text = localize LSTRING(openMenu); private _icon = ""; private _action = [QGVAR(openMenu), _text, _icon, _statement, _condition] call EFUNC(interact_menu,createAction); -[_type, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToClass); +if (_hasCargoConfig) then { + [_type, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToClass); +} else { + [_vehicle, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToObject); +}; // Add the paradrop self interaction for planes and helicopters if (_vehicle isKindOf "Air") then { private _condition = { + //IGNORE_PRIVATE_WARNING ["_target", "_player"]; GVAR(enable) && {[_player, _target, []] call EFUNC(common,canInteractWith)} && { private _turretPath = _player call CBA_fnc_turretPath; (_player == (driver _target)) || // pilot @@ -66,6 +91,7 @@ if (_vehicle isKindOf "Air") then { {_turretPath in (getArray (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(loadmasterTurrets)))}} // loadMaster turret from config }; private _statement = { + //IGNORE_PRIVATE_WARNING ["_target", "_player"]; GVAR(interactionVehicle) = _target; GVAR(interactionParadrop) = true; createDialog QGVAR(menu); @@ -74,5 +100,9 @@ if (_vehicle isKindOf "Air") then { private _icon = ""; private _action = [QGVAR(openMenu), _text, _icon, _statement, _condition] call EFUNC(interact_menu,createAction); - [_type, 1, ["ACE_SelfActions"], _action] call EFUNC(interact_menu,addActionToClass); // self action on the vehicle + if (_hasCargoConfig) then { + [_type, 1, ["ACE_SelfActions"], _action] call EFUNC(interact_menu,addActionToClass); // self action on the vehicle + } else { + [_vehicle, 1, ["ACE_SelfActions"], _action] call EFUNC(interact_menu,addActionToObject); + }; }; diff --git a/addons/cargo/functions/fnc_makeLoadable.sqf b/addons/cargo/functions/fnc_makeLoadable.sqf index 6bd962398a..4d2aac21f0 100644 --- a/addons/cargo/functions/fnc_makeLoadable.sqf +++ b/addons/cargo/functions/fnc_makeLoadable.sqf @@ -17,6 +17,13 @@ */ #include "script_component.hpp" +// Only run this after the settings are initialized +if !(EGVAR(common,settingsInitFinished)) exitWith { + EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(makeLoadable), _this]; +}; + +ACE_DEPRECATED(QFUNC(makeLoadable),"3.12.0",QFUNC(setSize)); + params [["_object", objNull, [objNull]], ["_canLoad", true, [false, 0]], ["_setSize", 1, [0]]]; TRACE_3("params",_object,_canLoad,_setSize); @@ -25,7 +32,7 @@ private _type = typeOf _object; private _cfgCanLoad = getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(canLoad)); private _curSize = [_object] call FUNC(getSizeItem); -_canLoad = [0, 1] select _canLoad; //convert true/false to scalar +_canLoad = [0, 1] select _canLoad; // Convert true/false to scalar if ((_canLoad == 1) && {_setSize <= 0}) exitWith { ERROR("ace_cargo_fnc_makeLoadable (size <= 0) when making loadable"); @@ -33,7 +40,7 @@ if ((_canLoad == 1) && {_setSize <= 0}) exitWith { TRACE_2("setVar if different from config",_canLoad,_cfgCanLoad); if (_canLoad != _cfgCanLoad) then { - _object setVariable [QGVAR(canLoad), _canLoad]; + _object setVariable [QGVAR(canLoad), _canLoad == 1]; }; TRACE_2("setVar if different from config",_setSize,_curSize); diff --git a/addons/cargo/functions/fnc_moduleMakeLoadable.sqf b/addons/cargo/functions/fnc_moduleMakeLoadable.sqf index 9c7fb06742..9a9e21a22d 100644 --- a/addons/cargo/functions/fnc_moduleMakeLoadable.sqf +++ b/addons/cargo/functions/fnc_moduleMakeLoadable.sqf @@ -20,6 +20,8 @@ params ["_logic", "_objects", "_activated"]; TRACE_3("params",_logic,_objects,_activated); +ACE_DEPRECATED(QFUNC(moduleMakeLoadable),"3.12.0","Eden editor object attributes"); + if ((isNull _logic) || {!_activated}) exitWith {}; if (_objects isEqualTo []) exitWith { WARNING_1("ace_cargo_fnc_moduleMakeLoadable has no synced objects [%1]", _logic); diff --git a/addons/cargo/functions/fnc_paradropItem.sqf b/addons/cargo/functions/fnc_paradropItem.sqf index 4c34e61e4e..e1c04799fb 100644 --- a/addons/cargo/functions/fnc_paradropItem.sqf +++ b/addons/cargo/functions/fnc_paradropItem.sqf @@ -32,9 +32,9 @@ private _itemSize = [_item] call FUNC(getSizeItem); _vehicle setVariable [QGVAR(space), (_cargoSpace + _itemSize), true]; (boundingBoxReal _vehicle) params ["_bb1", "_bb2"]; -private _distBehind = ((_bb1 select 1) min (_bb2 select 1)) - 3; // 3 meters behind max bounding box +private _distBehind = ((_bb1 select 1) min (_bb2 select 1)) - 4; // 4 meters behind max bounding box TRACE_1("",_distBehind); -private _posBehindVehicleAGL = _vehicle modelToWorld [0, _distBehind, -1]; +private _posBehindVehicleAGL = _vehicle modelToWorld [0, _distBehind, -2]; private _itemObject = if (_item isEqualType objNull) then { @@ -49,7 +49,7 @@ private _itemObject = if (_item isEqualType objNull) then { _newItem }; -_itemObject setVelocity ((velocity _vehicle) vectorAdd ((vectorNormalized (vectorDir _vehicle)) vectorMultiply 10)); +_itemObject setVelocity ((velocity _vehicle) vectorAdd ((vectorNormalized (vectorDir _vehicle)) vectorMultiply -5)); // open parachute and ir light effect [{ diff --git a/addons/cargo/functions/fnc_setSize.sqf b/addons/cargo/functions/fnc_setSize.sqf new file mode 100644 index 0000000000..2e5c0aa441 --- /dev/null +++ b/addons/cargo/functions/fnc_setSize.sqf @@ -0,0 +1,56 @@ +/* + * Author: SilentSpike + * Set the cargo size of any object. Has global effect. + * Adds the load action menu if necessary. + * Negative size makes unloadable. + * + * Arguments: + * 0: Object + * 1: Cargo size + * + * Return Value: + * None + * + * Example: + * [cursorTarget, 3] call ace_cargo_fnc_setSize + * + * Public: Yes + */ +#include "script_component.hpp" + +// Only run this after the settings are initialized +if !(EGVAR(common,settingsInitFinished)) exitWith { + EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(setSize), _this]; +}; + +params [ + ["_object",objNull,[objNull]], + ["_size",nil,[0]] // Default can't be a number since all are valid +]; +TRACE_2("setSize",_object,_size); + +// Nothing to do here +if ( + (isNil "_size") || + {isNull _object} || + {_size == _object getVariable [QGVAR(size), CARGO_SIZE(typeOf _object)]} +) exitWith {}; + +// Apply new size globally +// Necessary to update value, even if unloadable, as API could be used again +_object setVariable [QGVAR(canLoad), _size >= 0, true]; +_object setVariable [QGVAR(size), _size, true]; + +// If no size no need for load action +if (_size < 0) exitWith {}; + +// If an existing ID is present, load action has already been added globally +private _jipID = _object getVariable QGVAR(setSize_jipID); + +// Actions should be added to all future JIP players too +if (isNil "_jipID") then { + _jipID = [QGVAR(initObject), [_object]] call CBA_fnc_globalEventJIP; + + // Store the ID for any future calls to this function + _object setVariable [QGVAR(setSize_jipID), _jipID, true]; +}; diff --git a/addons/cargo/functions/fnc_setSpace.sqf b/addons/cargo/functions/fnc_setSpace.sqf new file mode 100644 index 0000000000..9f8ab85c68 --- /dev/null +++ b/addons/cargo/functions/fnc_setSpace.sqf @@ -0,0 +1,55 @@ +/* + * Author: SilentSpike + * Set the cargo space of any object. Has global effect. + * Adds the cargo action menu if necessary. + * + * Arguments: + * 0: Object + * 1: Cargo space + * + * Return Value: + * None + * + * Example: + * [vehicle player, 20] call ace_cargo_fnc_setSpace + * + * Public: Yes + */ +#include "script_component.hpp" + +// Only run this after the settings are initialized +if !(EGVAR(common,settingsInitFinished)) exitWith { + EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(setSpace), _this]; +}; + +params [ + ["_vehicle",objNull,[objNull]], + ["_space",nil,[0]] // Default can't be a number since all are valid +]; +TRACE_2("setSpace",_vehicle,_size); + +// Nothing to do here +if ( + (isNil "_space") || + {isNull _vehicle} || + {_space == _vehicle getVariable [QGVAR(space), CARGO_SPACE(typeOf _vehicle)]} +) exitWith {}; + +// Apply new space globally +// Necessary to update value, even if no space, as API could be used again +_vehicle setVariable [QGVAR(hasCargo), _space > 0, true]; +_vehicle setVariable [QGVAR(space), _space, true]; + +// If no cargo space no need for cargo menu +if (_space <= 0) exitWith {}; + +// If an existing ID is present, cargo menu has already been added globally +private _jipID = _vehicle getVariable QGVAR(setSpace_jipID); + +// Cargo menu should be added to all future JIP players too +if (isNil "_jipID") then { + _jipID = [QGVAR(initVehicle), [_vehicle]] call CBA_fnc_globalEventJIP; + + // Store the ID for any future calls to this function + _vehicle setVariable [QGVAR(setSpace_jipID), _jipID, true]; +}; diff --git a/addons/cargo/functions/fnc_startLoadIn.sqf b/addons/cargo/functions/fnc_startLoadIn.sqf index 8af411bddd..0116a34a73 100644 --- a/addons/cargo/functions/fnc_startLoadIn.sqf +++ b/addons/cargo/functions/fnc_startLoadIn.sqf @@ -5,6 +5,7 @@ * Arguments: * 0: Player * 1: Object + * 2: Vehicle (Optional) * * Return Value: * Load ProgressBar Started @@ -16,15 +17,14 @@ */ #include "script_component.hpp" -params ["_player", "_object"]; -TRACE_2("params",_player,_object); +params ["_player", "_object", ["_cargoVehicle", objNull]]; +TRACE_3("params",_player,_object,_cargoVehicle); -private _vehicle = [_player, _object] call FUNC(findNearestVehicle); - -if ((isNull _vehicle) || {_vehicle isKindOf "Cargo_Base_F"}) then { +private _vehicle = _cargoVehicle; +if (isNull _vehicle) then { { if ([_object, _x] call FUNC(canLoadItemIn)) exitWith {_vehicle = _x}; - } forEach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]); + } forEach (nearestObjects [_player, CARGO_VEHICLE_CLASSES, MAX_LOAD_DISTANCE]); }; if (isNull _vehicle) exitWith { diff --git a/addons/cargo/script_component.hpp b/addons/cargo/script_component.hpp index 4a1305a160..885308a3b9 100644 --- a/addons/cargo/script_component.hpp +++ b/addons/cargo/script_component.hpp @@ -17,3 +17,11 @@ #include "\z\ace\addons\main\script_macros.hpp" #define MAX_LOAD_DISTANCE 10 + +#define CARGO_VEHICLE_CLASSES ["Car", "Air", "Tank", "Ship", "Cargo_base_F", "Land_PaperBox_closed_F"] + +#define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default}) + +// Default cargo size is -1 as 0 is a valid size +#define CARGO_SIZE(classname) GET_NUMBER(configFile >> "CfgVehicles" >> (classname) >> QGVAR(size),-1) +#define CARGO_SPACE(classname) GET_NUMBER(configFile >> "CfgVehicles" >> (classname) >> QGVAR(space),0) diff --git a/addons/cargo/stringtable.xml b/addons/cargo/stringtable.xml index 9eefee62c1..df5090db6e 100644 --- a/addons/cargo/stringtable.xml +++ b/addons/cargo/stringtable.xml @@ -237,13 +237,26 @@ オブジェクトの大きさ 물체 크기 + + Cargo Space + + + The cargo space available in this vehicle/container + + + Cargo Size + + + The cargo space required to hold this object (-1 for unloadable) + Airdrop Türlast 空中投下 Zrzut zaopatrzenia 공중 투하 - Largage aérien + Largage aérien + Lancio Aereo Unlevel Flight @@ -251,15 +264,20 @@ 機体が水平ではありません Nierówny lot 기체가 수평이 아닙니다 - Rétablir l'assiette + Rétablir l'assiette + Volo non Livellato Paradrop Time Coffecient 空中投下までの時間係数 + Coefficente Tempo Lancio Paracadute + Coefficient Temps de largage de cargaison Modifier for how long it takes to paradrop a cargo item. カーゴ アイテムを空中投下するまでの時間を変更します。 + Modificato per quanto tempo ci impiega a paracadutare un oggetto cargo. + Modifier le temps qu'il faut pour larguer la cargaison. diff --git a/addons/chemlights/stringtable.xml b/addons/chemlights/stringtable.xml index c95af9dc26..76e1ffd27e 100644 --- a/addons/chemlights/stringtable.xml +++ b/addons/chemlights/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -8,6 +8,7 @@ Knicklichter 켐라이트 Cyalumes + Luce chimica Prepare %1 @@ -16,6 +17,7 @@ %1 vorbereiten %1 준비 Prépare %1 + Prepara %1 %1<br/>Prepared @@ -24,6 +26,7 @@ %1<br/>vorbereitet %1<br/>준비됨 %1<br/>prêt + %1 <br/> Preparata No inventory space @@ -33,7 +36,7 @@ Pas de place Nedostatek místa v inventáři Sem espaço no inventário - Non hai più spazio + Nessuno spazio nell'inventario Nincs több hely В инвентаре нет места インベントリに空きがありません @@ -46,6 +49,7 @@ [ACE] Knicklichter [ACE] 켐라이트 [ACE] Cyalume + [ACE] Luci chimiche Chemlight (Orange) @@ -54,6 +58,7 @@ Knicklicht (orange) 켐라이트 (주황) Cyalume (orange) + Luce chimica (Arancione) Orange Light @@ -62,6 +67,7 @@ Oranges Knicklicht 주황색 Lum. orange + Luce Arancione Type: Light - Orange<br />Rounds: 1<br />Used in: Hand @@ -70,6 +76,7 @@ Typ: Licht - orange<br />Anzahl: 1<br />Benutzt in: Hand 종류:밝은 오렌지<br />수량: 1<br />사용처: 손 Type: Lumière - orange<br />Nbre: 1<br /> À main + Tipo: Luce - Arancione<br/>Rimanenti: 1<br/>Usata in: Mano Chemlight (White) @@ -78,6 +85,7 @@ Knicklicht (weiß) 켐라이트 (하양) Cyalume (blanc) + Luce chimica (Bianca) White Light @@ -86,6 +94,7 @@ Weißes Knicklicht 하얀색 Lum. blanche + Luce Bianca Type: Light - White<br />Rounds: 1<br />Used in: Hand @@ -94,6 +103,7 @@ Typ: Licht - weiß<br />Anzahl: 1<br />Benutzt in: Hand 종류:하얀색<br />수량: 1<br />사용처: 손 Type: Lumière - blanche<br />Nbre: 1<br /> À main + Tipo: Luce - Bianca<br/>Rimanenti: 1<br/>Usata in: Mano Chemlight (Hi Red) @@ -102,6 +112,7 @@ Knicklicht (rot, hell) 켐라이트 (밝은 빨간색) Cyalume (Hi rouge) + Luce chimica (Hi Rossa) Red Hi Light @@ -110,6 +121,7 @@ Helles, rotes Knicklicht 밝은 빨간색 Lum. rouge haute intensité + Luce Hi Rossa Type: Light - Red Hi (5 minute)<br />Rounds: 1<br />Used in: Hand @@ -118,6 +130,7 @@ Typ: Licht - rot, hell (5 Minuten)<br />Anzahl: 1<br />Benutzt in: Hand 종류: 밝은 빨간색 (5분)<br />수량: 1<br />사용처: 손 Type: Lumière - rouge Hi (5 minutes)<br />Nbre: 1<br /> À main + Tipo: Luce - Rossa Hi (5 minuti)<br />Rimanenti: 1<br/>Usata in: Mano Chemlight (Hi Yellow) @@ -126,6 +139,7 @@ Knicklicht (gelb, hell) 켐라이트 (밝은 노란색) Cyalume (Hi jaune) + Luce chimica (Hi Gialla) Yellow Hi Light @@ -134,6 +148,7 @@ Helles, gelbes Knicklicht 밝은 노란색 Lum. jaune haute intensité + Luce Hi Gialla Type: Light - Yellow Hi (5 minute)<br />Rounds: 1<br />Used in: Hand @@ -142,6 +157,7 @@ Typ: Licht - gelb, hell (5 Minuten)<br />Anzahl: 1<br />Benutzt in: Hand 종류:밝은 노란색 (5분)<br />수량: 1<br />사용처: Hand Type: Lumière - Jaune Hi (5 minutes)Nbre: 1<br /> À main + Tipo: Luce - Gialla Hi (5 minuti)<br />Rimanenti: 1<br/>Usata in: Mano Chemlight (Hi Orange) @@ -150,6 +166,7 @@ Knicklicht (orange, hell) 켐라이트 (밝은 주황색) Cyalume (Hi orange) + Luce chimica (Hi Arancione) Orange Hi Light @@ -158,6 +175,7 @@ Helles, oranges Knicklicht 밝은 주황색 Lum. orange haute intensité + Luce Hi Arancione Type: Light - Orange Hi (5 minute)<br />Rounds: 1<br />Used in: Hand @@ -166,6 +184,7 @@ Typ: Licht - orange, hell (5 Minuten)<br />Anzahl: 1<br />Benutzt in: Hand 종류: 밝은 주황색 (5분)<br />수량: 1<br />사용처: 손 Type: Lumière - orange Hi (5 minutes)<br />Nbre: 1<br /> À main + Tipo: Luce - Arancione Hi (5 minuti)<br />Rimanenti: 1<br/>Usata in: Mano Chemlight (Hi White) @@ -174,6 +193,7 @@ Knicklicht (weiß, hell) 켐라이트 (밝은 하얀색) Cyalume (Hi blanc) + Luce chimica (Hi Bianca) White Hi Light @@ -182,6 +202,7 @@ Helles, weißes Knicklicht 밝은 하얀색 Lum. blanche haute intensité + Luce Hi Bianca Type: Light - White Hi (5 minute)<br />Rounds: 1<br />Used in: Hand @@ -190,6 +211,7 @@ Typ: Licht - weiß, hell (5 Minuten)<br />Anzahl: 1<br />Benutzt in: Hand 종류: 밝은 하얀색 (5분)<br />수량: 1<br />사용처: 손 Type: Lumière - blanche Hi (5 minutes)<br />Nbre: 1<br /> À main + Tipo: Luce - Bianca Hi (5 minuti)<br />Rimanenti: 1<br/>Usata in: Mano Chemlight (IR) @@ -198,6 +220,7 @@ Knicklicht (IR) 켐라이트 (적외선) Cyalume (IR) + Luce chimica (IR) IR Light @@ -206,6 +229,7 @@ IR-Knicklicht 적외선 켐라이트 Lumière IR + Luce IR Type: Light - Infrared<br />Rounds: 1<br />Used in: Hand @@ -214,6 +238,7 @@ Typ: Licht - infrarot<br />Anzahl: 1<br />Benutzt in: Hand 종류: 적외선<br />수량: 1<br />사용처: 손 Type: Lumière - infrarouge<br />Nbre: 1<br /> À main + Tipo: Luce - Infrarossi<br />Usata in: Mano Chemlight Shield (Empty) @@ -222,6 +247,7 @@ Knicklicht-Abschirmung (leer) 켐라이트 쉴드 (비어있음) Étui cyalume (vide) + Scudo Luce chimica (Vuoto) Shield for chemlights. Combine with chemlight to prepare reading light. @@ -230,6 +256,7 @@ Abschirmung für Knicklichter. Mit Knicklicht kombinieren, um Leselicht zu erhalten. 켐라이트를 위한 가림막입니다. 켐라이트와 같이 사용하여 읽을 때 씁니다. Étui pour cyalume. Combiné avec un cyalume pour obtennir un lampe de lecture. + Scudo per luci chimiche. Combina con una luce chimica per una luce da lettura. Chemlight Shield (Green) @@ -238,6 +265,7 @@ Knicklicht-Abschirmung (grün) 켐라이트 쉴드 (초록) Étui cyalume (vert) + Scudo Luce Chimica (Verde) Green reading light. @@ -246,6 +274,7 @@ Grünes Leselicht. 초록빛 조명 Lampe d'orientation verte. + Luce da lettura Verde. Chemlight Shield (Red) @@ -254,6 +283,7 @@ Knicklicht-Abschirmung (rot) 켐라이트 쉴드 (빨강) Étui cyalume (rouge) + Scudo Luce Chimica (Rossa) Red reading light. @@ -262,6 +292,7 @@ Rotes Leselicht. 빨간색 조명 Lampe d'orientation rouge. + Luce da lettura Rossa. Chemlight Shield (Blue) @@ -270,6 +301,7 @@ Knicklicht-Abschirmung (blau) 켐라이트 쉴드 (파랑) Étui cyalume (bleu) + Scudo Luce Chimica (Blu) Blue reading light. @@ -278,6 +310,7 @@ Blaues Leselicht. 파란색 조명 Lampe d'orientation bleue. + Luce da lettura Blu. Chemlight Shield (Yellow) @@ -286,6 +319,7 @@ Knicklicht-Abschirmung (gelb) 켐라이트 쉴드 (노랑) Étui cyalume (jaune) + Scudo Luce Chimica (Gialla) Yellow reading light. @@ -294,6 +328,7 @@ Gelbes Leselicht. 노란색 조명 Lampe d'orientation jaune. + Luce da lettura Gialla. Chemlight Shield (Orange) @@ -302,6 +337,7 @@ Knicklicht-Abschirmung (orange) 켐라이트 쉴드 (주황) Étui cyalume (orange) + Scudo Luce Chimica (Arancione) Orange reading light. @@ -310,6 +346,7 @@ Oranges Leselicht. 주황색 조명 Lampe d'orientation orange. + Luce da lettura Arancione. Chemlight Shield (White) @@ -318,6 +355,7 @@ Knicklicht-Abschirmung (weiß) 켐라이트 쉴드 (하양) Étui cyalume (blanc) + Scudo Luce Chimica (Bianca) White reading light. @@ -326,6 +364,7 @@ Weißes Leselicht. 주황색 조명 Lampe d'orientation blanche. + Luce da lettura Bianca. diff --git a/addons/common/XEH_PREP.hpp b/addons/common/XEH_PREP.hpp index 9cdee7bb54..0ecace8c84 100644 --- a/addons/common/XEH_PREP.hpp +++ b/addons/common/XEH_PREP.hpp @@ -37,6 +37,7 @@ PREP(displayTextPicture); PREP(displayTextStructured); PREP(doAnimation); PREP(doGesture); +PREP(dummy); PREP(dropBackpack); PREP(endRadioTransmission); PREP(eraseCache); diff --git a/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf b/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf index 763874de82..4aa2b8e675 100644 --- a/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf +++ b/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf @@ -15,6 +15,7 @@ params ["_client"]; [GVAR(syncedEvents), { + //IGNORE_PRIVATE_WARNING ["_key", "_value"]; _value params ["", "_eventLog"]; ["ACEs", [_key, _eventLog], _client] call CBA_fnc_targetEvent; diff --git a/addons/common/functions/fnc_cachedCall.sqf b/addons/common/functions/fnc_cachedCall.sqf index c0b858e58a..3463e1db55 100644 --- a/addons/common/functions/fnc_cachedCall.sqf +++ b/addons/common/functions/fnc_cachedCall.sqf @@ -33,11 +33,12 @@ if ((_namespace getVariable [_uid, [-99999]]) select 0 < diag_tickTime) then { missionNamespace setVariable [_varName, _cacheList]; [_event, { - // _eventName is defined on the function that calls the event #ifdef DEBUG_MODE_FULL INFO_1("Clear cached variables on event: %1",_eventName); #endif // Get the list of caches to clear + //IGNORE_PRIVATE_WARNING ["_eventName"]; + // _eventName is defined on the function that calls the event private _varName = format [QGVAR(clearCache_%1), _eventName]; private _cacheList = missionNamespace getVariable [_varName, []]; // Erase all the cached results diff --git a/addons/common/functions/fnc_checkFiles.sqf b/addons/common/functions/fnc_checkFiles.sqf index 98736a6dba..f0821f3f4c 100644 --- a/addons/common/functions/fnc_checkFiles.sqf +++ b/addons/common/functions/fnc_checkFiles.sqf @@ -41,18 +41,29 @@ private _addons = "true" configClasses (configFile >> "CfgPatches");// _addons = _addons apply {toLower configName _x};// _addons = _addons select {_x find "ace_" == 0}; +private _oldCompats = []; { if (getText (configFile >> "CfgPatches" >> _x >> "versionStr") != _version) then { private _errorMsg = format ["File %1.pbo is outdated.", _x]; ERROR(_errorMsg); - if (hasInterface) then { - ["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage); + if ((_x select [0, 10]) != "ace_compat") then { + if (hasInterface) then { + ["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage); + }; + } else { + _oldCompats pushBack _x; // Don't block game if it's just an old compat pbo }; }; false } count _addons; +if (!(_oldCompats isEqualTo [])) then { + [{ + // Lasts for ~10 seconds + ERROR_WITH_TITLE_1("The following ACE compatiblity PBOs are outdated", "%1", _this); + }, _oldCompats, 1] call CBA_fnc_waitAndExecute; +}; /////////////// // check dlls diff --git a/addons/common/functions/fnc_dummy.sqf b/addons/common/functions/fnc_dummy.sqf new file mode 100644 index 0000000000..a70fed35c0 --- /dev/null +++ b/addons/common/functions/fnc_dummy.sqf @@ -0,0 +1,12 @@ +/* + * Author: SilentSpike + * A dummy function which does nothing. Can be useful. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Public: No + */ diff --git a/addons/common/functions/fnc_getNumberMagazinesIn.sqf b/addons/common/functions/fnc_getNumberMagazinesIn.sqf index 87f92979eb..90e6b7d352 100644 --- a/addons/common/functions/fnc_getNumberMagazinesIn.sqf +++ b/addons/common/functions/fnc_getNumberMagazinesIn.sqf @@ -21,11 +21,14 @@ if (_unit isKindOf "CAManBase") then { _return = {_x == _magazine} count magazines _unit; } else { { - _return = _return + {_x == _magazine} count magazines _x; + _return = _return + ({_x == _magazine} count magazines _x); false } count crew _unit; - _return = _return + ({_x == _magazine} count getMagazineCargo _unit); + (getMagazineCargo _unit) params [["_magNames", []], ["_magCount", []]]; + { + if (_magazine == _x) exitWith {_return = _return + (_magCount select _forEachIndex)}; + } forEach _magNames; }; _return diff --git a/addons/common/functions/fnc_switchToGroupSide.sqf b/addons/common/functions/fnc_switchToGroupSide.sqf index 3a559a7a65..a375cfaf05 100644 --- a/addons/common/functions/fnc_switchToGroupSide.sqf +++ b/addons/common/functions/fnc_switchToGroupSide.sqf @@ -15,7 +15,7 @@ */ #include "script_component.hpp" -params [["_unit", objNull], ["_switch", false], ["_id", ""], ["_side", side _unit]]; +params [["_unit", objNull], ["_switch", false], ["_id", ""], ["_side", sideUnknown]]; private _previousGroupsList = _unit getVariable [QGVAR(previousGroupSwitchTo), []]; diff --git a/addons/concertina_wire/functions/fnc_deploy.sqf b/addons/concertina_wire/functions/fnc_deploy.sqf index 67b3584de2..0e8bc07914 100644 --- a/addons/concertina_wire/functions/fnc_deploy.sqf +++ b/addons/concertina_wire/functions/fnc_deploy.sqf @@ -14,7 +14,7 @@ */ #include "script_component.hpp" -PARAMS_2(_wirecoil,_unit); +params ["_wirecoil", "_unit"]; private _wireNoGeo = "ACE_ConcertinaWireNoGeo" createVehicle [0,0,0]; { diff --git a/addons/concertina_wire/functions/fnc_dismountSuccess.sqf b/addons/concertina_wire/functions/fnc_dismountSuccess.sqf index a3f5081271..f8673b8829 100644 --- a/addons/concertina_wire/functions/fnc_dismountSuccess.sqf +++ b/addons/concertina_wire/functions/fnc_dismountSuccess.sqf @@ -13,7 +13,7 @@ */ #include "script_component.hpp" -PARAMS_1(_wire); +params ["_wire"]; { _wire animate [_x, 1]; diff --git a/addons/cookoff/CfgSFX.hpp b/addons/cookoff/CfgSFX.hpp index 0e10644729..1b2d5408af 100644 --- a/addons/cookoff/CfgSFX.hpp +++ b/addons/cookoff/CfgSFX.hpp @@ -2,8 +2,12 @@ class CfgSFX { class GVAR(CookOff) { name = QGVAR(cookoff); - sounds[] = {QGVAR(cookoff)}; - GVAR(cookoff)[] = {PATHTOF(sounds\cookoff.wss),6,1.8,400,1,0,0,0}; + // Index 4 is percentage chance to play, in theory high pressure is way more likely + variant0[] = {PATHTOF(sounds\cookoff_low_pressure.ogg),6,1,400,0.1,0,0,0}; + variant1[] = {PATHTOF(sounds\cookoff_mid_pressure.ogg),6,1,400,0.25,0,0,0}; + variant2[] = {PATHTOF(sounds\cookoff_high_pressure.ogg),6,1,400,0.65,0,0,0}; + sounds[] = {"variant0","variant1","variant2"}; + titles[] = {}; empty[] = {"",0,0,0,0,0,0,0}; }; }; diff --git a/addons/cookoff/functions/fnc_cookOff.sqf b/addons/cookoff/functions/fnc_cookOff.sqf index b75eaf9eb3..99a901649f 100644 --- a/addons/cookoff/functions/fnc_cookOff.sqf +++ b/addons/cookoff/functions/fnc_cookOff.sqf @@ -91,6 +91,7 @@ if (local _vehicle) then { } forEach _positions; if (isServer) then { + // TODO - Players in the vehicle hear no sound (even after exiting the vehicle) private _sound = createSoundSource [QGVAR(Sound), position _vehicle, [], 0]; _effects pushBack _sound; @@ -107,11 +108,12 @@ if (local _vehicle) then { DEC(_counter); if (_counter > 0) then { - [_fnc_FlameEffect, [_vehicle, _fnc_FlameEffect, _counter], 0.4] call CBA_fnc_waitAndExecute + [_fnc_FlameEffect, [_vehicle, _fnc_FlameEffect, _counter], FLAME_EFFECT_DELAY] call CBA_fnc_waitAndExecute }; }; - [_vehicle, _fnc_FlameEffect, 12] call _fnc_FlameEffect; // recursive function + // Recursive function, occurs for duration of cookoff + [_vehicle, _fnc_FlameEffect, ceil(COOKOFF_TIME/FLAME_EFFECT_DELAY)] call _fnc_FlameEffect; private _randomPosition = _vehicle getPos [100, random 360]; @@ -132,6 +134,6 @@ if (local _vehicle) then { if (local _vehicle) then { _vehicle setDamage 1; }; - }, [_vehicle, _effects], 14] call CBA_fnc_waitAndExecute; - }, [_vehicle, _effects, _positions], 10.5] call CBA_fnc_waitAndExecute; -}, _vehicle, 3] call CBA_fnc_waitAndExecute; + }, [_vehicle, _effects], COOKOFF_TIME] call CBA_fnc_waitAndExecute; // TODO: Randomise cook off time with locality in mind + }, [_vehicle, _effects, _positions], SMOKE_TIME] call CBA_fnc_waitAndExecute; +}, _vehicle, IGNITE_TIME] call CBA_fnc_waitAndExecute; diff --git a/addons/cookoff/functions/fnc_cookOffBox.sqf b/addons/cookoff/functions/fnc_cookOffBox.sqf index 6f834a15b6..4e509e3194 100644 --- a/addons/cookoff/functions/fnc_cookOffBox.sqf +++ b/addons/cookoff/functions/fnc_cookOffBox.sqf @@ -71,6 +71,6 @@ if (local _box) then { if (local _box) then { _box setDamage 1; }; - }, [_box, _effects], 82.5] call CBA_fnc_waitAndExecute; // Give signifcant time for ammo cookoff to occur (perhaps keep the box alive until all cooked off?) - }, [_box, _effects], 10.5] call CBA_fnc_waitAndExecute; -}, _box, 3] call CBA_fnc_waitAndExecute; + }, [_box, _effects], COOKOFF_TIME_BOX] call CBA_fnc_waitAndExecute; // TODO: Change so that box is alive until no ammo left, with locality in mind + }, [_box, _effects], SMOKE_TIME] call CBA_fnc_waitAndExecute; +}, _box, IGNITE_TIME] call CBA_fnc_waitAndExecute; diff --git a/addons/cookoff/script_component.hpp b/addons/cookoff/script_component.hpp index 7a9468c50c..5daa0e8330 100644 --- a/addons/cookoff/script_component.hpp +++ b/addons/cookoff/script_component.hpp @@ -17,3 +17,13 @@ #include "\z\ace\addons\main\script_macros.hpp" #define IS_EXPLOSIVE_AMMO(ammo) (getNumber (ammo call CBA_fnc_getObjectConfig >> "explosive") > 0.5) + +// Stages of cookoff in order (in seconds) +// Should be no un-synced randomness in these as the effects must be ran on each client +#define IGNITE_TIME 3 +#define SMOKE_TIME 10.5 +#define COOKOFF_TIME 14 // Cook off time should be 20s at most due to length of sound files +#define COOKOFF_TIME_BOX 82.5 // Cook off time for boxes should be significant to allow time for ammo to burn + +// Delay between flame effect for players in a cooking off vehicle +#define FLAME_EFFECT_DELAY 0.4 diff --git a/addons/cookoff/sounds/cookoff.wss b/addons/cookoff/sounds/cookoff.wss deleted file mode 100644 index 11b9d55194..0000000000 Binary files a/addons/cookoff/sounds/cookoff.wss and /dev/null differ diff --git a/addons/cookoff/sounds/cookoff_high_pressure.ogg b/addons/cookoff/sounds/cookoff_high_pressure.ogg new file mode 100644 index 0000000000..ebcffaf9ce Binary files /dev/null and b/addons/cookoff/sounds/cookoff_high_pressure.ogg differ diff --git a/addons/cookoff/sounds/cookoff_low_pressure.ogg b/addons/cookoff/sounds/cookoff_low_pressure.ogg new file mode 100644 index 0000000000..89439e21a7 Binary files /dev/null and b/addons/cookoff/sounds/cookoff_low_pressure.ogg differ diff --git a/addons/cookoff/sounds/cookoff_mid_pressure.ogg b/addons/cookoff/sounds/cookoff_mid_pressure.ogg new file mode 100644 index 0000000000..b82cbcf4e1 Binary files /dev/null and b/addons/cookoff/sounds/cookoff_mid_pressure.ogg differ diff --git a/addons/cookoff/stringtable.xml b/addons/cookoff/stringtable.xml index 4aa9423b96..8e8e41ff4f 100644 --- a/addons/cookoff/stringtable.xml +++ b/addons/cookoff/stringtable.xml @@ -10,6 +10,7 @@ 쿡오프 현상 활성화 Aktywuj efekty samozapłonu amunicji Active le cook-off + Abilita Esplosione Enables cook off and related vehicle destruction effects. @@ -20,6 +21,7 @@ 쿡오프 현상을 활성화 하고 관련된 차량에 폭발 이펙트를 적용합니다. Aktywuje efekt samozapłonu amunicji na zniszczonych pojazdach. Active le cook-off (autocombustion des munitions) et les effets de destruction liés. + Abilita l'esplosione e i relativi effetti di distruzione del veicolo. Wreck (Turret) @@ -42,6 +44,7 @@ 탄약 상자 쿡오프 현상 활성화 Aktywuj samozapłon skrzyń z amunicją Cook-off caisses de munitions + Abilita esplosione cassa munizioni Enables cooking off of ammo boxes. @@ -50,6 +53,7 @@ 탄약 상자에 쿡오프 현상을 적용합니다. Aktywuje samozapłon skrzyń z amunicją Active le cook-off sur toutes les caisses de munitions. + Abilita l'esplosione della cassa di munizioni. Enable Ammunition cook off @@ -58,6 +62,7 @@ 탄약 쿡오프 현상 활성화 Aktywuj samozapłon amunicji Active le cook-off des munitions + Abilita Esplosione munizioni Enables Ammunition cook off. Fires ammunition projectiles while vehicle is on fire and has ammunition. @@ -65,18 +70,21 @@ Ermöglicht Selbstzündung von Munition. Feuert Projektile der Munition ab, solange das Fahrzeug brennt und Munition besitzt. Aktywuje samozapłon amunicji. Wystrzeliwuje pociski podczas gdy pojazd płonie i posiada amunicję. Mets à feu les munitions lorsqu'un véhicule est en feu et contient des munitions. + Abilita l'esplosione delle munizioni. Spara munizioni di proiettili quando il veicolo va a fuoco e contiene munizioni. Ammunition cook off duration Czas trwania samozapłonu amunicji 弾薬の誘爆持続時間 Durée cook-off des munitions + Durata esplosione munizioni Multiplier for how long cook off lasts [Setting to 0 will disable ammo cookoff] Multiplicateur de la durée du cook-off des munitions [Une valeur de 0 désactive l'effet] Mnożnik decydujący jak długo ma trwać samozapłon amunicji [Ustawienie na 0 spowoduje wyłącznie samozapłonu] 誘爆の持続時間を乗数で設定。[0 に設定で誘爆を無効化] + Moltiplicatore della durata dell'esplosione [Impostare 0 disabiliterà l'esplosione delle munizioni] diff --git a/addons/disposable/CfgWeapons.hpp b/addons/disposable/CfgWeapons.hpp index 0ca6763d63..731910b704 100644 --- a/addons/disposable/CfgWeapons.hpp +++ b/addons/disposable/CfgWeapons.hpp @@ -5,6 +5,7 @@ class CfgWeapons { magazines[] = {"ACE_PreloadedMissileDummy"}; // The dummy magazine }; class ACE_launch_NLAW_Used_F: launch_NLAW_F { // the used tube should be a sub class of the disposable launcher + EGVAR(nlaw,enabled) = 0; // disable guidance for the disposabled tube scope = 1; ACE_isUsedLauncher = 1; author = ECSTRING(common,ACETeam); diff --git a/addons/disposable/stringtable.xml b/addons/disposable/stringtable.xml index 29d9d5e232..3d9df039a1 100644 --- a/addons/disposable/stringtable.xml +++ b/addons/disposable/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -10,7 +10,7 @@ Lanzador utilizado Elhasznált kilövőcső Отстрелянная труба - Tubo usato + Lanciatore usato Tubo utilizado 使用済み 사용함 diff --git a/addons/dogtags/stringtable.xml b/addons/dogtags/stringtable.xml index 3e13f3621e..5aa5d80a4e 100644 --- a/addons/dogtags/stringtable.xml +++ b/addons/dogtags/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -10,6 +10,7 @@ Hundemarke 군번줄 Plaque d'identification + Piastrina Check Dog Tag @@ -20,6 +21,7 @@ Hundemarke prüfen 군번줄 확인 Vérifier les plaques d'identification + Controlla Piastrina Check @@ -30,6 +32,7 @@ Prüfen 확인 Vérifier + Controlla Take @@ -40,6 +43,7 @@ Nehmen 회수 Prendre + Prendi Dogtag taken from %1... @@ -50,6 +54,7 @@ Hundemarke von %1 genommen ... %1로부터 군번줄을 회수했습니다... Plaque d'identification pris sur %1... + Piastrina presa da %1... Somebody else has already taken the dogtag... @@ -60,7 +65,7 @@ Jemand anderes hat bereits die Hundemarke genommen ... 누군가 이미 군번줄을 회수해갔습니다... Quelqu'un d'autre a déjâ pris les plaques d'identification... + Qualcun altro ha già preso la piastrina... - diff --git a/addons/dragging/functions/fnc_handleAnimChanged.sqf b/addons/dragging/functions/fnc_handleAnimChanged.sqf index 935a6d3652..c59b088ee0 100644 --- a/addons/dragging/functions/fnc_handleAnimChanged.sqf +++ b/addons/dragging/functions/fnc_handleAnimChanged.sqf @@ -16,6 +16,8 @@ */ #include "script_component.hpp" +//IGNORE_PRIVATE_WARNING ["_thisArgs", "_thisID"]; // From CBA_fnc_addBISEventHandler; + params ["_unit", "_anim"]; _thisArgs params ["_realUnit"]; TRACE_4("params",_unit,_anim,_realUnit,_thisID); diff --git a/addons/dragging/functions/fnc_setDraggable.sqf b/addons/dragging/functions/fnc_setDraggable.sqf index 1fbcb995dc..3636847d06 100644 --- a/addons/dragging/functions/fnc_setDraggable.sqf +++ b/addons/dragging/functions/fnc_setDraggable.sqf @@ -18,7 +18,7 @@ */ #include "script_component.hpp" -//IGNORE_PRIVATE_WARNING("_player", "_target"); +//IGNORE_PRIVATE_WARNING ["_player", "_target"]; params ["_object", "_enableDrag", "_position", "_direction"]; if (isNil "_position") then { diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index 9b9296d3d4..e0cb44badf 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -883,6 +883,7 @@ Stolperdraht-Leuchtrakete 조명지뢰 Fusée éclairante avec fil de détente + Cavo d'innesco Type: Tripwire flare - Ignites a non-lethal flare when triggered.<br />Rounds: 1<br />Used on: Ground @@ -892,6 +893,7 @@ Typ: Stolperdraht-Leuchtrakete - Schießt bei Auslösung eine nicht-tödliche Leuchtrakete ab.<br />Ladungen: 1<br />Benutzt auf: Boden 종류: 조명지뢰 - 작동시 무해한 조명을 사출합니다.<br />장탄수: 1<br />사용처: 지면 Type : Fusée éclairante avec fil de détente - Allume une fusée éclairante lorsque déclenché. <br />Coups : 1<br />Utilisé sur : le sol + Tipo: Cavo d'innesco - Sfocio un abbaglio non letale quanto attivato. <br />Rimanenti: 1<br />Usato: A terra diff --git a/addons/fastroping/stringtable.xml b/addons/fastroping/stringtable.xml index 362b422fa1..26573f3e0d 100644 --- a/addons/fastroping/stringtable.xml +++ b/addons/fastroping/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -7,7 +7,7 @@ Wyposaż FRIES Equiper le FRIES Equipar FRIES - Equipaggia la FRIES + Equipaggia il FRIES Vybavit FRIES Equipar FRIES Десантирование по канатам @@ -20,7 +20,7 @@ Wyposaża kompatybilne helikoptery w zestaw Fast Rope Insertion Extraction System. Equipe les hélicoptères compatibles avec un Module Fast Rope Insertion Extraction System. Equipar helicoptero compatible con un Sistema de Inserción Extracción Fast Rope. - Equipagga l'elicottero compatibile con il Fast Rope Insertion Exstraction System + Equipagga l'elicottero compatibile con il Fast Rope Insertion Extraction System Vybavit kompatibilní vrtulníky systémem Fast Rope Insertion Extraction (FRIES). Equipa um helicóptero compatível com o Fast Rope Insertion Exctraction System. Снаряжает совместимые вертолеты оборудованием для спуска десанта по канатам. @@ -59,7 +59,7 @@ Zjedź na linie Descendre à la corde Descender por la cuerda - Scendi sulla corda + Scendi dalla corda SLANIT Descida rápida Спуститься по канату @@ -85,7 +85,7 @@ Wyposaż helikopter w FRIES Equiper l'hélicoptère avec le FRIES Equipar helicoptero con FRIES - Equipaggia l'elicottero con FRIES + Equipaggia l'elicottero con il FRIES Vybavit vrtulník pomocí FRIES Equipar helicóptero com FRIES Снарядить вертолет канатами для спуска diff --git a/addons/fcs/CfgOptics.hpp b/addons/fcs/CfgOptics.hpp index aa68a6f68a..f8770d7327 100644 --- a/addons/fcs/CfgOptics.hpp +++ b/addons/fcs/CfgOptics.hpp @@ -11,110 +11,13 @@ h = 0; \ }; +class RscText; class RscControlsGroup; class RscMapControl; class RscInGameUI { class RscUnitInfo; - class RscUnitInfo_AH64D_gunner { - controls[] = {"CA_Distance","ACE_CA_Distance"}; - MACRO_RANGEFINDER - }; - class RscWeaponRangeFinder { - controls[] = {"CA_Distance","ACE_CA_Distance"}; - MACRO_RANGEFINDER - }; - class RscWeaponRangeFinderPAS13 { - MACRO_RANGEFINDER - }; - class RscOptics_Rangefinder: RscUnitInfo { - class CA_IGUI_elements_group: RscControlsGroup { - class controls { - MACRO_RANGEFINDER - }; - }; - }; - class RscWeaponRangeFinderMAAWS { - class CA_IGUI_elements_group: RscControlsGroup { - class controls { - MACRO_RANGEFINDER - }; - }; - }; - class RscWeaponRangeFinderAbramsCom { - controls[] = {"CA_Distance","ACE_CA_Distance"}; - MACRO_RANGEFINDER - }; - class RscWeaponRangeFinderAbramsGun { - controls[] = {"CA_Distance","ACE_CA_Distance"}; - MACRO_RANGEFINDER - }; - class RscWeaponRangeFinderStrykerMGSGun { - controls[] = {"CA_Distance","ACE_CA_Distance"}; - MACRO_RANGEFINDER - }; - class RscOptics_crows: RscUnitInfo { - class CA_IGUI_elements_group: RscControlsGroup { - class controls { - MACRO_RANGEFINDER - }; - }; - }; - class RscOptics_strider_commander { - class CA_IGUI_elements_group: RscControlsGroup { - class controls { - MACRO_RANGEFINDER - }; - }; - }; - - class RscWeaponRangeZeroing: RscUnitInfo { - controls[] = {"CA_Zeroing", "CA_DistanceText", "CA_Distance","ACE_CA_Distance", "ACE_Rangehelper"}; - MACRO_RANGEFINDER - }; - class RscOptics_sos: RscUnitInfo { - class CA_IGUI_elements_group: RscControlsGroup { - class controls { - MACRO_RANGEFINDER - }; - }; - }; - class RscOptics_nightstalker: RscUnitInfo { - class CA_IGUI_elements_group: RscControlsGroup { - class controls { - MACRO_RANGEFINDER - }; - }; - }; - class RscOptics_tws: RscUnitInfo { - class CA_IGUI_elements_group: RscControlsGroup { - class controls { - MACRO_RANGEFINDER - }; - }; - }; - class RscOptics_punisher { - class CA_IGUI_elements_group: RscControlsGroup { - class controls { - MACRO_RANGEFINDER - }; - }; - }; - class RscOptics_tws_sniper: RscUnitInfo { - class CA_IGUI_elements_group: RscControlsGroup { - class controls { - MACRO_RANGEFINDER - }; - }; - }; - class RscOptics_SDV_periscope { - class CA_IGUI_elements_group: RscControlsGroup { - class controls { - MACRO_RANGEFINDER - }; - }; - }; class RscOptics_Heli_Attack_02_gunner: RscUnitInfo { class CA_IGUI_elements_group: RscControlsGroup { class controls { @@ -122,7 +25,7 @@ class RscInGameUI { }; }; }; - class Rsc_ACE_Helo_UI_Turret: RscUnitInfo { + 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];"; class CA_IGUI_elements_group: RscControlsGroup { class controls { @@ -130,103 +33,30 @@ class RscInGameUI { }; }; }; - class RscOptics_Heli_Attack_01_gunner: RscUnitInfo { - class CA_IGUI_elements_group: RscControlsGroup { - class controls { - MACRO_RANGEFINDER - }; - }; - }; - class RscOptics_UAV_gunner: RscUnitInfo { - class CA_IGUI_elements_group: RscControlsGroup { - class controls { - MACRO_RANGEFINDER - }; - }; - }; - class RscOptics_UGV_gunner: RscUnitInfo { - class CA_IGUI_elements_group: RscControlsGroup { - class controls { - MACRO_RANGEFINDER - }; - }; - }; + class RscOptics_APC_Tracked_01_gunner: RscUnitInfo { class CA_IGUI_elements_group: RscControlsGroup { class controls { - MACRO_RANGEFINDER + class CA_Distance: RscText {}; }; }; }; - class RscOptics_APC_Tracked_03_gunner: RscUnitInfo { - class CA_IGUI_elements_group: RscControlsGroup { - class controls { - MACRO_RANGEFINDER - }; - }; - }; - class RscOptics_APC_Wheeled_01_gunner: RscUnitInfo { - class CA_IGUI_elements_group: RscControlsGroup { - class controls { - MACRO_RANGEFINDER - }; - }; - }; - class RscOptics_APC_Wheeled_03_commander: RscUnitInfo { - class CA_IGUI_elements_group: RscControlsGroup { - class controls { - MACRO_RANGEFINDER - }; - }; - }; - class RscOptics_APC_Wheeled_03_gunner: RscUnitInfo { - class CA_IGUI_elements_group: RscControlsGroup { - class controls { - MACRO_RANGEFINDER - }; - }; - }; - class RscOptics_MBT_01_commander: RscUnitInfo { - class CA_IGUI_elements_group: RscControlsGroup { - class controls { - MACRO_RANGEFINDER - }; - }; - }; - class RscOptics_MBT_01_gunner: RscUnitInfo { - class CA_IGUI_elements_group: RscControlsGroup { - class controls { - MACRO_RANGEFINDER - }; - }; - }; - class RscOptics_MBT_02_commander: RscUnitInfo { - class CA_IGUI_elements_group: RscControlsGroup { - class controls { - MACRO_RANGEFINDER - }; - }; - }; - class RscOptics_MBT_02_gunner: RscUnitInfo { - class CA_IGUI_elements_group: RscControlsGroup { - class controls { - MACRO_RANGEFINDER - }; - }; - }; - class RscOptics_MBT_03_gunner: RscUnitInfo { - class CA_IGUI_elements_group: RscControlsGroup { - class controls { - MACRO_RANGEFINDER - }; - }; - }; - - // marksmen - class RscOptics_LaserDesignator_02 { - class CA_IGUI_elements_group: RscControlsGroup { - class controls { - MACRO_RANGEFINDER + class ACE_RscOptics_APC_Tracked_01_gunner: RscOptics_APC_Tracked_01_gunner { + class CA_IGUI_elements_group: CA_IGUI_elements_group { + class controls: controls { + // MACRO_RANGEFINDER + modify IDC of CA_Distance + class CA_Distance: CA_Distance { + idc = 151; + }; + class ACE_CA_Distance: CA_Distance { + idc = 1713151; + text = "----"; + }; + class ACE_Rangehelper: RscMapControl { + onDraw = "((ctrlParent (_this select 0)) displayCtrl 1713151) ctrlShow (cameraView == 'GUNNER');"; + w = 0; + h = 0; + }; }; }; }; diff --git a/addons/fcs/CfgVehicles.hpp b/addons/fcs/CfgVehicles.hpp index 82572f2c68..47b731a66c 100644 --- a/addons/fcs/CfgVehicles.hpp +++ b/addons/fcs/CfgVehicles.hpp @@ -49,9 +49,6 @@ class CfgVehicles { class Turrets { class MainTurret: NewTurret { GVAR(Enabled) = 1; // all tracked vehicles get one by default - class Turrets { - class CommanderOptics; - }; }; }; }; @@ -60,231 +57,52 @@ class CfgVehicles { class Turrets { class MainTurret: NewTurret { GVAR(Enabled) = 1; // all tracked vehicles get one by default - class Turrets { - class CommanderOptics;//: CommanderOptics {}; - }; }; }; }; - class Car_F: Car { - class Turrets { - class MainTurret; - }; - }; - - class Wheeled_APC_F: Car_F { - class Turrets { - class MainTurret: NewTurret { - class Turrets { - class CommanderOptics;//: CommanderOptics {}; - }; - }; - }; - }; - - class MRAP_01_base_F: Car_F {}; - - class MRAP_01_gmg_base_F: MRAP_01_base_F { - class Turrets: Turrets { - class MainTurret: MainTurret { - GVAR(Enabled) = 1; - GVAR(MaxDistance) = 2000; - discreteDistance[] = {}; - discreteDistanceInitIndex = 0; - }; - }; - }; - - class MRAP_01_hmg_base_F: MRAP_01_gmg_base_F { - /*class Turrets: Turrets { - class MainTurret: MainTurret {}; - };*/ - }; - - class B_MRAP_01_F: MRAP_01_base_F { - class Turrets; - }; - - class MRAP_02_base_F: Car_F {}; - - class MRAP_02_hmg_base_F: MRAP_02_base_F { - class Turrets: Turrets { - class MainTurret: MainTurret { - GVAR(Enabled) = 1; - GVAR(MaxDistance) = 2000; - discreteDistance[] = {}; - discreteDistanceInitIndex = 0; - }; - }; - }; - - class MRAP_02_gmg_base_F: MRAP_02_hmg_base_F { - /*class Turrets: Turrets { - class MainTurret: MainTurret {}; - };*/ - }; - - class O_MRAP_02_F: MRAP_02_base_F { - class Turrets; - }; - - class MRAP_03_base_F: Car_F { - class Turrets: Turrets { - class CommanderTurret: MainTurret { - GVAR(Enabled) = 0; - }; - }; - }; - - class MRAP_03_hmg_base_F: MRAP_03_base_F { - class Turrets: Turrets { - class MainTurret: MainTurret { - GVAR(Enabled) = 1; - GVAR(MaxDistance) = 2000; - discreteDistance[] = {}; - discreteDistanceInitIndex = 0; - }; - class CommanderTurret: CommanderTurret { - GVAR(Enabled) = 0; - }; - }; - }; - - class MRAP_03_gmg_base_F: MRAP_03_hmg_base_F { - /*class Turrets: Turrets { - class MainTurret: MainTurret {}; - class CommanderTurret: CommanderTurret {}; - };*/ - }; - - class APC_Wheeled_01_base_F: Wheeled_APC_F { - /*class Turrets: Turrets { - class MainTurret: MainTurret { - class Turrets: Turrets { - class CommanderOptics: CommanderOptics {}; - }; - }; - };*/ - }; - - class B_APC_Wheeled_01_base_F: APC_Wheeled_01_base_F {}; - - class B_APC_Wheeled_01_cannon_F: B_APC_Wheeled_01_base_F { - class Turrets: Turrets { - class MainTurret: MainTurret { - GVAR(Enabled) = 1; - discreteDistance[] = {}; - discreteDistanceInitIndex = 0; - }; - }; - }; - - class APC_Wheeled_02_base_F: Wheeled_APC_F { - class Turrets: Turrets { - class MainTurret: MainTurret { - GVAR(Enabled) = 1; - GVAR(MaxDistance) = 2000; - discreteDistance[] = {}; - discreteDistanceInitIndex = 0; - }; - - // class CommanderOptics: CommanderOptics {}; - }; - }; - - class APC_Wheeled_03_base_F: Wheeled_APC_F { - class Turrets: Turrets { - class MainTurret: MainTurret { - GVAR(Enabled) = 1; - discreteDistance[] = {}; - discreteDistanceInitIndex = 0; - - /*class Turrets: Turrets { - class CommanderOptics: CommanderOptics {}; - };*/ - }; - }; - }; - - class I_APC_Wheeled_03_base_F: APC_Wheeled_03_base_F {}; - - class I_APC_Wheeled_03_cannon_F: I_APC_Wheeled_03_base_F { - /*class Turrets: Turrets { - class MainTurret: MainTurret {}; - };*/ - }; - class APC_Tracked_01_base_F: Tank_F { - /*class Turrets: Turrets { - class MainTurret: MainTurret { - class Turrets; - }; - };*/ - }; - - class B_APC_Tracked_01_base_F: APC_Tracked_01_base_F { - /*class Turrets: Turrets { - class MainTurret: MainTurret {}; - };*/ - }; - - class B_APC_Tracked_01_rcws_F: B_APC_Tracked_01_base_F { class Turrets: Turrets { class MainTurret: MainTurret { - GVAR(Enabled) = 1; - GVAR(MaxDistance) = 2000; - discreteDistance[] = {}; - discreteDistanceInitIndex = 0; + GVAR(Enabled) = 0; }; - class CommanderOptics: CommanderOptics {}; }; }; - class B_APC_Tracked_01_CRV_F: B_APC_Tracked_01_base_F { - //GVAR(Enabled) = 0; @todo - }; + class B_APC_Tracked_01_base_F: APC_Tracked_01_base_F {}; class B_APC_Tracked_01_AA_F: B_APC_Tracked_01_base_F { class Turrets: Turrets { class MainTurret: MainTurret { + GVAR(Enabled) = 1; + turretinfotype = "ACE_RscOptics_APC_Tracked_01_gunner"; + GVAR(MaxDistance) = 2000; discreteDistance[] = {}; discreteDistanceInitIndex = 0; magazines[] += {"ACE_120Rnd_35mm_ABM_shells_Tracer_Red"}; - - /*class Turrets: Turrets { - class CommanderOptics: CommanderOptics {}; - };*/ }; }; }; class APC_Tracked_02_base_F: Tank_F { - /*class Turrets: Turrets { + class Turrets: Turrets { class MainTurret: MainTurret { - class Turrets: Turrets { - class CommanderOptics: CommanderOptics {}; - }; + GVAR(Enabled) = 0; }; - };*/ + }; }; class O_APC_Tracked_02_base_F: APC_Tracked_02_base_F {}; - - class O_APC_Tracked_02_cannon_F: O_APC_Tracked_02_base_F { - /*class Turrets: Turrets { - class MainTurret: MainTurret {}; - };*/ - }; - + class O_APC_Tracked_02_AA_F: O_APC_Tracked_02_base_F { class Turrets: Turrets { class MainTurret: MainTurret { + GVAR(Enabled) = 1; + turretinfotype = "ACE_RscOptics_APC_Tracked_01_gunner"; + GVAR(MaxDistance) = 2000; + discreteDistance[] = {}; + discreteDistanceInitIndex = 0; magazines[] += {"ACE_120Rnd_35mm_ABM_shells_Tracer_Green"}; - - /*class Turrets: Turrets { - class CommanderOptics: CommanderOptics {}; - };*/ }; }; }; @@ -292,151 +110,31 @@ class CfgVehicles { class APC_Tracked_03_base_F: Tank_F { class Turrets: Turrets { class MainTurret: MainTurret { - discreteDistance[] = {}; - discreteDistanceInitIndex = 0; - - /*class Turrets: Turrets { - class CommanderOptics: CommanderOptics {}; - };*/ + GVAR(Enabled) = 0; }; }; }; class MBT_01_base_F: Tank_F { - class Turrets: Turrets { - class MainTurret: MainTurret { - discreteDistance[] = {}; - discreteDistanceInitIndex = 0; - - /*class Turrets: Turrets { - class CommanderOptics: CommanderOptics {}; - };*/ - }; - }; - }; - - class B_MBT_01_base_F: MBT_01_base_F {}; - - class B_MBT_01_cannon_F: B_MBT_01_base_F {}; - - class B_MBT_01_TUSK_F: B_MBT_01_cannon_F { - class Turrets: Turrets { - class MainTurret: MainTurret { - discreteDistance[] = {}; - discreteDistanceInitIndex = 0; - - class Turrets: Turrets { - class CommanderOptics: CommanderOptics { - GVAR(Enabled) = 1; - discreteDistance[] = {}; - discreteDistanceInitIndex = 0; - }; - }; - }; - }; - }; - - class MBT_01_arty_base_F: MBT_01_base_F { class Turrets: Turrets { class MainTurret: MainTurret { GVAR(Enabled) = 0; - - class Turrets: Turrets { - class CommanderOptics: CommanderOptics { - GVAR(Enabled) = 1; - GVAR(MaxDistance) = 2000; - discreteDistance[] = {}; - discreteDistanceInitIndex = 0; - }; - }; - }; - }; - }; - - class MBT_01_mlrs_base_F: MBT_01_base_F { - class Turrets: Turrets { - class MainTurret: MainTurret { - GVAR(Enabled) = 0; - //class Turrets; }; }; }; class MBT_02_base_F: Tank_F { - class Turrets: Turrets { - class MainTurret: MainTurret { - discreteDistance[] = {}; - discreteDistanceInitIndex = 0; - - class Turrets: Turrets { - class CommanderOptics: CommanderOptics { - GVAR(Enabled) = 1; - discreteDistance[] = {}; - discreteDistanceInitIndex = 0; - }; - }; - }; - }; - }; - - class MBT_02_arty_base_F: MBT_02_base_F { class Turrets: Turrets { class MainTurret: MainTurret { GVAR(Enabled) = 0; - - class Turrets: Turrets { - class CommanderOptics: CommanderOptics { - GVAR(Enabled) = 1; - GVAR(MaxDistance) = 2000; - discreteDistance[] = {}; - discreteDistanceInitIndex = 0; - }; - }; }; }; }; - + class MBT_03_base_F: Tank_F { class Turrets: Turrets { class MainTurret: MainTurret { - discreteDistance[] = {}; - discreteDistanceInitIndex = 0; - - class Turrets: Turrets { - class CommanderOptics: CommanderOptics { - GVAR(Enabled) = 1; - discreteDistance[] = {}; - discreteDistanceInitIndex = 0; - }; - }; - }; - }; - }; - - // SHIPS - class Ship: AllVehicles { - class Turrets { - class MainTurret; - }; - }; - - class Ship_F: Ship {}; - - class Boat_F: Ship_F {}; - - class Boat_Armed_01_base_F: Boat_F { - class Turrets: Turrets { - class FrontTurret: NewTurret { - GVAR(enabled) = 1; - GVAR(minDistance) = 100; - GVAR(maxDistance) = 2000; - GVAR(distanceInterval) = 5; - discreteDistance[] = {}; - discreteDistanceInitIndex = 0; - }; - class RearTurret: FrontTurret { - discreteDistance[] = {100,200,300,400,600,800,1000,1200}; // Originally inherited from FrontTurret - discreteDistanceInitIndex = 4; + GVAR(Enabled) = 0; }; }; }; @@ -450,51 +148,7 @@ class CfgVehicles { }; }; - class Plane: Air {}; - - class Helicopter_Base_F: Helicopter { - class Turrets: Turrets { - class CopilotTurret; - }; - }; - - class Helicopter_Base_H: Helicopter_Base_F { - class Turrets: Turrets { - class CopilotTurret; - }; - }; - - class Heli_Light_01_base_F: Helicopter_Base_H { - /*class Turrets: Turrets { - class CopilotTurret: CopilotTurret {}; - };*/ - }; - - class Heli_Light_01_unarmed_base_F: Heli_Light_01_base_F {}; - - class B_Heli_Light_01_F: Heli_Light_01_unarmed_base_F { - /*class Turrets: Turrets { - class CopilotTurret: CopilotTurret {}; - };*/ - }; - - class Heli_Light_01_armed_base_F: Heli_Light_01_base_F { - /*class Turrets: Turrets { - class CopilotTurret: CopilotTurret {}; - };*/ - }; - - class Heli_Light_02_base_F: Helicopter_Base_H { - /*class Turrets: Turrets { - class CopilotTurret: CopilotTurret {}; - };*/ - }; - - class Plane_Base_F: Plane { - class Turrets { - class CopilotTurret; - }; - }; + class Helicopter_Base_F: Helicopter {}; class Heli_Attack_01_base_F: Helicopter_Base_F { class Turrets: Turrets { @@ -515,80 +169,4 @@ class CfgVehicles { }; }; }; - - class Heli_Transport_01_base_F: Helicopter_Base_H { - /*class Turrets: Turrets { - class CopilotTurret: CopilotTurret {}; - class MainTurret: MainTurret {}; - class RightDoorGun: MainTurret {}; - };*/ - }; - - class Heli_Transport_02_base_F: Helicopter_Base_H { - /*class Turrets: Turrets { - class CopilotTurret: CopilotTurret {}; - };*/ - }; - - class Heli_light_03_base_F; - class I_Heli_light_03_base_F: Heli_light_03_base_F { - /*class Turrets: Turrets { - class MainTurret: MainTurret {}; - };*/ - }; - class I_Heli_light_03_F: Heli_light_03_base_F { - /*class Turrets: Turrets { - class MainTurret: MainTurret {}; - };*/ - }; - - class Plane_CAS_01_base_F: Plane_Base_F { - class Turrets; - }; - - class Plane_CAS_02_base_F: Plane_Base_F { - class Turrets; - }; - - class Plane_Fighter_03_base_F: Plane_Base_F { - class Turrets; - }; - - // static weapons. - class StaticWeapon: LandVehicle { - class Turrets { - class MainTurret; //: NewTurret {}; - }; - }; - - class StaticMGWeapon: StaticWeapon {}; - - class HMG_01_base_F: StaticMGWeapon { - class Turrets: Turrets { - class MainTurret: MainTurret { - GVAR(Enabled) = 1; - GVAR(MinDistance) = 200; - GVAR(MaxDistance) = 2000; - GVAR(DistanceInterval) = 5; - discreteDistance[] = {}; - discreteDistanceInitIndex = 0; - }; - }; - }; - - class StaticGrenadeLauncher: StaticWeapon {}; - class GMG_TriPod: StaticGrenadeLauncher {}; - - class GMG_01_base_F: GMG_TriPod { - class Turrets: Turrets { - class MainTurret: MainTurret { - GVAR(Enabled) = 1; - GVAR(MinDistance) = 200; - GVAR(MaxDistance) = 2000; - GVAR(DistanceInterval) = 5; - discreteDistance[] = {}; - discreteDistanceInitIndex = 0; - }; - }; - }; }; diff --git a/addons/fcs/CfgWeapons.hpp b/addons/fcs/CfgWeapons.hpp index 760e39e2de..555060b119 100644 --- a/addons/fcs/CfgWeapons.hpp +++ b/addons/fcs/CfgWeapons.hpp @@ -1,15 +1,6 @@ class CfgWeapons { - // disable locking, so it doesn't interfere with our system class CannonCore; - class cannon_120mm: CannonCore { - canLock = 0; - ballisticsComputer = 0; - }; - class autocannon_Base_F: CannonCore { - canLock = 0; - ballisticsComputer = 0; - }; class autocannon_35mm: CannonCore { canLock = 0; ballisticsComputer = 4; //was "4 + 2", 2 is for manual zeroing, 4 is for the lead indicator - https://community.bistudio.com/wiki/A3_Locking_Review#ballisticsComputer diff --git a/addons/fcs/XEH_postInit.sqf b/addons/fcs/XEH_postInit.sqf index 02c9e72ae5..ef6e89d5cc 100644 --- a/addons/fcs/XEH_postInit.sqf +++ b/addons/fcs/XEH_postInit.sqf @@ -21,3 +21,7 @@ if (!hasInterface) exitWith {}; // Register event for global updates [QGVAR(forceUpdate), {[ACE_player] call FUNC(onForceUpdate)}] call CBA_fnc_addEventHandler; + +#ifdef DEBUG_MODE_FULL +call compile preprocessFileLineNumbers QPATHTOF(functions\dev_debugConfigs.sqf); +#endif diff --git a/addons/fcs/functions/dev_debugConfigs.sqf b/addons/fcs/functions/dev_debugConfigs.sqf new file mode 100644 index 0000000000..73abd89771 --- /dev/null +++ b/addons/fcs/functions/dev_debugConfigs.sqf @@ -0,0 +1,88 @@ +// PabstMirror +#include "script_component.hpp" + +diag_log text format ["[ACE_FCS] ---------------"]; +private _vehicles = configProperties [configFile >> "CfgVehicles", "(isClass _x) && {2 == getNumber (_x >> 'scope')}", true]; +private _problemUIs = []; +{ + private _vehicleType = configName _x; + { + private _turret = _x; + private _config = [_vehicleType, _turret] call CBA_fnc_getTurret; + if (!isNull _config) then { + private _aceFCS = (getNumber (_config >> "ACE_FCS_Enabled")) == 1; + + private _vanillaFCS = false; + private _weapons = getArray (_config >> "weapons"); + { + private _weapon = _x; + private _ballisticComputer = getNumber (configFile >> "CfgWeapons" >> _weapon >> "ballisticsComputer"); + _ballisticComputer = [_ballisticComputer, 5] call ace_common_fnc_toBin; + if ((_ballisticComputer select [(count _ballisticComputer) - 5, 1]) == "1") then { + _vanillaFCS = true; + if (_aceFCS) then {diag_log text format ["%1 -> %2: ACE FCS Enabled CONFLICTS with vanilla FCS [%3]", _vehicleType, _weapon, _ballisticComputer];}; + }; + } forEach _weapons; + + if (!(_weapons isEqualTo [])) then { + private _fcsMsg = switch (true) do { + // case ((!_vanillaFCS) && {!_aceFCS}): {"No FCS"}; + // case ((_vanillaFCS) && {_aceFCS}): {"CONFLICT FCS"}; + // case (_vanillaFCS): {"Vanilla FCS"}; + // case (_aceFCS): {"ACE FCS"}; + default {""}; + }; + if (_fcsMsg != "") then {diag_log text format ["%1: %2", _vehicleType, _fcsMsg];}; + }; + + if (_vanillaFCS) then { + private _dd = getArray (_config >> "discreteDistance"); + if (_dd isEqualTo []) exitWith {diag_log format ["%1->%2: discreteDistance with vanillaFCS [%3]", _vehicleType, _turret, _config];}; + }; + + if (true) then { + private _turretInfo = getText (_config >> "turretInfoType"); + private _infoConfig = configFile >> "RscInGameUI" >> _turretInfo; + if (!isNull _infoConfig) then { + private _idcList = []; + + private _fncGetIDCS = { + params ["_subConfig"]; + if (!isClass _subConfig) exitWith {diag_log "err";}; + private _controlsArray = getArray (_subConfig >> "controls"); + { + [_subConfig >> _x] call _fncGetIDCS; + } forEach _controlsArray; + private _controlsConfig = configProperties [(_subConfig >> "controls"), "isClass _x", true]; + { + [_x] call _fncGetIDCS; + } forEach _controlsConfig; + _idcList pushBack getNumber (_subConfig >> "idc"); + }; + [_infoConfig] call _fncGetIDCS; + + if (_aceFCS && {!(1713151 in _idcList)}) then { + _problemUIs pushBackUnique format ["%1: ACE_FCS, but missing ACE_CA_DIST", _turretInfo]; + }; + if (_aceFCS && {(198 in _idcList)}) then { + _problemUIs pushBackUnique format ["%1: ACE_FCS, but NEW Lazr CA_DIST", _turretInfo, _vehicleType]; + }; + if ((!_aceFCS) && {(1713151 in _idcList)}) then { + _problemUIs pushBackUnique format ["%1: Not ACE but has ACE_CA_DIST", _turretInfo, _vehicleType]; + }; + if (_vanillaFCS && {!(198 in _idcList)}) then { + _problemUIs pushBackUnique format ["%1: vanillaFCS but missing NEW Lazr CA_DIST [just a warning]", _turretInfo, _vehicleType]; + }; + }; + }; + }; + } forEach [[0],[0,0]]; +} forEach _vehicles; + +_problemUIs sort true; + +diag_log text format ["[ACE_FCS] ------- Problem UIs --------"]; +{ + diag_log text format ["- %1", _x]; +} forEach _problemUIs; +diag_log text format ["[ACE_FCS] ---------------"]; diff --git a/addons/finger/functions/fnc_perFrameEH.sqf b/addons/finger/functions/fnc_perFrameEH.sqf index 94ea4fe067..a28a30ef96 100644 --- a/addons/finger/functions/fnc_perFrameEH.sqf +++ b/addons/finger/functions/fnc_perFrameEH.sqf @@ -24,6 +24,7 @@ if ((ACE_player != vehicle ACE_player) && {!((vehicle ACE_player) isKindOf "Stat private _iconSize = BASE_SIZE * 0.10713 * (call EFUNC(common,getZoom)); [+GVAR(fingersHash), { + //IGNORE_PRIVATE_WARNING ["_key", "_value"]; _value params ["_lastTime", "_pos", "_name"]; private _timeLeftToShow = _lastTime + FP_TIMEOUT - diag_tickTime; if (_timeLeftToShow <= 0) then { diff --git a/addons/gestures/stringtable.xml b/addons/gestures/stringtable.xml index 46a3fdba6a..4f5063721b 100644 --- a/addons/gestures/stringtable.xml +++ b/addons/gestures/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -8,7 +8,7 @@ ACE Posunky ACE Gestes ACE Kézjelek - ACE Gesti + Gesti ACE ACE Gestos ACE Жесты ACE Gestos @@ -236,7 +236,7 @@ Zeige Gesten im Selbst-Interkationsmenü, lege sie auf Schnelltasten, oder deaktiviere sie vollständig. Zobrazit posunky pro vlastní interakční menu, nebo prostě použít klávesové zkratky, nebo to zakázat úplně Pokaż listę gestów w menu własnej interakcji, użyj tylko skrótów na klawiaturze lub wyłącz całkowicie - Mostra Gesti nel Menù Interazione Personale, o usa solamente Hotkey, o disabilita completamente + Mostra Gesti nel Menù Interazione Personale, o usa solamente tasti di scelta rapida, o disabilita completamente Muestror los gestos en el menú de interacción propia, utilizar solo combinación de teclas o desactivarlos completamente Afficher les gestes dans le menu d'interaction personnel, ou seulement utiliser les touches, ou desactiver complètement. Mostra gestos no menu de interação, ou utilize um dos atalhos de teclado ou desative completamente @@ -249,7 +249,7 @@ Nur Schnelltasten Pouze klávesové zkratky Tylko skróty klaw. - Solo Hotkey + Solo tasti di scelta rapida Solo mediante teclas Seulement les touches Somente atalhos de teclado @@ -262,7 +262,7 @@ Schnelltasten+ Interaktionsmenü Klávesové zkratky + interakční menu Skróty klaw. + menu interakcji - Hotkey + Menù Interazione + Tasti di scelta rapida + Menù Interazione Teclas y Menú de Interacción Touches + menu d'interaction Atalhos + Menu de Interação diff --git a/addons/gforces/functions/fnc_pfhUpdateGForces.sqf b/addons/gforces/functions/fnc_pfhUpdateGForces.sqf index f4f7c4becd..89e49fe7e5 100644 --- a/addons/gforces/functions/fnc_pfhUpdateGForces.sqf +++ b/addons/gforces/functions/fnc_pfhUpdateGForces.sqf @@ -69,7 +69,7 @@ private _gBlackOut = MAXVIRTUALG / _classCoef + MAXVIRTUALG / _suitCoef - MAXVIR // Unconsciousness if ((_average > _gBlackOut) and {isClass (configFile >> "CfgPatches" >> "ACE_Medical") and {!(ACE_player getVariable ["ACE_isUnconscious", false])}}) then { - [ACE_player, true, (10 + floor(random 5))] call EFUNC(medical,setUnconscious); + [ACE_player, true, (10 + floor(random 5)), true] call EFUNC(medical,setUnconscious); }; GVAR(GForces_CC) ppEffectAdjust [1,1,0,[0,0,0,1],[0,0,0,0],[1,1,1,1],[10,10,0,0,0,0.1,0.5]]; diff --git a/addons/gforces/stringtable.xml b/addons/gforces/stringtable.xml index 4bce899bd1..2abb558b58 100644 --- a/addons/gforces/stringtable.xml +++ b/addons/gforces/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,6 +12,7 @@ G による効果 Efekty przeciążeń 중력가속도 효과 + Effetti forza G Only Aircraft @@ -24,6 +25,7 @@ 航空機のみ Tylko samoloty 비행기에만 적용 + Solo Aerei diff --git a/addons/goggles/stringtable.xml b/addons/goggles/stringtable.xml index 6d37b00e21..c06d310ef7 100644 --- a/addons/goggles/stringtable.xml +++ b/addons/goggles/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -37,6 +37,7 @@ Brilleneffekt 고글 효과 Effets des lunettes + Effetto Occhiali Tint @@ -46,6 +47,7 @@ Tönung 색조 Teinte + Colore Tint + Effects @@ -55,7 +57,7 @@ Tönung + Effekte 색조+효과 Teinte + effets + Colore + Effetti - diff --git a/addons/grenades/CfgVehicles.hpp b/addons/grenades/CfgVehicles.hpp index 1315ccf611..f9ac60d9fe 100644 --- a/addons/grenades/CfgVehicles.hpp +++ b/addons/grenades/CfgVehicles.hpp @@ -2,40 +2,40 @@ class CfgVehicles { class NATO_Box_Base; class Box_NATO_Grenades_F: NATO_Box_Base { - class TransportItems { - MACRO_ADDITEM(ACE_HandFlare_White,12); - MACRO_ADDITEM(ACE_HandFlare_Green,12); - MACRO_ADDITEM(ACE_M84,12); + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_HandFlare_White,12); + MACRO_ADDMAGAZINE(ACE_HandFlare_Green,12); + MACRO_ADDMAGAZINE(ACE_M84,12); }; }; class EAST_Box_Base; class Box_East_Grenades_F: EAST_Box_Base { - class TransportItems { - MACRO_ADDITEM(ACE_HandFlare_Yellow,12); - MACRO_ADDITEM(ACE_HandFlare_Red,12); - MACRO_ADDITEM(ACE_M84,12); + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_HandFlare_Yellow,12); + MACRO_ADDMAGAZINE(ACE_HandFlare_Red,12); + MACRO_ADDMAGAZINE(ACE_M84,12); }; }; class IND_Box_Base; class Box_IND_Grenades_F: IND_Box_Base { - class TransportItems { - MACRO_ADDITEM(ACE_HandFlare_Yellow,12); - MACRO_ADDITEM(ACE_HandFlare_Green,12); - MACRO_ADDITEM(ACE_M84,12); + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_HandFlare_Yellow,12); + MACRO_ADDMAGAZINE(ACE_HandFlare_Green,12); + MACRO_ADDMAGAZINE(ACE_M84,12); }; }; class Box_NATO_Support_F; class ACE_Box_Misc: Box_NATO_Support_F { - class TransportItems { - MACRO_ADDITEM(ACE_HandFlare_White,12); - MACRO_ADDITEM(ACE_HandFlare_Red,12); - MACRO_ADDITEM(ACE_HandFlare_Green,12); - MACRO_ADDITEM(ACE_HandFlare_Yellow,12); - MACRO_ADDITEM(ACE_M84,12); - MACRO_ADDITEM(ACE_M14,12); + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_HandFlare_White,12); + MACRO_ADDMAGAZINE(ACE_HandFlare_Red,12); + MACRO_ADDMAGAZINE(ACE_HandFlare_Green,12); + MACRO_ADDMAGAZINE(ACE_HandFlare_Yellow,12); + MACRO_ADDMAGAZINE(ACE_M84,12); + MACRO_ADDMAGAZINE(ACE_M14,12); }; }; }; diff --git a/addons/grenades/stringtable.xml b/addons/grenades/stringtable.xml index cbabdd01b2..fe102bec8f 100644 --- a/addons/grenades/stringtable.xml +++ b/addons/grenades/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -303,6 +303,7 @@ Granat zapalający AN-M14 AN-M14 소이 수류탄 Grenade incendiaire AN-M14 + AN-M14 Granata Incendiaria AN-M14 @@ -312,6 +313,7 @@ AN-M14 AN-M14 AN-M14 + AN-M14 Incendiary grenade used to destroy weapons, ammunition and other equipment. @@ -321,6 +323,7 @@ Granat zapalający, używany do niszczenia broni, amunicji i innego sprzętu. 소이 수류탄은 무기나 탄약 그리고 장비를 파괴할때 쓰입니다. Grenade incendiaire utilisé pour détruire des armes, munitions et autres équipements. + Granata incendiaria usata per distruggere armi, munizioni e altri equipaggiamenti. diff --git a/addons/gunbag/stringtable.xml b/addons/gunbag/stringtable.xml index 51a1e63cdf..5e5d8a7526 100644 --- a/addons/gunbag/stringtable.xml +++ b/addons/gunbag/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -10,6 +10,7 @@ ガンバッグ Torba na broń 총가방 + Borsa per Armi Gunbag (Tan) @@ -20,6 +21,7 @@ ガンバッグ (タン) Torba na broń (jasnobrązowa) 총가방 (황갈색) + Borsa per Armi (Tan) Put weapon into gunbag @@ -30,6 +32,7 @@ ガンバッグへ武器を入れる Włóż broń do torby 무기를 총가방에 넣기 + Metti l'arma nella borsa per armi Get weapon out of gunbag @@ -40,6 +43,7 @@ ガンバッグから武器を出す Wyciągnij broń z torby 무기를 총가방에서 꺼내기 + Prendi l'arma dalla borsa per armi Status @@ -50,6 +54,7 @@ 中身 Status 상태 + Stato Gunbag Empty @@ -60,6 +65,7 @@ ガンバッグは空 Torba jest pusta 총가방 비어있음 + Borsa per armi vuota diff --git a/addons/hearing/CfgWeapons.hpp b/addons/hearing/CfgWeapons.hpp index c063c0e896..8b138271b3 100644 --- a/addons/hearing/CfgWeapons.hpp +++ b/addons/hearing/CfgWeapons.hpp @@ -13,42 +13,42 @@ class CfgWeapons { }; }; + #define HEARING_PROTECTION_VICCREW EGVAR(hearing,protection) = 0.85; EGVAR(hearing,lowerVolume) = 0.6; + #define HEARING_PROTECTION_EARMUFF EGVAR(hearing,protection) = 0.75; EGVAR(hearing,lowerVolume) = 0.5; + #define HEARING_PROTECTION_PELTOR EGVAR(hearing,protection) = 0.75; EGVAR(hearing,lowerVolume) = 0; + class H_HelmetB; class H_HelmetCrew_B: H_HelmetB { - GVAR(protection) = 1; - GVAR(lowerVolume) = 0.80; + HEARING_PROTECTION_VICCREW }; class H_CrewHelmetHeli_B: H_HelmetB { - GVAR(protection) = 0.85; - GVAR(lowerVolume) = 0.75; + HEARING_PROTECTION_VICCREW }; class H_PilotHelmetHeli_B: H_HelmetB { - GVAR(protection) = 0.85; - GVAR(lowerVolume) = 0.75; + HEARING_PROTECTION_VICCREW }; class H_PilotHelmetFighter_B: H_HelmetB { - GVAR(protection) = 1; - GVAR(lowerVolume) = 0.80; + HEARING_PROTECTION_VICCREW }; class HelmetBase; class H_Cap_headphones: HelmetBase { - GVAR(protection) = 0.5; - GVAR(lowerVolume) = 0.60; + HEARING_PROTECTION_EARMUFF }; class H_HelmetB_light: H_HelmetB { - GVAR(protection) = 0.8; - GVAR(lowerVolume) = 0.20; + HEARING_PROTECTION_PELTOR + }; + class H_HelmetB_camo: H_HelmetB { + HEARING_PROTECTION_PELTOR }; class H_HelmetB_plain_mcamo; class H_HelmetSpecB: H_HelmetB_plain_mcamo { - GVAR(protection) = 0.8; - GVAR(lowerVolume) = 0.20; + HEARING_PROTECTION_PELTOR }; }; diff --git a/addons/hellfire/$PBOPREFIX$ b/addons/hellfire/$PBOPREFIX$ new file mode 100644 index 0000000000..5bd6c77aff --- /dev/null +++ b/addons/hellfire/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\hellfire diff --git a/addons/hellfire/ACE_GuidanceConfig.hpp b/addons/hellfire/ACE_GuidanceConfig.hpp new file mode 100644 index 0000000000..1c5d4705f3 --- /dev/null +++ b/addons/hellfire/ACE_GuidanceConfig.hpp @@ -0,0 +1,17 @@ +class EGVAR(missileguidance,AttackProfiles) { + class hellfire { + // LOBL and LOAL-DIR behaive the same + name = "LOAL-DIR"; + nameLocked = "LOBL"; + functionName = QFUNC(attackProfile); + GVAR(launchHeightClear) = 0; + }; + class hellfire_hi: hellfire { + name = "LOAL-HI"; + GVAR(launchHeightClear) = 304.8; // clear 1000 ft by 1500m + }; + class hellfire_lo: hellfire_hi { + name = "LOAL-LO"; + GVAR(launchHeightClear) = 91.5; // clear 300 ft by 600m + }; +}; diff --git a/addons/hellfire/CfgAmmo.hpp b/addons/hellfire/CfgAmmo.hpp new file mode 100644 index 0000000000..b5df3994f2 --- /dev/null +++ b/addons/hellfire/CfgAmmo.hpp @@ -0,0 +1,57 @@ +class CfgAmmo { + class M_PG_AT; + + class ACE_Hellfire_AGM114K: M_PG_AT { + displayName = "AGM-114K"; + displayNameShort = "AGM-114K"; + description = "AGM-114K"; + descriptionShort = "AGM-114K"; + + model = "\A3\Weapons_F\Ammo\Missile_AT_03_fly_F"; + proxyShape = "\A3\Weapons_F\Ammo\Missile_AT_03_F"; + + hit = 1400; + indirectHit = 71; + indirectHitRange = 4.5; + effectsMissile = "missile2"; + + irLock = 0; + laserLock = 0; + manualControl = 0; + maxSpeed = 450; + + thrustTime = 2.5; // motor burn 2-3 sec + thrust = 250; + timeToLive = 40; + + EGVAR(rearm,caliber) = 178; + + class ace_missileguidance { + enabled = 1; + + minDeflection = 0.0005; // Minium flap deflection for guidance + maxDeflection = 0.01; // Maximum flap deflection for guidance + incDeflection = 0.0005; // The incrmeent in which deflection adjusts. + + 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" }; + + 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 = 5000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "hellfire"; + attackProfiles[] = {"hellfire", "hellfire_hi", "hellfire_lo"}; + }; + }; +}; diff --git a/addons/hellfire/CfgEventHandlers.hpp b/addons/hellfire/CfgEventHandlers.hpp new file mode 100644 index 0000000000..77ea0239bd --- /dev/null +++ b/addons/hellfire/CfgEventHandlers.hpp @@ -0,0 +1,15 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + }; +}; +class Extended_PostInit_EventHandlers { + class ADDON { + clientInit = QUOTE(call COMPILE_FILE(XEH_postInit)); + }; +}; diff --git a/addons/hellfire/CfgMagazines.hpp b/addons/hellfire/CfgMagazines.hpp new file mode 100644 index 0000000000..6f636c2c87 --- /dev/null +++ b/addons/hellfire/CfgMagazines.hpp @@ -0,0 +1,47 @@ +class CfgMagazines { + class 12Rnd_PG_missiles; + + class 6Rnd_ACE_Hellfire_AGM114K: 12Rnd_PG_missiles { // Old style vehicle magazine + count = 6; + ammo = "ACE_Hellfire_AGM114K"; + displayName = "AGM-114K [ACE]"; + displayNameShort = "AGM-114K"; + descriptionShort = "AGM-114K"; + }; + + // 1.70 pylon magazines: + class PylonMissile_1Rnd_ACE_Hellfire_AGM114K: 6Rnd_ACE_Hellfire_AGM114K { // Bare missle + displayName = "1x AGM-114K [ACE]"; + count = 1; + mass = 70; + pylonWeapon = QGVAR(launcher); + hardpoints[] = {"SCALPEL_1RND"}; + model = "\A3\Weapons_F\DynamicLoadout\PylonMissile_1x_Bomb_04_F.p3d"; + }; + class PylonRack_1Rnd_ACE_Hellfire_AGM114K: 6Rnd_ACE_Hellfire_AGM114K { // 1x Launcher Support Rack + displayName = "1x AGM-114K [ACE]"; + count = 1; + mass = 85; + pylonWeapon = QGVAR(launcher); + hardpoints[] = {"B_MISSILE_PYLON", "SCALPEL_1RND_EJECTOR", "B_ASRRAM_EJECTOR", "UNI_SCALPEL"}; + model = "\A3\Weapons_F\DynamicLoadout\PylonPod_1x_Missile_AA_04_F.p3d"; + }; + class PylonRack_3Rnd_ACE_Hellfire_AGM114K: 6Rnd_ACE_Hellfire_AGM114K { // 3x Launcher Support Rack + displayName = "3x AGM-114K [ACE]"; + count = 3; + mass = 250; + pylonWeapon = QGVAR(launcher); + hardpoints[] = {"B_MISSILE_PYLON", "UNI_SCALPEL"}; + model = "\A3\Weapons_F\DynamicLoadout\PylonPod_3x_Missile_LG_scalpel_F.p3d"; + mirrorMissilesIndexes[] = {2, 1, 3}; + }; + class PylonRack_4Rnd_ACE_Hellfire_AGM114K: 6Rnd_ACE_Hellfire_AGM114K { // 4x Launcher Support Rack + displayName = "4x AGM-114K [ACE]"; + count = 4; + mass = 340; + pylonWeapon = QGVAR(launcher); + hardpoints[] = {"UNI_SCALPEL"}; + model = "\A3\Weapons_F\DynamicLoadout\PylonPod_4x_Missile_LG_scalpel_F.p3d"; + mirrorMissilesIndexes[] = {2, 1, 4, 3}; + }; +}; diff --git a/addons/hellfire/CfgVehicles.hpp b/addons/hellfire/CfgVehicles.hpp new file mode 100644 index 0000000000..89dbf131d7 --- /dev/null +++ b/addons/hellfire/CfgVehicles.hpp @@ -0,0 +1,6 @@ +class CfgVehicles { + class Heli_Attack_01_base_F; + class Heli_Attack_01_dynamicLoadout_base_F: Heli_Attack_01_base_F { + GVAR(addLaserDesignator) = 1; + }; +}; diff --git a/addons/hellfire/CfgWeapons.hpp b/addons/hellfire/CfgWeapons.hpp new file mode 100644 index 0000000000..1b9a76352e --- /dev/null +++ b/addons/hellfire/CfgWeapons.hpp @@ -0,0 +1,13 @@ +class CfgWeapons { + class missiles_SCALPEL; + class GVAR(launcher): missiles_SCALPEL { + displayName = CSTRING(Hellfire); + GVAR(enabled) = 1; // show attack profile / lock on hud + EGVAR(laser,canSelect) = 1; // can ace_laser lock (allows switching laser code) + canLock = 0; + weaponLockSystem = 0; + magazines[] = {"6Rnd_ACE_Hellfire_AGM114K", "PylonMissile_1Rnd_ACE_Hellfire_AGM114K", "PylonRack_1Rnd_ACE_Hellfire_AGM114K", "PylonRack_3Rnd_ACE_Hellfire_AGM114K", "PylonRack_4Rnd_ACE_Hellfire_AGM114K"}; + lockingTargetSound[] = {"",0,1}; + lockedTargetSound[] = {"",0,1}; + }; +}; diff --git a/addons/hellfire/README.md b/addons/hellfire/README.md new file mode 100644 index 0000000000..bb9eef711e --- /dev/null +++ b/addons/hellfire/README.md @@ -0,0 +1,10 @@ +ace_hellfire +========== + +Adds AGM-114K Hellfire missiles. + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [PabstMirror](https://github.com/PabstMirror) diff --git a/addons/hellfire/RscTitles.hpp b/addons/hellfire/RscTitles.hpp new file mode 100644 index 0000000000..2bbedae1b6 --- /dev/null +++ b/addons/hellfire/RscTitles.hpp @@ -0,0 +1,57 @@ +class RscControlsGroupNoScrollbars; +class RscPictureKeepAspect; +class RscText; + +class RscTitles { + class GVAR(modeDisplay) { + idd = -1; + onLoad = QUOTE(with uiNameSpace do { GVAR(display) = _this select 0 };); + movingEnable = 0; + duration = 60; + fadeIn = "false"; + fadeOut = "false"; + 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)"; + + class controls { + class AttackMode: RscText { + idc = IDC_ATTACKMODE; + colorText[] = {1, 1, 1, 1}; + 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)"; + }; + 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)"; + 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)"; + }; + 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)"; + y = "0"; + w = "(1) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + h = "(1) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + }; + }; + }; + + }; + }; +}; diff --git a/addons/hellfire/XEH_PREP.hpp b/addons/hellfire/XEH_PREP.hpp new file mode 100644 index 0000000000..8b07d00b2c --- /dev/null +++ b/addons/hellfire/XEH_PREP.hpp @@ -0,0 +1,5 @@ +LOG("prep"); +PREP(attackProfile); +PREP(getAttackProfileSettings); +PREP(setupVehicle); +PREP(showHud); diff --git a/addons/hellfire/XEH_postInit.sqf b/addons/hellfire/XEH_postInit.sqf new file mode 100644 index 0000000000..34fc5b92ba --- /dev/null +++ b/addons/hellfire/XEH_postInit.sqf @@ -0,0 +1,10 @@ +#include "script_component.hpp" + +if (!hasInterface) exitWith {}; + +GVAR(pfID) = -1; + +["ace_settingsInitialized", { + ["turret", LINKFUNC(showHud), false] call CBA_fnc_addPlayerEventHandler; + ["vehicle", LINKFUNC(showHud), true] call CBA_fnc_addPlayerEventHandler; // only one of these needs the retro flag +}] call CBA_fnc_addEventHandler; diff --git a/addons/hellfire/XEH_preInit.sqf b/addons/hellfire/XEH_preInit.sqf new file mode 100644 index 0000000000..3464490b65 --- /dev/null +++ b/addons/hellfire/XEH_preInit.sqf @@ -0,0 +1,9 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP_RECOMPILE_START; + #include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; diff --git a/addons/hellfire/XEH_preStart.sqf b/addons/hellfire/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/hellfire/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/hellfire/config.cpp b/addons/hellfire/config.cpp new file mode 100644 index 0000000000..14c00904f1 --- /dev/null +++ b/addons/hellfire/config.cpp @@ -0,0 +1,23 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_interaction", "ace_missileguidance"}; + author = ECSTRING(common,ACETeam); + authors[] = {"PabstMirror"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "ACE_GuidanceConfig.hpp" +#include "CfgAmmo.hpp" +#include "CfgEventHandlers.hpp" +#include "CfgMagazines.hpp" +#include "CfgVehicles.hpp" +#include "CfgWeapons.hpp" +#include "RscTitles.hpp" diff --git a/addons/hellfire/functions/fnc_attackProfile.sqf b/addons/hellfire/functions/fnc_attackProfile.sqf new file mode 100644 index 0000000000..84f1c39f0a --- /dev/null +++ b/addons/hellfire/functions/fnc_attackProfile.sqf @@ -0,0 +1,85 @@ +/* + * Author: PabstMirror + * Hellfire attack profile. Handles all 4 modes LOBL, LOAL-DIR, LOAL-HI, LOAL-LO + * + * Arguments: + * 0: Seeker Target PosASL + * 1: Guidance Arg Array + * 2: Attack Profile State + * + * Return Value: + * Missile Aim PosASL + * + * Example: + * [[1,2,3], [], []] call ace_hellfire_fnc_attackProfile + * + * Public: No + */ +// #define DEBUG_MODE_FULL +#include "script_component.hpp" + +params ["_seekerTargetPos", "_args", "_attackProfileStateParams"]; +_args params ["_firedEH", "_launchParams"]; +_launchParams params ["","_targetLaunchParams"]; +_targetLaunchParams params ["", "", "_launchPos"]; +_firedEH params ["","","","","","","_projectile"]; + +// Get state params: +if (_attackProfileStateParams isEqualTo []) then { + _this call FUNC(getAttackProfileSettings); +}; +_attackProfileStateParams params ["_attackStage", "_configLaunchHeightClear"]; + + +private _projectilePos = getPosASL _projectile; +private _distanceFromLaunch2d = _launchPos distance2d _projectilePos; +private _heightAboveLaunch = (_projectilePos select 2) - (_launchPos select 2); + +// Add height depending on distance for compensate +private _returnTargetPos = nil; + +switch (_attackStage) do { + case STAGE_LAUNCH: { // Gain height quickly to pass terrain mask + _returnTargetPos = _projectilePos getPos [100, getDir _projectile]; + _returnTargetPos set [2, (_projectilePos select 2) + 36.4]; // 100 and 36.4 gives a 20 deg angle + + if (_heightAboveLaunch > _configLaunchHeightClear) then { + _attackProfileStateParams set [0, STAGE_SEEK_CRUISE]; + TRACE_2("New Stage: STAGE_SEEK_CRUISE",_distanceFromLaunch2d,_heightAboveLaunch); + }; + }; + case STAGE_SEEK_CRUISE: { // Slowly gain altitude while searching for target + // Before 4000 cruise at 5.7 degrees up, then level out + private _cruiseHeight = linearConversion [3000, 5000, _distanceFromLaunch2d, 10, 0, true]; + + _returnTargetPos = _projectilePos getPos [100, getDir _projectile]; + _returnTargetPos set [2, (_projectilePos select 2) + _cruiseHeight]; + + if (!(_seekerTargetPos isEqualTo [0,0,0])) then { + _attackProfileStateParams set [0, STAGE_ATTACK_CRUISE]; + TRACE_1("New Stage: STAGE_ATTACK_CRUISE",_distanceFromLaunch2d); + }; + }; + case STAGE_ATTACK_CRUISE: { + private _currentHeightOverTarget = (_projectilePos select 2) - (_seekerTargetPos select 2); + private _distanceToTarget2d = _seekerTargetPos distance2d _projectilePos; + private _distToGoRatio = _distanceToTarget2d / (_launchPos distance2d _seekerTargetPos); + + // arcing up at 7 degrees to start until 50% left, then smooth curve to a downward attack + private _gainSlope = linearConversion [0.5, 0.1, _distToGoRatio, 7, -7, true]; + _returnTargetPos = +_seekerTargetPos; + _returnTargetPos set [2, ((_projectilePos select 2) + (_distanceToTarget2d * sin _gainSlope)) max (_seekerTargetPos select 2)]; + + if ((_distanceToTarget2d < 500) || {(_currentHeightOverTarget atan2 _distanceToTarget2d) > 15}) then { // Wait until we can come down at a sharp angle + _attackProfileStateParams set [0, STAGE_ATTACK_TERMINAL]; + TRACE_2("New Stage: STAGE_ATTACK_TERMINAL",_distanceToTarget2d,_currentHeightOverTarget); + }; + }; + case STAGE_ATTACK_TERMINAL: { + private _distanceToTarget2d = _seekerTargetPos distance2d _projectilePos; + _returnTargetPos = _seekerTargetPos vectorAdd [0, 0, _distanceToTarget2d * 0.02]; + }; +}; + +// TRACE_1("Adjusted target position", _returnTargetPos); +_returnTargetPos; diff --git a/addons/hellfire/functions/fnc_getAttackProfileSettings.sqf b/addons/hellfire/functions/fnc_getAttackProfileSettings.sqf new file mode 100644 index 0000000000..a4854faa55 --- /dev/null +++ b/addons/hellfire/functions/fnc_getAttackProfileSettings.sqf @@ -0,0 +1,46 @@ +/* + * Author: PabstMirror + * Gets attack profile parameters for first run of hellfire attack profile function + * + * Arguments: + * 0: Seeker Target PosASL + * 1: Guidance Arg Array + * 2: Attack Profile State + * + * Return Value: + * Nothing + * + * Example: + * [[], [], []] call ace_hellfire_fnc_getAttackProfileSettings; + * + * Public: No + */ +// #define DEBUG_MODE_FULL +#include "script_component.hpp" + +params ["_seekerTargetPos", "_args", "_attackProfileStateParams"]; +_args params ["_firedEH", "_launchParams"]; +_launchParams params ["", "", "", "_attackProfile"]; +_firedEH params ["","","","","","","_projectile"]; + +private _attackConfig = configFile >> QEGVAR(missileguidance,AttackProfiles) >> _attackProfile; + +// Launch (clearing terrain mask for LO/HI): +private _configLaunchHeightClear = getNumber (_attackConfig >> QGVAR(launchHeightClear)); + +// Get starting stage +private _startingStage = if (_configLaunchHeightClear > 0) then { + STAGE_LAUNCH; // LOAL-HI / LO +} else { + if (_seekerTargetPos isEqualTo [0,0,0]) then { + STAGE_SEEK_CRUISE; // LOAL-DIR + } else { + STAGE_ATTACK_CRUISE // LOBL + }; +}; + +// Set data in param array +_attackProfileStateParams set [0, _startingStage]; +_attackProfileStateParams set [1, _configLaunchHeightClear]; + +TRACE_1("new shot settings",_attackProfileStateParams); diff --git a/addons/hellfire/functions/fnc_setupVehicle.sqf b/addons/hellfire/functions/fnc_setupVehicle.sqf new file mode 100644 index 0000000000..bec56d52a7 --- /dev/null +++ b/addons/hellfire/functions/fnc_setupVehicle.sqf @@ -0,0 +1,76 @@ +/* + * Author: PabstMirror + * Adds interaction menu actions to switch the firemode to a vehicle. + * Also adds a Laser Designator if vehicle is configured for one. + * + * Arguments: + * 0: Vehicle + * 1: Player's Turret Path + * + * Return Value: + * Nothing + * + * Example: + * [(vehicle player), [0]] call ace_hellfire_fnc_setupVehicle + * + * Public: No + */ +// #define DEBUG_MODE_FULL +#include "script_component.hpp" + +params ["_vehicle", "_turretPath"]; +TRACE_2("setupVehicle",_vehicle,_turretPath); + +// Add laser if vehicle is configured for one: +if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> QGVAR(addLaserDesignator))) == 1) then { + [{ + params ["_vehicle", "_turretPath"]; + TRACE_3("checking for laser",_vehicle,_turretPath,_vehicle turretLocal _turretPath); + if (!alive _vehicle) exitWith {}; + if (!(_vehicle turretLocal _turretPath)) then {WARNING("Turret not local");}; + private _hasLaser = false; + { + // Most addons just use "Laserdesignator_mounted", but this should cover custom ones + if ((getNumber (configFile >> "CfgWeapons" >> _x >> "Laser")) == 1) exitWith { + _hasLaser = true; + }; + } forEach (_vehicle weaponsTurret _turretPath); + if (!_hasLaser) then { + TRACE_1("Adding Laser Designator",typeOf _vehicle); + _vehicle addWeaponTurret ["Laserdesignator_mounted", _turretPath]; + _vehicle addMagazineTurret ["Laserbatteries", _turretPath]; + }; + }, _this, 1] call CBA_fnc_waitAndExecute; // Need to delay slightly for turret to become local (probably only needs a single frame) +}; + + +// Add interaction menu actions: +if (_vehicle getVariable [QGVAR(actionsAdded), false]) exitWith {}; +_vehicle setVariable [QGVAR(actionsAdded), true]; + +private _action = [QUOTE(ADDON), localize LSTRING(hellfireModeAction), "", {}, {true}] call EFUNC(interact_menu,createAction); +private _basePath = [_vehicle, 1, ["ACE_SelfActions"], _action] call EFUNC(interact_menu,addActionToObject); + +private _fnc_statement = { + params ["_target", "", "_attackProfile"]; + TRACE_2("statement",_target,_attackProfile); + + _target setVariable [QEGVAR(missileguidance,attackProfile), _attackProfile]; +}; +private _fnc_condition = { + params ["_target", "_player", "_attackProfile"]; + + private _turretPath = if (ACE_player == (driver _target)) then {[-1]} else {ACE_player call CBA_fnc_turretPath}; + private _hasWeapon = ({QGVAR(launcher) == _x} count (_target weaponsTurret _turretPath)) > 0; + + (_hasWeapon) && + {(_target getVariable [QEGVAR(missileguidance,attackProfile), "hellfire"]) != _attackProfile}; +}; + +{ + private _displayName = getText (configFile >> QEGVAR(missileguidance,AttackProfiles) >> _x >> "name"); + private _action = [format [QGVAR(%1),_x], _displayName, "", _fnc_statement, _fnc_condition, {}, _x] call EFUNC(interact_menu,createAction); + [_vehicle, 1, _basePath, _action] call EFUNC(interact_menu,addActionToObject); +} forEach ["hellfire", "hellfire_hi", "hellfire_lo"]; + +TRACE_2("interactions added",_vehicle,typeOf _vehicle); diff --git a/addons/hellfire/functions/fnc_showHud.sqf b/addons/hellfire/functions/fnc_showHud.sqf new file mode 100644 index 0000000000..c79780c3fe --- /dev/null +++ b/addons/hellfire/functions/fnc_showHud.sqf @@ -0,0 +1,124 @@ +/* + * Author: PabstMirror + * Shows the hellfire hud when vehicle is equiped with the weapon. + * Shows laser code, fire mode and seeker status. + * + * Arguments: + * 0: Player + * + * Return Value: + * Nothing + * + * Example: + * [player] call ace_hellfire_fnc_showHud + * + * Public: No + */ +#include "script_component.hpp" + +params ["_player"]; +TRACE_1("showHud",_player); + +private _enabled = false; +private _vehicle = vehicle _player; +private _turretPath = [-1]; + +if ((alive _player) && {_player != _vehicle}) then { + if (_player != (driver _vehicle)) then { + _turretPath = _player call CBA_fnc_turretPath + }; + { + if ((getNumber (configFile >> "CfgWeapons" >> _x >> QGVAR(enabled))) == 1) then { + TRACE_1("enabled",_x); + _enabled = true; + }; + } forEach (_vehicle weaponsTurret _turretPath); +}; + +if ((!_enabled) && (GVAR(pfID) < 0)) exitWith {TRACE_2("Disabled - No Change",_enabled,GVAR(pfID));}; + +TRACE_2("Cleaning up old pfeh and display",_enabled,GVAR(pfID)); +[GVAR(pfID)] call CBA_fnc_removePerFrameHandler; +if (!isNull (uiNamespace getVariable [QGVAR(display), displayNull])) then { + ([QGVAR(modeDisplay)] call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; +}; +GVAR(pfID) = -1; + +if (!_enabled) exitWith {TRACE_2("Disabled - Now Off",_enabled,GVAR(pfID));}; + +TRACE_2("Enabled - Adding actions and PFEH",_enabled,GVAR(pfID)); + +[_vehicle, _turretPath] call FUNC(setupVehicle); + +private _adjustDown = false; // Flares display will block ours, if present just move ours down a bit +{ + if ((getText (configFile >> "CfgWeapons" >> _x >> "simulation")) == "cmlauncher") exitWith {_adjustDown = true}; +} forEach (_vehicle weaponsTurret _turretPath); + +private _turretConfig = [_vehicle, _turretPath] call CBA_fnc_getTurret; +private _seekerSource = getText (_turretConfig >> "memoryPointGunnerOptics"); +TRACE_3("",_adjustDown,_seekerSource,_vehicle selectionPosition _seekerSource); + +GVAR(pfID) = [{ + params ["_args", "_pfID"]; + _args params ["_vehicle", "_turretPath", "_seekerSource", "_adjustDown"]; + + // Restart display if null (not just at start, this will happen periodicly) + if (isNull (uiNamespace getVariable [QGVAR(display), displayNull])) then { + TRACE_1("creating display",_this); + ([QGVAR(modeDisplay)] call BIS_fnc_rscLayer) cutRsc [QGVAR(modeDisplay), "PLAIN", 1, false]; + 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)]; + _ctrl ctrlSetPosition _pos; + _ctrl ctrlCommit 0; + }; + }; + + private _currentWeapon = _vehicle currentWeaponTurret _turretPath; + private _showLockMode = (getNumber (configFile >> "CfgWeapons" >> _currentWeapon >> QGVAR(enabled))) == 1; + + private _ctrlGroup = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl 1000; + + if (!_showLockMode) exitWith { + _ctrlGroup ctrlShow false; + }; + _ctrlGroup ctrlShow true; + + private _ctrlText = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl IDC_ATTACKMODE; + private _ctrlCode = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl IDC_LASERCODE; + private _ctrlIcon = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl IDC_LASERICON; + + // Do Laser Scan: + private _laserSource = AGLtoASL (_vehicle modelToWorld (_vehicle selectionPosition _seekerSource)); + private _laserCode = _vehicle getVariable [QEGVAR(laser,code), ACE_DEFAULT_LASER_CODE]; + private _laserResult = [_laserSource, vectorDir _vehicle, 70, 5000, [ACE_DEFAULT_LASER_WAVELENGTH,ACE_DEFAULT_LASER_WAVELENGTH], _laserCode, _vehicle] call EFUNC(laser,seekerFindLaserSpot); + private _foundTargetPos = _laserResult select 0; + private _haveLock = !isNil "_foundTargetPos"; + + private _modeShort = "ERR"; + private _vehicleLockMode = _vehicle getVariable [QEGVAR(missileguidance,attackProfile), ""]; + + switch (_vehicleLockMode) do { // note: missileguidance is case sensitive + case ("hellfire_hi"): { + _modeShort = getText (configFile >> QEGVAR(missileguidance,AttackProfiles) >> _vehicleLockMode >> "name"); + }; + case ("hellfire_lo"): { + _modeShort = getText (configFile >> QEGVAR(missileguidance,AttackProfiles) >> _vehicleLockMode >> "name"); + }; + default { + _vehicleLockMode = "hellfire"; + _modeShort = if (_haveLock) then { + getText (configFile >> QEGVAR(missileguidance,AttackProfiles) >> _vehicleLockMode >> "nameLocked"); + } else { + getText (configFile >> QEGVAR(missileguidance,AttackProfiles) >> _vehicleLockMode >> "name"); + }; + }; + }; + + _ctrlIcon ctrlSetTextColor ([[0,0,0,0.25],[1,0,0,0.75]] select _haveLock); + _ctrlText ctrlSetText _modeShort; + _ctrlCode ctrlSetText format ["CODE: %1", _laserCode]; + +}, 0.1, [_vehicle, _turretPath, _seekerSource, _adjustDown]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/hellfire/functions/script_component.hpp b/addons/hellfire/functions/script_component.hpp new file mode 100644 index 0000000000..899f29a758 --- /dev/null +++ b/addons/hellfire/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\hellfire\script_component.hpp" diff --git a/addons/hellfire/script_component.hpp b/addons/hellfire/script_component.hpp new file mode 100644 index 0000000000..2e8cf04eff --- /dev/null +++ b/addons/hellfire/script_component.hpp @@ -0,0 +1,27 @@ +#define COMPONENT hellfire +#define COMPONENT_BEAUTIFIED Hellfire +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_HELLFIRE + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_HELLFIRE + #define DEBUG_SETTINGS DEBUG_SETTINGS_HELLFIRE +#endif + +#include "\z\ace\addons\main\script_macros.hpp" + +#define STAGE_LAUNCH 1 +#define STAGE_SEEK_CRUISE 2 +#define STAGE_ATTACK_CRUISE 3 +#define STAGE_ATTACK_TERMINAL 4 + +#define IDC_MODECONTROLGROUP 1000 +#define IDC_ATTACKMODE 1001 +#define IDC_LASERCODE 1002 +#define IDC_LASERICON 1003 diff --git a/addons/hellfire/stringtable.xml b/addons/hellfire/stringtable.xml new file mode 100644 index 0000000000..ee8c91a071 --- /dev/null +++ b/addons/hellfire/stringtable.xml @@ -0,0 +1,34 @@ + + + + + Hellfire + Hellfire + Hellfire + Hellfire + Hellfire + Hellfire + Hellfire + Hellfire + Hellfire + Hellfire + Hellfire + + + Set Hellfire mode + + + RAH-66 Comanche [Hellfire] + RAH-66 Comanche [Hellfire] + RAH-66 Comanche [Hellfire] + RAH-66 Comanche [Hellfire] + RAH-66 Comanche [Hellfire] + RAH-66 Commanche [Hellfire] + RAH-66 Команч [Hellfire] + RAH-66 Comanche [Hellfire] + RAH-66 Comanche [Hellfire] + RAH-66 Comanche [Hellfire] + RAH-66 コマンチ [Hellfire] + + + diff --git a/addons/interact_menu/CfgEventHandlers.hpp b/addons/interact_menu/CfgEventHandlers.hpp index fa53ccf57c..b8bb1264e1 100644 --- a/addons/interact_menu/CfgEventHandlers.hpp +++ b/addons/interact_menu/CfgEventHandlers.hpp @@ -29,4 +29,10 @@ class Extended_DisplayLoad_EventHandlers { class RscDiary { ADDON = QUOTE(call COMPILE_FILE(XEH_displayLoad)); }; + class RscDisplayInterrupt { + ADDON = QUOTE(_this call FUNC(handleEscapeMenu)); + }; + class RscDisplayMPInterrupt { + ADDON = QUOTE(_this call FUNC(handleEscapeMenu)); + }; }; diff --git a/addons/interact_menu/XEH_PREP.hpp b/addons/interact_menu/XEH_PREP.hpp index 0c1a6842fc..55c35d54df 100644 --- a/addons/interact_menu/XEH_PREP.hpp +++ b/addons/interact_menu/XEH_PREP.hpp @@ -9,6 +9,7 @@ PREP(collectActiveActionTree); PREP(createAction); PREP(ctrlSetParsedTextCached); PREP(findActionNode); +PREP(handleEscapeMenu); PREP(isSubPath); PREP(keyDown); PREP(keyUp); diff --git a/addons/interact_menu/functions/fnc_compileMenu.sqf b/addons/interact_menu/functions/fnc_compileMenu.sqf index ed38e41ada..0df6ac5965 100644 --- a/addons/interact_menu/functions/fnc_compileMenu.sqf +++ b/addons/interact_menu/functions/fnc_compileMenu.sqf @@ -10,7 +10,7 @@ * * Public: No */ -#include "script_component.hpp"; +#include "script_component.hpp" params ["_target"]; diff --git a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf index 0c5e236f0b..cd7aabf2e1 100644 --- a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf +++ b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf @@ -10,7 +10,7 @@ * * Public: No */ -#include "script_component.hpp"; +#include "script_component.hpp" params ["_target"]; diff --git a/addons/interact_menu/functions/fnc_compileMenuZeus.sqf b/addons/interact_menu/functions/fnc_compileMenuZeus.sqf index c0797269e6..442afdb26c 100644 --- a/addons/interact_menu/functions/fnc_compileMenuZeus.sqf +++ b/addons/interact_menu/functions/fnc_compileMenuZeus.sqf @@ -10,7 +10,7 @@ * * Public: No */ -#include "script_component.hpp"; +#include "script_component.hpp" // Exit if the action menu is already compiled for zeus if !(isNil {missionNamespace getVariable [QGVAR(ZeusActions), nil]}) exitWith {}; diff --git a/addons/interact_menu/functions/fnc_handleEscapeMenu.sqf b/addons/interact_menu/functions/fnc_handleEscapeMenu.sqf new file mode 100644 index 0000000000..41e16e8951 --- /dev/null +++ b/addons/interact_menu/functions/fnc_handleEscapeMenu.sqf @@ -0,0 +1,25 @@ +/* + * Author: PabstMirror + * Handle the escape key being pressed. + * + * Arguments: + * 0: Escape menu display that should be closed + * + * Return Value: + * Nothing + * + * Public: No + */ +#include "script_component.hpp" + +if (GVAR(openedMenuType) < 0) exitWith {}; + +params [["_display", displayNull, [displayNull]]]; +TRACE_2("handleEscapeMenu",_display,isNull _display); + +if (!isNull _display) then { + _display closeDisplay 0; +}; + +GVAR(actionSelected) = false; +[GVAR(openedMenuType), false] call FUNC(keyUp); diff --git a/addons/interact_menu/functions/fnc_isSubPath.sqf b/addons/interact_menu/functions/fnc_isSubPath.sqf index 5933e2c462..cd49e6d01e 100644 --- a/addons/interact_menu/functions/fnc_isSubPath.sqf +++ b/addons/interact_menu/functions/fnc_isSubPath.sqf @@ -22,6 +22,7 @@ private _isSubPath = true; if (count _shortPath > count _longPath) exitWith {false}; +//IGNORE_PRIVATE_WARNING ["_i"]; for [{private _i = 0},{_i < count _shortPath},{_i = _i + 1}] do { if !((_longPath select _i) isEqualTo (_shortPath select _i)) exitWith { _isSubPath = false; diff --git a/addons/interact_menu/functions/fnc_keyDown.sqf b/addons/interact_menu/functions/fnc_keyDown.sqf index 58286a65bb..fb1a377f70 100644 --- a/addons/interact_menu/functions/fnc_keyDown.sqf +++ b/addons/interact_menu/functions/fnc_keyDown.sqf @@ -59,7 +59,13 @@ if (GVAR(useCursorMenu)) then { createDialog QGVAR(cursorMenu); }; (finddisplay 91919) displayAddEventHandler ["KeyUp", {[_this,'keyup'] call CBA_events_fnc_keyHandler}]; - (finddisplay 91919) displayAddEventHandler ["KeyDown", {[_this,'keydown'] 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); + }; + [_this,'keydown'] call CBA_events_fnc_keyHandler; + }]; // The dialog sets: // uiNamespace getVariable QGVAR(dlgCursorMenu); // uiNamespace getVariable QGVAR(cursorMenuOpened); @@ -73,6 +79,10 @@ if (GVAR(useCursorMenu)) then { ((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 { + (findDisplay 91919) closeDisplay 2; + }; }; GVAR(selfMenuOffset) = (AGLtoASL (positionCameraToWorld [0, 0, 2])) vectorDiff (AGLtoASL (positionCameraToWorld [0, 0, 0])); diff --git a/addons/interact_menu/functions/fnc_renderBaseMenu.sqf b/addons/interact_menu/functions/fnc_renderBaseMenu.sqf index 363f7100f9..51e3ae6a5d 100644 --- a/addons/interact_menu/functions/fnc_renderBaseMenu.sqf +++ b/addons/interact_menu/functions/fnc_renderBaseMenu.sqf @@ -61,7 +61,7 @@ if ((_sPos select 0) < safeZoneXAbs || {(_sPos select 0) > safeZoneXAbs + safeZo if ((_sPos select 1) < safeZoneY || {(_sPos select 1) > safeZoneY + safeZoneH}) exitWith {false}; -BEGIN_COUNTER(fnc_collectActiveActionTree) +BEGIN_COUNTER(fnc_collectActiveActionTree); // Collect active tree private _uid = format [QGVAR(ATCache_%1), _actionName]; @@ -71,7 +71,7 @@ private _activeActionTree = [ _object, _uid, 1.0, "ace_interactMenuClosed" ] call EFUNC(common,cachedCall); -END_COUNTER(fnc_collectActiveActionTree) +END_COUNTER(fnc_collectActiveActionTree); #ifdef DEBUG_MODE_EXTRA diag_log "Printing: _activeActionTree"; @@ -79,9 +79,6 @@ diag_log "Printing: _activeActionTree"; params ["_level", "_node"]; _node params ["_actionData", "_children", "_object"]; diag_log text format ["Level %1 -> %2 on %3", _level, _actionData select 0, _object]; - { - [_level + 1, _x] call _fnc_print; - } forEach _children; }; #endif @@ -101,6 +98,6 @@ GVAR(collectedActionPoints) pushBack [_sPos select 2, _sPos, _activeActionTree]; END_COUNTER(fnc_renderMenus); -END_COUNTER(fnc_renderBaseMenu) +END_COUNTER(fnc_renderBaseMenu); true diff --git a/addons/interaction/ACE_ZeusActions.hpp b/addons/interaction/ACE_ZeusActions.hpp index af29186895..44b7078f4b 100644 --- a/addons/interaction/ACE_ZeusActions.hpp +++ b/addons/interaction/ACE_ZeusActions.hpp @@ -3,6 +3,7 @@ class ACE_ZeusActions { class ZeusUnits { displayName = "$STR_A3_RscDisplayCurator_ModeUnits_tooltip"; icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeUnits_ca.paa"; + condition = QUOTE((count (curatorSelected select 0)) > 0); class stance { displayName = "$STR_A3_RscAttributeUnitPos_Title"; @@ -10,22 +11,22 @@ class ACE_ZeusActions { class prone { displayName = "$STR_Pos_Down"; icon = "\A3\UI_F\Data\IGUI\RscIngameUI\RscUnitInfo\SI_prone_ca.paa"; - statement = "{_x setUnitPos 'DOWN';} forEach (curatorSelected select 0);"; + statement = QUOTE([ARR_3(QQGVAR(zeusStance),[ARR_2('DOWN',curatorSelected select 0)],curatorSelected select 0)] call CBA_fnc_targetEvent;); }; class crouch { displayName = "$STR_Pos_Crouch"; icon = "\A3\UI_F\Data\IGUI\RscIngameUI\RscUnitInfo\SI_crouch_ca.paa"; - statement = "{_x setUnitPos 'MIDDLE';} forEach (curatorSelected select 0);"; + statement = QUOTE([ARR_3(QQGVAR(zeusStance),[ARR_2('MIDDLE',curatorSelected select 0)],curatorSelected select 0)] call CBA_fnc_targetEvent;); }; class stand { displayName = "$STR_Pos_Up"; icon = "\A3\UI_F\Data\IGUI\RscIngameUI\RscUnitInfo\SI_stand_ca.paa"; - statement = "{_x setUnitPos 'UP';} forEach (curatorSelected select 0);"; + statement = QUOTE([ARR_3(QQGVAR(zeusStance),[ARR_2('UP',curatorSelected select 0)],curatorSelected select 0)] call CBA_fnc_targetEvent;); }; class auto { displayName = "$STR_Pos_Automatic"; icon = "\A3\UI_F_Curator\Data\default_ca.paa"; - statement = "{_x setUnitPos 'AUTO';} forEach (curatorSelected select 0);"; + statement = QUOTE([ARR_3(QQGVAR(zeusStance),[ARR_2('AUTO',curatorSelected select 0)],curatorSelected select 0)] call CBA_fnc_targetEvent;); }; }; @@ -39,33 +40,34 @@ class ACE_ZeusActions { class ZeusGroups { displayName = "$STR_A3_RscDisplayCurator_ModeGroups_tooltip"; icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeGroups_ca.paa"; + condition = QUOTE((count (curatorSelected select 1)) > 0); class behaviour { displayName = "$STR_Combat_Mode"; class careless { displayName = "$STR_Combat_Careless"; - statement = "{ _x setBehaviour 'CARELESS'; } forEach (curatorSelected select 1);"; + statement = QUOTE([ARR_3(QQGVAR(zeusBehaviour),[ARR_2('CARELESS',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); }; class safe { displayName = "$STR_Combat_Safe"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\safe_ca.paa"; - statement = "{ _x setBehaviour 'SAFE'; } forEach (curatorSelected select 1);"; + statement = QUOTE([ARR_3(QQGVAR(zeusBehaviour),[ARR_2('CARELESS',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); }; class aware { displayName = "$STR_Combat_Aware"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\aware_ca.paa"; - statement = "{ _x setBehaviour 'AWARE'; } forEach (curatorSelected select 1);"; + statement = QUOTE([ARR_3(QQGVAR(zeusBehaviour),[ARR_2('AWARE',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); }; class combat { displayName = "$STR_Combat_Combat"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\combat_ca.paa"; - statement = "{ _x setBehaviour 'COMBAT'; } forEach (curatorSelected select 1);"; + statement = QUOTE([ARR_3(QQGVAR(zeusBehaviour),[ARR_2('COMBAT',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); }; class stealth { displayName = "$STR_Combat_Stealth"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\stealth_ca.paa"; - statement = "{ _x setBehaviour 'STEALTH'; } forEach (curatorSelected select 1);"; + statement = QUOTE([ARR_3(QQGVAR(zeusBehaviour),[ARR_2('STEALTH',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); }; }; @@ -75,17 +77,17 @@ class ACE_ZeusActions { class limited { displayName = "$STR_Speed_Limited"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeSpeedMode\limited_ca.paa"; - statement = "{_x setSpeedMode 'LIMITED';} forEach (curatorSelected select 1);"; + statement = QUOTE([ARR_3(QQGVAR(zeusSpeed),[ARR_2('LIMITED',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); }; class normal { displayName = "$STR_Speed_Normal"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeSpeedMode\normal_ca.paa"; - statement = "{_x setSpeedMode 'NORMAL';} forEach (curatorSelected select 1);"; + statement = QUOTE([ARR_3(QQGVAR(zeusSpeed),[ARR_2('NORMAL',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); }; class full { displayName = "$STR_Speed_Full"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeSpeedMode\full_ca.paa"; - statement = "{_x setSpeedMode 'FULL';} forEach (curatorSelected select 1);"; + statement = QUOTE([ARR_3(QQGVAR(zeusSpeed),[ARR_2('FULL',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); }; }; @@ -95,47 +97,47 @@ class ACE_ZeusActions { class wedge { displayName = "$STR_Wedge"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\wedge_ca.paa"; - statement = "{_x setFormation 'WEDGE';} forEach (curatorSelected select 1);"; + statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('WEDGE',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); }; class vee { displayName = "$STR_Vee"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\vee_ca.paa"; - statement = "{_x setFormation 'VEE';} forEach (curatorSelected select 1);"; + statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('VEE',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); }; class line { displayName = "$STR_Line"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\line_ca.paa"; - statement = "{_x setFormation 'LINE';} forEach (curatorSelected select 1);"; + statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('LINE',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); }; class column { displayName = "$STR_Column"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\column_ca.paa"; - statement = "{_x setFormation 'COLUMN';} forEach (curatorSelected select 1);"; + statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('COLUMN',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); }; class file { displayName = "$STR_File"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\file_ca.paa"; - statement = "{_x setFormation 'FILE';} forEach (curatorSelected select 1);"; + statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('FILE',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); }; class stag_column { displayName = "$STR_Staggered"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\stag_column_ca.paa"; - statement = "{_x setFormation 'STAG COLUMN';} forEach (curatorSelected select 1);"; + statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('STAG COLUMN',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); }; class ech_left { displayName = "$STR_EchL"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\ech_left_ca.paa"; - statement = "{_x setFormation 'ECH LEFT';} forEach (curatorSelected select 1);"; + statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('ECH LEFT',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); }; class ech_right { displayName = "$STR_EchR"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\ech_right_ca.paa"; - statement = "{_x setFormation 'ECH RIGHT';} forEach (curatorSelected select 1);"; + statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('ECH RIGHT',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); }; class diamond { displayName = "$STR_Diamond"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\diamond_ca.paa"; - statement = "{_x setFormation 'DIAMOND';} forEach (curatorSelected select 1);"; + statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('DIAMOND',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); }; }; }; @@ -143,33 +145,34 @@ class ACE_ZeusActions { class ZeusWaypoints { displayName = "Waypoints"; icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeRecent_ca.paa"; + condition = QUOTE((count (curatorSelected select 2)) > 0); class behaviour { displayName = "$STR_Combat_Mode"; class careless { displayName = "$STR_Combat_Careless"; - statement = "{ _x setWaypointBehaviour 'CARELESS'; } forEach (curatorSelected select 2);"; + statement = QUOTE([ARR_2(QQGVAR(zeusBehaviour),[ARR_3('CARELESS',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); }; class safe { displayName = "$STR_Combat_Safe"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\safe_ca.paa"; - statement = "{ _x setWaypointBehaviour 'SAFE'; } forEach (curatorSelected select 2);"; + statement = QUOTE([ARR_2(QQGVAR(zeusBehaviour),[ARR_3('SAFE',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); }; class aware { displayName = "$STR_Combat_Aware"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\aware_ca.paa"; - statement = "{ _x setWaypointBehaviour 'AWARE'; } forEach (curatorSelected select 2);"; + statement = QUOTE([ARR_2(QQGVAR(zeusBehaviour),[ARR_3('AWARE',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); }; class combat { displayName = "$STR_Combat_Combat"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\combat_ca.paa"; - statement = "{ _x setWaypointBehaviour 'COMBAT'; } forEach (curatorSelected select 2);"; + statement = QUOTE([ARR_2(QQGVAR(zeusBehaviour),[ARR_3('COMBAT',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); }; class stealth { displayName = "$STR_Combat_Stealth"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\stealth_ca.paa"; - statement = "{ _x setWaypointBehaviour 'STEALTH'; } forEach (curatorSelected select 2);"; + statement = QUOTE([ARR_2(QQGVAR(zeusBehaviour),[ARR_3('STEALTH',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); }; }; @@ -179,17 +182,17 @@ class ACE_ZeusActions { class limited { displayName = "$STR_Speed_Limited"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeSpeedMode\limited_ca.paa"; - statement = "{ _x setWaypointSpeed 'LIMITED'; } forEach (curatorSelected select 2);"; + statement = QUOTE([ARR_2(QQGVAR(zeusSpeed),[ARR_3('LIMITED',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); }; class normal { displayName = "$STR_Speed_Normal"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeSpeedMode\normal_ca.paa"; - statement = "{ _x setWaypointSpeed 'NORMAL'; } forEach (curatorSelected select 2);"; + statement = QUOTE([ARR_2(QQGVAR(zeusSpeed),[ARR_3('NORMAL',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); }; class full { displayName = "$STR_Speed_Full"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeSpeedMode\full_ca.paa"; - statement = "{ _x setWaypointSpeed 'FULL'; } forEach (curatorSelected select 2);"; + statement = QUOTE([ARR_2(QQGVAR(zeusSpeed),[ARR_3('FULL',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); }; }; @@ -199,47 +202,47 @@ class ACE_ZeusActions { class wedge { displayName = "$STR_Wedge"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\wedge_ca.paa"; - statement = "{_x setWaypointFormation 'WEDGE';} forEach (curatorSelected select 2);"; + statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('WEDGE',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); }; class vee { displayName = "$STR_Vee"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\vee_ca.paa"; - statement = "{_x setWaypointFormation 'VEE';} forEach (curatorSelected select 2);"; + statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('VEE',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); }; class line { displayName = "$STR_Line"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\line_ca.paa"; - statement = "{_x setWaypointFormation 'LINE';} forEach (curatorSelected select 2);"; + statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('LINE',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); }; class column { displayName = "$STR_Column"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\column_ca.paa"; - statement = "{_x setWaypointFormation 'COLUMN';} forEach (curatorSelected select 2);"; + statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('COLUMN',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); }; class file { displayName = "$STR_File"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\file_ca.paa"; - statement = "{_x setWaypointFormation 'FILE';} forEach (curatorSelected select 2);"; + statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('FILE',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); }; class stag_column { displayName = "$STR_Staggered"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\stag_column_ca.paa"; - statement = "{_x setWaypointFormation 'STAG COLUMN';} forEach (curatorSelected select 2);"; + statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('COLUMN',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); }; class ech_left { displayName = "$STR_EchL"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\ech_left_ca.paa"; - statement = "{_x setWaypointFormation 'ECH LEFT';} forEach (curatorSelected select 2);"; + statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('LEFT',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); }; class ech_right { displayName = "$STR_EchR"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\ech_right_ca.paa"; - statement = "{_x setWaypointFormation 'ECH RIGHT';} forEach (curatorSelected select 2);"; + statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('RIGHT',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); }; class diamond { displayName = "$STR_Diamond"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\diamond_ca.paa"; - statement = "{_x setWaypointFormation 'DIAMOND';} forEach (curatorSelected select 2);"; + statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('DIAMOND',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); }; }; }; @@ -247,5 +250,6 @@ class ACE_ZeusActions { class ZeusMarkers { displayName = "$STR_A3_RscDisplayCurator_ModeMarkers_tooltip"; icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeMarkers_ca.paa"; + condition = QUOTE((count (curatorSelected select 3)) > 0); }; }; diff --git a/addons/interaction/XEH_PREP.hpp b/addons/interaction/XEH_PREP.hpp index be4669cc27..dc8c361607 100644 --- a/addons/interaction/XEH_PREP.hpp +++ b/addons/interaction/XEH_PREP.hpp @@ -30,6 +30,7 @@ PREP(pardon); // interaction with doors PREP(getDoor); +PREP(getGlassDoor); PREP(getDoorAnimations); PREP(handleScrollWheel); PREP(openDoor); diff --git a/addons/interaction/XEH_postInit.sqf b/addons/interaction/XEH_postInit.sqf index 9aa9cfb157..bbbda80bfa 100644 --- a/addons/interaction/XEH_postInit.sqf +++ b/addons/interaction/XEH_postInit.sqf @@ -28,6 +28,36 @@ ACE_Modifier = 0; {_lamp setHit [_x select 0, (_x select 1) max _disabledLampDMG];nil} count _hitPointsDamage; }] call CBA_fnc_addEventHandler; +// Zeus action events +[QGVAR(zeusStance),{ + { _x setUnitPos (_this select 0); } forEach (_this select 1); +}] call CBA_fnc_addEventHandler; + +// The following 3 events handle both waypoints and groups +[QGVAR(zeusBehaviour),{ + if (param [2,false]) then { + { _x setWaypointBehaviour (_this select 0); } forEach (_this select 1); + } else { + { _x setBehaviour (_this select 0); } forEach (_this select 1); + }; +}] call CBA_fnc_addEventHandler; + +[QGVAR(zeusSpeed),{ + if (param [2,false]) then { + { _x setWaypointSpeed (_this select 0); } forEach (_this select 1); + } else { + { _x setSpeedMode (_this select 0); } forEach (_this select 1); + }; +}] call CBA_fnc_addEventHandler; + +[QGVAR(zeusFormation),{ + if (param [2,false]) then { + { _x setWaypointFormation (_this select 0); } forEach (_this select 1); + } else { + { _x setFormation (_this select 0); } forEach (_this select 1); + }; +}] call CBA_fnc_addEventHandler; + if (!hasInterface) exitWith {}; GVAR(isOpeningDoor) = false; @@ -60,7 +90,6 @@ GVAR(isOpeningDoor) = false; }, [57, [false, true, false]], false] call CBA_fnc_addKeybind; //Key CTRL+Space - ["ACE3 Common", QGVAR(tapShoulder), localize LSTRING(TapShoulder), { // Conditions: canInteract if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; diff --git a/addons/interaction/functions/fnc_canJoinTeam.sqf b/addons/interaction/functions/fnc_canJoinTeam.sqf index 7732e164e7..ee99723d77 100644 --- a/addons/interaction/functions/fnc_canJoinTeam.sqf +++ b/addons/interaction/functions/fnc_canJoinTeam.sqf @@ -16,7 +16,7 @@ */ #include "script_component.hpp" -PARAMS_2(_unit,_target); +params ["_unit", "_target"]; alive _target && {!(_target getVariable ["ACE_isUnconscious", false])} diff --git a/addons/interaction/functions/fnc_getDoor.sqf b/addons/interaction/functions/fnc_getDoor.sqf index 8261aa44f0..05793decc5 100644 --- a/addons/interaction/functions/fnc_getDoor.sqf +++ b/addons/interaction/functions/fnc_getDoor.sqf @@ -1,5 +1,5 @@ /* - * Author: commy2 + * Author: commy2, Phyma * Find door. * * Arguments: @@ -35,7 +35,14 @@ if (typeOf _house == "") exitWith {[objNull, ""]}; _intersections = [_house, "GEOM"] intersect [_position0, _position1]; -_door = _intersections select 0 select 0; +_door = toLower (_intersections select 0 select 0); + +if (isNil "_door") exitWith {[_house, ""]}; + +//Check if door is glass because then we need to find the proper location of the door so we can use it +if ((_door find "glass") != -1) then { + _door = [_distance, _house, _door] call FUNC(getGlassDoor); +}; if (isNil "_door") exitWith {[_house, ""]}; diff --git a/addons/interaction/functions/fnc_getDoorAnimations.sqf b/addons/interaction/functions/fnc_getDoorAnimations.sqf index a5c185d7d6..0d40d066be 100644 --- a/addons/interaction/functions/fnc_getDoorAnimations.sqf +++ b/addons/interaction/functions/fnc_getDoorAnimations.sqf @@ -1,6 +1,6 @@ /* - * Author: commy2 - * Get door animations. @todo rewrite for better custom building support + * Author: commy2, Phyma + * Get door animations. * * Arguments: * 0: House @@ -20,104 +20,19 @@ params ["_house", "_door"]; -private ["_index", "_animations", "_lockedVariable"]; +private _animate = animationNames _house; +private _animations = []; +private _lockedVariable = []; -_index = [ - "door_1", - "door_2", - "door_3", - "door_4", - "door_5", - "door_6", - "door_7", - "door_8", - "door_9", - "door_10", - "door_11", - "door_12", - "door_13", - "door_14", - "door_15", - "door_16", - "door_17", - "door_18", - "door_19", - "door_20", - "door_21", - "door_22", - - "hatch_1", - "hatch_2", - "hatch_3", - "hatch_4", - "hatch_5", - "hatch_6" -] find toLower _door; - -if (_index == -1) exitWith {[[],""]}; - -_animations = [ - ["Door_1_rot", "Door_Handle_1_rot_1", "Door_Handle_1_rot_2"], - ["Door_2_rot", "Door_Handle_2_rot_1", "Door_Handle_2_rot_2"], - ["Door_3_rot", "Door_Handle_3_rot_1", "Door_Handle_3_rot_2"], - ["Door_4_rot", "Door_Handle_4_rot_1", "Door_Handle_4_rot_2"], - ["Door_5_rot", "Door_Handle_5_rot_1", "Door_Handle_5_rot_2"], - ["Door_6_rot", "Door_Handle_6_rot_1", "Door_Handle_6_rot_2"], - ["Door_7_rot", "Door_Handle_7_rot_1", "Door_Handle_7_rot_2"], - ["Door_8_rot", "Door_Handle_8_rot_1", "Door_Handle_8_rot_2"], - ["Door_9_rot", "Door_Handle_9_rot_1", "Door_Handle_9_rot_2"], - ["Door_10_rot", "Door_Handle_10_rot_1", "Door_Handle_10_rot_2"], - ["Door_11_rot", "Door_Handle_11_rot_1", "Door_Handle_11_rot_2"], - ["Door_12_rot", "Door_Handle_12_rot_1", "Door_Handle_12_rot_2"], - ["Door_13_rot", "Door_Handle_13_rot_1", "Door_Handle_13_rot_2"], - ["Door_14_rot", "Door_Handle_14_rot_1", "Door_Handle_14_rot_2"], - ["Door_15_rot", "Door_Handle_15_rot_1", "Door_Handle_15_rot_2"], - ["Door_16_rot", "Door_Handle_16_rot_1", "Door_Handle_16_rot_2"], - ["Door_17_rot", "Door_Handle_17_rot_1", "Door_Handle_17_rot_2"], - ["Door_18_rot", "Door_Handle_18_rot_1", "Door_Handle_18_rot_2"], - ["Door_19_rot", "Door_Handle_19_rot_1", "Door_Handle_19_rot_2"], - ["Door_20_rot", "Door_Handle_20_rot_1", "Door_Handle_20_rot_2"], - ["Door_21_rot", "Door_Handle_21_rot_1", "Door_Handle_21_rot_2"], - ["Door_22_rot", "Door_Handle_22_rot_1", "Door_Handle_22_rot_2"], - - ["Hatch_1_rot"], - ["Hatch_2_rot"], - ["Hatch_3_rot"], - ["Hatch_4_rot"], - ["Hatch_5_rot"], - ["Hatch_6_rot"] -] select _index; - -_lockedVariable = [ - ["BIS_Disabled_Door_1", "Door_Handle_1_rot_1", "Door_Locked_1_rot"], - ["BIS_Disabled_Door_2", "Door_Handle_2_rot_1", "Door_Locked_2_rot"], - ["BIS_Disabled_Door_3", "Door_Handle_3_rot_1", "Door_Locked_3_rot"], - ["BIS_Disabled_Door_4", "Door_Handle_4_rot_1", "Door_Locked_4_rot"], - ["BIS_Disabled_Door_5", "Door_Handle_5_rot_1", "Door_Locked_5_rot"], - ["BIS_Disabled_Door_6", "Door_Handle_6_rot_1", "Door_Locked_6_rot"], - ["BIS_Disabled_Door_7", "Door_Handle_7_rot_1", "Door_Locked_7_rot"], - ["BIS_Disabled_Door_8", "Door_Handle_8_rot_1", "Door_Locked_8_rot"], - ["BIS_Disabled_Door_9", "Door_Handle_9_rot_1", "Door_Locked_9_rot"], - ["BIS_Disabled_Door_10", "Door_Handle_10_rot_1", "Door_Locked_10_rot"], - ["BIS_Disabled_Door_11", "Door_Handle_11_rot_1", "Door_Locked_11_rot"], - ["BIS_Disabled_Door_12", "Door_Handle_12_rot_1", "Door_Locked_12_rot"], - ["BIS_Disabled_Door_13", "Door_Handle_13_rot_1", "Door_Locked_13_rot"], - ["BIS_Disabled_Door_14", "Door_Handle_14_rot_1", "Door_Locked_14_rot"], - ["BIS_Disabled_Door_15", "Door_Handle_15_rot_1", "Door_Locked_15_rot"], - ["BIS_Disabled_Door_16", "Door_Handle_16_rot_1", "Door_Locked_16_rot"], - ["BIS_Disabled_Door_17", "Door_Handle_17_rot_1", "Door_Locked_17_rot"], - ["BIS_Disabled_Door_18", "Door_Handle_18_rot_1", "Door_Locked_18_rot"], - ["BIS_Disabled_Door_19", "Door_Handle_19_rot_1", "Door_Locked_19_rot"], - ["BIS_Disabled_Door_20", "Door_Handle_20_rot_1", "Door_Locked_20_rot"], - ["BIS_Disabled_Door_21", "Door_Handle_21_rot_1", "Door_Locked_21_rot"], - ["BIS_Disabled_Door_22", "Door_Handle_22_rot_1", "Door_Locked_22_rot"], - - ["", ""], - ["", ""], - ["", ""], - ["", ""], - ["", ""], - ["", ""] -] select _index; +{ + private _animName = toLower _x; + if ((_animName find (toLower _door)) != -1) then { + if (((_animName find "disabled") != -1) || ((_animName find "locked") != -1)) then { + _lockedVariable pushBack _animName; + } else { + _animations pushBack _animName; + }; + }; +} forEach _animate; [_animations, _lockedVariable] diff --git a/addons/interaction/functions/fnc_getGlassDoor.sqf b/addons/interaction/functions/fnc_getGlassDoor.sqf new file mode 100644 index 0000000000..2731f82888 --- /dev/null +++ b/addons/interaction/functions/fnc_getGlassDoor.sqf @@ -0,0 +1,67 @@ +/* + * Author: Phyma + * Find glass door. + * + * Arguments: + * 0: Distance + * 1: House + * 2: Door name + * + * Return Value: + * 0: Door Name + * + * Example: + * [player, target] call ace_interaction_fnc_getGlassDoor + * + * Public: No + */ +#include "script_component.hpp" + +params ["_distance", "_house", "_door"]; + +private _doorParts = []; +private _doorPos = []; +private _animate = animationNames _house; +private _glassDoor = _door splitString "_"; +private _glassPos = (_house selectionPosition [(_glassDoor select 0) + "_" + (_glassDoor select 1) + "_effects", "Memory"]); +// Calculate all animation names so we know what is there +{ + private _animName = toLower _x; + if (((_animName find "door") != -1) && ((_animName find "locked") == -1) && ((_animName find "disabled") == -1) && ((_animName find "handle") == -1)) then { + private _splitStr = _animName splitString "_"; + _doorParts pushBack ((_splitStr select 0) + "_" + (_splitStr select 1) + "_trigger"); + }; +} forEach _animate; + + +// Get the pos of all the door components and save the parts +{ + _doorPos pushBack (_house selectionPosition [_x, "Memory"]); +} forEach _doorParts; + +// Calculate what door that is closest to the glass door +private _lowestDistance = 0; +{ + private _objDist = _glassPos distance _x; + //Make sure we dont take another door by mistake + if (_objDist <= _distance) then { + //Need to set the value in the beginning + if (_lowestDistance == 0) then { + _lowestDistance = _objDist; + private _splitStr = (_doorParts select _forEachIndex) splitString "_"; + _door = (_splitStr select 0) + "_" + (_splitStr select 1); + } else { + if (_objDist < _lowestDistance) then { + _lowestDistance = _objDist; + private _splitStr = (_doorParts select _forEachIndex) splitString "_"; + _door = (_splitStr select 0) + "_" + (_splitStr select 1); + }; + }; + }; +} forEach _doorPos; + +// Check if we have a door or if it is the glass part +if ((isNil "_door") || ((_door find "glass") != -1)) exitWith {}; + +_door + diff --git a/addons/interaction/functions/fnc_openDoor.sqf b/addons/interaction/functions/fnc_openDoor.sqf index b1c7789ec3..039974baa2 100644 --- a/addons/interaction/functions/fnc_openDoor.sqf +++ b/addons/interaction/functions/fnc_openDoor.sqf @@ -28,9 +28,12 @@ _getDoorAnimations params ["_animations", "_lockedVariable"]; if (_animations isEqualTo []) exitWith {}; -if (_house animationPhase (_animations select 0) <= 0 && {_house getVariable [_lockedVariable select 0, 0] == 1}) exitWith { - _lockedVariable set [0, _house]; - _lockedVariable call BIS_fnc_LockedDoorOpen; +//Check if the door can be locked aka have locked variable, otherwhise cant lock it +if (!(isNil (_lockedVariable select 0))) then { + if ((_house animationPhase (_animations select 0) <= 0) && {_house getVariable [_lockedVariable select 0, 0] == 1}) exitWith { + _lockedVariable set [0, _house]; + _lockedVariable call BIS_fnc_LockedDoorOpen; + }; }; playSound "ACE_Sound_Click"; // @todo replace with smth. more fitting @@ -62,7 +65,6 @@ GVAR(usedScrollWheel) = false; if (CBA_missionTime > _time && {diag_frameno > _frame}) then { GVAR(usedScrollWheel) = true; }; - // do incremental door opening {_house animate [_x, GVAR(doorTargetPhase)]; false} count _animations; }, 0.1, [_house, _animations, getPosASL ACE_player, CBA_missionTime + 0.2, diag_frameno + 2]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/javelin/stringtable.xml b/addons/javelin/stringtable.xml index ece03b3699..a1f786da72 100644 --- a/addons/javelin/stringtable.xml +++ b/addons/javelin/stringtable.xml @@ -9,7 +9,7 @@ Namierz cel (przytrzymaj) Verrouiller la cible (maintenir) Célpontra állás (Lenyomva tartott) - Aggangia il bersagio + Aggangia il bersaglio Fijar objetivo (Mantener) Travar Alvo(Segurar) 目標を捕捉 (押しっぱ) diff --git a/addons/kestrel4500/functions/fnc_generateOutputData.sqf b/addons/kestrel4500/functions/fnc_generateOutputData.sqf index ccc2ab57e3..039da0e213 100644 --- a/addons/kestrel4500/functions/fnc_generateOutputData.sqf +++ b/addons/kestrel4500/functions/fnc_generateOutputData.sqf @@ -143,7 +143,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { } else { _textCenterLine1Left = "Max"; _textCenterLine2Left = "Avg"; - switch (GVAR(MinAvgMax)Mode) do { + switch (GVAR(MinAvgMaxMode)) do { case 0: { _textCenterLine1Right = "--. -"; _textCenterLine2Right = "--. -"; @@ -175,7 +175,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { } else { _textCenterLine1Left = "Max"; _textCenterLine2Left = "Avg"; - switch (GVAR(MinAvgMax)Mode) do { + switch (GVAR(MinAvgMaxMode)) do { case 0: { _textCenterLine1Right = "--. -"; _textCenterLine2Right = "--. -"; diff --git a/addons/laser/functions/fnc_dev_drawVisibleLaserTargets.sqf b/addons/laser/functions/fnc_dev_drawVisibleLaserTargets.sqf index 7598bf8f46..cecda2d21a 100644 --- a/addons/laser/functions/fnc_dev_drawVisibleLaserTargets.sqf +++ b/addons/laser/functions/fnc_dev_drawVisibleLaserTargets.sqf @@ -26,6 +26,7 @@ private _testSeekerDir = vectorDirVisual _seekerVehicle; // Draw all lasers [GVAR(laserEmitters), { + //IGNORE_PRIVATE_WARNING ["_key", "_value"]; // TRACE_2("",_key,_value); _value params ["_obj", "_owner", "_laserMethod", "_waveLength", "_laserCode", "_beamSpread"]; diff --git a/addons/laser/functions/fnc_keyLaserCodeChange.sqf b/addons/laser/functions/fnc_keyLaserCodeChange.sqf index f4f485bcd0..d43dc52fe5 100644 --- a/addons/laser/functions/fnc_keyLaserCodeChange.sqf +++ b/addons/laser/functions/fnc_keyLaserCodeChange.sqf @@ -29,12 +29,13 @@ if (ACE_player call CBA_fnc_canUseWeapon) then { _currentWeapon = currentWeapon ACE_player; } else { _currentShooter = vehicle ACE_player; - private _turret = [ACE_player] call ace_common_fnc_getTurretIndex; - _currentWeapon = _currentShooter currentWeaponTurret _turret; + private _turretPath = if (ACE_player == (driver _currentShooter)) then {[-1]} else {ACE_player call CBA_fnc_turretPath}; + _currentWeapon = _currentShooter currentWeaponTurret _turretPath; }; TRACE_2("",_currentShooter,_currentWeapon); -if ((getNumber (configFile >> "CfgWeapons" >> _currentWeapon >> "laser")) == 0) exitWith {false}; +if (((getNumber (configFile >> "CfgWeapons" >> _currentWeapon >> "laser")) == 0) && + {(getNumber (configFile >> "CfgWeapons" >> _currentWeapon >> QGVAR(canSelect))) == 0}) exitWith {false}; private _oldLaserCode = _currentShooter getVariable [QGVAR(code), ACE_DEFAULT_LASER_CODE]; private _newLaserCode = _oldLaserCode; @@ -52,7 +53,7 @@ if (((_codeChange < 0) && {_oldLaserCode > ACE_DEFAULT_LASER_CODE}) || {(_codeCh TRACE_2("",_oldLaserCode,_newLaserCode); if (_oldLaserCode != _newLaserCode) then { - _currentShooter setVariable [QGVAR(code), _newLaserCode, false]; + _currentShooter setVariable [QGVAR(code), _newLaserCode, true]; }; [format ["%1: %2", localize LSTRING(laserCode), _newLaserCode]] call EFUNC(common,displayTextStructured); diff --git a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf index 612cc17fe5..6fa2f9c54d 100644 --- a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf +++ b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf @@ -76,7 +76,7 @@ private _finalOwner = objNull; // Shoot a cone with dispersion ([_laserPos, _laserDir, _divergence, GVAR(dispersionCount), _obj] call FUNC(shootCone)) params ["", "", "_resultPositions"]; { - _testPoint = _x select 0; + private _testPoint = _x select 0; private _testPointVector = _posASL vectorFromTo _testPoint; private _testDotProduct = _dir vectorDotProduct _testPointVector; if ((_testDotProduct > _seekerCos) && {(_testPoint vectorDistanceSqr _posASL) < _seekerMaxDistSq}) then { @@ -90,7 +90,7 @@ private _finalOwner = objNull; if (_distance > 0) then { private _testPointVector = _posASL vectorFromTo _resultPos; private _testDotProduct = _dir vectorDotProduct _testPointVector; - if ((_testDotProduct > _seekerCos) && {(_testPoint vectorDistanceSqr _posASL) < _seekerMaxDistSq}) then { + if ((_testDotProduct > _seekerCos) && {(_resultPos vectorDistanceSqr _posASL) < _seekerMaxDistSq}) then { _spots pushBack [_resultPos, _owner]; }; }; @@ -178,6 +178,7 @@ if ((count _spots) > 0) then { private _maxOwnerCount = -1; [_ownersHash, { + //IGNORE_PRIVATE_WARNING ["_key", "_value"]; if (_value > _maxOwnerCount) then { _finalOwner = _key; }; @@ -189,9 +190,9 @@ 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", _code], 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", _code], 0.5, 0.025, "TahomaB"]; + 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/stringtable.xml b/addons/laser/stringtable.xml index 4014441551..7e8db0c87c 100644 --- a/addons/laser/stringtable.xml +++ b/addons/laser/stringtable.xml @@ -8,6 +8,7 @@ 레이저 분산 시뮬레이션 수 Wskaźnik poziomu rozproszenia wiązki lasera Compte de la simulation de la dispersion du laser + Contatore Simulazione Dispersione Laser Laser Code diff --git a/addons/laserpointer/XEH_postInit.sqf b/addons/laserpointer/XEH_postInit.sqf index d8857da32a..7e90e29259 100644 --- a/addons/laserpointer/XEH_postInit.sqf +++ b/addons/laserpointer/XEH_postInit.sqf @@ -41,9 +41,16 @@ GVAR(greenLaserUnits) = []; params ["_unit"]; private _weapon = currentWeapon _unit; + if (!(_unit isFlashlightOn _weapon)) exitWith { + GVAR(redLaserUnits) deleteAt (GVAR(redLaserUnits) find _unit); + GVAR(greenLaserUnits) deleteAt (GVAR(greenLaserUnits) find _unit); + }; + private _laser = [(_unit weaponAccessories _weapon) select 1] param [0, ""]; - - if (_laser isEqualTo "") exitWith {}; + if (_laser isEqualTo "") exitWith { + GVAR(redLaserUnits) deleteAt (GVAR(redLaserUnits) find _unit); + GVAR(greenLaserUnits) deleteAt (GVAR(greenLaserUnits) find _unit); + }; private _laserID = GVAR(laserClassesCache) getVariable _laser; @@ -51,21 +58,17 @@ GVAR(greenLaserUnits) = []; _laserID = getNumber (configFile >> "CfgWeapons" >> _laser >> "ACE_laserpointer"); GVAR(laserClassesCache) setVariable [_laser, _laserID]; }; + TRACE_3("",_weapon,_laser,_laserID); - if (_unit isFlashlightOn _weapon) then { - if (_laserID isEqualTo 1) exitWith { - GVAR(redLaserUnits) pushBackUnique _unit; - GVAR(greenLaserUnits) deleteAt (GVAR(greenLaserUnits) find _unit); - }; - - if (_laserID isEqualTo 2) exitWith { - GVAR(greenLaserUnits) pushBackUnique _unit; - GVAR(redLaserUnits) deleteAt (GVAR(redLaserUnits) find _unit); - }; - } else { - GVAR(redLaserUnits) deleteAt (GVAR(redLaserUnits) find _unit); + if (_laserID isEqualTo 1) exitWith { + GVAR(redLaserUnits) pushBackUnique _unit; GVAR(greenLaserUnits) deleteAt (GVAR(greenLaserUnits) find _unit); }; + + if (_laserID isEqualTo 2) exitWith { + GVAR(greenLaserUnits) pushBackUnique _unit; + GVAR(redLaserUnits) deleteAt (GVAR(redLaserUnits) find _unit); + }; }; // custom scheduler diff --git a/addons/laserpointer/functions/fnc_getNearUnits.sqf b/addons/laserpointer/functions/fnc_getNearUnits.sqf index 6f31a99a2a..eb505c3795 100644 --- a/addons/laserpointer/functions/fnc_getNearUnits.sqf +++ b/addons/laserpointer/functions/fnc_getNearUnits.sqf @@ -6,7 +6,7 @@ * None * * Return Value: - * None + * Near Units * * Public: No */ @@ -15,7 +15,7 @@ private _camPosAGL = positionCameraToWorld [0, 0, 0]; // handle RHS / bugged vehicle slots -if !((_camPosAGL select 0) isEqualType 0) exitWith {}; +if !((_camPosAGL select 0) isEqualType 0) exitWith { [] }; private _nearUnits = []; diff --git a/addons/logistics_wirecutter/stringtable.xml b/addons/logistics_wirecutter/stringtable.xml index f13cd9a288..542b152af3 100644 --- a/addons/logistics_wirecutter/stringtable.xml +++ b/addons/logistics_wirecutter/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -24,7 +24,7 @@ Służą do cięcia drutu i płotów Pince coupante Drótok, huzalok, és kábelek vágására alkalmas olló. - Trancia da ferro + Tronchese Cortador de Arame ワイヤーカッター 절단기 diff --git a/addons/magazinerepack/functions/fnc_simulateRepackEvents.sqf b/addons/magazinerepack/functions/fnc_simulateRepackEvents.sqf index 09c04de26e..a96fa2dead 100644 --- a/addons/magazinerepack/functions/fnc_simulateRepackEvents.sqf +++ b/addons/magazinerepack/functions/fnc_simulateRepackEvents.sqf @@ -26,6 +26,7 @@ _arrayOfAmmoCounts = +_arrayOfAmmoCounts; _arrayOfAmmoCounts sort true; private _fnc_newMag = { + //IGNORE_PRIVATE_WARNING ["_time", "_events"]; _time = _time + GVAR(TimePerMagazine); _events pushBack [_time, false, +_arrayOfAmmoCounts]; }; diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index 6cb346a72b..f0681137a6 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -9,7 +9,7 @@ #define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD // MINIMAL required version for the Mod. Components can specify others.. -#define REQUIRED_VERSION 1.64 +#define REQUIRED_VERSION 1.70 #define REQUIRED_CBA_VERSION {3,2,1} #ifdef COMPONENT_BEAUTIFIED diff --git a/addons/main/script_version.hpp b/addons/main/script_version.hpp index 6b0cc9e423..a52346e875 100644 --- a/addons/main/script_version.hpp +++ b/addons/main/script_version.hpp @@ -1,4 +1,4 @@ #define MAJOR 3 #define MINOR 9 -#define PATCHLVL 1 -#define BUILD 17 +#define PATCHLVL 2 +#define BUILD 18 diff --git a/addons/map/stringtable.xml b/addons/map/stringtable.xml index f5eb043e80..d7fb92a3d6 100644 --- a/addons/map/stringtable.xml +++ b/addons/map/stringtable.xml @@ -445,6 +445,7 @@ GPS피아식별기 끄기 Wyłącz BFT Désactive le BFT + Disablita BFT Always disable Blue Force Tracking for this group. @@ -453,6 +454,7 @@ 이 그룹에 한해 GPS피아식별기를 항상 끕니다. Zawsze wyłączaj Blue Force Tracking dla tej grupy. Désactive en permanence le Blue Force Tracking pour ce groupe. + Disabilita sempre il Blue Force Tracking per questo gruppo. diff --git a/addons/maptools/stringtable.xml b/addons/maptools/stringtable.xml index 8828aed603..da72ba5a52 100644 --- a/addons/maptools/stringtable.xml +++ b/addons/maptools/stringtable.xml @@ -163,6 +163,7 @@ Klawisz obrotu narzędzi nawigacyjnych Taste zum Drehen des Kartenwerkzeugs 독도용 도구 돌리기 키 + Ruota Strumenti di Mappatura Modifier key to allow rotating map tools @@ -172,6 +173,7 @@ Modyfikator pozwalający na obracanie narzędzi nawigacyjnych Steuerungstaste, um Drehung des Kartenwerkzeugs zu ermöglichen. 독도용 도구를 돌리기 위한 키를 변경할 수 있습니다. + Tasto modifica per consentire strumenti di mappatura rotanti Draw straight lines with maptools @@ -180,6 +182,7 @@ 독도용 도구로 직선 그리기 Rysuj proste linie przy użyciu narzędzi nawigacyjnych Tracer des lignes droites + Disegna linee dritte con gli strumenti di mappatura Draw on the edge of maptools to draw straight lines. Note: Must hover at midpoint to delete. @@ -188,6 +191,7 @@ 독도용 도구 가장자리에 직선을 그립니다. 주의: 삭제하기 위해선 선의 중앙에 가져다 대십시요 Przeciągnij po krawędzi narzędzi nawigacyjnych by narysować prostą linię. Uwaga: aby usunąć linię - nalezy ustawić kursor nad jej środkiem. Utiliser le bord des outils de navigation pour tracer des lignes droites. Note: l'on doit survoler le milieu du trait pour pouvoir le supprimer. + Disegna sul bordo degli strumenti di mappatura per disegnare linee dritte. Nota: Deve spostarsi al centro per essere cancellato. diff --git a/addons/medical/ACE_Medical_StateMachine.hpp b/addons/medical/ACE_Medical_StateMachine.hpp index 003eb66a70..224edfde7b 100644 --- a/addons/medical/ACE_Medical_StateMachine.hpp +++ b/addons/medical/ACE_Medical_StateMachine.hpp @@ -10,7 +10,11 @@ class ACE_Medical_StateMachine { }; class CriticalInjuryOrVitals { targetState = "Unconscious"; - events[] = {QGVAR(CriticalInjury), QGVAR(CriticalVitals)}; + events[] = {QGVAR(CriticalInjury), QGVAR(CriticalVitals), QGVAR(knockOut)}; + }; + class FatalVitals { + targetState = "CardiacArrest"; + events[] = {QGVAR(FatalVitals)}; }; class FatalInjury { targetState = "FatalInjury"; @@ -25,7 +29,7 @@ class ACE_Medical_StateMachine { }; class CriticalInjuryOrVitals { targetState = "Unconscious"; - events[] = {QGVAR(CriticalInjury), QGVAR(CriticalVitals)}; + events[] = {QGVAR(CriticalInjury), QGVAR(CriticalVitals), QGVAR(knockOut)}; }; class FatalVitals { targetState = "CardiacArrest"; @@ -38,7 +42,7 @@ class ACE_Medical_StateMachine { }; class Unconscious { onState = QUOTE(DFUNC(handleStateUnconscious)); - onStateEntered = QUOTE([ARR_2(_this,(true))] call FUNC(setUnconscious)); + onStateEntered = QUOTE([ARR_2(_this,(true))] call FUNC(setUnconsciousStatemachine)); class DeathAI { targetState = "Dead"; condition = QUOTE(!isPlayer _this && {GVAR(unconsciousConditionAI)}); @@ -47,7 +51,7 @@ class ACE_Medical_StateMachine { targetState = "Injured"; condition = QUOTE(_this call FUNC(hasStableVitals)); events[] = {QGVAR(WakeUp)}; - onTransition = QUOTE([ARR_2(_this,(false))] call FUNC(setUnconscious)); + onTransition = QUOTE([ARR_2(_this,(false))] call FUNC(setUnconsciousStatemachine)); }; class FatalTransitions { targetState = "CardiacArrest"; diff --git a/addons/medical/ACE_Settings.hpp b/addons/medical/ACE_Settings.hpp index be25758c3e..50812342e6 100644 --- a/addons/medical/ACE_Settings.hpp +++ b/addons/medical/ACE_Settings.hpp @@ -265,4 +265,11 @@ class ACE_Settings { value = 0; values[] = {"No", "Yes"}; }; + class GVAR(spontaneousWakeUpChance) { + category = CSTRING(Category_Medical); + displayName = CSTRING(MedicalSettings_spontaneousWakeUpChance_DisplayName); + description = CSTRING(MedicalSettings_spontaneousWakeUpChance_Description); + typeName = "SCALAR"; + value = 0; + }; }; diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index e496b50475..521b8b723d 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -464,6 +464,12 @@ class CfgVehicles { }; }; }; + class spontaneousWakeUpChance { + displayName = CSTRING(MedicalSettings_spontaneousWakeUpChance_DisplayName); + description = CSTRING(MedicalSettings_spontaneousWakeUpChance_Description); + typeName = "SCALAR"; + defaultValue = 0; + }; }; }; class MapBoard_altis_F; diff --git a/addons/medical/XEH_PREP.hpp b/addons/medical/XEH_PREP.hpp index 5d2f0aa195..9c40ee1b2b 100644 --- a/addons/medical/XEH_PREP.hpp +++ b/addons/medical/XEH_PREP.hpp @@ -41,6 +41,7 @@ PREP(serverRemoveBody); PREP(setCardiacArrest); PREP(setDead); PREP(setUnconscious); +PREP(setUnconsciousStatemachine); PREP(transitionSecondChance); PREP(updateHeartRate); PREP(updatePainSuppress); diff --git a/addons/medical/functions/fnc_dev_watchMedicalStats.sqf b/addons/medical/functions/fnc_dev_watchMedicalStats.sqf index b7de63c577..d2c53de569 100644 --- a/addons/medical/functions/fnc_dev_watchMedicalStats.sqf +++ b/addons/medical/functions/fnc_dev_watchMedicalStats.sqf @@ -62,7 +62,7 @@ private _damage = _unit getVariable [QEGVAR(medical,bodyPartDamage), [0,0,0,0,0,0]]; private _limping = if (_unit getVariable [QEGVAR(medical_engine,isLimping), false]) then {"[ Limping ]"} else {""}; _return pushBack format ["Damage: [H: %1] [B: %2] %3", (_damage select 0) toFixed 2, (_damage select 1) toFixed 2, _limping]; - _return pushBack format ["[LA:%1] [RA: %2] [LL:%1] [RL: %2]", (_damage select 2) toFixed 2, (_damage select 3) toFixed 2, (_damage select 4) toFixed 2, (_damage select 5) toFixed 2]; + _return pushBack format ["[LA:%1] [RA: %2] [LL:%3] [RL: %4]", (_damage select 2) toFixed 2, (_damage select 3) toFixed 2, (_damage select 4) toFixed 2, (_damage select 5) toFixed 2]; // Tourniquets: diff --git a/addons/medical/functions/fnc_handleStateUnconscious.sqf b/addons/medical/functions/fnc_handleStateUnconscious.sqf index b22fac1ee3..123f8f9f1f 100644 --- a/addons/medical/functions/fnc_handleStateUnconscious.sqf +++ b/addons/medical/functions/fnc_handleStateUnconscious.sqf @@ -1,4 +1,5 @@ +#define DEBUG_MODE_FULL #include "script_component.hpp" params ["_unit", "_stateName"]; @@ -21,16 +22,19 @@ if (_painLevel > 0) then { }; // Handle spontaneous wakeup from unconsciousness -if (_unit call FUNC(hasStableVitals)) then { - private _lastWakeUpCheck = _unit getVariable [QGVAR(lastWakeUpCheck), CBA_missionTime]; - if (CBA_missionTime - _lastWakeUpCheck > SPONTANEOUS_WAKE_UP_INTERVAL) then { - _unit setVariable [QGVAR(lastWakeUpCheck), CBA_missionTime]; - if ((random 1) < SPONTANEOUS_WAKE_UP_CHANCE) then { - TRACE_1("spontaneous wake up",_unit); - [QGVAR(WakeUp), _unit] call CBA_fnc_localEvent; +if (GVAR(spontaneousWakeUpChance) > 0) then { + if (_unit call FUNC(hasStableVitals)) then { + private _lastWakeUpCheck = _unit getVariable [QGVAR(lastWakeUpCheck), CBA_missionTime]; + if (CBA_missionTime - _lastWakeUpCheck > SPONTANEOUS_WAKE_UP_INTERVAL) then { + TRACE_2("Checking for wake up",_unit,GVAR(spontaneousWakeUpChance)); + _unit setVariable [QGVAR(lastWakeUpCheck), CBA_missionTime]; + if ((random 1) < GVAR(spontaneousWakeUpChance)) then { + TRACE_1("Spontaneous wake up!",_unit); + [QGVAR(WakeUp), _unit] call CBA_fnc_localEvent; + }; }; + } else { + // Unstable vitals, procrastinate the next wakeup check + _unit setVariable [QGVAR(lastWakeUpCheck), CBA_missionTime]; }; -} else { - // Unstable vitals, procrastinate the next wakeup check - _unit setVariable [QGVAR(lastWakeUpCheck), CBA_missionTime]; }; diff --git a/addons/medical/functions/fnc_moduleMedicalSettings.sqf b/addons/medical/functions/fnc_moduleMedicalSettings.sqf index 5e714bf9cd..bdf5123661 100644 --- a/addons/medical/functions/fnc_moduleMedicalSettings.sqf +++ b/addons/medical/functions/fnc_moduleMedicalSettings.sqf @@ -56,6 +56,8 @@ if !(_activated) exitWith {}; [_logic, QGVAR(ivFlowRate), "ivFlowRate"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(allowSelfIV), "allowSelfIV"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(spontaneousWakeUpChance), "spontaneousWakeUpChance"] call EFUNC(common,readSettingFromModule); + //[_logic, QGVAR(allowLitterCreation), "allowLitterCreation"] call EFUNC(common,readSettingFromModule); //[_logic, QGVAR(litterCleanUpDelay), "litterCleanUpDelay"] call EFUNC(common,readSettingFromModule); diff --git a/addons/medical/functions/fnc_setCardiacArrest.sqf b/addons/medical/functions/fnc_setCardiacArrest.sqf index 9354784662..5bcae1a680 100644 --- a/addons/medical/functions/fnc_setCardiacArrest.sqf +++ b/addons/medical/functions/fnc_setCardiacArrest.sqf @@ -23,8 +23,8 @@ _unit setVariable [QGVAR(heartRate), 0, true]; ["ace_cardiacArrestEntered", [_unit]] call CBA_fnc_localEvent; -[_unit, true] call FUNC(setUnconscious); -[QEGVAR(medical,InjuryCritical), _unit] call CBA_fnc_localEvent; +[_unit, true] call FUNC(setUnconsciousStatemachine); + private _timeInCardiacArrest = 120 + round(random(600)); [{ diff --git a/addons/medical/functions/fnc_setUnconscious.sqf b/addons/medical/functions/fnc_setUnconscious.sqf index a4b4ed8f5d..8d9fd5b39f 100644 --- a/addons/medical/functions/fnc_setUnconscious.sqf +++ b/addons/medical/functions/fnc_setUnconscious.sqf @@ -1,19 +1,24 @@ /* * Author: Glowbal * Sets a unit in the unconscious state. + * For Public Use * * Arguments: * 0: The unit that will be put in an unconscious state * 1: Set unconsciouns (default: true) + * 2: Minimum unconscious time (set to 0 to ignore) (default: 0) + * 3: Force wakeup at given time if vitals are stable (default: false) * * ReturnValue: * Success? * * Example: * [bob, true] call ace_medical_fnc_setUnconscious; + * [player, true, 5, true] call ace_medical_fnc_setUnconscious; * * Public: yes */ +#define DEBUG_MODE_FULL #include "script_component.hpp" // only run this after the settings are initialized @@ -21,41 +26,50 @@ if !(EGVAR(common,settingsInitFinished)) exitWith { EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(setUnconscious), _this]; }; -params ["_unit", ["_knockOut", true]]; - -if (isNull _unit || {!(_unit isKindOf "CAManBase")}) exitWith {false}; +params ["_unit", ["_knockOut", true, [false]], ["_minWaitingTime", 0, [0]], ["_forcedWakup", false, [false]]]; +TRACE_4("setUnconscious",_unit,_knockOut,_minWaitingTime,_forcedWakup); +if ((isNull _unit) || {!alive _unit} || {!(_unit isKindOf "CAManBase")}) exitWith { + ERROR_3("Bad Unit %1 [Type: %2] [Alive: %3]",_unit,typeOf _unit,alive _unit); + false +}; if (!local _unit) exitWith { [QGVAR(setUnconscious), [_unit, _knockOut], _unit] call CBA_fnc_targetEvent; true }; - -if (_knockOut isEqualTo (_unit getVariable [QGVAR(isUnconscious), false])) exitWith {false}; - -// --- wake up -if !(_knockOut) exitWith { - _unit setVariable [QGVAR(isUnconscious), false, true]; - - [_unit, false] call EFUNC(medical_engine,setUnconsciousAnim); - ["ace_unconscious", [_unit, false]] call CBA_fnc_globalEvent; - - true +if (_knockOut isEqualTo (_unit getVariable [QGVAR(isUnconscious), false])) exitWith { + WARNING_2("setUnconscious called with no change [Unit %1] [State [%2]", _unit, _knockOut); + false }; -// --- knock out -_unit setVariable [QGVAR(isUnconscious), true, true]; -_unit setVariable [QGVAR(lastWakeUpCheck), CBA_missiontime]; +private _beforeState = [_unit, GVAR(STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState; -if (_unit == ACE_player) then { - if (visibleMap) then {openMap false}; - while {dialog} do { - closeDialog 0; +if (_knockOut) then { + if (_minWaitingTime > 0) then { + if (_forcedWakup) then { + // If unit still has stable vitals at min waiting time, then force wake up + [{ + params [["_unit", objNull]]; + if ((alive _unit) && {_unit call FUNC(hasStableVitals)}) then { + TRACE_1("Doing delay wakeup",_unit); + [QGVAR(WakeUp), _unit] call CBA_fnc_localEvent; + } else { + TRACE_1("Skipping delay wakeup",_unit); + }; + }, [_unit], _minWaitingTime] call CBA_fnc_waitAndExecute; + }; + if (GVAR(spontaneousWakeUpChance) > 0) then { + _unit setVariable [QGVAR(lastWakeUpCheck), CBA_missionTime + _minWaitingTime - SPONTANEOUS_WAKE_UP_INTERVAL]; + }; }; + + [QGVAR(knockOut), _unit] call CBA_fnc_localEvent; +} else { + [QGVAR(WakeUp), _unit] call CBA_fnc_localEvent; }; -[_unit, true] call EFUNC(medical_engine,setUnconsciousAnim); -[QGVAR(Unconscious), _unit] call CBA_fnc_localEvent; -["ace_unconscious", [_unit, true]] call CBA_fnc_globalEvent; +private _afterState = [_unit, GVAR(STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState; +TRACE_2("state change",_beforeState,_afterState); true diff --git a/addons/medical/functions/fnc_setUnconsciousStatemachine.sqf b/addons/medical/functions/fnc_setUnconsciousStatemachine.sqf new file mode 100644 index 0000000000..cb21188466 --- /dev/null +++ b/addons/medical/functions/fnc_setUnconsciousStatemachine.sqf @@ -0,0 +1,50 @@ +/* + * Author: Glowbal + * Sets a unit in the unconscious state. + * For Internal Use: Called from the state machine. + * + * Arguments: + * 0: The unit that will be put in an unconscious state + * 1: Set unconsciouns + * + * ReturnValue: + * Success? + * + * Example: + * [bob, true] call ace_medical_fnc_setUnconsciousStatemachine + * + * Public: No + */ +#define DEBUG_MODE_FULL +#include "script_component.hpp" + +params ["_unit", "_knockOut"]; +TRACE_2("setUnconsciousStatemachine",_unit,_knockOut); + +if (_knockOut isEqualTo (_unit getVariable [QGVAR(isUnconscious), false])) exitWith {TRACE_1("No Change - Exiting",_knockOut);}; + +_unit setVariable [QGVAR(isUnconscious), _knockOut, true]; +["ace_unconscious", [_unit, _knockOut]] call CBA_fnc_globalEvent; +[_unit, _knockOut] call EFUNC(medical_engine,setUnconsciousAnim); + + +if (_knockOut) then { + // --- knock out + if (GVAR(spontaneousWakeUpChance) > 0) then { // Don't bother setting this if not used + private _lastWakeUpCheck = CBA_missiontime max (_unit getVariable [QGVAR(lastWakeUpCheck), 0]); + TRACE_2("setting lastWakeUpCheck",_lastWakeUpCheck,(_lastWakeUpCheck - CBA_missiontime)); + _unit setVariable [QGVAR(lastWakeUpCheck), _lastWakeUpCheck]; + }; + + if (_unit == ACE_player) then { + if (visibleMap) then {openMap false}; + + while {dialog} do { + closeDialog 0; + }; + }; + [QGVAR(Unconscious), _unit] call CBA_fnc_localEvent; +} else { + // --- wake up + _unit setVariable [QGVAR(lastWakeUpCheck), nil]; // clear this now (min wait time could be set to a very high value) +}; diff --git a/addons/medical/script_macros_medical.hpp b/addons/medical/script_macros_medical.hpp index a22f7fafc8..84b94f647b 100644 --- a/addons/medical/script_macros_medical.hpp +++ b/addons/medical/script_macros_medical.hpp @@ -45,7 +45,6 @@ #define PAIN_SUPPRESSION_FADE_TIME 1800 // Chance to wake up when vitals are stable (checked once every SPONTANEOUS_WAKE_UP_INTERVAL seconds) -#define SPONTANEOUS_WAKE_UP_CHANCE 0.2 #define SPONTANEOUS_WAKE_UP_INTERVAL 15 #define LETHAL_HEAD_DAMAGE_THRESHOLD 1.0 diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index d4b53958da..4f0f84f061 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -4067,5 +4067,11 @@ Allow Unconscious Animation on Treatment. + + Unconscious Wake Up Chance + + + Probablity that a unit with stable vitals will wake up from unconscious [Checked every 15 sec] + diff --git a/addons/medical_ai/stringtable.xml b/addons/medical_ai/stringtable.xml index c7eba9b03a..b2fdbbb773 100644 --- a/addons/medical_ai/stringtable.xml +++ b/addons/medical_ai/stringtable.xml @@ -9,6 +9,7 @@ サーバーと HC のみ Tylko serwer i HC Seulement sur le server ou le HC + Solo Server e HC diff --git a/addons/medical_blood/stringtable.xml b/addons/medical_blood/stringtable.xml index bd401f5c39..4bbd2c19a1 100644 --- a/addons/medical_blood/stringtable.xml +++ b/addons/medical_blood/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -8,6 +8,7 @@ 오직 플레이어만 Tylko gracze Joueurs seulement + Solo Giocatori Enable Blood Drops @@ -16,6 +17,7 @@ 피흘리기 활성화 Włącz ślady krwi na ziemi Active les gouttes de sang + Abilita Perdite di Sangue Enable or disable Blood Drops created on bleeding and taking damage @@ -23,6 +25,7 @@ Aktiviere oder deaktiviere Blutspritzer, die durch Blutungen oder bei Schadensnahme entstehen. Włącz lub wyłącz pozostawianie śladów krwi na ziemi kiedy postać odnosi obrażenia bądź krwawi (Dés)active les gouttes de sang lors d'un saignement ou de blessure + Abilita o disabilita la Perdite di Sangue create sanguinando e prendendo danno diff --git a/addons/medical_damage/ACE_Medical_Injuries.hpp b/addons/medical_damage/ACE_Medical_Injuries.hpp index 07391d96dc..d167255f87 100644 --- a/addons/medical_damage/ACE_Medical_Injuries.hpp +++ b/addons/medical_damage/ACE_Medical_Injuries.hpp @@ -16,7 +16,7 @@ class ACE_Medical_Injuries { // Occur when an entire structure or part of it is forcibly pulled away, such as the loss of a permanent tooth or an ear lobe. Explosions, gunshots, and animal bites may cause avulsions. class Avulsion { causes[] = {"explosive", "vehiclecrash", "grenade", "shell", "bullet", "backblast", "bite"}; - bleeding = 0.5; + bleeding = 0.25; pain = 1.0; minDamage = 0.01; causeLimping = 1; @@ -32,7 +32,7 @@ class ACE_Medical_Injuries { // Occur when a heavy object falls onto a person, splitting the skin and shattering or tearing underlying structures. class Crush { causes[] = {"falling", "vehiclecrash", "punch", "unknown"}; - bleeding = 0.1; + bleeding = 0.05; pain = 0.8; minDamage = 0.1; causeLimping = 1; @@ -55,7 +55,7 @@ class ACE_Medical_Injuries { // Also called velocity wounds, they are caused by an object entering the body at a high speed, typically a bullet or small peices of shrapnel. class VelocityWound { causes[] = {"bullet", "grenade","explosive", "shell", "unknown"}; - bleeding = 1.0; + bleeding = 0.5; pain = 0.9; minDamage = 0.35; causeLimping = 1; @@ -63,7 +63,7 @@ class ACE_Medical_Injuries { // Deep, narrow wounds produced by sharp objects such as nails, knives, and broken glass. class PunctureWound { causes[] = {"stab", "grenade"}; - bleeding = 0.1; + bleeding = 0.05; pain = 0.4; minDamage = 0.02; causeLimping = 1; diff --git a/addons/medical_damage/functions/fnc_woundsHandler.sqf b/addons/medical_damage/functions/fnc_woundsHandler.sqf index 07af9867db..766680e5a5 100644 --- a/addons/medical_damage/functions/fnc_woundsHandler.sqf +++ b/addons/medical_damage/functions/fnc_woundsHandler.sqf @@ -15,8 +15,6 @@ */ #include "script_component.hpp" -#define MATH_E 2.71828182846 - params ["_unit", "_bodyPart", "_damage", "_typeOfDamage"]; TRACE_5("start",_unit,_bodyPart,_damage,_typeOfDamage); @@ -39,45 +37,48 @@ private _woundsCreated = []; call compile _extensionOutput; // todo: Make the pain and bleeding calculations part of the extension again +private _woundDamage = _damage / ((count _woundsCreated) max 1); // If the damage creates multiple wounds private _painLevel = 0; private _critialDamage = false; private _bodyPartDamage = _unit getVariable [QEGVAR(medical,bodyPartDamage), [0,0,0,0,0,0]]; { _x params ["", "_woundClassIDToAdd", "_bodyPartNToAdd", "", "_bleeding"]; - _bodyPartDamage set [_bodyPartNToAdd, (_bodyPartDamage select _bodyPartNToAdd) + _damage]; + _bodyPartDamage set [_bodyPartNToAdd, (_bodyPartDamage select _bodyPartNToAdd) + _woundDamage]; // The higher the nastiness likelihood the higher the change to get a painful and bloody wound - private _nastinessLikelihood = linearConversion [0, 20, _damage, 0.5, 30, true]; - private _bloodiness = 0.01 + 0.99 * MATH_E ^ (-(random 30) / _nastinessLikelihood); - private _painfullness = 0.05 + 0.95 * MATH_E ^ (-(random 30) / _nastinessLikelihood); + private _nastinessLikelihood = linearConversion [0, 20, _woundDamage, 0.5, 30, true]; + private _bleedingModifier = 0.25 + 8 * exp ((random [-4.5, -5, -6]) / _nastinessLikelihood); + private _painModifier = 0.05 + 2 * exp (-2 / _nastinessLikelihood); - _bleeding = _bleeding * _bloodiness; - - // wound category (minor, medium, large) - private _category = floor ((0 max _bleeding min 0.1) / 0.05); + TRACE_3("",_nastinessLikelihood,_bleedingModifier,_painModifier); + + _bleeding = _bleeding * _bleedingModifier; + private _pain = (((GVAR(woundsData) select _woundClassIDToAdd) select 3) * _painModifier); + _painLevel = _painLevel + _pain; + + // wound category (minor [0..0.5], medium[0.5..1.0], large[1.0+]) + private _category = floor linearConversion [0, 1, _bleedingModifier, 0, 2, true]; _x set [4, _bleeding]; - _x set [5, _damage]; + _x set [5, _woundDamage]; _x set [6, _category]; - private _pain = ((GVAR(woundsData) select _woundClassIDToAdd) select 3) * _painfullness; - _painLevel = _painLevel max _pain; - if (_bodyPartNToAdd == 0 || {_bodyPartNToAdd == 1 && {_damage > PENETRATION_THRESHOLD}}) then { + if (_bodyPartNToAdd == 0 || {_bodyPartNToAdd == 1 && {_woundDamage > PENETRATION_THRESHOLD}}) then { _critialDamage = true; }; #ifdef DEBUG_MODE_FULL - systemChat format["%1, damage: %2, peneration: %3, bleeding: %4, pain: %5", _bodyPart, round(_damage * 100) / 100, _damage > PENETRATION_THRESHOLD, round(_bleeding * 1000) / 1000, round(_pain * 1000) / 1000]; + systemChat format["%1, damage: %2, peneration: %3, bleeding: %4, pain: %5", _bodyPart, round(_woundDamage * 100) / 100, _woundDamage > PENETRATION_THRESHOLD, round(_bleeding * 1000) / 1000, round(_pain * 1000) / 1000]; #endif - if (_bodyPartNToAdd == 0 && {_damage > LETHAL_HEAD_DAMAGE_THRESHOLD}) then { + if (_bodyPartNToAdd == 0 && {_woundDamage > LETHAL_HEAD_DAMAGE_THRESHOLD}) then { [QEGVAR(medical,FatalInjury), _unit] call CBA_fnc_localEvent; }; // todo `forceWalk` based on leg damage private _causeLimping = (GVAR(woundsData) select _woundClassIDToAdd) select 7; - if (_causeLimping == 1 && {_damage > LIMPING_DAMAGE_THRESHOLD} && {_bodyPartNToAdd > 3}) then { + if (_causeLimping == 1 && {_woundDamage > LIMPING_DAMAGE_THRESHOLD} && {_bodyPartNToAdd > 3}) then { [_unit, true] call EFUNC(medical_engine,setLimping); }; @@ -85,13 +86,13 @@ private _bodyPartDamage = _unit getVariable [QEGVAR(medical,bodyPartDamage), [0, private _createNewWound = true; { _x params ["", "_classID", "_bodyPartN", "_oldAmountOf", "_oldBleeding", "_oldDamage", "_oldCategory"]; - if (_woundClassIDToAdd == _classID && {_bodyPartNToAdd == _bodyPartN && {(_damage < PENETRATION_THRESHOLD) isEqualTo (_oldDamage < PENETRATION_THRESHOLD)}}) then { + if (_woundClassIDToAdd == _classID && {_bodyPartNToAdd == _bodyPartN && {(_woundDamage < PENETRATION_THRESHOLD) isEqualTo (_oldDamage < PENETRATION_THRESHOLD)}}) then { if (_oldCategory == _category) exitWith { private _newAmountOf = _oldAmountOf + 1; _x set [3, _newAmountOf]; private _newBleeding = (_oldAmountOf * _oldBleeding + _bleeding) / _newAmountOf; _x set [4, _newBleeding]; - private _newDamage = (_oldAmountOf * _oldDamage + _damage) / _newAmountOf; + private _newDamage = (_oldAmountOf * _oldDamage + _woundDamage) / _newAmountOf; _x set [5, _newDamage]; _createNewWound = false; }; @@ -107,12 +108,11 @@ _unit setVariable [QEGVAR(medical,openWounds), _openWounds, true]; _unit setVariable [QEGVAR(medical,bodyPartDamage), _bodyPartDamage, true]; [_unit, _bodyPart] call EFUNC(medical_engine,updateBodyPartVisuals); +[_unit, _painLevel] call EFUNC(medical,adjustPainLevel); +[_unit, "hit", PAIN_TO_SCREAM(_painLevel)] call EFUNC(medical_engine,playInjuredSound); if (_critialDamage || {_painLevel > PAIN_UNCONSCIOUS}) then { [_unit] call EFUNC(medical,handleIncapacitation); }; -[_unit, _painLevel] call EFUNC(medical,adjustPainLevel); -[_unit, "hit", PAIN_TO_SCREAM(_painLevel)] call EFUNC(medical_engine,playInjuredSound); - TRACE_5("exit",_unit,_painLevel,_unit getVariable QEGVAR(medical,pain),_unit getVariable QEGVAR(medical,openWounds),_woundsCreated); diff --git a/addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf b/addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf index e5ccd02922..9dcd25521d 100644 --- a/addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf +++ b/addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf @@ -76,8 +76,10 @@ private _critialDamage = false; private _bodyPartDamage = _unit getVariable [QEGVAR(medical,bodyPartDamage), [0,0,0,0,0,0]]; private _woundsCreated = []; { - if (_x select 0 <= _damage) exitWith { - for "_i" from 0 to ((_x select 1)-1) do { + _x params ["_thresholdMinDam", "_thresholdWoundCount"]; + if (_thresholdMinDam <= _damage) exitWith { + private _woundDamage = _damage / (_thresholdWoundCount max 1); // If the damage creates multiple wounds + for "_i" from 0 to (_thresholdWoundCount-1) do { // Find the injury we are going to add. Format [ classID, allowdSelections, bleedingRate, injuryPain] private _oldInjury = if (random 1 >= 0.85) then { _woundTypes select _highestPossibleSpot @@ -89,42 +91,44 @@ private _woundsCreated = []; private _bodyPartNToAdd = [floor random 6, _bodyPartN] select _isSelectionSpecific; // 6 == count ALL_BODY_PARTS - _bodyPartDamage set [_bodyPartNToAdd, (_bodyPartDamage select _bodyPartNToAdd) + _damage]; + _bodyPartDamage set [_bodyPartNToAdd, (_bodyPartDamage select _bodyPartNToAdd) + _woundDamage]; // Create a new injury. Format [ID, classID, bodypart, percentage treated, bleeding rate] _injury = [_woundID, _woundClassIDToAdd, _bodyPartNToAdd, 1, _injuryBleedingRate]; // The higher the nastiness likelihood the higher the change to get a painful and bloody wound - private _nastinessLikelihood = linearConversion [0, 20, _damage, 0.5, 30, true]; - private _bloodiness = 0.01 + 0.99 * MATH_E ^ (-(random 30) / _nastinessLikelihood); - private _painfullness = 0.05 + 0.95 * MATH_E ^ (-(random 30) / _nastinessLikelihood); + private _nastinessLikelihood = linearConversion [0, 20, (_woundDamage / _thresholdWoundCount), 0.5, 30, true]; + private _bleedingModifier = 0.25 + 8 * exp ((random [-4.5, -5, -6]) / _nastinessLikelihood); + private _painModifier = 0.05 + 2 * exp (-2 / _nastinessLikelihood); - _bleeding = _injuryBleedingRate * _bloodiness; + _bleeding = _injuryBleedingRate * _bleedingModifier; + private _pain = _injuryPain * _painModifier; + _painLevel = _painLevel + _pain; + + // wound category (minor [0..0.5], medium[0.5..1.0], large[1.0+]) + private _category = floor linearConversion [0, 1, _bleedingModifier, 0, 2, true]; // wound category (minor, medium, large) private _category = floor ((0 max _bleeding min 0.1) / 0.05); _injury set [4, _bleeding]; - _injury set [5, _damage]; + _injury set [5, _woundDamage]; _injury set [6, _category]; - private _pain = _injuryPain * _painfullness; - _painLevel = _painLevel max _pain; - - if (_bodyPartNToAdd == 0 || {_bodyPartNToAdd == 1 && {_damage > PENETRATION_THRESHOLD}}) then { + if (_bodyPartNToAdd == 0 || {_bodyPartNToAdd == 1 && {_woundDamage > PENETRATION_THRESHOLD}}) then { _critialDamage = true; }; #ifdef DEBUG_MODE_FULL - systemChat format["%1, damage: %2, peneration: %3, bleeding: %4, pain: %5", _bodyPart, round(_damage * 100) / 100, _damage > PENETRATION_THRESHOLD, round(_bleeding * 1000) / 1000, round(_pain * 1000) / 1000]; + systemChat format["%1, damage: %2, peneration: %3, bleeding: %4, pain: %5", _bodyPart, round(_woundDamage * 100) / 100, _woundDamage > PENETRATION_THRESHOLD, round(_bleeding * 1000) / 1000, round(_pain * 1000) / 1000]; #endif - if (_bodyPartNToAdd == 0 && {_damage > LETHAL_HEAD_DAMAGE_THRESHOLD}) then { + if (_bodyPartNToAdd == 0 && {_woundDamage > LETHAL_HEAD_DAMAGE_THRESHOLD}) then { [QEGVAR(medical,FatalInjury), _unit] call CBA_fnc_localEvent; }; // todo `forceWalk` based on leg damage private _causeLimping = (GVAR(woundsData) select _woundClassIDToAdd) select 7; - if (_causeLimping == 1 && {_damage > LIMPING_DAMAGE_THRESHOLD} && {_bodyPartNToAdd > 3}) then { + if (_causeLimping == 1 && {_woundDamage > LIMPING_DAMAGE_THRESHOLD} && {_bodyPartNToAdd > 3}) then { [_unit, true] call EFUNC(medical_engine,setLimping); }; @@ -132,13 +136,13 @@ private _woundsCreated = []; private _createNewWound = true; { _x params ["", "_classID", "_bodyPartN", "_oldAmountOf", "_oldBleeding", "_oldDamage", "_oldCategory"]; - if (_woundClassIDToAdd == _classID && {_bodyPartNToAdd == _bodyPartN && {(_damage < PENETRATION_THRESHOLD) isEqualTo (_oldDamage < PENETRATION_THRESHOLD)}}) then { + if (_woundClassIDToAdd == _classID && {_bodyPartNToAdd == _bodyPartN && {(_woundDamage < PENETRATION_THRESHOLD) isEqualTo (_oldDamage < PENETRATION_THRESHOLD)}}) then { if (_oldCategory == _category) exitWith { private _newAmountOf = _oldAmountOf + 1; _x set [3, _newAmountOf]; private _newBleeding = (_oldAmountOf * _oldBleeding + _bleeding) / _newAmountOf; _x set [4, _newBleeding]; - private _newDamage = (_oldAmountOf * _oldDamage + _damage) / _newAmountOf; + private _newDamage = (_oldAmountOf * _oldDamage + _woundDamage) / _newAmountOf; _x set [5, _newDamage]; _createNewWound = false; }; @@ -163,11 +167,11 @@ _unit setVariable [QEGVAR(medical,bodyPartDamage), _bodyPartDamage, true]; [_unit, _bodyPart] call EFUNC(medical_engine,updateBodyPartVisuals); +[_unit, _painLevel] call EFUNC(medical,adjustPainLevel); +[_unit, "hit", PAIN_TO_SCREAM(_painLevel)] call EFUNC(medical_engine,playInjuredSound); + if (_critialDamage || {_painLevel > PAIN_UNCONSCIOUS}) then { [_unit] call EFUNC(medical,handleIncapacitation); }; -[_unit, _painLevel] call EFUNC(medical,adjustPainLevel); -[_unit, "hit", PAIN_TO_SCREAM(_painLevel)] call EFUNC(medical_engine,playInjuredSound); - TRACE_5("exit",_unit,_painLevel,_unit getVariable QEGVAR(medical,pain),_unit getVariable QEGVAR(medical,openWounds),_woundsCreated); diff --git a/addons/medical_engine/functions/fnc_handleDamage.sqf b/addons/medical_engine/functions/fnc_handleDamage.sqf index f9a7c30539..1e00d07fdf 100644 --- a/addons/medical_engine/functions/fnc_handleDamage.sqf +++ b/addons/medical_engine/functions/fnc_handleDamage.sqf @@ -113,10 +113,26 @@ if (_hitPoint isEqualTo "ace_hdbracket") exitWith { }; _ammo = "#falling"; } else { - // Assume collision damage. - // @todo, find a method for detecting burning damage. - _woundedHitPoint = "Body"; - _ammo = "#collision"; + if (_receivedDamage > 0.1) then { + // Assume collision damage. + _woundedHitPoint = "Body"; + _ammo = "#vehiclecrash"; + } else { + // Probably fire damage: + _woundedHitPoint = selectRandom ["LeftLeg", "RightLeg", "Body"]; + _ammo = "#unknown"; + private _combinedDamage = _receivedDamage + (_unit getVariable [QGVAR(trivialDamage), 0]); + if (_combinedDamage > 0.1) then { + // if the new sum is large enough, reset variable and continue with it added in + _unit setVariable [QGVAR(trivialDamage), 0]; + TRACE_2("Using sum of trivialDamage",_receivedDamage,_combinedDamage); + _receivedDamage = _combinedDamage; + } else { + // otherwise just save the new sum into the variable and exit + _unit setVariable [QGVAR(trivialDamage), _combinedDamage]; + _receivedDamage = 0; + }; + }; }; }; diff --git a/addons/minedetector/CfgVehicles.hpp b/addons/minedetector/CfgVehicles.hpp index 14273b108c..ab6c06b4cb 100644 --- a/addons/minedetector/CfgVehicles.hpp +++ b/addons/minedetector/CfgVehicles.hpp @@ -1,9 +1,9 @@ class CfgVehicles { class Box_NATO_Support_F; class ACE_Box_Misc: Box_NATO_Support_F { - class TransportItems { - MACRO_ADDITEM(ACE_VMM3,4); - MACRO_ADDITEM(ACE_VMH3,4); + class TransportWeapons { + MACRO_ADDWEAPON(ACE_VMM3,4); + MACRO_ADDWEAPON(ACE_VMH3,4); }; }; diff --git a/addons/minedetector/stringtable.xml b/addons/minedetector/stringtable.xml index 14ff729334..456873d2c4 100644 --- a/addons/minedetector/stringtable.xml +++ b/addons/minedetector/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -10,6 +10,7 @@ Wykrywacz metali Metalldetektor 지뢰탐지기 + Metal detector Metal detector @@ -20,6 +21,7 @@ Wykrywacz metali Metalldetektor 지뢰탐지기 + Metal detector Activate @@ -30,6 +32,7 @@ Aktywuj Aktivieren 작동 + Attiva Deactivate @@ -40,6 +43,7 @@ Deaktywuj Deaktivieren 끄기 + Disattiva Connect Headphones @@ -50,6 +54,7 @@ Kopfhörer verbinden 헤드폰에 연결 Connecter les écouteurs + Connetti Auricolari Disconnect Headphones @@ -60,6 +65,7 @@ Kopfhörer trennen 헤드폰 연결끊기 Déconnecter les écouteurs + Disconnetti Auricolari Headphones Connected @@ -70,6 +76,7 @@ Kopfhörer verbunden 헤드폰 연결됨 Écouteurs connectés + Auricolari Connessi Headphones Disconnected @@ -80,7 +87,7 @@ Kopfhörer getrennt 헤드폰 연결끊김 Écouteurs déconnectés + Auricolari Disconnessi - diff --git a/addons/missileguidance/CfgAmmo.hpp b/addons/missileguidance/CfgAmmo.hpp index 49fa40331e..7c2fb90d22 100644 --- a/addons/missileguidance/CfgAmmo.hpp +++ b/addons/missileguidance/CfgAmmo.hpp @@ -14,7 +14,7 @@ class CfgAmmo { laserLock = 0; manualControl = 0; maxSpeed = 300; - + EGVAR(rearm,caliber) = 70; class ADDON { @@ -45,26 +45,6 @@ class CfgAmmo { }; }; - class ACE_Hellfire_AGM114K: ACE_Hydra70_DAGR { - displayName = CSTRING(Hellfire_AGM114K); - displayNameShort = CSTRING(Hellfire_AGM114K_Short); - - description = CSTRING(Hellfire_AGM114K_desc); - descriptionShort = CSTRING(Hellfire_AGM114K_desc); - - // @TODO: placeholder model to at least make it look different - model = "\A3\Weapons_F\Ammo\Missile_AT_03_fly_F"; - proxyShape = "\A3\Weapons_F\Ammo\Missile_AT_03_F"; - - hit = 1400; - indirectHit = 71; - indirectHitRange = 4.5; - effectsMissile = "missile2"; - - //Explicity add guidance config - class ADDON: ADDON {}; - }; - // Titan class M_Titan_AT: MissileBase {}; @@ -109,7 +89,7 @@ class CfgAmmo { 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" }; diff --git a/addons/missileguidance/CfgMagazines.hpp b/addons/missileguidance/CfgMagazines.hpp index e4a84862ae..7cc33b17a3 100644 --- a/addons/missileguidance/CfgMagazines.hpp +++ b/addons/missileguidance/CfgMagazines.hpp @@ -24,30 +24,4 @@ class CfgMagazines { descriptionShort = "24 Round DAGR"; weight = 72; }; - - // Hellfires - class 6Rnd_ACE_Hellfire_AGM114K : 12Rnd_PG_missiles { - count = 12; - ammo = "ACE_Hellfire_AGM114K"; - displayName = "6Rnd_ACE_Hellfire_AGM114K"; - displayNameShort = "6Rnd_ACE_Hellfire_AGM114K"; - descriptionShort = "6Rnd_ACE_Hellfire_AGM114K"; - weight = 36; - - }; - class 12Rnd_ACE_Hellfire_AGM114K : 6Rnd_ACE_Hydra70_DAGR { - count = 12; - displayName = "12Rnd_ACE_Hellfire_AGM114K"; - displayNameShort = "12Rnd_ACE_Hellfire_AGM114K"; - descriptionShort = "12Rnd_ACE_Hellfire_AGM114K"; - weight = 72; - }; - class 24Rnd_ACE_Hellfire_AGM114K : 6Rnd_ACE_Hydra70_DAGR { - count = 24; - displayName = "24Rnd_ACE_Hellfire_AGM114K"; - displayNameShort = "24Rnd_ACE_Hellfire_AGM114K"; - descriptionShort = "24Rnd_ACE_Hellfire_AGM114K"; - weight = 72; - }; - }; diff --git a/addons/missileguidance/CfgVehicles.hpp b/addons/missileguidance/CfgVehicles.hpp deleted file mode 100644 index 6aae81b316..0000000000 --- a/addons/missileguidance/CfgVehicles.hpp +++ /dev/null @@ -1,32 +0,0 @@ -class CfgVehicles { - class Air; - class Helicopter: Air { - class Turrets; - }; - class Helicopter_Base_F: Helicopter { - class Turrets: Turrets { - class MainTurret; - }; - }; - class Heli_Attack_01_base_F: Helicopter_Base_F { - class Turrets: Turrets { - class MainTurret: MainTurret {}; - }; - }; - class B_Heli_Attack_01_F: Heli_Attack_01_base_F {}; - class ACE_Comanche_Test : B_Heli_Attack_01_F { // Comanche testbed (Hidden: Scope=1) - scope = 1; - scopeCurator = 0; - displayName = "ACE_Comanche_Test"; - author = "ACE Team"; - class Library { - libTextDesc = "ACE_Comanche_Test"; - }; - class Turrets: Turrets { - class MainTurret: MainTurret { - weapons[] = {"gatling_20mm", "ace_missileguidance_dagr", "Laserdesignator_mounted"}; - magazines[] = {"ACE_500Rnd_20mm_shells_Comanche", "6Rnd_ACE_Hydra70_DAGR", "Laserbatteries"}; - }; - }; - }; -}; diff --git a/addons/missileguidance/config.cpp b/addons/missileguidance/config.cpp index c97a542a7f..ce75e277b4 100644 --- a/addons/missileguidance/config.cpp +++ b/addons/missileguidance/config.cpp @@ -20,4 +20,3 @@ class CfgPatches { #include "CfgAmmo.hpp" #include "CfgMagazines.hpp" #include "CfgWeapons.hpp" -#include "CfgVehicles.hpp" diff --git a/addons/missileguidance/functions/fnc_cycleAttackProfileKeyDown.sqf b/addons/missileguidance/functions/fnc_cycleAttackProfileKeyDown.sqf index 05db3748da..dcc9d7c607 100644 --- a/addons/missileguidance/functions/fnc_cycleAttackProfileKeyDown.sqf +++ b/addons/missileguidance/functions/fnc_cycleAttackProfileKeyDown.sqf @@ -28,7 +28,8 @@ if (((vehicle ACE_player) == ACE_player) || {ACE_player call CBA_fnc_canUseWeapo _currentMagazine = currentMagazine ACE_player; } else { _currentShooter = vehicle ACE_player; - _currentMagazine = _currentShooter currentMagazineTurret (ACE_player call CBA_fnc_turretPath); + private _turretPath = if (ACE_player == (driver _currentShooter)) then {[-1]} else {ACE_player call CBA_fnc_turretPath}; + _currentMagazine = _currentShooter currentMagazineTurret _turretPath; }; if (_currentMagazine == "") exitWith {TRACE_1("no magazine",_currentMagazine)}; diff --git a/addons/missileguidance/functions/fnc_onFired.sqf b/addons/missileguidance/functions/fnc_onFired.sqf index 224cfb14ec..bf7d81331e 100644 --- a/addons/missileguidance/functions/fnc_onFired.sqf +++ b/addons/missileguidance/functions/fnc_onFired.sqf @@ -115,6 +115,15 @@ private _args = [_this, [ diag_tickTime, [], [], _lastKnownPosState] ]; + +// Run the "onFired" function passing the full guidance args array +private _onFiredFunc = getText (_config >> "onFired"); +TRACE_1("",_onFiredFunc); +if (_onFiredFunc != "") then { + _args call (missionNamespace getVariable _onFiredFunc); +}; + + // Reverse: // _args params ["_firedEH", "_launchParams", "_flightParams", "_seekerParams", "_stateParams"]; // _firedEH params ["_shooter","","","","_ammo","","_projectile"]; diff --git a/addons/mx2a/CfgVehicles.hpp b/addons/mx2a/CfgVehicles.hpp index c450133ba7..51038b9625 100644 --- a/addons/mx2a/CfgVehicles.hpp +++ b/addons/mx2a/CfgVehicles.hpp @@ -6,15 +6,15 @@ class CfgVehicles { scopeCurator = 2; displayName = CSTRING(DisplayName); vehicleClass = "Items"; - class TransportWeapons { - MACRO_ADDWEAPON(ACE_MX2A,1); + class TransportItems { + MACRO_ADDITEM(ACE_MX2A,1); }; }; class Box_NATO_Support_F; class ACE_Box_Misc: Box_NATO_Support_F { - class TransportWeapons { - MACRO_ADDWEAPON(ACE_MX2A,6); + class TransportItems { + MACRO_ADDITEM(ACE_MX2A,6); }; }; }; diff --git a/addons/nametags/functions/fnc_doShow.sqf b/addons/nametags/functions/fnc_doShow.sqf index 1f689704b9..c21d587c0b 100644 --- a/addons/nametags/functions/fnc_doShow.sqf +++ b/addons/nametags/functions/fnc_doShow.sqf @@ -14,7 +14,7 @@ * Public: No */ #include "script_component.hpp" -#include "common.hpp"; +#include "common.hpp" private ["_roleImages", "_player", "_vehicle", "_type", "_config", "_text", "_data", "_isAir", "_turretUnits", "_turretRoles", "_index", "_roleType", "_unit", "_toShow"]; diff --git a/addons/nametags/functions/fnc_getVehicleData.sqf b/addons/nametags/functions/fnc_getVehicleData.sqf index 1c916f81aa..59f5284faf 100644 --- a/addons/nametags/functions/fnc_getVehicleData.sqf +++ b/addons/nametags/functions/fnc_getVehicleData.sqf @@ -18,7 +18,7 @@ * Public: No */ #include "script_component.hpp" -#include "common.hpp"; +#include "common.hpp" params ["_type"]; diff --git a/addons/nametags/stringtable.xml b/addons/nametags/stringtable.xml index 628384bc19..9a4acbe108 100644 --- a/addons/nametags/stringtable.xml +++ b/addons/nametags/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -469,6 +469,7 @@ Ukryj na brzegach ekranu 화면 가장자리에서 사라짐 Estomper sur les bords de l'écran + Sfocatura nei bordi dello schermo diff --git a/addons/nlaw/$PBOPREFIX$ b/addons/nlaw/$PBOPREFIX$ new file mode 100644 index 0000000000..cbcdbb46de --- /dev/null +++ b/addons/nlaw/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\nlaw diff --git a/addons/nlaw/ACE_GuidanceConfig.hpp b/addons/nlaw/ACE_GuidanceConfig.hpp new file mode 100644 index 0000000000..e04753d681 --- /dev/null +++ b/addons/nlaw/ACE_GuidanceConfig.hpp @@ -0,0 +1,14 @@ +class EGVAR(missileguidance,AttackProfiles) { + class GVAR(directAttack) { + name = CSTRING(directAttack); + functionName = QFUNC(attackProfile); + }; + class GVAR(overflyTopAttack): GVAR(directAttack) { + name = CSTRING(overflyTopAttack); + }; +}; +class EGVAR(missileguidance,SeekerTypes) { + class GVAR(seeker) { + functionName = QFUNC(seeker); + }; +}; diff --git a/addons/nlaw/CfgAmmo.hpp b/addons/nlaw/CfgAmmo.hpp new file mode 100644 index 0000000000..f0649b2ba4 --- /dev/null +++ b/addons/nlaw/CfgAmmo.hpp @@ -0,0 +1,55 @@ +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 { + enabled = 1; + + minDeflection = 0.0005; // Minium flap deflection for guidance + maxDeflection = 0.01; // Maximum flap deflection for guidance + incDeflection = 0.0005; // The incrmeent in which deflection adjusts. + + 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"}; + + 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)}; + showHintOnCycle = 1; + + // Run once at fired event + onFired = QFUNC(onFired); + }; + }; + + // Sub ammos used in OTA mode (see fnc_seeker.sqf) + class ACE_NLAW_Explosion: ACE_NLAW { // Based on FCS-Airburst, will explode right away + timeToLive = 0; + model = ""; + }; + class ACE_NLAW_ShapedCharge: ACE_NLAW { // Shaped charge from rocket explosion, no effects + timeToLive = 1; + model = ""; + hit = 750; + indirectHit = 0; + indirectHitRange = 0; + explosionSoundEffect = ""; + explosionEffects = ""; + CraterEffects = ""; + muzzleEffect = ""; + }; +}; diff --git a/addons/nlaw/CfgEventhandlers.hpp b/addons/nlaw/CfgEventhandlers.hpp new file mode 100644 index 0000000000..0d3301d6e0 --- /dev/null +++ b/addons/nlaw/CfgEventhandlers.hpp @@ -0,0 +1,17 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + }; +}; diff --git a/addons/nlaw/CfgMagazines.hpp b/addons/nlaw/CfgMagazines.hpp new file mode 100644 index 0000000000..fe2e2ecf8d --- /dev/null +++ b/addons/nlaw/CfgMagazines.hpp @@ -0,0 +1,6 @@ +class CfgMagazines { + class CA_LauncherMagazine; + class NLAW_F: CA_LauncherMagazine { + ammo = "ACE_NLAW"; + }; +}; diff --git a/addons/nlaw/CfgWeapons.hpp b/addons/nlaw/CfgWeapons.hpp new file mode 100644 index 0000000000..35f5b17122 --- /dev/null +++ b/addons/nlaw/CfgWeapons.hpp @@ -0,0 +1,13 @@ +class CfgWeapons { + class Launcher_Base_F; + class launch_NLAW_F: Launcher_Base_F { + GVAR(enabled) = 1; + canLock = 1; + class OpticsModes { + class optic { + distanceZoomMin = 0; + distanceZoomMax = 0; + }; + }; + }; +}; diff --git a/addons/nlaw/README.md b/addons/nlaw/README.md new file mode 100644 index 0000000000..dd62b36014 --- /dev/null +++ b/addons/nlaw/README.md @@ -0,0 +1,10 @@ +ace_nlaw +=============== + +Adds Predicted Line Of Sight guidance to the NLAW. + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [PabstMirror](https://github.com/PabstMirror) diff --git a/addons/nlaw/XEH_PREP.hpp b/addons/nlaw/XEH_PREP.hpp new file mode 100644 index 0000000000..aad1e57efb --- /dev/null +++ b/addons/nlaw/XEH_PREP.hpp @@ -0,0 +1,6 @@ +LOG("prep"); + +PREP(attackProfile); +PREP(keyDown); +PREP(onFired); +PREP(seeker); diff --git a/addons/nlaw/XEH_postInit.sqf b/addons/nlaw/XEH_postInit.sqf new file mode 100644 index 0000000000..885e2d5e2f --- /dev/null +++ b/addons/nlaw/XEH_postInit.sqf @@ -0,0 +1,46 @@ +#include "script_component.hpp" + +if (!hasInterface) exitWith {}; + +GVAR(isLockKeyDown) = false; + +// Degrees per second +GVAR(yawChange) = 0; +GVAR(pitchChange) = 0; + +// Add keybind +["ACE3 Weapons", QGVAR(trackTarget), localize LSTRING(trackTarget), { + call FUNC(keyDown); + false // Return false so it doesn't block the rest weapon action +}, { + TRACE_1("lock key up",GVAR(isLockKeyDown)); + GVAR(isLockKeyDown) = false; + false +}, [15, [false, false, false]], false] call CBA_fnc_addKeybind; //Tab Key + + + +// Visual debuging, idealy used with a moving vehicle called "testTarget" +#ifdef DRAW_NLAW_INFO +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"]; + } 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 _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"]; + } forEach [0, 1, 2, 3]; + }; +}]; +#endif diff --git a/addons/nlaw/XEH_preInit.sqf b/addons/nlaw/XEH_preInit.sqf new file mode 100644 index 0000000000..b47cf6628d --- /dev/null +++ b/addons/nlaw/XEH_preInit.sqf @@ -0,0 +1,9 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; diff --git a/addons/nlaw/XEH_preStart.sqf b/addons/nlaw/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/nlaw/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/nlaw/config.cpp b/addons/nlaw/config.cpp new file mode 100644 index 0000000000..7109459066 --- /dev/null +++ b/addons/nlaw/config.cpp @@ -0,0 +1,22 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_missileguidance"}; + author = ECSTRING(common,ACETeam); + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgEventhandlers.hpp" + +#include "CfgAmmo.hpp" +#include "CfgMagazines.hpp" +#include "CfgWeapons.hpp" + +#include "ACE_GuidanceConfig.hpp" diff --git a/addons/nlaw/functions/fnc_attackProfile.sqf b/addons/nlaw/functions/fnc_attackProfile.sqf new file mode 100644 index 0000000000..778a1924b3 --- /dev/null +++ b/addons/nlaw/functions/fnc_attackProfile.sqf @@ -0,0 +1,60 @@ +/* + * Author: PabstMirror + * NLAW missile guidance attack profile. + * + * Arguments: + * 0: Seeker Target PosASL + * 1: Guidance Arg Array + * 2: Attack Profile State + * + * Return Value: + * Missile Aim PosASL + * + * Example: + * [[1,2,3], [], []] call ace_nlaw_fnc_attackProfile + * + * Public: No + */ +#include "script_component.hpp" + +params ["_seekerTargetPos", "_args", "_attackProfileStateParams"]; +_args params ["_firedEH", "_launchParams"]; +_launchParams params ["","_targetLaunchParams", "", "_attackProfile"]; +_targetLaunchParams params ["", "", "_launchPos"]; +_firedEH params ["","","","","","","_projectile"]; + +// Use seeker (if terminal) +if (!(_seekerTargetPos isEqualTo [0,0,0])) exitWith {_seekerTargetPos}; + +_attackProfileStateParams params ["_startTime", "_startLOS", "_yawChange", "_pitchChange"]; +(_startLOS call CBA_fnc_vect2Polar) params ["", "_yaw", "_pitch"]; + +private _projectilePos = getPosASL _projectile; +private _distanceFromLaunch = (_launchPos distance _projectilePos) + 10; +private _flightTime = CBA_missionTime - _startTime; + +private _realYaw = _yaw + _yawChange * _flightTime; +private _realPitch = _pitch + _pitchChange * _flightTime; + +private _returnTargetPos = _launchPos vectorAdd ([_distanceFromLaunch, _realYaw, _realPitch] call CBA_fnc_polar2vect); + +if (_attackProfile == QGVAR(overflyTopAttack)) then { // Add 2m height in OTA attack mode + _returnTargetPos = _returnTargetPos vectorAdd [0,0,2]; +}; + + +#ifdef DRAW_NLAW_INFO +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); + 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 + +// TRACE_1("Adjusted target position", _returnTargetPos); +_returnTargetPos; diff --git a/addons/nlaw/functions/fnc_keyDown.sqf b/addons/nlaw/functions/fnc_keyDown.sqf new file mode 100644 index 0000000000..82dfbbcc2e --- /dev/null +++ b/addons/nlaw/functions/fnc_keyDown.sqf @@ -0,0 +1,81 @@ +/* + * Author: PabstMirror + * Handles the track key being held down. + * Tracks change in direction of weapon and computes angle change per second. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_nlaw_fnc_keyDown + * + * Public: No + */ +// #define DEBUG_MODE_FULL +#include "script_component.hpp" + +TRACE_1("lock key down",GVAR(isLockKeyDown)); + +if (!alive ACE_player) exitWith {}; +if (!([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith))) exitWith {}; +if (!(ACE_player call CBA_fnc_canUseWeapon)) exitWith {}; +if ((getNumber (configFile >> "CfgWeapons" >> (currentWeapon ACE_player) >> QGVAR(enabled))) == 0) exitWith {}; +if (GVAR(isLockKeyDown)) exitWith {ERROR("already running?");}; + +GVAR(isLockKeyDown) = true; +playSound "ACE_Sound_Click"; + +// Get starting weapon dir +((ACE_player weaponDirection (currentWeapon ACE_player)) call CBA_fnc_vect2Polar) params ["", "_yaw", "_pitch"]; + +[{ + params ["_args", "_pfID"]; + _args params ["_lastTime", "_lastYaw", "_lastPitch", "_initPhase"]; + + if ((!alive ACE_player) || + {!([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith))} || + {!GVAR(isLockKeyDown)} || + {!(ACE_player call CBA_fnc_canUseWeapon)} || + {(getNumber (configFile >> "CfgWeapons" >> (currentWeapon ACE_player) >> QGVAR(enabled))) == 0}) + exitWith { + TRACE_1("ending track",_pfID); + [_pfID] call CBA_fnc_removePerFrameHandler; + playSound "ACE_Sound_Click"; + + [{ // reset gvars after a short delay + TRACE_1("reset vars",_this); + GVAR(yawChange) = 0; + GVAR(pitchChange) = 0; + }, [], 0.5] call CBA_fnc_waitAndExecute; + }; + + private _deltaT = CBA_missionTime - _lastTime; + if (_deltaT == 0) exitWith {}; + if (_initPhase && {_deltaT < 0.75}) exitWith {}; + + ((ACE_player weaponDirection (currentWeapon ACE_player)) call CBA_fnc_vect2Polar) params ["", "_yaw", "_pitch"]; + private _yawChange = ([_yaw - _lastYaw] call CBA_fnc_simplifyAngle180) / _deltaT; + private _pitchChange = ([_pitch - _lastPitch] call CBA_fnc_simplifyAngle180) / _deltaT; + + if (_initPhase) then { // initial value will use first 0.75 seconds of input + GVAR(yawChange) = _yawChange; + GVAR(pitchChange) = _pitchChange; + _args set [3, false]; + } else { + // smoothing factor alpha - higher values will be more responsive to change, but also spike higher on jerky mouse movmeent + private _alpha = _deltaT / 3; + GVAR(yawChange) = (_yawChange * _alpha) + GVAR(yawChange) * (1 - _alpha); + GVAR(pitchChange) = (_pitchChange * _alpha) + GVAR(pitchChange) * (1 - _alpha); + }; + + _args set [0, CBA_missionTime]; + _args set [1, _yaw]; + _args set [2, _pitch]; + + #ifdef DEBUG_MODE_FULL + hintSilent format ["Instantaneous\nYaw: %1\n Pitch: %2\nGVAR\nYaw: %3\nPitch: %4", _yawChange, _pitchChange, GVAR(yawChange), GVAR(pitchChange)]; + #endif +}, .25, [CBA_missionTime, _yaw, _pitch, true]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/nlaw/functions/fnc_onFired.sqf b/addons/nlaw/functions/fnc_onFired.sqf new file mode 100644 index 0000000000..7049dfb918 --- /dev/null +++ b/addons/nlaw/functions/fnc_onFired.sqf @@ -0,0 +1,62 @@ +/* + * Author: PabstMirror + * Sets up missile guidance state arrays (called from missileGuidance's onFired). + * + * Arguments: + * Guidance Arg Array + * + * Return Value: + * None + * + * Example: + * [] call ace_nlaw_fnc_onFired + * + * Public: No + */ +#include "script_component.hpp" + +params ["_firedEH", "_launchParams", "_flightParams", "_seekerParams", "_stateParams"]; +_firedEH params ["_shooter","","","","","","_projectile"]; +_launchParams params ["","_targetLaunchParams","","_attackProfile"]; +_targetLaunchParams params ["_target"]; +_stateParams params ["", "", "_attackProfileStateParams"]; + +// Reset _launchPos origin as projectile's height instead of player's foot +_targetLaunchParams set [2, getPosASL _projectile]; + +// Get state params: +TRACE_3("start of attack profile",_attackProfile,_shooter,vectorDir _projectile); + +private _firedLOS = _shooter weaponDirection (currentWeapon _shooter); +private _yawChange = 0; +private _pitchChange = 0; + +if (_shooter == ACE_player) then { + TRACE_2("isPlayer",GVAR(yawChange),GVAR(pitchChange)); + _yawChange = GVAR(yawChange); + _pitchChange = GVAR(pitchChange); + TRACE_1("los check",_firedLOS call CBA_fnc_vect2Polar); +} else { + if ((!isNil "_target") && {!isNull _target}) then { + _firedLOS = (getPosASL _projectile) vectorFromTo (aimPos _target); + (((eyePos _shooter) vectorFromTo (aimPos _target)) call CBA_fnc_vect2Polar) params ["", "_startYaw", "_startPitch"]; + // Add some random error to AI's velocity prediction: + private _random = random [(_shooter skillFinal "aimingAccuracy") min 0.9, 1, 2-((_shooter skillFinal "aimingAccuracy") min 0.9)]; + (((eyePos _shooter) vectorFromTo ((aimPos _target) vectorAdd ((velocity _target) vectorMultiply (_random)))) call CBA_fnc_vect2Polar) params ["", "_predictedYaw", "_predictedPitch"]; + _yawChange = ([_predictedYaw - _startYaw] call CBA_fnc_simplifyAngle180); + _pitchChange = ([_predictedPitch - _startPitch] call CBA_fnc_simplifyAngle180); + TRACE_1("AI",_target); + } else { + TRACE_1("AI - no target",_target); + }; +}; + +// Limit Max Deflection +_yawChange = -10 max _yawChange min 10; +_pitchChange = -10 max _pitchChange min 10; + +TRACE_3("attackProfileStateParams",_firedLOS,_yawChange,_pitchChange); +_attackProfileStateParams set [0, CBA_missionTime]; +_attackProfileStateParams set [1, _firedLOS]; +_attackProfileStateParams set [2, _yawChange]; +_attackProfileStateParams set [3, _pitchChange]; diff --git a/addons/nlaw/functions/fnc_seeker.sqf b/addons/nlaw/functions/fnc_seeker.sqf new file mode 100644 index 0000000000..850c966f56 --- /dev/null +++ b/addons/nlaw/functions/fnc_seeker.sqf @@ -0,0 +1,94 @@ +/* + * Author: PabstMirror + * Handles the top down attack seeker for missile guidance. + * Has a very short range (IR/Magnetic?) seeker that will trigger the shaped charge midair above the target. + * + * Arguments: + * 1: Guidance Arg Array + * 2: Seeker State + * + * Return Value: + * Seeker Pos + * + * Example: + * [] call ace_nlaw_fnc_seeker + * + * Public: No + */ +// #define DEBUG_MODE_FULL +#include "script_component.hpp" + +params ["", "_args", "_seekerStateParams"]; +_args params ["_firedEH", "_launchParams", "", "_seekerParams", "_stateParams"]; +_firedEH params ["","","","","","","_projectile"]; +_launchParams params ["", "_targetLaunchParams", "", "_attackProfile"]; +_targetLaunchParams params ["", "", "_launchPos"]; + +if (_attackProfile == QGVAR(directAttack)) exitWith {[0,0,0]}; + +private _projPos = getPosASL _projectile; + +// Arm seeker after 20 meters +if ((_projPos distance _launchPos) >= 20) then { + scopeName "targetScan"; + BEGIN_COUNTER(targetScan); + + if (_seekerStateParams isEqualTo []) then { + TRACE_2("Seeker Armed",_projPos distance _launchPos,diag_fps); + _seekerStateParams set [0, _projPos]; // Set _lastPos to current position + }; + + _seekerStateParams params ["_lastPos", "_terminal"]; + if (_terminal) exitWith {}; + + private _vectorDir = _lastPos vectorFromTo _projPos; + private _frameDistance = _lastPos vectorDistance _projPos; + + // Distance traveled depends on velocity and FPS - at 60fps it will be ~4m + // Step size will effect accuracy and performance costs + for "_stepSize" from 0 to _frameDistance step 0.5 do { + // 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]]; + #endif + + // Limit scan to 5 meters directly down (shaped charge jet has a very limited range) + private _res = lineIntersectsSurfaces [_virtualPos, (_virtualPos vectorAdd [0,0,-5]), _projectile]; + if (!(_res isEqualTo [])) 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); + _virtualPos = _virtualPos vectorAdd (_vectorDir vectorMultiply 1.25); + + deleteVehicle _projectile; + + // Damage and effects of missile exploding (timeToLive is 0 so should happen next frame) + private _explosion = "ACE_NLAW_Explosion" createVehicle _virtualPos; + _explosion setPosASL _virtualPos; + + // Just damage from shaped charge + private _shapedCharage = "ACE_NLAW_ShapedCharge" createVehicle _virtualPos; + _shapedCharage setPosASL _virtualPos; + _shapedCharage setVectorDirAndUp [[0,0,-1], [1,0,0]]; + _shapedCharage setVelocity [0,0,-300]; + + _seekerStateParams set [1, true]; + + END_COUNTER(targetScan); + breakOut "targetScan"; + }; + }; + }; + _seekerStateParams set [0, _projPos]; + END_COUNTER(targetScan); +}; + +// Exploded, return dummy value +if (_seekerStateParams param [1, false]) exitWith { + [0,0,1] +}; + +// return: +[0,0,0] diff --git a/addons/nlaw/functions/script_component.hpp b/addons/nlaw/functions/script_component.hpp new file mode 100644 index 0000000000..50d8cac4c1 --- /dev/null +++ b/addons/nlaw/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\nlaw\script_component.hpp" diff --git a/addons/nlaw/script_component.hpp b/addons/nlaw/script_component.hpp new file mode 100644 index 0000000000..2cabaf7e47 --- /dev/null +++ b/addons/nlaw/script_component.hpp @@ -0,0 +1,18 @@ +#define COMPONENT nlaw +#define COMPONENT_BEAUTIFIED NLAW +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DRAW_NLAW_INFO +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_NLAW + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_NLAW + #define DEBUG_SETTINGS DEBUG_SETTINGS_NLAW +#endif + +#include "\z\ace\addons\main\script_macros.hpp" diff --git a/addons/nlaw/stringtable.xml b/addons/nlaw/stringtable.xml new file mode 100644 index 0000000000..14432e4089 --- /dev/null +++ b/addons/nlaw/stringtable.xml @@ -0,0 +1,14 @@ + + + + + NLAW Track Target (Hold) + + + Direct Attack + + + Overfly Top Attack + + + diff --git a/addons/optionsmenu/stringtable.xml b/addons/optionsmenu/stringtable.xml index 6d5b70baa7..58929567af 100644 --- a/addons/optionsmenu/stringtable.xml +++ b/addons/optionsmenu/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -24,7 +24,7 @@ Napraw animację Corriger animation Animációk kijavítása - Fixa l'animazione + Sistema l'animazione Arrumar Animação アニメーションを修正 동작 고정 @@ -150,7 +150,7 @@ Tableau. Séparation par ,. Tabulka. Odděl elementy použitím ,. Array. Válasszad el az elemeket vesszővel. - Array. Separa gli elementi usando ,. + Vettor. Separa gli elementi usando ,. Vetor. Separe elementos usando *,*. アライ。,を使うことで区別できます。 배열. 요소를 ,. 로 나눔 @@ -445,7 +445,7 @@ Fix Headbug Fix Headbug Corregir error de cabeza (headbug) - Sistema Headbug + Sistema Bug della Testa ヘッドバグ修正 헤드버그 수정 @@ -473,7 +473,7 @@ Nouveautés ACE ACE hírek Новости ACE - News ACE + Novità ACE ACE からのお知らせ ACE 새소식 diff --git a/addons/overheating/CfgVehicles.hpp b/addons/overheating/CfgVehicles.hpp index a096754ce3..2d6a48b7b3 100644 --- a/addons/overheating/CfgVehicles.hpp +++ b/addons/overheating/CfgVehicles.hpp @@ -68,62 +68,62 @@ class CfgVehicles { class FIA_Box_Base_F; class Box_NATO_Support_F: NATO_Box_Base { - class TransportItems { - MACRO_ADDITEM(ACE_SpareBarrel,2); + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_SpareBarrel,2); }; }; class B_supplyCrate_F: ReammoBox_F { - class TransportItems { - MACRO_ADDITEM(ACE_SpareBarrel,2); + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_SpareBarrel,2); }; }; class Box_East_Support_F: EAST_Box_Base { - class TransportItems { - MACRO_ADDITEM(ACE_SpareBarrel,2); + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_SpareBarrel,2); }; }; class O_supplyCrate_F: B_supplyCrate_F { - class TransportItems { - MACRO_ADDITEM(ACE_SpareBarrel,2); + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_SpareBarrel,2); }; }; class Box_IND_Support_F: IND_Box_Base { - class TransportItems { - MACRO_ADDITEM(ACE_SpareBarrel,2); + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_SpareBarrel,2); }; }; class Box_FIA_Support_F: FIA_Box_Base_F { - class TransportItems { - MACRO_ADDITEM(ACE_SpareBarrel,2); + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_SpareBarrel,2); }; }; class I_supplyCrate_F: B_supplyCrate_F { - class TransportItems { - MACRO_ADDITEM(ACE_SpareBarrel,2); + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_SpareBarrel,2); }; }; class IG_supplyCrate_F: ReammoBox_F { - class TransportItems { - MACRO_ADDITEM(ACE_SpareBarrel,2); + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_SpareBarrel,2); }; }; class C_supplyCrate_F: ReammoBox_F { - class TransportItems { - MACRO_ADDITEM(ACE_SpareBarrel,2); + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_SpareBarrel,2); }; }; class ACE_Box_Misc: Box_NATO_Support_F { - class TransportItems { - MACRO_ADDITEM(ACE_SpareBarrel,6); + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_SpareBarrel,6); }; }; }; diff --git a/addons/overheating/functions/fnc_canCheckSpareBarrelsTemperatures.sqf b/addons/overheating/functions/fnc_canCheckSpareBarrelsTemperatures.sqf index 29c08275ef..1ac1e04492 100644 --- a/addons/overheating/functions/fnc_canCheckSpareBarrelsTemperatures.sqf +++ b/addons/overheating/functions/fnc_canCheckSpareBarrelsTemperatures.sqf @@ -11,7 +11,8 @@ * Public: No */ #include "script_component.hpp" -params ["_unit"]; + +params ["_player"]; //Get the classname of the spare barrel for the weapon private _weaponBarrelClass = getText (configFile >> 'CfgWeapons' >> currentWeapon _player >> QGVAR(barrelClassname)); @@ -22,4 +23,4 @@ if(_weaponBarrelClass == "") then { //Check if the player has the barrel and the weapon can have its barrel swapped private _canCheckTemperature = GVAR(enabled) && {_weaponBarrelClass in magazines _player}; -_canCheckTemperature; \ No newline at end of file +_canCheckTemperature; diff --git a/addons/overheating/functions/fnc_getWeaponData.sqf b/addons/overheating/functions/fnc_getWeaponData.sqf index b1525f0f41..d1a9bdc8bb 100644 --- a/addons/overheating/functions/fnc_getWeaponData.sqf +++ b/addons/overheating/functions/fnc_getWeaponData.sqf @@ -14,6 +14,8 @@ */ #include "script_component.hpp" +params ["_weapon"]; + // Look in the cache first private _weaponData = GVAR(cacheWeaponData) getVariable _weapon; if (!isNil "_weaponData") exitWith {_weaponData}; diff --git a/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf b/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf index 0bb240533c..aaefe4f037 100644 --- a/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf +++ b/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf @@ -18,7 +18,10 @@ private _pairs = []; TRACE_1("updateSpareBarrelsTemperaturesThread1",GVAR(storedSpareBarrels)); -[GVAR(storedSpareBarrels), {_pairs pushBack [_key, _value];}] call CBA_fnc_hashEachPair; +[GVAR(storedSpareBarrels), { + //IGNORE_PRIVATE_WARNING ["_key", "_value"]; + _pairs pushBack [_key, _value]; +}] call CBA_fnc_hashEachPair; TRACE_1("updateSpareBarrelsTemperaturesThread2",_pairs); { _x params ["_barrelMagazineID","_value"]; diff --git a/addons/overheating/stringtable.xml b/addons/overheating/stringtable.xml index 8c2eef1732..faa0462893 100644 --- a/addons/overheating/stringtable.xml +++ b/addons/overheating/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -266,7 +266,7 @@ Смена ствола... Cső kicserélése folyamatban... Substituindo cano... - Sto sostituendo la canna... + Sostituendo la canna... 銃身を交換中・・・ 총열 교체중... @@ -321,7 +321,7 @@ Hőmérséklet ellenőrzése... Zjišťuju teplotu... Conferindo temperatura... - Sto controllando la temperatura... + Controllando la temperatura... Проверка температуры... 温度を測っている・・・ 무기 온도 확인중... @@ -336,6 +336,7 @@ Sprawdź temperaturę zapasowych luf Temperatur der Wechselläufe prüfen 총열 온도 확인 + Controlla la temperatura della canna di ricambio Checking spare barrels temperatures... @@ -347,6 +348,7 @@ Sprawdzanie temperatury zapasowych luf... Prüfe Temperatur der Wechselläufe ... 총열 온도 확인중... + Controllando la temperatura della canna di ricambio... Temperature @@ -372,6 +374,7 @@ Zimne zapasowe lufy Kalte Wechselläufe 차가운 예비 총열 + Canna/e di Ricambio Fredda Warm Spare Barrel/s @@ -383,6 +386,7 @@ Ciepłe zapasowe lufy Warme Wechselläufe 따뜻한 예비 총열 + Canna/e di Ricambio Calda Hot Spare Barrel/s @@ -394,6 +398,7 @@ Gorące zapasowe lufy Heiße Wechselläufe 뜨거운 예비 총열 + Canna/e di Ricambio Molto Calda Very Hot Spare Barrel/s @@ -405,6 +410,7 @@ Bardzo gorące zapasowe lufy Sehr heiße Wechselläufe 매우 뜨거운 예비 총열 + Canna/e di Ricambio Estremamente Calda Extremely Hot Spare Barrel/s @@ -416,6 +422,7 @@ Ekstremalnie gorące zapasowe lufy Extrem heiße Wechselläufe 엄청나게 뜨거운 예비 총열 + Canna/e di Ricambio Rovente Overheating Enabled @@ -428,6 +435,7 @@ 過熱を有効化 Przegrzewanie włączone 과열 활성화 + Surriscaldamento Abilitato Master enable for the overheating/jamming module @@ -438,6 +446,7 @@ Główny włącznik modułu przegrzewania/zacinania się broni Hauptschalter, um die Überhitzung-/Ladehemmung-Module zu aktivieren 과열/탄걸림 최종 활성화 + Abilitazione master per il modulo di surriscaldamento / inceppamento diff --git a/addons/overpressure/stringtable.xml b/addons/overpressure/stringtable.xml index 89d8cf8b2d..a982ec488c 100644 --- a/addons/overpressure/stringtable.xml +++ b/addons/overpressure/stringtable.xml @@ -7,6 +7,7 @@ 초과압력 거리 계수 Mnożnik dystansu nadciśnienia Coéfficient de distance pour la surpression + Coefficente Distanza Sovrapressione Scales the overpressure effect [Default: 1] @@ -14,6 +15,7 @@ 초과압력의 효과 크기 [기본설정: 1] Skaluje efekt nadciśnienia [Domyślne: 1] Échelonne les effets de la surpression [Par défaut : 1] + Scala l'effetto di sovrapressione [Predefinito: 1] diff --git a/addons/quickmount/$PBOPREFIX$ b/addons/quickmount/$PBOPREFIX$ new file mode 100644 index 0000000000..2251bc0b6e --- /dev/null +++ b/addons/quickmount/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\quickmount diff --git a/addons/quickmount/ACE_Settings.hpp b/addons/quickmount/ACE_Settings.hpp new file mode 100644 index 0000000000..bcb45f8c43 --- /dev/null +++ b/addons/quickmount/ACE_Settings.hpp @@ -0,0 +1,41 @@ +class ACE_Settings { + class GVAR(enabled) { + value = 0; + typeName = "BOOL"; + category = CSTRING(Category); + displayName = ECSTRING(common,Enabled); + description = CSTRING(KeybindDescription); + isClientSettable = 1; + force = 0; + }; + class GVAR(distance) { + value = DEFAULT_DISTANCE; + typeName = "SCALAR"; + category = CSTRING(Category); + displayName = CSTRING(Distance); + description = CSTRING(DistanceDescription); + isClientSettable = 0; + force = 0; + values[] = {"0m", "1m", "2m", "3m", "4m", "5m", "6m", "7m", "8m", "9m", "10m"}; + }; + class GVAR(speed) { + value = DEFAULT_SPEED; + typeName = "SCALAR"; + category = CSTRING(Category); + displayName = CSTRING(Speed); + description = CSTRING(SpeedDescription); + isClientSettable = 0; + force = 0; + values[] = {"0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"}; + }; + class GVAR(priority) { + value = DEFAULT_PRIORITY; + typeName = "SCALAR"; + category = CSTRING(Category); + displayName = CSTRING(Priority); + description = CSTRING(PriorityDescription); + isClientSettable = 1; + force = 0; + values[] = {"Driver", "Gunner", "Commander", "Passenger"}; + }; +}; diff --git a/addons/quickmount/CfgEventHandlers.hpp b/addons/quickmount/CfgEventHandlers.hpp new file mode 100644 index 0000000000..9426fa861e --- /dev/null +++ b/addons/quickmount/CfgEventHandlers.hpp @@ -0,0 +1,17 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient)); + }; +}; diff --git a/addons/quickmount/CfgVehicles.hpp b/addons/quickmount/CfgVehicles.hpp new file mode 100644 index 0000000000..758e462900 --- /dev/null +++ b/addons/quickmount/CfgVehicles.hpp @@ -0,0 +1,37 @@ +class CfgVehicles { + class ACE_Module; + class GVAR(module): ACE_Module { + author = ECSTRING(common,ACETeam); + category = "ACE"; + displayName = CSTRING(Category); + function = QFUNC(moduleInit); + scope = 2; + isGlobal = 1; + isTriggerActivated = 0; + isDisposable = 0; + icon = QPATHTOF(UI\Icon_Module_QuickMount_ca.paa); + class Arguments { + class enabled { + displayName = ECSTRING(common,Enabled); + description = CSTRING(KeybindDescription); + typeName = "BOOL"; + defaultValue = 1; + }; + class distance { + displayName = CSTRING(Distance); + description = CSTRING(DistanceDescription); + typeName = "NUMBER"; + defaultValue = DEFAULT_DISTANCE; + }; + class speed { + displayName = CSTRING(Speed); + description = CSTRING(SpeedDescription); + typeName = "NUMBER"; + defaultValue = DEFAULT_SPEED; + }; + }; + class ModuleDescription { + description = CSTRING(KeybindDescription); + }; + }; +}; diff --git a/addons/quickmount/README.md b/addons/quickmount/README.md new file mode 100644 index 0000000000..6e11fc8ae4 --- /dev/null +++ b/addons/quickmount/README.md @@ -0,0 +1,9 @@ +ace_quickmount +============ +Adds a keybind to quickly enter the vehicle you are directly looking at. + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [Kingsley](https://github.com/jameslkingsley) diff --git a/addons/quickmount/UI/Icon_Module_QuickMount_ca.paa b/addons/quickmount/UI/Icon_Module_QuickMount_ca.paa new file mode 100644 index 0000000000..425f744a47 Binary files /dev/null and b/addons/quickmount/UI/Icon_Module_QuickMount_ca.paa differ diff --git a/addons/quickmount/XEH_PREP.hpp b/addons/quickmount/XEH_PREP.hpp new file mode 100644 index 0000000000..eba2f68296 --- /dev/null +++ b/addons/quickmount/XEH_PREP.hpp @@ -0,0 +1,2 @@ +PREP(getInNearest); +PREP(moduleInit); diff --git a/addons/quickmount/XEH_postInitClient.sqf b/addons/quickmount/XEH_postInitClient.sqf new file mode 100644 index 0000000000..718c08b843 --- /dev/null +++ b/addons/quickmount/XEH_postInitClient.sqf @@ -0,0 +1,10 @@ +#include "script_component.hpp" + +if (!hasInterface) exitWith {}; + +["ACE3 Movement", QGVAR(mount), [localize LSTRING(KeybindName), localize LSTRING(KeybindDescription)], "", { + if (!dialog) then { + call FUNC(getInNearest); + }; + false +}] call CBA_fnc_addKeybind; diff --git a/addons/quickmount/XEH_preInit.sqf b/addons/quickmount/XEH_preInit.sqf new file mode 100644 index 0000000000..b47cf6628d --- /dev/null +++ b/addons/quickmount/XEH_preInit.sqf @@ -0,0 +1,9 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; diff --git a/addons/quickmount/XEH_preStart.sqf b/addons/quickmount/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/quickmount/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/quickmount/config.cpp b/addons/quickmount/config.cpp new file mode 100644 index 0000000000..063897aebc --- /dev/null +++ b/addons/quickmount/config.cpp @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Kingsley"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "ACE_Settings.hpp" +#include "CfgVehicles.hpp" diff --git a/addons/quickmount/functions/fnc_getInNearest.sqf b/addons/quickmount/functions/fnc_getInNearest.sqf new file mode 100644 index 0000000000..43e66e648c --- /dev/null +++ b/addons/quickmount/functions/fnc_getInNearest.sqf @@ -0,0 +1,98 @@ +/* + * Author: Kingsley + * Mount the player in the vehicle they are directly looking at based on their distance. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_quickmount_fnc_getInNearest; + * + * Public: No + */ +#include "script_component.hpp" + +if (!GVAR(enabled) || + {isNull ACE_player} || + {vehicle ACE_player != ACE_player} || + {!alive ACE_player} || + {ACE_player getVariable ["ace_unconscious", false]} +) exitWith {}; + +private _start = AGLtoASL (ACE_player modelToWorldVisual (ACE_player selectionPosition "pilot")); +private _end = (_start vectorAdd (getCameraViewDirection ACE_player vectorMultiply GVAR(distance))); +private _objects = lineIntersectsSurfaces [_start, _end, ACE_player]; +private _target = (_objects param [0, []]) param [2, objNull]; + +if (locked _target in [2,3]) exitWith { + [localize LSTRING(VehicleLocked)] call EFUNC(common,displayTextStructured); + true +}; + +TRACE_1("",_target); + +if (!isNull _target && + {alive _target} && + {{_target isKindOf _x} count ["Air","LandVehicle","Ship","StaticMortar"] > 0} && + {([ACE_player, _target] call EFUNC(common,canInteractWith))} && + {speed _target <= GVAR(speed)} + ) then { + + + if (GVAR(priority) > 3 || GVAR(priority) < 0) then { + GVAR(priority) = 0; + }; + + private _seats = ["Driver", "Gunner", "Commander", "Cargo"]; + private _sortedSeats = [_seats select GVAR(priority)]; + _seats deleteAt GVAR(priority); + _sortedSeats append _seats; + + + private _hasAction = false; + scopeName "SearchForSeat"; + { + private _desiredRole = _x; + { + _x params ["_unit", "_role", "_cargoIndex", "_turretPath"]; + if ((isNull _unit) || {!alive _unit}) then { + private _effectiveRole = toLower _role; + + if ((_effectiveRole in ["driver", "gunner"]) && {unitIsUAV _target}) exitWith {}; // Ignoring UAV Driver/Gunner + if ((_effectiveRole == "driver") && {(getNumber (([_target] call CBA_fnc_getObjectConfig) >> "hasDriver")) == 0}) exitWith {}; // Ignoring Non Driver (static weapons) + if (_effectiveRole == "turret") then { + if ((getNumber (([_target, _turretPath] call CBA_fnc_getTurret) >> "isCopilot")) == 1) exitWith { + _effectiveRole = "driver"; + }; + if (_cargoIndex < 0) exitWith { + _effectiveRole = "gunner"; // door gunners / 2nd turret + }; + _effectiveRole = "cargo"; // probably a FFV + }; + TRACE_2("",_effectiveRole,_x); + if (_effectiveRole != _desiredRole) exitWith {}; + + if (_role == "Turret") then { + ACE_player action ["GetIn" + _role, _target, _turretPath]; + TRACE_3("Geting In",_x,_role,_turretPath); + } else { + ACE_player action ["GetIn" + _role, _target]; + TRACE_3("Geting In",_x,_role); + }; + + _hasAction = true; + breakTo "SearchForSeat"; + }; + } forEach (fullCrew [_target, "", true]); + } forEach _sortedSeats; + + if (!_hasAction) then { + TRACE_1("no empty seats",_hasAction); + [localize LSTRING(VehicleFull)] call EFUNC(common,displayTextStructured); + }; +}; + +true diff --git a/addons/quickmount/functions/fnc_moduleInit.sqf b/addons/quickmount/functions/fnc_moduleInit.sqf new file mode 100644 index 0000000000..92df787737 --- /dev/null +++ b/addons/quickmount/functions/fnc_moduleInit.sqf @@ -0,0 +1,25 @@ +/* + * Author: Kingsley + * Initializes the quick-mount module. + * + * Arguments: + * 0: The module logic + * 1: Units (Unused) + * 2: Activated + * + * Return Value: + * None + * + * Public: No + */ +#include "script_component.hpp" + +if (!isServer) exitWith {}; + +params ["_logic", "", "_activated"]; + +if (!_activated) exitWith {}; + +[_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(distance), "distance"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(speed), "speed"] call EFUNC(common,readSettingFromModule); diff --git a/addons/quickmount/functions/script_component.hpp b/addons/quickmount/functions/script_component.hpp new file mode 100644 index 0000000000..a91c3e1665 --- /dev/null +++ b/addons/quickmount/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\quickmount\script_component.hpp" diff --git a/addons/quickmount/script_component.hpp b/addons/quickmount/script_component.hpp new file mode 100644 index 0000000000..a0ec1debd0 --- /dev/null +++ b/addons/quickmount/script_component.hpp @@ -0,0 +1,21 @@ +#define COMPONENT quickmount +#define COMPONENT_BEAUTIFIED Quick Mount +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_QUICKMOUNT + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_QUICKMOUNT + #define DEBUG_SETTINGS DEBUG_SETTINGS_QUICKMOUNT +#endif + +#include "\z\ace\addons\main\script_macros.hpp" + +#define DEFAULT_DISTANCE 3 +#define DEFAULT_SPEED 18 +#define DEFAULT_PRIORITY 0 diff --git a/addons/quickmount/stringtable.xml b/addons/quickmount/stringtable.xml new file mode 100644 index 0000000000..8669e36eb3 --- /dev/null +++ b/addons/quickmount/stringtable.xml @@ -0,0 +1,40 @@ + + + + + Quick Mount + + + Vehicle quick mount + Fahrzeug schnell montieren + Pojazd szybkie mocowanie + + + Quickly enter the vehicle you are directly looking at. + + + Vehicle Full + + + Distance + + + Maximum distance to check for vehicles. + + + Vehicle Locked + + + Maximum Speed (km/h) + + + Maximum vehicle speed (km/h) allowed for player entry + + + Prioritize Seat + + + Seat priority on entry + + + diff --git a/addons/realisticnames/CfgMagazines.hpp b/addons/realisticnames/CfgMagazines.hpp index a6a64a4a15..d32ee3ec2c 100644 --- a/addons/realisticnames/CfgMagazines.hpp +++ b/addons/realisticnames/CfgMagazines.hpp @@ -417,4 +417,65 @@ class CfgMagazines { class SmokeShellYellow: SmokeShell { displayName = CSTRING(SmokeShellYellow_Name); }; + + + // 1.70 Pylon Magazines (Should Match Weapon Name) + class 2Rnd_Missile_AA_04_F; + class PylonRack_1Rnd_Missile_AA_04_F: 2Rnd_Missile_AA_04_F { + displayName = "AIM-9 Sidewinder"; // [vanilla: Falchion-22 - Missile_AA_04_Plane_CAS_01_F] + }; + class 4Rnd_AAA_missiles; + class PylonRack_1Rnd_AAA_missiles: 4Rnd_AAA_missiles { + displayName = "AIM-132 ASRAAM"; // [vanilla: ASRAAM - missiles_ASRAAM] + }; + class 4Rnd_GAA_missiles; + class PylonRack_1Rnd_GAA_missiles: 4Rnd_GAA_missiles { + displayName = "AIM-120A AMRAAM"; // [vanilla: Zephyr - missiles_Zephyr] + }; + class 6Rnd_Missile_AGM_02_F; + class PylonRack_1Rnd_Missile_AGM_02_F: 6Rnd_Missile_AGM_02_F { + displayName = "AGM-65 Maverick"; // [vanilla: Macer - Missile_AGM_02_Plane_CAS_01_F] + }; + class PylonRack_3Rnd_Missile_AGM_02_F: PylonRack_1Rnd_Missile_AGM_02_F { + displayName = "AGM-65 Maverick 3x"; // [vanilla: Macer 3x - Missile_AGM_02_Plane_CAS_01_F] + }; + class 2Rnd_LG_scalpel; + class PylonRack_1Rnd_LG_scalpel: 2Rnd_LG_scalpel { + displayName = "9K121 Vikhr"; // [vanilla: Scalpel - missiles_SCALPEL] + }; + class PylonRack_3Rnd_LG_scalpel: PylonRack_1Rnd_LG_scalpel { + displayName = "9K121 Vikhr 3x"; // [vanilla: Scalpel 3x - missiles_SCALPEL] + }; + class PylonRack_4Rnd_LG_scalpel: PylonRack_1Rnd_LG_scalpel { + displayName = "9K121 Vikhr 4x"; // [vanilla: Scalpel 4x - missiles_SCALPEL] + }; + class PylonRack_7Rnd_Rocket_04_HE_F: 7Rnd_Rocket_04_HE_F { + displayName = "Hydra 70 7x HE"; // [vanilla: Shrieker 7x HE - Rocket_04_HE_Plane_CAS_01_F] + }; + class PylonRack_7Rnd_Rocket_04_AP_F: 7Rnd_Rocket_04_AP_F { + displayName = "Hydra 70 7x AP"; // [vanilla: Shrieker 7x AP - Rocket_04_AP_Plane_CAS_01_F] + }; + class 12Rnd_missiles; + class PylonRack_12Rnd_missiles: 12Rnd_missiles { + displayName = "Hydra 70"; // [vanilla: DAR - missiles_DAR] + }; + class PylonRack_20Rnd_Rocket_03_HE_F: 20Rnd_Rocket_03_HE_F { + displayName = "S-8 20x HE"; // [vanilla: Tratnyr 20x HE - Rocket_03_HE_Plane_CAS_02_F] + }; + class PylonRack_20Rnd_Rocket_03_AP_F: 20Rnd_Rocket_03_AP_F { + displayName = "S-8 20x AP"; // [vanilla: Tratnyr 20x AP - Rocket_03_AP_Plane_CAS_02_F] + }; + class 2Rnd_Missile_AA_03_F; + class PylonRack_1Rnd_Missile_AA_03_F: 2Rnd_Missile_AA_03_F { + displayName = "Wympel R-73"; // [vanilla: Sahr-3 - Missile_AA_03_Plane_CAS_02_F] + }; + class 4Rnd_Missile_AGM_01_F; + class PylonRack_1Rnd_Missile_AGM_01_F: 4Rnd_Missile_AGM_01_F { + displayName = "Kh-25MTP"; // [vanilla: Sharur - Missile_AGM_01_Plane_CAS_02_F] + }; + class 2Rnd_Bomb_03_F; + class PylonMissile_1Rnd_Bomb_03_F: 2Rnd_Bomb_03_F { + displayName = "FAB-250M-54"; // [vanilla: LOM-250G - Bomb_03_Plane_CAS_02_F] + }; + }; diff --git a/addons/realisticnames/CfgVehicles.hpp b/addons/realisticnames/CfgVehicles.hpp index f31b7ffeac..3d217164e5 100644 --- a/addons/realisticnames/CfgVehicles.hpp +++ b/addons/realisticnames/CfgVehicles.hpp @@ -293,18 +293,27 @@ class CfgVehicles { displayName = CSTRING(Heli_Attack_01_Name); }; + class Heli_Attack_01_dynamicLoadout_base_F; + class B_Heli_Attack_01_dynamicLoadout_F: Heli_Attack_01_dynamicLoadout_base_F { + displayName = CSTRING(Heli_Attack_01_Name); + }; + class Heli_Light_01_unarmed_base_F; class B_Heli_Light_01_F: Heli_Light_01_unarmed_base_F { displayName = CSTRING(Heli_Light_01_Name); }; + class Heli_Light_01_civil_base_F: Heli_Light_01_unarmed_base_F { + displayName = CSTRING(Heli_Light_01_civil_Name); + }; class Heli_Light_01_armed_base_F; class B_Heli_Light_01_armed_F: Heli_Light_01_armed_base_F { displayName = CSTRING(Heli_Light_01_armed_Name); }; - class Heli_Light_01_civil_base_F: Heli_Light_01_unarmed_base_F { - displayName = CSTRING(Heli_Light_01_civil_Name); + class Heli_Light_01_dynamicLoadout_base_F; + class B_Heli_Light_01_dynamicLoadout_F: Heli_Light_01_dynamicLoadout_base_F { + displayName = CSTRING(Heli_Light_01_armed_Name); }; class Heli_Transport_03_base_F; @@ -328,6 +337,11 @@ class CfgVehicles { displayName = CSTRING(Heli_Light_02_unarmed_Name); }; + class Heli_Light_02_dynamicLoadout_base_F; + class O_Heli_Light_02_dynamicLoadout_F: Heli_Light_02_dynamicLoadout_base_F { + displayName = CSTRING(Heli_Light_02_Name); + }; + class Heli_light_03_base_F; class I_Heli_light_03_F: Heli_light_03_base_F { displayName = CSTRING(Heli_light_03_Name); @@ -338,6 +352,11 @@ class CfgVehicles { displayName = CSTRING(Heli_light_03_unarmed_Name); }; + class Heli_light_03_dynamicLoadout_base_F; + class I_Heli_light_03_dynamicLoadout_F: Heli_light_03_dynamicLoadout_base_F { + displayName = CSTRING(Heli_light_03_Name); + }; + class Heli_Transport_02_base_F; class I_Heli_Transport_02_F: Heli_Transport_02_base_F { displayName = CSTRING(Heli_Transport_02_Name); @@ -349,11 +368,21 @@ class CfgVehicles { displayName = CSTRING(Plane_CAS_01_Name); }; + class Plane_CAS_01_dynamicLoadout_base_F; + class B_Plane_CAS_01_dynamicLoadout_F: Plane_CAS_01_dynamicLoadout_base_F { + displayName = CSTRING(Plane_CAS_01_Name); + }; + class Plane_CAS_02_base_F; class O_Plane_CAS_02_F: Plane_CAS_02_base_F { displayName = CSTRING(Plane_CAS_02_Name); }; + class Plane_CAS_02_dynamicLoadout_base_F; + class O_Plane_CAS_02_dynamicLoadout_F: Plane_CAS_02_dynamicLoadout_base_F { + displayName = CSTRING(Plane_CAS_02_Name); + }; + class Plane_Fighter_03_base_F; class I_Plane_Fighter_03_CAS_F: Plane_Fighter_03_base_F { displayName = CSTRING(Plane_Fighter_03_CAS_Name); @@ -363,6 +392,11 @@ class CfgVehicles { displayName = CSTRING(Plane_Fighter_03_AA_Name); }; + class Plane_Fighter_03_dynamicLoadout_base_F; + class I_Plane_Fighter_03_dynamicLoadout_F: Plane_Fighter_03_dynamicLoadout_base_F { + displayName = CSTRING(Plane_Fighter_03_Name); + }; + // uavs class UAV_02_base_F; class B_UAV_02_F: UAV_02_base_F { @@ -375,7 +409,7 @@ class CfgVehicles { displayName = CSTRING(UAV_02_Name); }; - class UAV_02_CAS_base_F: UAV_02_base_F {}; + class UAV_02_CAS_base_F; class B_UAV_02_CAS_F: UAV_02_CAS_base_F { displayName = CSTRING(UAV_02_CAS_Name); }; @@ -386,6 +420,17 @@ class CfgVehicles { displayName = CSTRING(UAV_02_CAS_Name); }; + class UAV_02_dynamicLoadout_base_F; + class B_UAV_02_dynamicLoadout_F: UAV_02_dynamicLoadout_base_F { + displayName = CSTRING(UAV_02_Name); + }; + class O_UAV_02_dynamicLoadout_F: UAV_02_dynamicLoadout_base_F { + displayName = CSTRING(UAV_02_Name); + }; + class I_UAV_02_dynamicLoadout_F: UAV_02_dynamicLoadout_base_F { + displayName = CSTRING(UAV_02_Name); + }; + // pistols class Pistol_Base_F; class Weapon_hgun_P07_F: Pistol_Base_F { @@ -525,11 +570,11 @@ class CfgVehicles { class Weapon_SMG_02_F: Weapon_Base_F { displayName = CSTRING(SMG_02_Name); }; - + class Weapon_SMG_05_F: Weapon_Base_F { displayName = CSTRING(SMG_05); }; - + class Weapon_hgun_PDW2000_F: Weapon_Base_F { displayName = CSTRING(hgun_PDW2000_Name); }; diff --git a/addons/realisticnames/CfgWeapons.hpp b/addons/realisticnames/CfgWeapons.hpp index 3bc97b14ab..6aa3c7c3c8 100644 --- a/addons/realisticnames/CfgWeapons.hpp +++ b/addons/realisticnames/CfgWeapons.hpp @@ -319,7 +319,7 @@ class CfgWeapons { }; }; - class gatling_30mm: CannonCore { // This is a fictional veresion of the GSh-6-30, with 3 barrels + class gatling_30mm_base: CannonCore { // This is a fictional version of the GSh-6-30, with 3 barrels displayName = "GSh-3-30"; class LowROF: Mode_FullAuto { displayName = "GSh-3-30"; @@ -602,7 +602,7 @@ class CfgWeapons { class arifle_CTAR_GL_hex_F: arifle_CTAR_GL_base_F { displayName = CSTRING(arifle_CTAR_GL_hex); }; - + class arifle_CTARS_base_F; class arifle_CTARS_blk_F: arifle_CTARS_base_F { displayName = CSTRING(arifle_CTARS_blk); diff --git a/addons/realisticnames/dev_dumpPylon.sqf b/addons/realisticnames/dev_dumpPylon.sqf new file mode 100644 index 0000000000..df0d7ea4a5 --- /dev/null +++ b/addons/realisticnames/dev_dumpPylon.sqf @@ -0,0 +1,29 @@ +// [] execVM "z\ace\addons\realisticnames\dev_dumpPylon.sqf"; + +private _justLog = true; + +diag_log text format ["[Dumping Pylons] --------------------"]; +private _magazines = configProperties [configFile >> "CfgMagazines", "isClass _x", true]; +{ + private _pylonWeapon = getText (_x >> "pylonWeapon"); + if (_pylonWeapon != "") then { + private _weaponConfig = configFile >> "CfgWeapons" >> _pylonWeapon; + private _weaponName = getText (_weaponConfig >> "displayName"); + private _inherit = (configProperties [_x, "configName _x == 'displayName'", false]) isEqualTo []; + private _pylonMagName = getText (_x >> "displayName"); + if (_justLog) then { + if (!_inherit) then { + diag_log text format ["%1: [%2 vs %3]", configName _x, _pylonMagName, _weaponName]; + } else { + diag_log text format [" - %1: [%2 vs %3]", configName _x, _pylonMagName, _weaponName]; + }; + } else { + if (!_inherit) then { + diag_log text format ['class %1;', configName inheritsFrom _x]; + diag_log text format ['class %1: %2 {', configName _x, configName inheritsFrom _x]; + diag_log text format ['displayName = "%1"; [vanilla: %2 - %3]', _weaponName, _pylonMagName, _pylonWeapon]; + diag_log text format ['};', configName _x, configName inheritsFrom _x, _weaponName, _pylonMagName]; + }; + }; + }; +} forEach _magazines; diff --git a/addons/realisticnames/stringtable.xml b/addons/realisticnames/stringtable.xml index a490a78ab5..7f685174e2 100644 --- a/addons/realisticnames/stringtable.xml +++ b/addons/realisticnames/stringtable.xml @@ -911,6 +911,20 @@ AW101 マーリン AW101 Merlin + + L-159 ALCA + L-159 ALCA + L-159 ALCA + L-159 ALCA + L-159 ALCA + L-159 ALCA + L-159 Альбатрос + L-159 ALCA + L-159 ALCA + L-159 ALCA + L-159 アルカ + L-159 ALCA + L-159 ALCA (CAS) L-159 ALCA (CAS) diff --git a/addons/refuel/ACE_Settings.hpp b/addons/refuel/ACE_Settings.hpp index b38a880641..a25c36a2ba 100644 --- a/addons/refuel/ACE_Settings.hpp +++ b/addons/refuel/ACE_Settings.hpp @@ -6,4 +6,10 @@ class ACE_Settings { value = 1; typeName = "SCALAR"; }; + class GVAR(hoseLength) { + category = ECSTRING(OptionsMenu,CategoryLogistics); + displayName = CSTRING(RefuelSettings_hoseLength_DisplayName); + value = 12; + typeName = "SCALAR"; + }; }; diff --git a/addons/refuel/CfgVehicles.hpp b/addons/refuel/CfgVehicles.hpp index 104da38f71..3a28762b79 100644 --- a/addons/refuel/CfgVehicles.hpp +++ b/addons/refuel/CfgVehicles.hpp @@ -119,6 +119,11 @@ class CfgVehicles { typeName = "NUMBER"; defaultValue = 10; }; + class hoseLength { + displayName = CSTRING(RefuelSettings_hoseLength_DisplayName); + typeName = "NUMBER"; + defaultValue = 12; + }; }; }; @@ -512,6 +517,22 @@ class CfgVehicles { GVAR(fuelCargo) = REFUEL_INFINITE_FUEL; }; + // Helper object for non-AllVehicles objects + class GVAR(helper): Helicopter_Base_F { + scope = 1; + displayName = "Refuel Helper"; + model = "\A3\Weapons_f\empty"; + class ACE_Actions {}; + class ACE_SelfActions {}; + EGVAR(cargo,hasCargo) = 0; + EGVAR(cargo,space) = 0; + damageEffect = ""; + destrType = ""; + class HitPoints {}; + class Turrets {}; + class TransportItems {}; + }; + /* // Barrels found in config \ BarrelHelper: Misc_thing 100 BarrelBase: BarrelHelper 100 diff --git a/addons/refuel/functions/fnc_checkFuel.sqf b/addons/refuel/functions/fnc_checkFuel.sqf index 49d62b1e44..8acecccfd6 100644 --- a/addons/refuel/functions/fnc_checkFuel.sqf +++ b/addons/refuel/functions/fnc_checkFuel.sqf @@ -21,7 +21,7 @@ params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]]]; private _fuel = [_target] call FUNC(getFuel); [ - 5, + REFUEL_PROGRESS_DURATION * 2.5, [_unit, _target, _fuel], { params ["_args"]; diff --git a/addons/refuel/functions/fnc_connectNozzleAction.sqf b/addons/refuel/functions/fnc_connectNozzleAction.sqf index 250da51e21..b132863672 100644 --- a/addons/refuel/functions/fnc_connectNozzleAction.sqf +++ b/addons/refuel/functions/fnc_connectNozzleAction.sqf @@ -72,7 +72,7 @@ _endPosTestOffset = _startingOffset vectorAdd (_closeInUnitVector vectorMultiply _endPosTestOffset set [2, (_startingOffset select 2)]; [ - 2, + REFUEL_PROGRESS_DURATION, [_unit, _nozzle, _target, _endPosTestOffset], { params ["_args"]; diff --git a/addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf b/addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf index 2a23b5eb99..0f83f48fbb 100644 --- a/addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf +++ b/addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf @@ -38,7 +38,8 @@ if (_nozzle getVariable [QGVAR(jerryCan), false]) exitWith {}; [_pfID] call CBA_fnc_removePerFrameHandler; }; - if (isNull _source || {_unit distance (_source modelToWorld _endPosOffset) > (REFUEL_HOSE_LENGTH - 2)} || {!alive _source}) exitWith { + private _hoseLength = _source getVariable [QGVAR(hoseLength), GVAR(hoseLength)]; + if (isNull _source || {_unit distance (_source modelToWorld _endPosOffset) > (_hoseLength - 2)} || {!alive _source}) exitWith { if !(isNull _nozzle) then { [_unit, _nozzle] call FUNC(dropNozzle); REFUEL_UNHOLSTER_WEAPON @@ -49,6 +50,10 @@ if (_nozzle getVariable [QGVAR(jerryCan), false]) exitWith {}; if !(isNull _rope) then { ropeDestroy _rope; }; + private _helper = _nozzle getVariable [QGVAR(helper), objNull]; + if !(isNull _helper) then { + deleteVehicle _helper; + }; deleteVehicle _nozzle; } else { [LSTRING(Hint_TooFar), 2, _unit] call EFUNC(common,displayTextStructured); diff --git a/addons/refuel/functions/fnc_moduleRefuelSettings.sqf b/addons/refuel/functions/fnc_moduleRefuelSettings.sqf index 4d8f89425e..8322118a90 100644 --- a/addons/refuel/functions/fnc_moduleRefuelSettings.sqf +++ b/addons/refuel/functions/fnc_moduleRefuelSettings.sqf @@ -20,5 +20,6 @@ params ["_logic", "", ["_activated", false, [false]]]; if !(_activated) exitWith {}; [_logic, QGVAR(rate), "rate"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(hoseLength), "hoseLength"] call EFUNC(common,readSettingFromModule); -diag_log text format ["[ACE]: Refuel Module Initialized with flow rate: %1", GVAR(rate)]; +INFO_2("Refuel Module Initialized with flow rate: %1 - hoseLength: %2",GVAR(rate), GVAR(hoseLength)) diff --git a/addons/refuel/functions/fnc_readFuelCounter.sqf b/addons/refuel/functions/fnc_readFuelCounter.sqf index 519b07897d..1b1fb78e81 100644 --- a/addons/refuel/functions/fnc_readFuelCounter.sqf +++ b/addons/refuel/functions/fnc_readFuelCounter.sqf @@ -19,7 +19,7 @@ params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]]]; [ - 2, + REFUEL_PROGRESS_DURATION, [_unit, _target], { params ["_args"]; diff --git a/addons/refuel/functions/fnc_refuel.sqf b/addons/refuel/functions/fnc_refuel.sqf index 773d85e08d..2c8f6c1a8c 100644 --- a/addons/refuel/functions/fnc_refuel.sqf +++ b/addons/refuel/functions/fnc_refuel.sqf @@ -44,7 +44,8 @@ if (_maxFuel == 0) then { _sink setVariable [QGVAR(nozzle), objNull, true]; [_pfID] call CBA_fnc_removePerFrameHandler; }; - private _tooFar = ((_sink modelToWorld _connectToPoint) distance (_source modelToWorld _connectFromPoint)) > (REFUEL_HOSE_LENGTH - 2); + private _hoseLength = _source getVariable [QGVAR(hoseLength), GVAR(hoseLength)]; + private _tooFar = ((_sink modelToWorld _connectToPoint) distance (_source modelToWorld _connectFromPoint)) > (_hoseLength - 2); if (_tooFar && {!(_nozzle getVariable [QGVAR(jerryCan), false])}) exitWith { [LSTRING(Hint_TooFar), 2, _unit] call EFUNC(common,displayTextStructured); diff --git a/addons/refuel/functions/fnc_reset.sqf b/addons/refuel/functions/fnc_reset.sqf index d58f0a48ad..480beb6ca0 100644 --- a/addons/refuel/functions/fnc_reset.sqf +++ b/addons/refuel/functions/fnc_reset.sqf @@ -31,6 +31,10 @@ if !(isNil "_nozzle") then { if !(isNull _rope) then { ropeDestroy _rope; }; + private _helper = _nozzle getVariable [QGVAR(helper), objNull]; + if !(isNull _helper) then { + deleteVehicle _helper; + }; { [QGVAR(resetLocal), [_x, _nozzle], _x] call CBA_fnc_targetEvent; diff --git a/addons/refuel/functions/fnc_returnNozzle.sqf b/addons/refuel/functions/fnc_returnNozzle.sqf index 1bd364eafb..752be90d23 100644 --- a/addons/refuel/functions/fnc_returnNozzle.sqf +++ b/addons/refuel/functions/fnc_returnNozzle.sqf @@ -24,7 +24,7 @@ private _source = _nozzle getVariable QGVAR(source); if (isNull _nozzle || {_source != _target}) exitWith {false}; [ - 2, + REFUEL_PROGRESS_DURATION, [_unit, _nozzle, _target], { params ["_args"]; @@ -46,6 +46,10 @@ if (isNull _nozzle || {_source != _target}) exitWith {false}; if !(isNull _rope) then { ropeDestroy _rope; }; + private _helper = _nozzle getVariable [QGVAR(helper), objNull]; + if !(isNull _helper) then { + deleteVehicle _helper; + }; deleteVehicle _nozzle; [_target, "blockEngine", "ACE_Refuel", false] call EFUNC(common,statusEffect_set); diff --git a/addons/refuel/functions/fnc_takeNozzle.sqf b/addons/refuel/functions/fnc_takeNozzle.sqf index 006c5e0942..285dd37ced 100644 --- a/addons/refuel/functions/fnc_takeNozzle.sqf +++ b/addons/refuel/functions/fnc_takeNozzle.sqf @@ -39,7 +39,7 @@ if (isNull _nozzle) then { // func is called on fuel truck _endPosOffset = _endPosOffset select 0; }; [ - 2, + REFUEL_PROGRESS_DURATION, [_unit, _target, _endPosOffset], { params ["_args"]; @@ -53,11 +53,23 @@ if (isNull _nozzle) then { // func is called on fuel truck _newNozzle attachTo [_unit, [-0.02,0.05,-0.12], "righthandmiddle1"]; _unit setVariable [QGVAR(nozzle), _newNozzle, true]; - if (_target isKindOf "AllVehicles") then { - // Currently ropeCreate requires its first parameter to be a real vehicle - private _rope = ropeCreate [_target, _endPosOffset, _newNozzle, [0, -0.20, 0.12], REFUEL_HOSE_LENGTH]; - _newNozzle setVariable [QGVAR(rope), _rope, true]; + private _ropeTarget = _target; + if (!(_target isKindOf "AllVehicles")) then { + private _helper = QGVAR(helper) createVehicle [0,0,0]; + [QEGVAR(common,hideObjectGlobal), [_helper, true]] call CBA_fnc_serverEvent; + if ((getText (configFile >> "CfgVehicles" >> typeOf _target >> "simulation")) isEqualTo "thingX") then { + _helper attachTo [_target, [0,0,0]]; + } else { + _helper setPosWorld (getPosWorld _target); + _helper setDir (getDir _target); + _helper setVectorUp (vectorUp _target); + }; + _newNozzle setVariable [QGVAR(helper), _helper, true]; + _ropeTarget = _helper; }; + private _hoseLength = _target getVariable [QGVAR(hoseLength), GVAR(hoseLength)]; + private _rope = ropeCreate [_ropeTarget, _endPosOffset, _newNozzle, [0, -0.20, 0.12], _hoseLength]; + _newNozzle setVariable [QGVAR(rope), _rope, true]; _newNozzle setVariable [QGVAR(attachPos), _endPosOffset, true]; _newNozzle setVariable [QGVAR(source), _target, true]; @@ -93,7 +105,7 @@ if (isNull _nozzle) then { // func is called on fuel truck ] call EFUNC(common,progressBar); } else { // func is called on muzzle either connected or on ground [ - 2, + REFUEL_PROGRESS_DURATION, [_unit, _nozzle], { params ["_args"]; diff --git a/addons/refuel/functions/fnc_turnOff.sqf b/addons/refuel/functions/fnc_turnOff.sqf index 7ce3d9c874..31308607bb 100644 --- a/addons/refuel/functions/fnc_turnOff.sqf +++ b/addons/refuel/functions/fnc_turnOff.sqf @@ -19,7 +19,7 @@ params [["_unit", objNull, [objNull]], ["_nozzle", objNull, [objNull]]]; [ - 2, + REFUEL_PROGRESS_DURATION, [_unit, _nozzle], { params ["_args"]; diff --git a/addons/refuel/functions/fnc_turnOn.sqf b/addons/refuel/functions/fnc_turnOn.sqf index 7a69de9b6f..b7a4cf1bc9 100644 --- a/addons/refuel/functions/fnc_turnOn.sqf +++ b/addons/refuel/functions/fnc_turnOn.sqf @@ -19,7 +19,7 @@ params [["_unit", objNull, [objNull]], ["_nozzle", objNull, [objNull]]]; [ - 2, + REFUEL_PROGRESS_DURATION, [_unit, _nozzle], { params ["_args"]; diff --git a/addons/refuel/script_component.hpp b/addons/refuel/script_component.hpp index 96006a2822..19f12ed366 100644 --- a/addons/refuel/script_component.hpp +++ b/addons/refuel/script_component.hpp @@ -18,7 +18,7 @@ #define REFUEL_INFINITE_FUEL -10 #define REFUEL_ACTION_DISTANCE 7 -#define REFUEL_HOSE_LENGTH 12 +#define REFUEL_PROGRESS_DURATION 2 #define REFUEL_HOLSTER_WEAPON \ _unit setVariable [QGVAR(selectedWeaponOnRefuel), currentWeapon _unit]; \ diff --git a/addons/refuel/stringtable.xml b/addons/refuel/stringtable.xml index c685b520de..4522ddd620 100644 --- a/addons/refuel/stringtable.xml +++ b/addons/refuel/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -21,7 +21,7 @@ Скорость заправки Velocidade da vazão Rychlost tankování - Rateo Flusso + Portata Flusso Caudal de llenado Vitesse du ravitaillement 流量 @@ -60,7 +60,7 @@ Взять топливный шланг Pegar o bocal de combustível Vzít výdejní pistoli - Prenti manica benzina + Prendi manica benzina Tomar surtidor Prendre la pompe 給油ノズルを取る @@ -73,7 +73,7 @@ Берем топливный шланг... Pegando o bocal de combustível... Beru výdejní pistoli... - Sto prendendo manica benzina... + Prendendo manicotto benzina... Tomando surtidor... Prise de la pompe... 給油ノズルを取っている・・・ @@ -99,7 +99,7 @@ Присоединяем топливный шланг... Conectando o bocal de combustível... Připojuji výdejní pistoli... - Sto collegando la manica benzina... + Collegando manicotto benzina... Conectando surtidor... Connection de la pompe... 給油ノズルを接続している・・・ @@ -112,7 +112,7 @@ Отсоединить топливный шланг Desconectar o bocal de combustível Odpojit výdejní pistoli - Scollega manica benzina + Scollega manicotto benzina Desconectar surtidor Déconnecter la pompe 給油ノズルを外した @@ -151,7 +151,7 @@ Проверяем остаток топлива... Verificando combustível restante... Kontroluji zůstatek paliva... - Sto controllando la benzina rimanente... + Controllando la benzina rimanente... Verificando combustible remanente,,, Vérifie le carburant restant... 残燃料を見ている・・・ @@ -229,7 +229,7 @@ Останавливаем заправку... Parando reabastecimento... Zastavuji tankování... - Sto fermando il rifornimento... + Fermando il rifornimento... Deteniendo reabastecimiento... Arrête le ravitaillement... 給油をやめている・・・ @@ -255,7 +255,7 @@ Начинаем заправку... Começando reabastecimento... Spouštím tankování... - Sto iniziando il rifornimento... + Iniziando il rifornimento... Comenzando reabastecimiento... Début du ravitaillement... 給油を始めている・・・ @@ -281,7 +281,7 @@ Источник топлива пустой. A fonte de combustível está vazia. Zdroj paliva je prázdný. - La fonte di benzina èvuota. + La fonte di benzina è vuota. La fuente de combustible está vacía. La source de carburant est vide. 給油元は空です。 @@ -294,7 +294,7 @@ Достигнута максимальная длина шланга. Distância máxima da mangueira de combustível alcançada. Dosažena maximální délka hadice - Distanza massima della manica raggiunta. + Distanza massima della pompa raggiunta. Máxima longitud de manguera alcanzada. Tuyau tendu au maximum 給油ホースはもうこれ以上届かない。 @@ -346,7 +346,7 @@ Вернуть топливный шланг Retornar bocal de combustível Vrátit výdejní pistoli - Riponi manica benzina + Riponi manicotto benzina Devolver surtidor Retourner la pompe 給油ノズルを戻す @@ -359,7 +359,7 @@ Возвращаем топливный шланг... Retornando bocal de combustível... Vracím výdejní pistoli... - Sto riponendo la manica della benzina... + Riponendo la manica della benzina... Devolviendo el surtidor... Retourne la pompe 給油ノズルを戻している・・・ @@ -385,7 +385,7 @@ Проверяем счетчик топлива... Verificando contador de combustível... Konroluji palivoměr... - Sto controllando l'indicatore del livello benzina... + Controllando l'indicatore del livello benzina... Verificando el contador de combustible Vérification du compteur... 燃料計を見ている・・・ @@ -404,5 +404,10 @@ %1 リッターがある %1 리터가 재급유되었습니다. + + Refuel hose length + Betankung Schlauchlänge + Reabastecer longitud de manguera + diff --git a/addons/reload/ACE_UI.hpp b/addons/reload/ACE_UI.hpp index 8164d04b17..cfc2a26f9c 100644 --- a/addons/reload/ACE_UI.hpp +++ b/addons/reload/ACE_UI.hpp @@ -1,7 +1,7 @@ class ACE_UI { class ammoCount { class conditions { - ADDON = "(false)"; + ADDON = "cameraOn == (getConnectedUAV ACE_player)"; }; }; }; diff --git a/addons/reload/CfgVehicles.hpp b/addons/reload/CfgVehicles.hpp index a9fa4deadd..05ac18ea70 100644 --- a/addons/reload/CfgVehicles.hpp +++ b/addons/reload/CfgVehicles.hpp @@ -6,7 +6,7 @@ class CfgVehicles { class GVAR(LinkBelt) { displayName = CSTRING(LinkBelt); distance = 2.0; - condition = QUOTE([ARR_2(_player, _target)] call FUNC(canLinkBelt)); + condition = QUOTE(([ARR_2(_player, _target)] call FUNC(getAmmoToLinkBelt)) > 0); statement = QUOTE([ARR_2(_player, _target)] call FUNC(startLinkingBelt)); }; class GVAR(CheckAmmo) { diff --git a/addons/reload/XEH_PREP.hpp b/addons/reload/XEH_PREP.hpp index bfd89b098e..f2b386ac37 100644 --- a/addons/reload/XEH_PREP.hpp +++ b/addons/reload/XEH_PREP.hpp @@ -1,6 +1,6 @@ PREP(canCheckAmmo); -PREP(canLinkBelt); +PREP(getAmmoToLinkBelt); PREP(checkAmmo); PREP(displayAmmo); PREP(startLinkingBelt); diff --git a/addons/reload/functions/fnc_canLinkBelt.sqf b/addons/reload/functions/fnc_getAmmoToLinkBelt.sqf similarity index 73% rename from addons/reload/functions/fnc_canLinkBelt.sqf rename to addons/reload/functions/fnc_getAmmoToLinkBelt.sqf index d29dc6efd6..decb922d80 100644 --- a/addons/reload/functions/fnc_canLinkBelt.sqf +++ b/addons/reload/functions/fnc_getAmmoToLinkBelt.sqf @@ -1,5 +1,5 @@ /* - * Author: esteldunedain + * Author: esteldunedain, phyma * Check if the target has an MG equiped with belt system that the player can link * * Arguments: @@ -7,10 +7,10 @@ * 1: Target * * Return Value: - * Can link belt + * Maximum ammo of magazine (-1 on error) * * Example: - * [player, cursorObject] call ace_reload_fnc_canLinkBelt; + * [player, cursorObject] call ace_reload_fnc_getAmmoToLinkBelt; * * Public: No */ @@ -18,18 +18,18 @@ params ["_player", "_target"]; -if (vehicle _target != _target) exitWith {false}; +if (vehicle _target != _target) exitWith {-1}; private _magazineType = currentMagazine _target; private _magazineCfg = configFile >> "CfgMagazines" >> _magazineType; -if (getNumber (_magazineCfg >> "ACE_isBelt") == 0) exitWith {false}; +if (getNumber (_magazineCfg >> "ACE_isBelt") == 0) exitWith {-1}; // Check if the ammo is not empty or full private _ammoCount = _target ammo currentWeapon _target; // Exit if the belt is full or empty -if (_ammoCount == 0 || getNumber (_magazineCfg >> "count") - _ammoCount == 0) exitWith {false}; +if (_ammoCount == 0 || getNumber (_magazineCfg >> "count") - _ammoCount == 0) exitWith {-1}; // Check if the player has any of the same magazines // Calculate max ammo @@ -39,4 +39,4 @@ private _maxAmmo = 0; _maxAmmo = _maxAmmo max (_x select 1); } forEach (magazinesAmmo _player select {_x select 0 == _magazineType}); -_maxAmmo > 0 +_maxAmmo diff --git a/addons/reload/functions/fnc_startLinkingBelt.sqf b/addons/reload/functions/fnc_startLinkingBelt.sqf index a1cc73635d..aabfadaf66 100644 --- a/addons/reload/functions/fnc_startLinkingBelt.sqf +++ b/addons/reload/functions/fnc_startLinkingBelt.sqf @@ -16,25 +16,12 @@ params ["_player", "_target"]; if (vehicle _target != _target) exitWith {false}; private _magazineType = currentMagazine _target; -private _magazineCfg = configFile >> "CfgMagazines" >> _magazineType; -if (getNumber (_magazineCfg >> "ACE_isBelt") == 0) exitWith {false}; -// Check if the ammo is not empty or full -private _ammoCount = _target ammo currentWeapon _target; +private _maxAmmo = [_player, _target] call FUNC(getAmmoToLinkBelt); -// Exit if the belt is full or empty -if ((_ammoCount == 0) || (getNumber (_magazineCfg >> "count") - _ammoCount) == 0) exitWith {false}; - -// Check if the player has any of the same same magazines -// Calculate max ammo it can link -private _maxAmmo = 0; - -{ - _maxAmmo = _maxAmmo max (_x select 1); -} forEach (magazinesAmmo _player select {_x select 0 == _magazineType}); - -if (_maxAmmo == 0) exitWith {}; +//if _maxAmmo is below 0 we quit +if (_maxAmmo <= 0) exitWith {}; // Condition to call each frame private _condition = { diff --git a/addons/reload/stringtable.xml b/addons/reload/stringtable.xml index 10426344ed..4454bd3f9a 100644 --- a/addons/reload/stringtable.xml +++ b/addons/reload/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -10,7 +10,7 @@ Sprawdź stan amunicji przy przeładowaniu broni Vérification des munitions au rechargement Lőszer ellenőrzése a fegyver újratöltésekor - Controlla le munizioni ricaricando + Controlla le munizioni durante il ricaricamento Conferir munição ao recarregar a arma 再装填された武器の弾薬を確認 재장전시 장탄수 확인 @@ -80,7 +80,7 @@ Podłączanie taśmy... Gurt anhängen... Töltényheveder összekötése folyamatban... - Attacco la tracolla... + Attaccando la tracolla... Ligando cintos... ベルトをつなげている・・・ 벨트 연결중... diff --git a/addons/reloadlaunchers/stringtable.xml b/addons/reloadlaunchers/stringtable.xml index cb9c610c56..c9ffa3cef8 100644 --- a/addons/reloadlaunchers/stringtable.xml +++ b/addons/reloadlaunchers/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -24,7 +24,7 @@ Nabíjím odpalovač... Ładowanie wyrzutni... Kilövő betöltés alatt... - Carico il lanciamissili... + Caricando il lanciamissili... Recarregando lançador... ランチャーを装填している・・・ 무기 재장전중... diff --git a/addons/repair/CfgEventHandlers.hpp b/addons/repair/CfgEventHandlers.hpp index 559d2d4d7e..3e47f9f96f 100644 --- a/addons/repair/CfgEventHandlers.hpp +++ b/addons/repair/CfgEventHandlers.hpp @@ -37,7 +37,7 @@ class Extended_InitPost_EventHandlers { class Helicopter { class ADDON { init = QUOTE(_this call DFUNC(addRepairActions)); - exclude[] = {QEGVAR(fastroping,helper), "ACE_friesBase"}; + exclude[] = {QEGVAR(fastroping,helper), "ACE_friesBase", QEGVAR(refuel,helper)}; }; }; class Plane { diff --git a/addons/repair/stringtable.xml b/addons/repair/stringtable.xml index bdfa2001ad..d1926a47eb 100644 --- a/addons/repair/stringtable.xml +++ b/addons/repair/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -51,7 +51,7 @@ Замена колеса... Měním kolo... Cambiando rueda... - Sto sostituendo la ruota... + Sostituendo la ruota... Remplacement de la roue... タイヤを交換中・・・ 바퀴 교체중... @@ -91,7 +91,7 @@ Снятие колеса... Odstraňuji kolo... Quitando rueda... - Sto rimuovendo la ruota... + Rimuovendo la ruota... Démontage de la roue... タイヤを外している・・ 바퀴 제거중... @@ -130,7 +130,7 @@ Замена гусеницы... Měním pás... Cambiando oruga... - Sto sostituendo il cingolo... + Sostituendo il cingolo... Remplacement de la chenille... 履帯を交換中・・・ 궤도 교체중... @@ -169,7 +169,7 @@ Снятие гусеницы... Odstraňuji pás... Quitando oruga... - Sto rimuovendo il cingolo... + Rimuovendo il cingolo... Enlèvement de la chenille... 履帯を外している・・・ 궤도 제거중... @@ -208,7 +208,7 @@ Ремонт транспорта... Opravuji vozidlo... Reparando vehículo... - Sto riparando il veicolo... + Riparando il veicolo... Réparation du véhicule... 車両を修理中・・・ 차량 수리중... @@ -339,7 +339,7 @@ Naprawianie... Opravuji... Reparando... - Sto riparando... + Riparando... javítása... Ремонтируем... 修理中・・・ @@ -353,7 +353,7 @@ Naprawianie %1... Opravuji %1... Reparando %1... - Sto riparando %1... + Riparando %1... %1 javítása... Ремонтируем %1... %1 を修理中・・・ @@ -1563,6 +1563,7 @@ 修理のためにエンジンを停止させる必要があります。 Silnik musi być wyłączony w celu naprawy 수리를 위해서는 엔진을 꺼야만 합니다 + Il motore deve essere spento per poter riparare diff --git a/addons/respawn/stringtable.xml b/addons/respawn/stringtable.xml index 7a24936f65..a2d90acce4 100644 --- a/addons/respawn/stringtable.xml +++ b/addons/respawn/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -330,7 +330,7 @@ ACE Respawn ACE Respawn ACE Возрождение - Respawn ACE + Rigenerazione ACE ACE リスポン ACE 재배치 diff --git a/addons/safemode/stringtable.xml b/addons/safemode/stringtable.xml index 29b84cb095..d2c7ff3fd6 100644 --- a/addons/safemode/stringtable.xml +++ b/addons/safemode/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -10,7 +10,7 @@ Biztonságos mód Предохранитель Sécurité - Sicura inserita + Modalità Sicura Modo de segurança 安全装置 안전 모드 diff --git a/addons/scopes/stringtable.xml b/addons/scopes/stringtable.xml index ce815a49df..d36161e99d 100644 --- a/addons/scopes/stringtable.xml +++ b/addons/scopes/stringtable.xml @@ -7,6 +7,7 @@ 조준경 Celowniki optyczne Scopes + Mirini Enable ACE Scope adjustment @@ -14,6 +15,7 @@ ACE 조준경 영점조작 활성화 Włącz ustawienia celowników optycznych ACE Active ACE Scope adjustment + Abilita Regolazione mirino ACE Enable adjustmet turrets on high powered scopes @@ -21,6 +23,7 @@ 고성능 조준경 조절 나사 활성화 Włącz pokrętła regulacyjne Permet de régler la hausse et la dérive sur les optiques de visée à fort grossissement + Abilita la regolazione delle torrette nei mirini a lunga gittata Force adjustment turrets @@ -28,6 +31,7 @@ 조절 나사 강제 Wymuś użycie pokręteł regulacyjnych Impose le réglage de la hausse/dérive + Forza la regolazione delle torrette Force usage of adjustmet turrets on high powered scopes @@ -35,6 +39,7 @@ 고성능 조준경의 조절 나사 사용을 강제합니다 Wymuś użycie pokręteł regulacyjnych dla celowników o dużym powiększeniu Impose le réglage de la hausse/dérive sur les optiques de visée à fort grossissement + Forza l'uso della regolazione nei mirini a lunga gittata Correct zeroing @@ -42,6 +47,7 @@ 영점 고치기 Poprawka zerowania Corrige le zérotage + Correggi azzeramento Corrects the zeroing of all small arms sights @@ -49,6 +55,7 @@ 모든 소화기의 영점을 고칩니다 Poprawia zerowanie wszystkich celowników broni ręcznej Corrige le zérotage des optiques de visée des petites armes + Corregge l'azzeramento di tutti i mirini di bassa portata Overwrite zero distance @@ -56,6 +63,7 @@ 영점거리 덮어쓰기 Nadpisuje ustawienie dla zerowego dystansu Remplace la distance de zérotage + Sovrascrivi la distanza zero Uses the 'defaultZeroRange' setting to overwrite the zero range of high power scopes @@ -63,6 +71,7 @@ 기존 고성능 조준경의 영점거리에 '기본설정 영점거리' 를 덮어씌웁니다 Używa 'defaultZeroRange' zamiast ustawionej odległości zerowania dla celowników o duzym przybliżeniu Utilise le paramètre 'defaultZeroRange' pour remplacer la distance de zérotage sur les optiques de visée à fort grossissement + Usa le impostazioni di "defaultZeroRange" (Portata Zero Predefinita) per sovrascrivere la portata zero dei mirini a lunga gittata Default zero distance @@ -70,6 +79,7 @@ 기본설정 영점거리 Domyślne zerowanie Distance de zérotage par défaut + Distanza zero predefinita High power scopes will be zeroed at this distance @@ -77,6 +87,7 @@ 고성능 조준경이 정해진 수만큼 영점거리를 맞추게 됩니다. Celowniki o dużym powiększeniu będą zerowane dla tej odległości Distance de zérotage par défaut des optiques de visée à fort grossissement + I mirini a lunga gittata verranno azzerrati a questa distanza Reference temperature @@ -84,6 +95,7 @@ 온도 기준 Referencyjna temperatura Température de référence + Temperatura di riferimento Temperature at which the scope was zeroed @@ -91,6 +103,7 @@ 조준경 영점조준시 온도 Temperatura, przy której celownik został wyzerowany Température de référence pour le zérotage des optiques + Temperatura a cui è stato azzerato il mirino Reference barometric pressure @@ -98,6 +111,7 @@ 기압 기준 Referencyjne ciśnienie barometryczne Pression barométrique de référence + Pressione barometrica di riferimento Barometric pressure at which the scope was zeroed @@ -105,6 +119,7 @@ 조준경 영점조준시 기압 Ciśnienie barometryczne, przy którym celownik został wyzerowany Pression barométrique de référence pour le zérotage des optiques + Pressione barometrica a cui è stato azzerato il mirino Reference humidity @@ -112,6 +127,7 @@ 습도 기준 Referencyjna wilgotność Humidité de référence + Umidità di riferimento Humidity at which the scope was zeroed @@ -119,6 +135,7 @@ 조준경 영점조준시 습도 Wilgotność powietrza, przy której celownik został wyzerowany Taux d'humidité de référence pour le zérotage des optiques + Umidità a cui è stato azzerato il mirino Deduce pressure from altitude @@ -126,6 +143,7 @@ 고도에 맞춰 기압 설정 Ciśnienie określone na podstawie wysokości Pression selon l'altitude + Ricava la pressione dall'altitudine Deduce the barometric pressure from the terrain altitude @@ -133,6 +151,7 @@ 주변 고도에 맞춰 기압을 설정합니다 Określ ciśnienie barometryczne na podstawie wysokości terenu Détermine la pression barométrique selon l'altitude du terrain + Ricava la pressione barometrica dall'altitudine del terreno Minor adjustment up @@ -266,6 +285,7 @@ 이 모듈은 고성능 조준경에 조준 나사를 이용한 편차 및 고도 조절 기능을 더해줍니다. Ten moduł włącza pokrętła kalibracyjne poprawki na wiatr oraz poprawki wysokości dla celowników o dużym powiększeniu. Ce module ajoute les tambours de correction de la hausse et de dérive sur les optiques de visée à fort grossissement. + Questo modulo aggiunge lo spostamento dell'aria e la regolazione dell'elevazione delle torrette in mirini a lunga gittata diff --git a/addons/slideshow/stringtable.xml b/addons/slideshow/stringtable.xml index 2f5c13b383..213834841d 100644 --- a/addons/slideshow/stringtable.xml +++ b/addons/slideshow/stringtable.xml @@ -144,12 +144,14 @@ Ustaw nazwę 名前設定 Définir le nom + Imposta Nome Name that will be used for main interaction entry (to distinguish multiple slideshows). Default: "Slides" Nazwa, która będzie użyta w głównym menu interakcji (w celu rozróżnienia różnych slajdów). Domyślnie: "Slides" メイン インタラクション エントリで使われる名前を設定します。(複数のスライドショーを区別するため)。標準: "Slides" Un nom qui sera utilisé pour interagir avec plusieurs diaporamas. Par défaut : "Slides" + Nome che sarà utilizzato per le principali interazioni (per distinguere le multiple diapositive). Predefinito: "Slides" Slide Duration diff --git a/addons/spectator/functions/fnc_handleCamera.sqf b/addons/spectator/functions/fnc_handleCamera.sqf index ce384c496c..f21581ea58 100644 --- a/addons/spectator/functions/fnc_handleCamera.sqf +++ b/addons/spectator/functions/fnc_handleCamera.sqf @@ -64,7 +64,7 @@ if (GVAR(camMode) == 0) then { _vector = _vector vectorAdd [0,0,_distance*sin(-_tilt)]; // Update the position of the target camera (used for smooth unit tracking) - _target camSetPos ((_unit modelToWorldVisual [0,0,0]) vectorAdd [0,0,1.5]); + _target camSetPos ((ASLToAGL getPosASLVisual _unit) vectorAdd [0,0,1.5]); _target camCommit 0; // Update the relative position of the unit camera diff --git a/addons/spectator/functions/fnc_handleIcons.sqf b/addons/spectator/functions/fnc_handleIcons.sqf index d1f83690ff..8f735c2a32 100644 --- a/addons/spectator/functions/fnc_handleIcons.sqf +++ b/addons/spectator/functions/fnc_handleIcons.sqf @@ -29,7 +29,7 @@ _drawVehicles = []; _color = GETVAR(_x,GVAR(gColor),[ARR_4(0,0,0,0)]); _txt = groupID _x; - drawIcon3D ["\A3\ui_f\data\map\markers\nato\b_inf.paa", _color, _leader modelToWorldVisual [0,0,30], 1, 1, 0, _txt, 2, 0.02]; + drawIcon3D ["\A3\ui_f\data\map\markers\nato\b_inf.paa", _color, (_leader modelToWorldVisual (_leader selectionPosition "Head")) vectorAdd [0,0,28.5], 1, 1, 0, _txt, 2, 0.02]; } else { _drawVehicles append (units _x); }; @@ -41,6 +41,6 @@ _drawVehicles = []; _color = GETVAR((group _x),GVAR(gColor),[ARR_4(0,0,0,0)]); _txt = ["", GETVAR(_x,GVAR(uName),"")] select (isPlayer _x); - drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", _color, _x modelToWorldVisual [0,0,3], 0.7, 0.7, 0, _txt, 1, 0.02]; + drawIcon3D ["a3\Ui_f\data\GUI\Rsc\RscDisplayEGSpectator\UnitIcon_ca.paa", _color, (_x modelToWorldVisual (_x selectionPosition "Head")) vectorAdd [0,0,1.5], 0.7, 0.7, 0, _txt, 1, 0.02]; false } count (_drawVehicles arrayIntersect GVAR(unitList)); diff --git a/addons/spectator/stringtable.xml b/addons/spectator/stringtable.xml index b2570dd08f..68c8e79ea5 100644 --- a/addons/spectator/stringtable.xml +++ b/addons/spectator/stringtable.xml @@ -1,9 +1,11 @@ - + ACE Spectator ACE スペクテイター + Spettatore ACE + Spectateur ACE Spectator Settings diff --git a/addons/switchunits/stringtable.xml b/addons/switchunits/stringtable.xml index d079350a19..c86142c877 100644 --- a/addons/switchunits/stringtable.xml +++ b/addons/switchunits/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -20,7 +20,7 @@ Versuche zu Wechseln Snažím se přehodit Próba zmiany - Sto provando a cambiare + Provando a cambiare Intentando cambiar Essaye de basculer Tentando trocar diff --git a/addons/tagging/stringtable.xml b/addons/tagging/stringtable.xml index 05a23e4cd1..ab5866dbfa 100644 --- a/addons/tagging/stringtable.xml +++ b/addons/tagging/stringtable.xml @@ -9,6 +9,7 @@ Markierungssystem 뿌리기 Marquage + Marcamento Configure how the tagging system will operate by default. @@ -18,6 +19,7 @@ Konfiguriert, wie das Markierungssystem standardmäßig funktioniert. 뿌리기 시스템의 기본사항을 설정합니다. Configure le fonctionnement par défaut du système de marquage. + Configura quanto il sistema di marcamento agirà da se. Quick Tag @@ -27,6 +29,7 @@ Schnelle Markierung 빠른 뿌리기 Marquage rapide + Marcamento Rapido Action performed on main tag interaction point. @@ -36,6 +39,7 @@ Aktion, die am Haupt-Interaktionspunkt ausgeführt werden soll. 이 동작은 상호작용에서 뿌리기를 할 수 있게 해준다 Action réalisé au point de marquage principal. + Azione eseguita sul punto di interazione dei tag principali. Last Used @@ -45,6 +49,7 @@ Zuletzt benutzt 최근 사용 Dernier utilisé + Ultimo Usato Random X @@ -54,6 +59,7 @@ Zufällig X 무작위 X Aléatoire X + Random X Random @@ -63,6 +69,7 @@ Zufällig 무작위 Aléatoire + Random Tag diff --git a/addons/trenches/stringtable.xml b/addons/trenches/stringtable.xml index 9203635d49..1fee5489df 100644 --- a/addons/trenches/stringtable.xml +++ b/addons/trenches/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -147,7 +147,7 @@ Digging Trench Grabe Schützengraben Kopanie wnęki - Sto Scavando la Trincea + Scavando la Trincea Cavando trinchera Creuse la tranchée Vykopat zákop @@ -166,6 +166,7 @@ 塹壕を掘りつづける Graben fortsetzen 계속해서 참호파기 + Continua a Scavare la Trincea Remove Trench @@ -177,6 +178,7 @@ 塹壕を消す Schützengraben entfernen 참호 제거 + Rimuove Trincea Removing Trench @@ -188,6 +190,7 @@ 塹壕を消している Entferne Schützengraben 참호 제거중... + Rimuovendo la Trincea diff --git a/addons/ui/stringtable.xml b/addons/ui/stringtable.xml index e13c38f6df..1bc2f8d888 100644 --- a/addons/ui/stringtable.xml +++ b/addons/ui/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -11,6 +11,7 @@ Interfejs użytkownika Benutzeroberfläche 사용자 인터페이스 + Interfaccia Utente User Interface @@ -22,6 +23,7 @@ Interfejs użytkownika Benutzeroberfläche 사용자 인터페이스 + Interfaccia Utente This module allows toggling visible user interface parts. @@ -32,6 +34,7 @@ Moduł ten pozwala zmienić stan widoczności poszczególnych elementów UI. Dieses Modul erlaubt es, Teile der Benutzeroberfläche (UI) an- oder auszuschalten. 이 모듈은 사용자 인터페이스의 부분을 토글하는것을 가능케 해줍니다. + Questo modulo consente di commutare parti di interfaccia utente visibili. Allow Selective UI @@ -43,6 +46,7 @@ Zezwól na selektywne UI Erlaube selektives UI 선택적 사용자 인터페이스 허가 + Permette l'UI Selettiva Allow client to modify their UI. @@ -54,6 +58,7 @@ Zezwól klientowi na modyfikację UI. Erlaube Clients, ihr UI zu modifizieren. 클라이언트가 선택적 사용자 인터페이스 사용하는것을 허가합니다 + Permette al client di modificare la propria UI. Soldier/Vehicle/Weapon Information @@ -65,6 +70,7 @@ Informacje o żołnierzu/pojeździe/broni Soldat/Fahrzeug/Waffe Information 병사/차량/무기 정보 + Informazioni Soldato/Veicolo/Arma Vehicle Radar @@ -76,6 +82,7 @@ Radar w pojeździe Fahrzeugradar 차량 레이더 + Rada Veicolo Vehicle Compass @@ -87,6 +94,7 @@ Kompas w pojeździe Fahrzeugkompass 차량 나침반 + Bussola Veicolo Command Menu @@ -98,6 +106,7 @@ Menu dowodzenia Kommandomenü 지휘 메뉴 + Menù di Comando Group Bar @@ -109,6 +118,7 @@ Pasek grupy Gruppenleiste 그룹 막대 + Barra del Gruppo Weapon Name @@ -120,6 +130,7 @@ Nazwa broni Waffenname 무기 이름 + Nome Arma Weapon Name Background @@ -131,6 +142,7 @@ Tło nazwy broni Waffenname Hintergrund 무기 이름 배경 + Nome Sfondo Arma Firing Mode @@ -142,6 +154,7 @@ Tryb ognia Feuermodus 사격 모드 + Modalità di Fuoco Ammo Type @@ -153,6 +166,7 @@ Typ amunicji Munitionstyp 탄종 + Tipo Munizioni Ammo Count @@ -164,6 +178,7 @@ Ilość amunicji Munitionsanzahl 탄약수 + Contatore Munizioni Magazine Count @@ -175,6 +190,7 @@ Ilość magazynków Magazinanzahl 탄창수 + Contatore Caricatore Throwable Type @@ -186,6 +202,7 @@ Typ granatu Wurfobjekt-Typ 투척물 종류 + Tipo Lanciabile Throwable Count @@ -197,6 +214,7 @@ Ilość granatów Wurfobjekt-Anzahl 투척물 개수 + Contatore Lanciabili Zeroing @@ -208,6 +226,7 @@ Wyzerowanie broni Nullung 영점 + Azzeramento Weapon Lower Info Background @@ -218,6 +237,7 @@ Tło dolnej części informacji o broni Hintergrund der unteren Waffen-Info-Leiste 무기 상세 정보 배경 + Informazioni Sfondo Arma Bassa Stance @@ -229,6 +249,7 @@ Postura Haltung 자세 + Postura Stamina Bar @@ -240,6 +261,7 @@ Pasek staminy Ausdaueranzeige 체력 막대 + Barra Stamina Gunner Weapon Name @@ -250,6 +272,7 @@ Nazwa broni strzelca Richtschütze Waffenname 사수 무기 명칭 + Nome Arma Artigliere Gunner Weapon Name Background @@ -260,6 +283,7 @@ Tło nazwy broni strzelca Richtschütze Waffenname Hintergrund 사수 무기 명칭 배경 + Nome Sfondo Arma Artigliere Gunner Firing Mode @@ -270,6 +294,7 @@ Tryb ognia strzelca Richtschütze Feuermodus 사수 사격 모드 + Modalità di Fuoco Artigliere Gunner Ammo Type @@ -280,6 +305,7 @@ Typ amunicji strzelca Richtschütze Munitionstyp 사수 탄종 + Tipo Munizioni Artigliere Gunner Ammo Count @@ -290,6 +316,7 @@ Ilość amunicji strzelca Richtschütze Munitionsanzahl 사수 탄약 수량 + Contatore Munizioni Artigliere Gunner Magazine Count @@ -300,6 +327,7 @@ Ilość magazynków strzelca Richtschütze Magazinanzahl 사수 탄창 수량 + Contatore Caricatore Artigliere Gunner Launchable Type @@ -310,6 +338,7 @@ Typ rakiet strzelca Richtschütze Raketentyp 사수 발사체 종류 + Tipo Lanciabile Artigliere Gunner Launchable Count @@ -320,6 +349,7 @@ Ilość rakiet strzelca Richtschütze Raketenanzahl 사수 발사체 수량 + Contatore Lanciabili Artigliere Gunner Zeroing @@ -330,6 +360,7 @@ Wyzerowanie broni strzelca Richtschütze Nullung 사수 영점 + Azzeramento Artigliere Gunner Weapon Lower Info Background @@ -340,6 +371,7 @@ Tło dolnej części informacji o broni strzelca Hintergrund der unteren Waffen-Info-Leiste (Richtschütze) 사수 무기 상세 정보 배경 + Informazioni Sfondo Arma Artigliere Bassa Vehicle Name @@ -351,6 +383,7 @@ Nazwa pojazdu Fahrzeugname 차량 명칭 + Nome Veicolo Vehicle Name Background @@ -362,6 +395,7 @@ Tło nazwy pojazdu Fahrzeugname Hintergrund 차량 명칭 배경 + Nome Sfondo Veicolo Vehicle Fuel Bar @@ -373,6 +407,7 @@ Pasek paliwa Fahrzeug-Treibstoffleiste 차량 연료 막대 + Barra Carburante Veicolo Vehicle Speed @@ -384,6 +419,7 @@ Prędkościomierz Fahrzeuggeschwindigkeit 차량 속도 + Velocità Veicolo Vehicle Altitude @@ -395,6 +431,7 @@ Wysokościomierz radarowy Fahrzeughöhe 차량 고도 + Altitudine Veicolo Vehicle Damage @@ -406,6 +443,7 @@ Uszkodzenia pojazdu Fahrzeugschaden 차량 피해 + Danno Veicolo Vehicle Info Background @@ -417,6 +455,7 @@ Tło informacji o pojeździe Fahrzeug Info Hintergrund 차량 정보 배경 + Informazioni Sfondo Veicolo Requires Soldier/Vehicle/Weapon Information. @@ -428,6 +467,7 @@ Wymaga informacji o żołnierzu/pojeździe/broni. Benötigt Soldat/Fahrzeug/Waffe Information. 병사/차량/무기의 정보가 필요합니다. + Richiede informazione Soldato/Veicolo/Arma. Modifying User Interface is disabled. @@ -439,6 +479,7 @@ Modyfikacja interfejsu użytkownika jest wyłączona. Die Modifizierung des UI ist deaktiviert. 사용자 인터페이스 변경이 비활성화 되어있습니다. + La modifica dell'Interfaccia Utente è disabilitata. Cannot modify a forced User Interface element. @@ -449,6 +490,7 @@ Nie można modyfikować wymuszonego elementu interfejsu użytkownika. Gesperrte UI-Elemente können nicht modifiziert werden. 강제 사용자 인터페이스는 변경하실 수 없습니다. + Impossibile modificare un elemento forzato d' Interfaccia Utente. diff --git a/addons/vector/CfgVehicles.hpp b/addons/vector/CfgVehicles.hpp index f06f79aa12..23aa8d7412 100644 --- a/addons/vector/CfgVehicles.hpp +++ b/addons/vector/CfgVehicles.hpp @@ -6,15 +6,15 @@ class CfgVehicles { scopeCurator = 2; displayName = CSTRING(VectorName); vehicleClass = "Items"; - class TransportWeapons { - MACRO_ADDWEAPON(ACE_Vector,1); + class TransportItems { + MACRO_ADDITEM(ACE_Vector,1); }; }; class Box_NATO_Support_F; class ACE_Box_Misc: Box_NATO_Support_F { - class TransportWeapons { - MACRO_ADDWEAPON(ACE_Vector,6); + class TransportItems { + MACRO_ADDITEM(ACE_Vector,6); }; }; }; diff --git a/addons/vehicles/functions/fnc_speedLimiter.sqf b/addons/vehicles/functions/fnc_speedLimiter.sqf index 2d445be3c8..d84bdfff9f 100644 --- a/addons/vehicles/functions/fnc_speedLimiter.sqf +++ b/addons/vehicles/functions/fnc_speedLimiter.sqf @@ -28,7 +28,7 @@ if (GVAR(isSpeedLimiter)) exitWith { playSound "ACE_Sound_Click"; GVAR(isSpeedLimiter) = true; -private _maxSpeed = speed _vehicle max 10; +private _maxSpeed = speed _vehicle max 5; [{ params ["_args", "_idPFH"]; diff --git a/addons/weather/functions/fnc_calculateAirDensity.sqf b/addons/weather/functions/fnc_calculateAirDensity.sqf index bda8410ddd..61d18d7201 100644 --- a/addons/weather/functions/fnc_calculateAirDensity.sqf +++ b/addons/weather/functions/fnc_calculateAirDensity.sqf @@ -23,7 +23,8 @@ _pressure = _pressure * 100; // hPa to Pa if (_relativeHumidity > 0) then { // Saturation vapor pressure calculated according to: http://wahiduddin.net/calc/density_algorithms.htm - private _pSat = 6.1078 * 10 ^ ((7.5 * _temperature) / (_temperature + 237.3)); + // 610.78 gives pressure in Pa - https://en.wikipedia.org/wiki/Density_of_air + private _pSat = 610.78 * 10 ^ ((7.5 * _temperature) / (_temperature + 237.3)); private _vaporPressure = _relativeHumidity * _pSat; private _partialPressure = _pressure - _vaporPressure; diff --git a/addons/yardage450/CfgVehicles.hpp b/addons/yardage450/CfgVehicles.hpp index d8f2ccabe3..2dc52de68a 100644 --- a/addons/yardage450/CfgVehicles.hpp +++ b/addons/yardage450/CfgVehicles.hpp @@ -6,15 +6,15 @@ class CfgVehicles { scopeCurator = 2; displayName = CSTRING(DisplayName); vehicleClass = "Items"; - class TransportWeapons { - MACRO_ADDWEAPON(ACE_Yardage450,1); + class TransportItems { + MACRO_ADDITEM(ACE_Yardage450,1); }; }; class Box_NATO_Support_F; class ACE_Box_Misc: Box_NATO_Support_F { - class TransportWeapons { - MACRO_ADDWEAPON(ACE_Yardage450,4); + class TransportItems { + MACRO_ADDITEM(ACE_Yardage450,4); }; }; }; diff --git a/addons/zeus/CfgVehicles.hpp b/addons/zeus/CfgVehicles.hpp index 42dc6d4289..9918764462 100644 --- a/addons/zeus/CfgVehicles.hpp +++ b/addons/zeus/CfgVehicles.hpp @@ -86,6 +86,7 @@ class CfgVehicles { class GVAR(moduleBase): Module_F { author = ECSTRING(common,ACETeam); category = "ACE"; + function = QEFUNC(common,dummy); functionPriority = 1; isGlobal = 1; isTriggerActivated = 0; @@ -213,4 +214,16 @@ class CfgVehicles { function = QFUNC(moduleUnconscious); icon = QPATHTOF(UI\Icon_Module_Zeus_Unconscious_ca.paa); }; + class GVAR(AddFullArsenal): GVAR(moduleBase) { + curatorCanAttach = 1; + category = QGVAR(Utility); + displayName = CSTRING(moduleAddFullArsenal_displayName); + function = QFUNC(moduleAddArsenal); + }; + class GVAR(RemoveFullArsenal): GVAR(moduleBase) { + curatorCanAttach = 1; + category = QGVAR(Utility); + displayName = CSTRING(moduleRemoveArsenal_displayName); + function = QFUNC(moduleRemoveArsenal); + }; }; diff --git a/addons/zeus/XEH_PREP.hpp b/addons/zeus/XEH_PREP.hpp index 0090d04015..a3f269f638 100644 --- a/addons/zeus/XEH_PREP.hpp +++ b/addons/zeus/XEH_PREP.hpp @@ -6,12 +6,14 @@ PREP(bi_moduleProjectile); PREP(bi_moduleRemoteControl); PREP(getModuleDestination); PREP(handleZeusUnitAssigned); +PREP(moduleAddArsenal); PREP(moduleAddSpareTrack); PREP(moduleAddSpareWheel); PREP(moduleAddOrRemoveFRIES); PREP(moduleCaptive); PREP(moduleGlobalSetSkill); PREP(moduleGroupSide); +PREP(moduleRemoveArsenal); PREP(moduleSearchNearby); PREP(moduleSetMedic); PREP(moduleSetMedicalVehicle); diff --git a/addons/zeus/XEH_postInit.sqf b/addons/zeus/XEH_postInit.sqf index 0c3ff85cdf..adf3d75a9b 100644 --- a/addons/zeus/XEH_postInit.sqf +++ b/addons/zeus/XEH_postInit.sqf @@ -10,6 +10,7 @@ // Global skill module PVs values for persistence, just listen for the PV QGVAR(GlobalSkillAI) addPublicVariableEventHandler FUNC(moduleGlobalSetSkill); +[QGVAR(moveToRespawnPosition), BIS_fnc_moveToRespawnPosition] call CBA_fnc_addEventHandler; [QGVAR(moduleDefendArea), CBA_fnc_taskDefend] call CBA_fnc_addEventHandler; [QGVAR(modulePatrolArea), CBA_fnc_taskPatrol] call CBA_fnc_addEventHandler; [QGVAR(moduleSearchNearby), CBA_fnc_searchNearby] call CBA_fnc_addEventHandler; diff --git a/addons/zeus/config.cpp b/addons/zeus/config.cpp index 5cd88750b9..d81ac5c074 100644 --- a/addons/zeus/config.cpp +++ b/addons/zeus/config.cpp @@ -13,6 +13,8 @@ class CfgPatches { QGVAR(moduleSearchNearby), QGVAR(moduleSimulation), QGVAR(moduleSuppressiveFire), + QGVAR(AddFullArsenal), + QGVAR(RemoveFullArsenal), QGVAR(moduleTeleportPlayers) }; weapons[] = {}; diff --git a/addons/zeus/functions/fnc_moduleAddArsenal.sqf b/addons/zeus/functions/fnc_moduleAddArsenal.sqf new file mode 100644 index 0000000000..b8eed64d76 --- /dev/null +++ b/addons/zeus/functions/fnc_moduleAddArsenal.sqf @@ -0,0 +1,38 @@ +/* + * Author: alganthe + * Add a full arsenal to an object + * + * Arguments: + * 0: The module logic + * + * Return Value: + * None + * + * Public: No + */ +#include "script_component.hpp" + +params ["_logic"]; +if (!local _logic) exitWith {}; + +private _object = attachedTo _logic; +TRACE_3("moduleAddArsenal",_logic,_object,typeOf _object); + +switch (true) do { + case (isNull _object): { + [LSTRING(NothingSelected)] call FUNC(showMessage); + }; + case (isPlayer _object): { + ["str_a3_cfgvehicles_moduleremotecontrol_f_errorPlayer"] call FUNC(showMessage); + }; + case (!alive _object): { + [LSTRING(OnlyAlive)] call FUNC(showMessage); + }; + default { + TRACE_1("BIS_fnc_arsenal: AmmoboxInit",_object); + // Global Effects: "Action to access the Arsenal will be added automatically on all clients." + ["AmmoboxInit", [_object, true]] call BIS_fnc_arsenal; + }; +}; + +deleteVehicle _logic; diff --git a/addons/zeus/functions/fnc_moduleRemoveArsenal.sqf b/addons/zeus/functions/fnc_moduleRemoveArsenal.sqf new file mode 100644 index 0000000000..9e267e4cf5 --- /dev/null +++ b/addons/zeus/functions/fnc_moduleRemoveArsenal.sqf @@ -0,0 +1,41 @@ +/* + * Author: alganthe + * Remove arsenal from an object + * + * Arguments: + * 0: The module logic + * + * Return Value: + * None + * + * Public: No +*/ + +#include "script_component.hpp" + +params ["_logic"]; +if (!local _logic) exitWith {}; + +private _object = attachedTo _logic; +TRACE_3("moduleRemoveArsenal",_logic,_object,typeOf _object); + +switch (true) do { + case (isNull _object): { + [LSTRING(NothingSelected)] call FUNC(showMessage); + }; + case (isPlayer _object): { + ["str_a3_cfgvehicles_moduleremotecontrol_f_errorPlayer"] call FUNC(showMessage); + }; + case (!alive _object): { + [LSTRING(OnlyAlive)] call FUNC(showMessage); + }; + default { + TRACE_1("Calling removeVirtualXXXCargo functions",_object); + [_object, (_object call BIS_fnc_getVirtualItemCargo), true] call BIS_fnc_removeVirtualItemCargo; + [_object, (_object call BIS_fnc_getVirtualWeaponCargo), true] call BIS_fnc_removeVirtualWeaponCargo; + [_object, (_object call BIS_fnc_getVirtualMagazineCargo), true] call BIS_fnc_removeVirtualMagazineCargo; + [_object, (_object call BIS_fnc_getVirtualBackpackCargo), true] call BIS_fnc_removeVirtualBackpackCargo; + }; +}; + +deleteVehicle _logic; diff --git a/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf b/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf index 4a1855ba65..c52517a7d0 100644 --- a/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf +++ b/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf @@ -36,9 +36,10 @@ if (_group) then { private _attached = attachedTo _logic; if (isNull _attached) then { - [_x, _logic] call BIS_fnc_moveToRespawnPosition; + // Function takes position AGL and must be ran where local + [QGVAR(moveToRespawnPosition), [_x, _logic modelToWorld [0,0,0]], _x] call CBA_fnc_targetEvent; } else { - [_x, _attached] call BIS_fnc_moveToRespawnPosition; + [QGVAR(moveToRespawnPosition), [_x, _attached], _x] call CBA_fnc_targetEvent; }; } forEach _player; diff --git a/addons/zeus/functions/fnc_moduleUnconscious.sqf b/addons/zeus/functions/fnc_moduleUnconscious.sqf index 0cf0fffda6..35b300e989 100644 --- a/addons/zeus/functions/fnc_moduleUnconscious.sqf +++ b/addons/zeus/functions/fnc_moduleUnconscious.sqf @@ -38,7 +38,7 @@ if (isNil QEFUNC(medical,setUnconscious)) then { } else { _conscious = GETVAR(_unit,ACE_isUnconscious,false); // Function handles locality for me - [_unit, !_conscious, 10e10, true] call EFUNC(medical,setUnconscious); + [_unit, !_conscious, 10e10] call EFUNC(medical,setUnconscious); }; }; }; diff --git a/addons/zeus/stringtable.xml b/addons/zeus/stringtable.xml index b9bd67cf3d..07c0ca97d2 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -137,7 +137,7 @@ Joue un son radio quand le Zeus utilise du matériel militaire. Rádiós figyelmeztetés kiadása, ha a Zeus tüzérséget használ. Проигрывает звук радио каждый раз, когда Зевс использует артиллерию. - Esegui un messaggio radio quando Zeus usa esplosivi. + Riproduci un messaggio radio quando Zeus usa esplosivi. Zeus が砲撃をつかうときに、無線で警告を流します。 Zeus가 폭격시 경고 무전을 재생합니다. @@ -207,7 +207,7 @@ Basculer en captif Elfogott állapot váltása Пленный (вкл./выкл.) - Apri Catturato + Attivatore Prigioniero 捕虜としてトグル 포로 토글 @@ -220,6 +220,7 @@ Broń obszaru Verteidige Gebiet 지역 방어 + Difendi Area Update Editable Objects @@ -227,6 +228,7 @@ Aktualizuj edytowalne obiekty 수정 가능한 물체 갱신 Màj les objets éditables + Aggiorna Oggetti Modificabili All Curators @@ -234,6 +236,7 @@ 모든 큐레이터 Wszyscy kuratorzy Tous curateurs + Tutti i Moderatori Apply changes to all curators @@ -241,6 +244,7 @@ 모든 큐레이터에 변화를 적용합니다 Zatwierdź zmiany dla wszystkich kuratorów Applique les changements à tous les curateurs + Applica i cambiamenti a tutti i moderatori Remove Objects @@ -248,6 +252,7 @@ 물체 삭제 Usuń obiekty Enlève les objets + Rimuovi Oggetti Remove existing instead of adding new @@ -255,6 +260,7 @@ 물체를 삭제합니다 Usuń istniejące zamiast dodawać nowe Enlève les objets existants au lieu d'en ajouter de nouveaux + Rimuove gli esistenti e li sostituisce con i nuovi Global AI Skill @@ -265,6 +271,7 @@ Globalne umiejętności AI Globale KI-Fähigkeit 서버 인공지능 실력 + Abilità AI Globale General Skill @@ -275,6 +282,7 @@ Ogólne umiejętności Allgemeine Fähigkeit 전반적 실력 + Abilità Generale Changes: general, commanding, courage @@ -285,6 +293,7 @@ Zmienia: ogólne, dowodzenie, odwaga Ändert: general, commanding, courage 변화: 전반적, 지휘, 사기 + Cambia: generale, comando, Accuracy @@ -295,6 +304,7 @@ Precyzja Genauigkeit 명중률 + Precisione Changes: aimingAccuracy @@ -305,6 +315,7 @@ Zmienia: precyzję celowania Ändert: aimingAccuracy 변화: 조준 명중률 + Cambia: aimingAccuracy Weapon Handling @@ -315,6 +326,7 @@ Obsługa broni Waffenhandhabung 무기 조작 + Uso dell'Arma Changes: aimingShake, aimingSpeed, reloadSpeed @@ -325,6 +337,7 @@ Zmienia: drżenie broni, szybkość celowania, szybkość przeładowania Ändert: aimingShake, aimingSpeed, reloadSpeed 변화: 조준시 흔들림, 조준 속도, 재장전 속도 + Cambia: aimingShake, aimingSpeed, reloadSpeed Spotting @@ -335,6 +348,7 @@ Rozpoznanie Aufklärung 탐지 + Ricognizione Changes: spotDistance, spotTime @@ -345,6 +359,7 @@ Zmienia: zasięg rozpoznawania, czas rozpoznawania Ändert: spotDistance, spotTime 변화: 탐지 거리, 탐지까지의 시간 + Cambia: spotDistance, spotTime Seek Cover @@ -355,6 +370,7 @@ Szukaj osłon Deckungssuche 엄폐물 찾기 + Cerca Copertura Should AI seek cover @@ -365,6 +381,7 @@ Czy AI powinno szukać osłon Soll KI nach Deckung suchen 인공지능이 엄폐물을 찾아갑니다 + Le AI dovrebbero cercare una copertura Auto Combat @@ -375,6 +392,7 @@ Auto walka Automatischer Kampfmodus 자동 교전 + Combattimento Automatico Should AI automatically switch to combat mode @@ -385,6 +403,7 @@ Czy AI powinno automatycznie przechodzić w tryb walki Soll KI automatisch in Kampfmodus umschalten 인공지능이 자동적으로 교전 상태에 돌입합니다 + Le AI dovrebbero passare in modalità di combattimento automaticamente Group Side @@ -395,6 +414,7 @@ Strona grupy Gruppenseite 진영 측 + Fazione del Gruppo Patrol Area @@ -405,6 +425,7 @@ Patrol obszaru Patrouillengebiet 정찰 구역 + Area di Pattugliamento Toggle Surrender @@ -416,7 +437,7 @@ Basculer en capitulation Kapituláló állapot váltása Сдавшийся (вкл./выкл.) - Apri Resa + Attivatore Resa 捕虜としてトグル 항복 토글 @@ -426,6 +447,7 @@ 패스트로프 추가/제거 Dodaj/usuń FRIES Aj./Enlève FRIES + Aggiungi/Rimuovi FRIES %1 is not fastrope compatible. @@ -433,6 +455,7 @@ %1은 패스트로프하기에 적합하지 않습니다. %1 nie jest kompatybilny ze zjazdem linowym. %1 n'est pas compatible. + %1 non è compatibile con il fastrope. Unable to remove FRIES, ropes are deployed. @@ -440,6 +463,7 @@ 패스트로프 제거 불가능, 줄이 이미 배치되었습니다. Nie można usunąć FRIES, liny są wypuszczone. Pas en mesure d'enlever le FRIES, les cordes ne sont pas déployées. + Impossibile rimuovere le FRIES, le corde sono ancora dispiegate Teleport Players @@ -450,6 +474,7 @@ Teleportuj graczy Spieler teleportieren 플레이어 순간이동 + Teletrasporta Giocatori Player @@ -460,6 +485,7 @@ Gracz Spieler 플레이어 + Giocatore Teleport selected player to module position @@ -470,6 +496,7 @@ Teleportuje wybranego gracza na pozycję modułu Teleportiert ausgewählten Spieler zur Position des Moduls 모듈의 위치로 플레이어 순간이동 + Teletrasporta il giocatore selezionato nella posizione del modulo Teleport Group @@ -480,6 +507,7 @@ Teleport grupy Gruppe teleportieren 그룹 순간이동 + Teletrasporta Gruppo Teleports all units in group @@ -490,6 +518,7 @@ Teleportuje wszystkie jednostki w grupie Teleportiert alle Einheiten der Gruppe 그룹내에 모든 인원을 순간이동 시킵니다 + Teletrasporta tutte le unità del gruppo Toggle Unconscious @@ -501,7 +530,7 @@ Basculer en inconscient Eszméletlen állapot váltása Без сознания (вкл./выкл.) - Apri Incosciente + Attivatore Incoscienza 気絶をトグル 기절 토글 @@ -514,6 +543,7 @@ Przeszukaj teren Durchsuche Gebiet 지역 수색 + Area di Ricerca Search Nearby Building @@ -524,6 +554,7 @@ Przeszukaj najbliższy budynek Durchsuche nahegelegenes Gebäude 근처 건물 수색 + Cerca Edifici nelle Vicinanze Assign Medic @@ -570,6 +601,7 @@ シミュレーションをトグル 재현 토글 Bascule Simulation + Attivatore Simulazione Add Spare Wheel @@ -700,6 +732,7 @@ Jednostka musi należeć do odpowiedniej strony Einheit muss einer passenden Seite angehören 대상이 적절한 진영에 속해야만합니다 + L'unità deve appartenere ad una fazione coerente Nearest building is too far away @@ -710,6 +743,7 @@ Najbliższy budynek jest zbyt daleko Nächstgelegenes Gebäude ist zu weit entfernt 가장가까운 건물이 너무 멈 + L'edificio più vicino è troppo lontano Place on a unit @@ -774,6 +808,7 @@ Ładunek: Ladung: 화물: + Cargo: Task Position @@ -784,6 +819,7 @@ Pozycja zadania Position der Aufgabe 작업 위치 + Posizione Incarico Select a position to perform the task at @@ -793,6 +829,7 @@ Wybierz pozycję na której wykonać zadanie Wähle eine Position, an der die Aufgabe ausgeführt werden soll 작업을 할 위치를 선택하십시요 + Seleziona una posizione per eseguire l'incarico Task Radius @@ -802,6 +839,7 @@ Obszar zadania Radius der Aufgabe 작업 반경 + Raggio Incarico Radius to perform the task within @@ -811,6 +849,7 @@ Obszar na którym zadanie powinno zostać wykonane Radius, in dem die Aufgabe ausgeführt werden soll 다음 반경 내에서 작업 + Raggio per eseguire un incarico Invalid radius entered @@ -821,9 +860,20 @@ Wpisano nieprawidłowy promień Ungültiger Radius eingegeben 알 수 없는 반경 입력됨 + Raggio Invalido Inserito Suppressive Fire + Fuoco di Soppressione + Tir de suppression + + + Add full arsenal to object + Ajouter arsenal complet à l'objet + + + Remove arsenal from object + Retirer arsenal de l'objet diff --git a/docs/README_DE.md b/docs/README_DE.md index fda503c4d2..52b11e0797 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -4,7 +4,7 @@

- ACE3 Version + ACE3 Version ACE3 Fehlermeldungen diff --git a/docs/README_PL.md b/docs/README_PL.md index 01aa93ddb0..5c5163313f 100644 --- a/docs/README_PL.md +++ b/docs/README_PL.md @@ -3,7 +3,7 @@

- ACE3 Wersja + ACE3 Wersja ACE3 Zagadnienia diff --git a/docs/_config.yml b/docs/_config.yml index 22352d1375..ab86d182c5 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -9,8 +9,8 @@ ace: version: major: 3 minor: 9 - patch: 1 - build: 17 + patch: 2 + build: 18 acex: githubUrl: https://github.com/acemod/ACEX diff --git a/docs/_config_dev.yml b/docs/_config_dev.yml index d3ec0acb83..227d4029bf 100644 --- a/docs/_config_dev.yml +++ b/docs/_config_dev.yml @@ -11,8 +11,8 @@ ace: version: major: 3 minor: 9 - patch: 1 - build: 17 + patch: 2 + build: 18 acex: githubUrl: https://github.com/acemod/ACEX diff --git a/docs/_includes/dependencies_list.md b/docs/_includes/dependencies_list.md index ad884d8cee..4e2a3dc141 100644 --- a/docs/_includes/dependencies_list.md +++ b/docs/_includes/dependencies_list.md @@ -138,6 +138,10 @@ `ace_interaction` {% endif %} +{% if include.component == "hellfire" %} +`ace_interaction`, `ace_missileguidance` +{% endif %} + {% if include.component == "hitreactions" %} `ace_common` {% endif %} @@ -258,6 +262,10 @@ `ace_common` {% endif %} +{% if include.component == "nlaw" %} +`ace_missileguidance` +{% endif %} + {% if include.component == "noidle" %} `ace_common` {% endif %} @@ -290,6 +298,10 @@ `ace_common` {% endif %} +{% if include.component == "quickmount" %} +`ace_common` +{% endif %} + {% if include.component == "rangecard" %} `ACE_Advanced_Ballistics`, `ace_scopes` {% endif %} diff --git a/docs/wiki/development/extension-guidelines.md b/docs/wiki/development/extension-guidelines.md index 06d85eeeaf..f4dc6e40bd 100644 --- a/docs/wiki/development/extension-guidelines.md +++ b/docs/wiki/development/extension-guidelines.md @@ -33,7 +33,7 @@ order: 9 ``` cd extensions\build -cmake .. -G "Visual Studio 14 2015" +cmake .. -G "Visual Studio 15 2017 Win64" ``` A Visual studio project file will now be generated in your build directory. diff --git a/docs/wiki/feature/hellfire.md b/docs/wiki/feature/hellfire.md new file mode 100644 index 0000000000..0f8376db20 --- /dev/null +++ b/docs/wiki/feature/hellfire.md @@ -0,0 +1,66 @@ +--- +layout: wiki +title: Hellfire +description: AGM-114K Hellfire Missiles +group: feature +category: equipment +parent: wiki +mod: ace +version: + major: 3 + minor: 10 + patch: 0 +--- + +## 1. Overview + +### 1.1 Guidance +Hellfire missile is a semi-active laser guided weapon. +It requires an observer (either the launch platform or an external source) to provide laser designation. + +### 1.2 Attack profiles +Missile does not need line of sight to target when fired and can Lock-On-After-Launch (can also delay lasing target). +This and the attack profile used will effect missile's flight and max altitude. +- LOBL: Lock-On-Before-Launch, standard top attack. +- LOAL-DIR: Missile flies with a low altitude until acquiring a laser. +- LOAL-LOW: Missile immediately gains ~90m altitude. +- LOAL-HI: Missile immediately gains ~300m altitude. + +## 2. Usage +- Switching to the hellfire weapon will show additional information about the weapon in weapon status display. +- Shows: lock mode, laser code and a laser receiver indicator. E.G. `LOAL-DIR CODE: 1111` +- Laser receiver indicator turns red when it detects a laser pulse set the the current code. +- Cycle attack profiles with vehicle's ACE3 Interaction Menu or with the missile guidance "Cycle Fire Mode" keybind (default: Ctrl + Tab) + +## 3 Adding to vehicles +- Easiest way to add is via the 1.70 Pylons system. +- Hellfires can also be added to other vehicles via config or script. + +### 3.1 Classnames +- Weapon: `ace_hellfire_launcher` +- Magazines: `6Rnd_ACE_Hellfire_AGM114K` +- Pylon Magazines: `PylonMissile_1Rnd_ACE_Hellfire_AGM114K`, `PylonRack_1Rnd_ACE_Hellfire_AGM114K`, `PylonRack_3Rnd_ACE_Hellfire_AGM114K`, `PylonRack_4Rnd_ACE_Hellfire_AGM114K` + +### 3.2 Script Example +- Adding hellfires to the Cessna Civilian Plane: + +``` +if (local this) then { + this addWeaponTurret ["ace_hellfire_launcher", [-1]]; + this addMagazineTurret ["6Rnd_ACE_Hellfire_AGM114K", [-1]]; +}; +``` + +## 4 Automaticly adding a laser designator +- Can automaticly add a laser designator if hellfire launcher is present +- Ideal for pylon dynamic loadouts + +```cpp +class myChopper: HeliBase { + ace_hellfire_addLaserDesignator = 1; +}; +``` + +## 5. Dependencies + +{% include dependencies_list.md component="hellfire" %} diff --git a/docs/wiki/feature/nlaw.md b/docs/wiki/feature/nlaw.md new file mode 100644 index 0000000000..471a6bdc38 --- /dev/null +++ b/docs/wiki/feature/nlaw.md @@ -0,0 +1,35 @@ +--- +layout: wiki +title: NLAW +description: NLAW +group: feature +category: equipment +parent: wiki +mod: ace +version: + major: 3 + minor: 10 + patch: 0 +--- + +## 1. Overview + +### 1.1 Guidance +NLAW uses Predicted Line Of Sight guidance. +Before firing the shooter tracks the targets for several seconds. +This programs the missile with the angular rotation and allows it to fly a curved path that will hit the target. +It will also correct for gravity drop. + +### 1.2 Attack profiles +- Direct - Normal impact fuze for non-armored targets. Note that the missile's shaped charge is aimed downards, so this mode is not recomended against armor. +- Overfly Top Attack - Flies high and when sensors detects a target below it triggers the shaped charge to fire downards into the weak top armor. + +## 2. Usage +- Cycle attack profiles with the missile guidance "Cycle Fire Mode" keybind (default: Ctrl + Tab) +- Start tracking by pressing and holding the "NLAW Track Target" keybind (default: Tab) +- While holding the key down track the target for 2-3 seconds and fire. +- Can also be fired against static targets without tracking. + +## 3. Dependencies + +{% include dependencies_list.md component="nlaw" %} diff --git a/docs/wiki/feature/refuel.md b/docs/wiki/feature/refuel.md index 939879caa0..b069d9dba2 100644 --- a/docs/wiki/feature/refuel.md +++ b/docs/wiki/feature/refuel.md @@ -65,6 +65,12 @@ Please check the framework description for more details. ### Something broke, I can't use the fuel truck / nozzle any longer. What to do? You can reset the fuel truck and its nozzle by calling `ace_refuel_fnc_reset` with its first parameter being the fuel truck object. +### How do I increase the length of the hose? +There is a global setting that will effect all vehicles and static pumps. To only effect a specific vehicle put the following in it's init box: +```cpp +this setVariable ["ace_refuel_hoseLength", 30]; +``` + ## 4. Dependencies {% include dependencies_list.md component="refuel" %} diff --git a/extensions/CMakeLists.txt b/extensions/CMakeLists.txt index 7ed8386dba..41c28045ea 100644 --- a/extensions/CMakeLists.txt +++ b/extensions/CMakeLists.txt @@ -89,7 +89,7 @@ endif() string(TIMESTAMP ACE_BUILDSTAMP "%Y-%m-%dT%H:%M:%SZ") set(ACE_VERSION_MAJOR 3) -set(ACE_VERSION_MINOR 6) +set(ACE_VERSION_MINOR 10) set(ACE_VERSION_REVISION 0) EXECUTE_PROCESS(COMMAND git rev-parse --verify HEAD OUTPUT_VARIABLE T_ACE_VERSION_BUILD diff --git a/extensions/advanced_ballistics/AdvancedBallistics.cpp b/extensions/advanced_ballistics/AdvancedBallistics.cpp index 32955b4316..7db5ca5add 100644 --- a/extensions/advanced_ballistics/AdvancedBallistics.cpp +++ b/extensions/advanced_ballistics/AdvancedBallistics.cpp @@ -93,7 +93,8 @@ double calculateAirDensity(double temperature, double pressure, double relativeH pressure = pressure * 100; if (relativeHumidity > 0) { - double _pSat = 6.1078 * pow(10, ((7.5 * temperature) / (temperature + 237.3))); + // 610.78 gives pressure in Pa - https://en.wikipedia.org/wiki/Density_of_air + double _pSat = 610.78 * pow(10, ((7.5 * temperature) / (temperature + 237.3))); double vaporPressure = relativeHumidity * _pSat; double partialPressure = pressure - vaporPressure; @@ -338,7 +339,13 @@ double calculateZeroAngle(double zeroRange, double muzzleVelocity, double boreHe extern "C" { - EXPORT void __stdcall RVExtension(char *output, int outputSize, const char *function); + EXPORT void __stdcall RVExtensionVersion(char *output, int outputSize); + EXPORT void __stdcall RVExtension(char *output, int outputSize, const char *function); +} + +void __stdcall RVExtensionVersion(char *output, int outputSize) +{ + strncpy_s(output, outputSize, ACE_FULL_VERSION_STR, _TRUNCATE); } void __stdcall RVExtension(char *output, int outputSize, const char *function) diff --git a/mod.cpp b/mod.cpp index 639e957a64..3357f64b54 100644 --- a/mod.cpp +++ b/mod.cpp @@ -1,8 +1,8 @@ -name = "Advanced Combat Environment 3.9.1"; +name = "Advanced Combat Environment 3.9.2"; picture = "logo_ace3_ca.paa"; actionName = "GitHub"; action = "https://github.com/acemod/ACE3"; -description = "ACE3 - Version 3.9.1"; +description = "ACE3 - Version 3.9.2"; logo = "logo_ace3_ca.paa"; logoOver = "logo_ace3_ca.paa"; tooltip = "ACE3"; diff --git a/optionals/compat_rh_acc/script_component.hpp b/optionals/compat_rh_acc/script_component.hpp index 31bfc4cc86..f819cb90e6 100644 --- a/optionals/compat_rh_acc/script_component.hpp +++ b/optionals/compat_rh_acc/script_component.hpp @@ -1,4 +1,4 @@ -#define COMPONENT rh_acc_comp +#define COMPONENT compat_rh_acc #define COMPONENT_BEAUTIFIED RH Accessories Compatibility #include "\z\ace\addons\main\script_mod.hpp" diff --git a/optionals/compat_rh_de/script_component.hpp b/optionals/compat_rh_de/script_component.hpp index 18621635d0..cb62a462a1 100644 --- a/optionals/compat_rh_de/script_component.hpp +++ b/optionals/compat_rh_de/script_component.hpp @@ -1,4 +1,4 @@ -#define COMPONENT rh_de_cfg_comp +#define COMPONENT compat_rh_de #define COMPONENT_BEAUTIFIED RH Desert Eagle Compatibility #include "\z\ace\addons\main\script_mod.hpp" diff --git a/optionals/compat_rh_m4/script_component.hpp b/optionals/compat_rh_m4/script_component.hpp index 5e52334c38..4c522f8a21 100644 --- a/optionals/compat_rh_m4/script_component.hpp +++ b/optionals/compat_rh_m4/script_component.hpp @@ -1,4 +1,4 @@ -#define COMPONENT rh_m4_cfg_comp +#define COMPONENT compat_rh_m4 #define COMPONENT_BEAUTIFIED RH M4 Compatibility #include "\z\ace\addons\main\script_mod.hpp" diff --git a/optionals/compat_rh_pdw/script_component.hpp b/optionals/compat_rh_pdw/script_component.hpp index 1ea9b9f6ad..52f0f814de 100644 --- a/optionals/compat_rh_pdw/script_component.hpp +++ b/optionals/compat_rh_pdw/script_component.hpp @@ -1,4 +1,4 @@ -#define COMPONENT rh_pdw_comp +#define COMPONENT compat_rh_pdw #define COMPONENT_BEAUTIFIED RH PDW Compatibility #include "\z\ace\addons\main\script_mod.hpp" diff --git a/optionals/compat_rhs_afrf3/CfgVehicles.hpp b/optionals/compat_rhs_afrf3/CfgVehicles.hpp index 9eca6c1c3a..5771ea3e16 100644 --- a/optionals/compat_rhs_afrf3/CfgVehicles.hpp +++ b/optionals/compat_rhs_afrf3/CfgVehicles.hpp @@ -451,6 +451,11 @@ class CfgVehicles { class rhs_2s3tank_base : Tank_F { EGVAR(refuel,fuelCapacity) = 830; + class Turrets: Turrets { + class MainTurret: MainTurret { + EGVAR(fcs,enabled) = 0; + }; + }; }; class OTR21_Base : Truck_F { diff --git a/optionals/compat_rhs_afrf3/CfgWeapons.hpp b/optionals/compat_rhs_afrf3/CfgWeapons.hpp index 09a3af7384..14431a92ae 100644 --- a/optionals/compat_rhs_afrf3/CfgWeapons.hpp +++ b/optionals/compat_rhs_afrf3/CfgWeapons.hpp @@ -87,24 +87,20 @@ class CfgWeapons { ace_reloadlaunchers_enabled = 1; }; + #define HEARING_PROTECTION_VICCREW EGVAR(hearing,protection) = 0.85; EGVAR(hearing,lowerVolume) = 0.6; + #define HEARING_PROTECTION_EARMUFF EGVAR(hearing,protection) = 0.75; EGVAR(hearing,lowerVolume) = 0.5; + #define HEARING_PROTECTION_PELTOR EGVAR(hearing,protection) = 0.75; EGVAR(hearing,lowerVolume) = 0; class H_HelmetB; class rhs_tsh4: H_HelmetB { - ace_hearing_protection = 1; - ace_hearing_lowerVolume = 0.80; + HEARING_PROTECTION_VICCREW }; - class rhs_tsh4_ess: rhs_tsh4 {}; - class rhs_tsh4_bala: rhs_tsh4 {}; - class rhs_tsh4_ess_bala: rhs_tsh4 {}; class rhs_zsh7a: H_HelmetB { - ace_hearing_protection = 1; - ace_hearing_lowerVolume = 0.80; + HEARING_PROTECTION_VICCREW }; - class rhs_zsh7a_mike: rhs_zsh7a {}; class rhs_gssh18: H_HelmetB { - ace_hearing_protection = 0.5; - ace_hearing_lowerVolume = 0.60; + HEARING_PROTECTION_EARMUFF }; class rhs_weap_d81; diff --git a/optionals/compat_rhs_usf3/CfgVehicles.hpp b/optionals/compat_rhs_usf3/CfgVehicles.hpp index d37fe7f09b..25ac08dfa0 100644 --- a/optionals/compat_rhs_usf3/CfgVehicles.hpp +++ b/optionals/compat_rhs_usf3/CfgVehicles.hpp @@ -184,12 +184,6 @@ class CfgVehicles { condition = QUOTE([ARR_2(this,'doorLB')] call FUNC(canCloseDoor)); }; }; - - class EventHandlers: EventHandlers { - class RHSUSF_EventHandlers: RHSUSF_EventHandlers { - getOut = QUOTE(if !((_this select 0) getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]) then {_this call rhs_fnc_uh60_doors}); - }; - }; }; class Helicopter_Base_H: Helicopter_Base_F { @@ -226,11 +220,6 @@ class CfgVehicles { condition = QUOTE([ARR_2(this,'doorLB')] call FUNC(canCloseDoor)); }; }; - class EventHandlers: EventHandlers { - class RHSUSF_EventHandlers { - getOut = QUOTE(if !((_this select 0) getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]) then {_this call rhs_fnc_uh60_doors}); - }; - }; EQUIP_FRIES_ATTRIBUTE; }; @@ -266,6 +255,20 @@ class CfgVehicles { }; }; + class rhsusf_CH53E_USMC: Helicopter_Base_H { + EGVAR(fastroping,enabled) = 1; + EGVAR(fastroping,ropeOrigins)[] = {{0,-9.5,2.6}}; + EGVAR(fastroping,onCut) = QFUNC(onCut); + EGVAR(fastroping,onPrepare) = QFUNC(onPrepare); + + class UserActions { + class RampOpen; + class RampClose: RampOpen { + condition = QUOTE([ARR_2(this,'ramp_bottom')] call FUNC(canCloseDoor)); + }; + }; + }; + class Heli_Attack_01_base_F: Helicopter_Base_F {}; class RHS_AH1Z_base: Heli_Attack_01_base_F { diff --git a/optionals/compat_rhs_usf3/CfgWeapons.hpp b/optionals/compat_rhs_usf3/CfgWeapons.hpp index 2c1594143c..d67879916b 100644 --- a/optionals/compat_rhs_usf3/CfgWeapons.hpp +++ b/optionals/compat_rhs_usf3/CfgWeapons.hpp @@ -30,7 +30,7 @@ class CfgWeapons { ACE_barrelTwist = 304.8; // 1:12" ACE_barrelLength = 635.0; // 25" ACE_RailHeightAboveBore = 2.6; - }; + }; class arifle_MX_Base_F; class rhs_weap_m4_Base: arifle_MX_Base_F { ACE_barrelTwist = 177.8; @@ -195,7 +195,7 @@ class CfgWeapons { class Snip { discreteDistance[] = {100}; discreteDistanceInitIndex = 0; - }; + }; }; }; }; @@ -212,36 +212,176 @@ class CfgWeapons { lockedTargetSound[] = {"",0,1}; }; - class rhsusf_ach_helmet_ocp; - class rhsusf_opscore_01: rhsusf_ach_helmet_ocp { - ace_hearing_protection = 0.50; - ace_hearing_lowerVolume = 0.60; - }; - class rhsusf_opscore_01_tan: rhsusf_opscore_01 {}; - class rhsusf_opscore_03_ocp: rhsusf_opscore_01 {}; - class rhsusf_cvc_helmet: rhsusf_opscore_01 { - ace_hearing_protection = 1; - ace_hearing_lowerVolume = 0.80; + + #define HEARING_PROTECTION_VICCREW EGVAR(hearing,protection) = 0.85; EGVAR(hearing,lowerVolume) = 0.6; + #define HEARING_PROTECTION_EARMUFF EGVAR(hearing,protection) = 0.75; EGVAR(hearing,lowerVolume) = 0.5; + #define HEARING_PROTECTION_PELTOR EGVAR(hearing,protection) = 0.75; EGVAR(hearing,lowerVolume) = 0; + // Fast Helmets + class rhsusf_opscore_01; + class rhsusf_opscore_aor1_pelt: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR }; - class rhsusf_cvc_green_helmet: rhsusf_cvc_helmet {}; - class rhsusf_cvc_ess: rhsusf_cvc_helmet {}; - class rhsusf_cvc_green_ess: rhsusf_cvc_ess {}; + class rhsusf_opscore_aor1_pelt_nsw: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_bk_pelt: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_fg_pelt: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_fg_pelt_nsw: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_fg_pelt_cam: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_paint_pelt: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_paint_pelt_nsw: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_paint_pelt_nsw_cam: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_aor2_pelt: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_aor2_pelt_nsw: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_ut_pelt: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_ut_pelt_cam: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_ut_pelt_nsw_cam: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_mc_pelt: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_mc_pelt_nsw: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_cover; + class rhsusf_opscore_mc_cover_pelt: rhsusf_opscore_cover { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_mc_cover_pelt_cam: rhsusf_opscore_cover { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_rg_cover_pelt: rhsusf_opscore_cover { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_coy_cover_pelt: rhsusf_opscore_cover { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_mar_01; + class rhsusf_opscore_mar_ut_pelt: rhsusf_opscore_mar_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_mar_fg_pelt: rhsusf_opscore_mar_01 { + HEARING_PROTECTION_PELTOR + }; + + // ACH Helmets + class rhsusf_ach_helmet_ocp; + class rhsusf_ach_bare_des_headset: rhsusf_ach_helmet_ocp { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_ach_bare_des_headset_ess: rhsusf_ach_helmet_ocp { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_ach_bare_headset: rhsusf_ach_helmet_ocp { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_ach_bare_headset_ess: rhsusf_ach_helmet_ocp { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_ach_bare_semi_headset: rhsusf_ach_helmet_ocp { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_ach_bare_semi_headset_ess: rhsusf_ach_helmet_ocp { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_ach_bare_tan_headset: rhsusf_ach_helmet_ocp { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_ach_bare_tan_headset_ess: rhsusf_ach_helmet_ocp { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_ach_bare_wood_headset: rhsusf_ach_helmet_ocp { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_ach_bare_wood_headset_ess: rhsusf_ach_helmet_ocp { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_ach_helmet_headset_ocp: rhsusf_ach_helmet_ocp { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_ach_helmet_headset_ess_ocp: rhsusf_ach_helmet_ocp { + HEARING_PROTECTION_PELTOR + }; + + // ACVC Helmets + class rhsusf_cvc_helmet: rhsusf_opscore_01 { + HEARING_PROTECTION_VICCREW + }; + + // MICH Helmets + class rhsusf_mich_bare; + class rhsusf_mich_bare_alt: rhsusf_mich_bare { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_mich_bare_norotos; + class rhsusf_mich_bare_norotos_alt: rhsusf_mich_bare_norotos { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_mich_bare_norotos_arc; + class rhsusf_mich_bare_norotos_arc_alt: rhsusf_mich_bare_norotos_arc { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_mich_bare_semi; + class rhsusf_mich_bare_alt_semi: rhsusf_mich_bare_semi { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_mich_bare_norotos_semi; + class rhsusf_mich_bare_norotos_alt_semi: rhsusf_mich_bare_norotos_semi { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_mich_bare_norotos_arc_semi; + class rhsusf_mich_bare_norotos_arc_alt_semi: rhsusf_mich_bare_norotos_arc_semi { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_mich_bare_tan; + class rhsusf_mich_bare_alt_tan: rhsusf_mich_bare_tan { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_mich_bare_norotos_tan; + class rhsusf_mich_bare_norotos_alt_tan: rhsusf_mich_bare_norotos_tan { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_mich_bare_norotos_arc_tan; + class rhsusf_mich_bare_norotos_arc_alt_tan: rhsusf_mich_bare_norotos_arc_tan { + HEARING_PROTECTION_PELTOR + }; + class H_PilotHelmetHeli_B; class H_CrewHelmetHeli_B; class rhsusf_hgu56p: H_PilotHelmetHeli_B { - ace_hearing_protection = 0.85; - ace_hearing_lowerVolume = 0.75; + HEARING_PROTECTION_VICCREW }; class rhsusf_hgu56p_mask: H_CrewHelmetHeli_B { - ace_hearing_protection = 0.85; - ace_hearing_lowerVolume = 0.75; + HEARING_PROTECTION_VICCREW }; class H_HelmetB; class RHS_jetpilot_usaf: H_HelmetB { - ace_hearing_protection = 1; - ace_hearing_lowerVolume = 0.80; + HEARING_PROTECTION_VICCREW }; }; diff --git a/optionals/compat_rhs_usf3/functions/fnc_canCloseDoor.sqf b/optionals/compat_rhs_usf3/functions/fnc_canCloseDoor.sqf index 61269519ed..2395010624 100644 --- a/optionals/compat_rhs_usf3/functions/fnc_canCloseDoor.sqf +++ b/optionals/compat_rhs_usf3/functions/fnc_canCloseDoor.sqf @@ -18,13 +18,21 @@ #include "script_component.hpp" params ["_vehicle", "_door"]; -(_vehicle doorPhase _door > 0) && -{alive _vehicle} && +(alive _vehicle) && {!(_vehicle getVariable [QEGVAR(fastroping,doorsLocked),false])} && { - if (_vehicle isKindOf "RHS_CH_47F") then { - ACE_player in [driver _vehicle, _vehicle turretUnit [3], _vehicle turretUnit [4]] - } else { - ACE_player in _vehicle + switch (true) do { + case (_vehicle isKindOf "rhsusf_CH53E_USMC"): { + ((_vehicle animationPhase _door) > 0) && + {ACE_player == (driver _vehicle)} + }; + case (_vehicle isKindOf "RHS_CH_47F"): { + ((_vehicle animationSourcePhase _door) > 0) && + {ACE_player in [driver _vehicle, _vehicle turretUnit [3], _vehicle turretUnit [4]]} + }; + default { + ((_vehicle doorPhase _door) > 0) && + {ACE_player in _vehicle} + }; } } diff --git a/optionals/compat_rhs_usf3/functions/fnc_onCut.sqf b/optionals/compat_rhs_usf3/functions/fnc_onCut.sqf index 1201d3ee18..8cbf1e2450 100644 --- a/optionals/compat_rhs_usf3/functions/fnc_onCut.sqf +++ b/optionals/compat_rhs_usf3/functions/fnc_onCut.sqf @@ -26,11 +26,15 @@ if !(isNull _fries) then { [{ _this animateDoor ["doorRB", 0]; _this animateDoor ["doorLB", 0]; + _this animate ["doorHandler_R",0]; + _this animate ["doorHandler_L",0]; }, _vehicle, 2] call CBA_fnc_waitAndExecute; 4 } else { _vehicle animateDoor ["ramp_anim", 0]; + _vehicle animate ["ramp_bottom",0]; + _vehicle animate ["ramp_top",0]; 2 }; diff --git a/optionals/compat_rhs_usf3/functions/fnc_onPrepare.sqf b/optionals/compat_rhs_usf3/functions/fnc_onPrepare.sqf index 4bc7c03524..2adb6f2b5e 100644 --- a/optionals/compat_rhs_usf3/functions/fnc_onPrepare.sqf +++ b/optionals/compat_rhs_usf3/functions/fnc_onPrepare.sqf @@ -23,7 +23,11 @@ private _waitTime = 2; _vehicle animateDoor ["doorRB", 1]; _vehicle animateDoor ["doorLB", 1]; +_vehicle animate ["doorHandler_R",1]; +_vehicle animate ["doorHandler_L",1]; _vehicle animateDoor ["ramp_anim", 1]; +_vehicle animate ["ramp_bottom",0.56]; +_vehicle animate ["ramp_top",1]; private _fries = _vehicle getVariable [QEGVAR(fastroping,FRIES), objNull]; if !(isNull _fries) then { diff --git a/optionals/compat_rksl_pm_ii/script_component.hpp b/optionals/compat_rksl_pm_ii/script_component.hpp index a3f12941a2..3a8d79b820 100644 --- a/optionals/compat_rksl_pm_ii/script_component.hpp +++ b/optionals/compat_rksl_pm_ii/script_component.hpp @@ -1,4 +1,4 @@ -#define COMPONENT RKSL_PMII_comp +#define COMPONENT compat_rksl_pm_ii #define COMPONENT_BEAUTIFIED RKSL PMII Compatibility #include "\z\ace\addons\main\script_mod.hpp" diff --git a/optionals/compat_sma3_iansky/script_component.hpp b/optionals/compat_sma3_iansky/script_component.hpp index 6f222299af..e85cb0083b 100644 --- a/optionals/compat_sma3_iansky/script_component.hpp +++ b/optionals/compat_sma3_iansky/script_component.hpp @@ -1,4 +1,4 @@ -#define COMPONENT sma3_iansky_comp +#define COMPONENT compat_sma3_iansky #define COMPONENT_BEAUTIFIED Iansky Scope Mod Compatibility #include "\z\ace\addons\main\script_mod.hpp"