From fde8f7383f4d4e63f4ff47e37b1cde4e0ac98fc0 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sun, 28 Jun 2015 13:08:47 -0500 Subject: [PATCH 001/371] Map Opened/Closed Events + use in maptools --- addons/common/XEH_postInit.sqf | 18 ++++++++++ addons/maptools/XEH_postInitClient.sqf | 16 +++++++-- addons/maptools/XEH_preInit.sqf | 1 - .../functions/fnc_mapStateUpdater.sqf | 33 ------------------- .../functions/fnc_updateMapToolMarkers.sqf | 10 ++++++ 5 files changed, 42 insertions(+), 36 deletions(-) delete mode 100644 addons/maptools/functions/fnc_mapStateUpdater.sqf diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 3796a4fdc8..159ef1883a 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -353,5 +353,23 @@ GVAR(deviceKeyCurrentIndex) = -1; {false}, [0xC7, [true, false, false]], false] call cba_fnc_addKeybind; //SHIFT + Home Key +//Map opened/closed Events: +GVAR(mapOpened) = false; +[] spawn { + waitUntil {(!isNull findDisplay 12)}; + ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", { + if (!GVAR(mapOpened)) then { + GVAR(mapOpened) = true; + ["mapOpened", []] call FUNC(localEvent); + [{ + if (!visibleMap) then { + GVAR(mapOpened) = false; + ["mapClosed", []] call FUNC(localEvent); + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + }, 0, []] call CBA_fnc_addPerFrameHandler; + }; + }]; +}; GVAR(commonPostInited) = true; diff --git a/addons/maptools/XEH_postInitClient.sqf b/addons/maptools/XEH_postInitClient.sqf index 8129a75b15..e227463711 100644 --- a/addons/maptools/XEH_postInitClient.sqf +++ b/addons/maptools/XEH_postInitClient.sqf @@ -67,6 +67,18 @@ GVAR(drawing_controls) = [36732, 36733, 36734, 36735, 36736, 36737]; // Update the size and rotation of map tools [] call FUNC(updateMapToolMarkers); - - [FUNC(mapStateUpdater), 0, []] call CBA_fnc_addPerFrameHandler; }; + +["mapOpened", { + // Show and update map tools if required + [] call FUNC(updateMapToolMarkers); + // Show GPS if required + [GVAR(mapGpsShow)] call FUNC(openMapGps); +}] call EFUNC(common,addEventHandler); + +["mapClosed", { + // Hide GPS + [false] call FUNC(openMapGps); + // Cancel drawing + call FUNC(cancelDrawing); +}] call EFUNC(common,addEventHandler); diff --git a/addons/maptools/XEH_preInit.sqf b/addons/maptools/XEH_preInit.sqf index 2da38996c3..2bcd68385a 100644 --- a/addons/maptools/XEH_preInit.sqf +++ b/addons/maptools/XEH_preInit.sqf @@ -16,7 +16,6 @@ PREP(handleMouseButton); PREP(handleMouseMove); PREP(handleMouseZChanged); PREP(isInsideMapTool); -PREP(mapStateUpdater); PREP(openMapGps); PREP(openMapGpsUpdate); PREP(removeLineMarker); diff --git a/addons/maptools/functions/fnc_mapStateUpdater.sqf b/addons/maptools/functions/fnc_mapStateUpdater.sqf deleted file mode 100644 index 2b4e634567..0000000000 --- a/addons/maptools/functions/fnc_mapStateUpdater.sqf +++ /dev/null @@ -1,33 +0,0 @@ - -#include "script_component.hpp" - -if (visibleMap) then { - // Show/Hide draw buttons - if ("ACE_MapTools" in items ACE_player) then { - { ((finddisplay 12) displayctrl _x) ctrlShow true; } forEach GVAR(drawing_controls); - } else { - { ((finddisplay 12) displayctrl _x) ctrlShow false; } forEach GVAR(drawing_controls); - if (GVAR(drawing_isDrawing)) then { - call FUNC(cancelDrawing); - }; - }; -}; - -//When Map is Closed: -if (GVAR(mapVisableLastFrame) && (!visibleMap)) then { - GVAR(mapVisableLastFrame) = false; - // Hide GPS - [false] call FUNC(openMapGps); - // Cancel drawing - call FUNC(cancelDrawing); -}; - -//When Map is Opened: -if ((!GVAR(mapVisableLastFrame)) && (visibleMap)) then { - //todo: "mapOpened" Event???? - GVAR(mapVisableLastFrame) = true; - // Show and update map tools if required - [] call FUNC(updateMapToolMarkers); - // Show GPS if required - [GVAR(mapGpsShow)] call FUNC(openMapGps); -}; diff --git a/addons/maptools/functions/fnc_updateMapToolMarkers.sqf b/addons/maptools/functions/fnc_updateMapToolMarkers.sqf index fa6db8872a..959be6752e 100644 --- a/addons/maptools/functions/fnc_updateMapToolMarkers.sqf +++ b/addons/maptools/functions/fnc_updateMapToolMarkers.sqf @@ -20,6 +20,16 @@ PARAMS_1(_theMap); private ["_rotatingTexture", "_textureWidth", "_scale", "_xPos", "_yPos"]; +// Show/Hide draw buttons +if ("ACE_MapTools" in items ACE_player) then { + { ((finddisplay 12) displayctrl _x) ctrlShow true; } forEach GVAR(drawing_controls); +} else { + { ((finddisplay 12) displayctrl _x) ctrlShow false; } forEach GVAR(drawing_controls); + if (GVAR(drawing_isDrawing)) then { + call FUNC(cancelDrawing); + }; +}; + if (!("ACE_MapTools" in items ACE_player)|| {GVAR(mapTool_Shown) == 0}) exitWith {}; _rotatingTexture = ""; From 5609ec7b6b90233cdfbadac5ea093296e6902cc1 Mon Sep 17 00:00:00 2001 From: Jonathan Pereira Date: Sat, 25 Jul 2015 12:56:50 -0300 Subject: [PATCH 002/371] Added PT-BR translations New PT-BR translations, including the slideshow and spectator module. --- addons/interact_menu/stringtable.xml | 3 +++ addons/interaction/stringtable.xml | 9 +++++---- addons/medical/stringtable.xml | 6 ++++++ addons/slideshow/stringtable.xml | 13 +++++++++++++ addons/spectator/stringtable.xml | 15 +++++++++++++++ 5 files changed, 42 insertions(+), 4 deletions(-) diff --git a/addons/interact_menu/stringtable.xml b/addons/interact_menu/stringtable.xml index 5ab782803d..736b520f94 100644 --- a/addons/interact_menu/stringtable.xml +++ b/addons/interact_menu/stringtable.xml @@ -90,6 +90,7 @@ Akcje Zeusa Akce Zeuse Acciones Zeus + Ações do Zeus Interaction - Text Max @@ -256,12 +257,14 @@ Pokazuj akcje dla budynków Zobrazit akci pro budovy Mostrar acciones para edificios + Mostrar ações para edifícios Adds interaction actions for opening doors and mounting ladders on buildings. (Note: There is a performance cost when opening interaction menu, especially in towns) Dodaje opcje interakcji dla otwierania drzwi oraz wchodzenia po drabinach do budynków. Uwaga: Użycie tej opcji może spowodować spadek wydajności menu interakcji, szczególnie w dużych miastach. Přidá možnost interakce pro otevření dvěří a umistňovat žebříky na budovy. (Poznámka: Použití této možnosti snižuje výkon při otevírání pomocí interakčního menu, zejména ve velkých městech.) Añade las acciones de interacción para la apertura de puertas y montaje de escaleras en los edificios. (Nota: Hay un coste de rendimiento al abrir el menú de interacción, especialmente en las ciudades) + Adiciona ações de interações para abrir portas e montar escadas em edifícios. (Nota: Existe um custo de performance quando aberto o menu de interação, especialmente em cidades) \ No newline at end of file diff --git a/addons/interaction/stringtable.xml b/addons/interaction/stringtable.xml index 5bd3282872..7e5eca1947 100644 --- a/addons/interaction/stringtable.xml +++ b/addons/interaction/stringtable.xml @@ -798,6 +798,7 @@ Otwórz Otevřít Abrir + Abrir Interaction System @@ -805,7 +806,7 @@ Sistema de interacción Interaktionssystem Systém interakce - Sistema de interação + Sistema de interação Enable Team Management @@ -813,7 +814,7 @@ Habilitar gestión de equipos Aktiviere Gruppenverwaltung Povolit správu týmu - Habilitar gestão de equipes + Habilitar gestão de equipes Should players be allowed to use the Team Management Menu? Default: Yes @@ -821,15 +822,15 @@ ¿Deben tener permitido los jugadores el uso del menu de gestión de equipos? Por defecto: Si Sollen Spieler das Gruppenverwaltungsmenü verwenden dürfen? Standard: Ja Mohou hráči použít menu správy týmu? Výchozí: Ano - Devem os jogadores ter permissão de usar o menu de gestão de equipes? Padrão: Sim + Devem os jogadores ter permissão de usar o menu de gestão de equipes? Padrão: Sim Team management allows color allocation for team members, taking team command and joining/leaving teams. Na zarządzanie drużyną składa się: przydział kolorów dla członków drużyny, przejmowanie dowodzenia, dołączanie/opuszczanie drużyn. Die Gruppenverwaltung erlaubt die Zuweisung von Farben für Einheiten, die Kommandierung und das Beitreten/Verlassen einer Gruppe. Správa týmu se skládá z: přidělení barev pro členy týmu, převzetí velení, připojení/odpojení. - O módulo de gestão de equipe é composto por: a atribuição de cores para os membros da equipe, comando das equipes, juntando-se / deixando equipes. La gestión del equipo permite la asignación de colores para los miembros del equipo, tomando el mando del equipo y uniendo/dejando equipos. + O módulo de gestão de equipe é composto por: a atribuição de cores para os membros da equipe, comando das equipes, juntando-se / deixando equipes. \ No newline at end of file diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index 5ceb625f59..b65343d1bf 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -3193,11 +3193,13 @@ Condition PAK Podmínka osobní lékárničky Condición EPA + Condição do KPS When can the Personal Aid Kit be used? Kde může být použita osobní lékárnička? ¿Cuando se puede utilizar el Equipo de primeros auxilios? + Onde o kit de primeiros socorros pode ser utilizado? Anywhere @@ -3302,11 +3304,13 @@ Condition Surgical kit (Adv) Podmínka chirurgické soupravy (Pokr.) Condición de equipo quirúrgico (Av) + Condição do Kit Cirúrgico (Avançado) When can the Surgical kit be used? Kde může být použita chirurgická souprava? ¿Cuando se puede utilizar el equipo quirúrgico? + Onde o kit cirúrgico pode ser utilizado? Bloodstains @@ -3635,11 +3639,13 @@ Anytime Kdykoli Siempre + Sempre Stable Stabilní Estable + Estável \ No newline at end of file diff --git a/addons/slideshow/stringtable.xml b/addons/slideshow/stringtable.xml index 63547c06e2..98e8b0e236 100644 --- a/addons/slideshow/stringtable.xml +++ b/addons/slideshow/stringtable.xml @@ -3,42 +3,55 @@ Slideshow + Apresentação de Slides This module allows you to set up slide-shows on different objects. One module per image list. Only objects with hiddenSelection 0 are supported. + Este módulo permite que você monte apresentações de slides em diferentes objetos. Um módulo por lista de imagem. Somente objetos com hiddenSelection 0 são suportados. Objects + Objetos Object names (can also be synchronized objects) slide-show will be displayed on, separated by commas if multiple. Reference INFO for object support. + Nomes dos objetos (também podem ser objetos sincronizados) em que a apresentação de slides será mostrada, separado por vírgulas se for mais de um. Referência INFO para suporte do objeto. Controllers + Controles Controller object names, separated by commas if multiple. + Nome dos objetos de controle, separado por vírgula se mais de um. Images + Imagens List of images that will be used for the slide-show, separated by commas, with full path correctly formatted (eg. images\image.paa). + Lista das imagens que serão utilizadas na apresentação de slides, separadas por vírgula, com o caminho completo corretamente formatado (ex: imagens\imagem.paa). Interaction Names + Nomes de Interação List of names that will be used for interaction entries, separated by commas, in order of images. + Lista dos nomes que serão usados para entradas de interação, separados por vírgulas, na ordem das imagens. Slide Duration + Duração do Slide Duration of each slide. Default: 0 (Automatic Transitions Disabled) + Duração de cada slide. Padrão: 0 (Transição automática desabilitada) Slides + Slides \ No newline at end of file diff --git a/addons/spectator/stringtable.xml b/addons/spectator/stringtable.xml index 5cd585108a..a4865cdb9c 100644 --- a/addons/spectator/stringtable.xml +++ b/addons/spectator/stringtable.xml @@ -6,90 +6,105 @@ Obserwator Pozorovatel Espectador + Espectador Enable Spectator Aktywuj obserwatora Povolit pozorovatele Activar espectador + Ativar espectador Begin spectating on player death? Włącz obserwatora po śmierci gracza? Přepnout do pozorovatele po hráčově smrti? ¿Comenzar como espectador al morir el jugador? + Começar como espectador após morte de jogador? Player Side Only Tylko strona gracza Pouze strana hráče Sólo bando del jugador + Somente lado do jogador Only spectate units belonging to player's side? Pozwól obserwować jednostki będące tylko po stronie gracza? Pozorovat pouze jednotky patřící k hráčově straně? ¿Sólo observar unidades que pertenecen al bando del jugador? + Somente observar unidades que pertençam ao lado do jogador? Spectate AI Obserwacja AI Pozorovat AI Observar IA + Observar IA Allow spectating of AI units? Pozwól obserwować jednostki AI? Umožnit pozorovat AI jednotky? ¿Permitir observar unidades de la IA? + Permitir observar unidades da IA? Track Units Śledź jednostki Sledovat jednotky Seguir unidades + Rastrear unidades Track units' movements throughout mission? Śledź ruch jednostek w trakcie misji? Sledovat pohyby jednotek napříč misí? ¿Seguimiento de movimientos de unidades a lo largo de la misión? + Rastrear unidades ao longo da missão? Start Position Pozycja startowa Počáteční pozice Posición de inicio + Posição de início Use this module as a starting position for spectator camera? Użyj pozycji modułu jako pozycje startową dla kamery obserwatora? Použít tento modul jako počáteční pozici pro pozorovací kameru? ¿Utiliza este módulo como una posición de inicio para la cámara de espectador? + Usar este módulo como uma posição de início para a câmera do espectador? End Mission Zakończ misję Konec mise Finalizar misión + Finalizar missão End mission when all players dead (default BIS behaviour)? Zakończ misję kiedy wszyscy gracze będą martwi (domyślne zachowanie BIS)? Ukončit misi když umřou všichni hráči (výchozí BIS chování)? ¿Finalizar misión cuando todos los jugadores mueran (comportamiento por defecto de BIS)? + Finalizar missão quando todos os jogadores estiverem mortos (Comportamento padrão da BIS)? View Distance Zasięg widzenia Dohlednost Distancia de visión + Distância de visão OK OK OK Aceptar + OK \ No newline at end of file From d0f91c5ebfdbfe6f68a1f79da45200afcebe4103 Mon Sep 17 00:00:00 2001 From: Harakhti Date: Thu, 30 Jul 2015 14:40:51 +0200 Subject: [PATCH 003/371] Row 1 Not a miracle, but it's something. --- addons/advanced_ballistics/stringtable.xml | 24 +++++ addons/ballistics/stringtable.xml | 1 + addons/captives/stringtable.xml | 10 +- addons/common/stringtable.xml | 18 +++- addons/explosives/stringtable.xml | 10 +- addons/finger/stringtable.xml | 12 ++- addons/frag/stringtable.xml | 4 +- addons/hearing/stringtable.xml | 4 +- addons/interact_menu/stringtable.xml | 9 +- addons/interaction/stringtable.xml | 5 + addons/map/stringtable.xml | 8 ++ addons/medical/stringtable.xml | 106 +++++++++++++++++++++ addons/microdagr/stringtable.xml | 9 +- addons/missileguidance/stringtable.xml | 3 + addons/missionmodules/stringtable.xml | 9 ++ addons/mk6mortar/stringtable.xml | 6 +- addons/mx2a/stringtable.xml | 4 +- addons/optionsmenu/stringtable.xml | 21 +++- addons/parachute/stringtable.xml | 4 +- addons/rangecard/stringtable.xml | 9 +- addons/respawn/stringtable.xml | 12 ++- addons/sitting/stringtable.xml | 5 + addons/tacticalladder/stringtable.xml | 11 ++- 23 files changed, 280 insertions(+), 24 deletions(-) diff --git a/addons/advanced_ballistics/stringtable.xml b/addons/advanced_ballistics/stringtable.xml index b30485aae6..45e0d042a5 100644 --- a/addons/advanced_ballistics/stringtable.xml +++ b/addons/advanced_ballistics/stringtable.xml @@ -32,6 +32,7 @@ Erweiterte Ballistik Pokročilá balistika Balística avançada + Fejlett ballisztika Advanced Ballistics @@ -40,6 +41,7 @@ Erweiterte Ballistik Pokročilá balistika Balística avançada + Fejlett ballisztika Enables advanced ballistics @@ -48,6 +50,7 @@ Aktiviert die erweiterte Ballistik Aktivuje pokročilou balistiku Ativa balística avançada + Engedélyezi a fejlett ballisztikát Enabled For Snipers @@ -56,6 +59,7 @@ Für Scharfschützen aktiviert Povoleno pro odstřelovače Ativar para caçadores + Mesterlövészeknek engedélyezve Enables advanced ballistics for non local snipers (when using high power optics) @@ -64,6 +68,7 @@ Aktiviert die erweiterte Ballistik für nicht lokale Scharfschützen (bei Benutzung von Optiken mit starker Vergrößerung) Aktivuje pokročilou balistiku pro nelokální odstřelovače (když používá výkonnou optiku) Ativa balística avançada para caçadores não locais (quando usando miras telescópicas) + Engedélyezi a fejlett ballisztikát nem-helyi mesterlövészeknek (nagy-teljesítményű optika használatakor) Enabled For Group Members @@ -72,6 +77,7 @@ Für Gruppenmitglieder aktiviert Povoleno pro členy skupiny Ativada para membros do grupo + Csoporttagoknak engedélyezve Enables advanced ballistics for non local group members @@ -80,6 +86,7 @@ Aktiviert die erweiterte Ballistik für nicht lokale Gruppenmitglieder Aktivuje pokročilou balistiku pro nelokální členy skupiny Ativa balística avançada para membros de grupo não locais + Engedélyezi a fejlett ballisztikát nem-helyi csoporttagoknak Enabled For Everyone @@ -88,6 +95,7 @@ Für jeden aktiviert Povoleno pro všechny Ativada para todos + Mindenkinek engedélyezve Enables advanced ballistics for all non local players (enabling this may degrade performance during heavy firefights in multiplayer) @@ -96,6 +104,7 @@ Aktiviert die erweiterte Ballistik für alle nicht lokalen Spieler (das Aktivieren dieser Funktion kann zur Beeinträchtigung des Spielerlebnisses im Multiplayer führen) Aktivovat pokročilou balistiku pro všechny nelokální hráče (aktivace této možnosti způsobuje pokles snímu za sekundu během těžké přestřelky v multiplayeru) Ativa balística avançada para todos os jogadores não locais (ativando isso pode degradar a performance durante troca de tiros intensas no multiplayer) + 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) Always Enabled For Group Members @@ -104,6 +113,7 @@ Für Gruppenmitglieder immer aktiviert Vždy povoleno pro členy skupiny Sempre ativada para membros do grupo + Mindig engedélyezve csoporttagoknak Always enables advanced ballistics when a group member fires @@ -112,6 +122,7 @@ Aktiviert die erweiterte Ballistik immer, wenn ein Gruppenmitglied schießt Aktivuje pokročilou balistiku pro členy skupiny Sempre ative balística avançada quando um membro do grupo disparar + Mindig engedélyezi a fejlett ballisztikát, ha egy csoporttag tüzel Disabled In FullAuto Mode @@ -120,6 +131,7 @@ Beim vollautomatischen Feuern deaktiviert Zakázáno v automatickém režimu střelby Desabilitar no modo automático + Automata módban letiltva Disables the advanced ballistics during full auto fire @@ -128,6 +140,7 @@ Deaktiviert die erweiterte Ballistik beim vollautomatischen Feuern Zákáže pokročilou balistiku během střelby v režimu automat Desabilitar a balística avançada durante fogo automático + Letiltja a fejlett ballisztikát automata tüzelés folyamán Enable Ammo Temperature Simulation @@ -136,6 +149,7 @@ Simulation der Munitionstemperatur aktivieren Povolit simulaci teploty munice Ativar simulação de temperatura de munição + Lőszer-hő szimuláció engedélyezése Muzzle velocity varies with ammo temperature @@ -144,6 +158,7 @@ Munitionstemperatur hat Einfluss auf die Mündungsgeschwindigkeit Úsťová rychlost je závislá na teplotě munice A velocidade de saída varia com a temperatura da munição + A kezdősebesség a lőszer hőmérsékletétől függően változó Enable Barrel Length Simulation @@ -152,6 +167,7 @@ Simulation der Lauflänge aktivieren Povolit simulaci délky hlavně Ativar a simulação de comprimento do cano + Csőhossz-szimuláció engedélyezése Muzzle velocity varies with barrel length @@ -160,6 +176,7 @@ Lauflänge beeinflusst Mündungsgeschwindigkeit Úsťová rychlost je závislá na délce hlavně A velocidade de saída caria com o comprimento do cano + A kezdősebesség a cső hosszától függően változó Enable Bullet Trace Effect @@ -168,6 +185,7 @@ Geschossspureffekt aktivieren Povolit efekt trasírek Ativa efeito traçante de projétil + Nyomkövető-effekt engedélyezése Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics) @@ -176,6 +194,7 @@ Aktiviere Geschossspureffekt für hohe Kaliber (bei Benutzung von Optiken mit starker Vergrößerung) Aktivuje efekt trasírek z vysokokaliberních zbraní (viditelné pouze skrze výkonnou optiku) Ativa o efeito traçante de projétil para projéteis de alto calibre (somente visível quando observado por miras telescópicas) + 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ó) Simulation Interval @@ -184,6 +203,7 @@ Simulationsintervall Interval simulace Intervalo da simulação + Szimuláció intervalluma Defines the interval between every calculation step @@ -192,6 +212,7 @@ Legt das Intervall zwischen den Berechnungsschritten fest Určuje interval mezi každým výpočtem Define o intervalo entre cada cálculo + Meghatározza a számítási lépések közötti időintervallumot Simulation Radius @@ -200,6 +221,7 @@ Simulationsradius Rozsah simulace Raio de simulação + Szimuláció hatóköre Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles @@ -208,12 +230,14 @@ Gibt den Radius (in Metern) um den Spieler an, bei dem die erweiterte Ballistik auf Geschosse angewendet wird Určuje oblast kolem hráče (v metrech), kde je pokročilá balistika použita na projektil Define o raio ao redor do jogador (em metros) onde a balística avançada será aplicada aos projéteis + Meghatározza a játékos körüli hatókört (méterben), ahol a lövedékek fejlett ballisztikát használnak This module enables advanced ballistics simulation - meaning the trajectory of projectiles is influenced by variables like air temperature, atmospheric pressure, humidity, gravity, the type of ammunition and the weapon from which it was fired. Moduł ten pozwala aktywować zaawansowaną balistykę biorącą przy obliczeniach trajektorii lotu pocisku pod uwagę takie rzeczy jak temperatura powietrza, ciśnienie atmosferyczne, wilgotność powietrza, siły Coriolisa i Eotvosa, grawitację a także broń z jakiej wykonywany jest strzał oraz rodzaj amunicji. Wszystko to sprowadza się na bardzo dokładne odwzorowanie balistyki. Tento modul umožňuje aktivovat pokročilou balistiku, která vypočítává trajektorii kulky a bere do úvahy věci jako je teplota vzduchu, atmosférický tlak, vlhkost vzduchu, gravitaci, typ munice a zbraň, ze které je náboj vystřelen. To vše přispívá k velmi přesné balistice. Este módulo permite que você ative cálculos de balística avançada, fazendo a trajetória do projétil levar em consideração coisas como temperatura do ar, pressão atmosférica, umidade, força de Coriolis, a gravidade, o modelo da arma no qual o disparo é realizado e o tipo de munição. Tudo isso acrescenta-se a um balística muito precisa. + Ez a modul engedélyezi a fejlett ballisztikai szimulációt - a lövedékek röppályáját befolyásolni fogja a levegő hőmérséklete, légnyomás, páratartalom, gravitáció, a lövedék fajtája, valamint a fegyver, amiből kilőtték a lövedéket. \ No newline at end of file diff --git a/addons/ballistics/stringtable.xml b/addons/ballistics/stringtable.xml index db44078980..70591dcbfe 100644 --- a/addons/ballistics/stringtable.xml +++ b/addons/ballistics/stringtable.xml @@ -1599,6 +1599,7 @@ [ACE] Munitionskiste [ACE] Bedna s municí [ACE] Caixa com suprimentos de munição + [ACE] Lőszeres láda \ No newline at end of file diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index 39cf65cac7..dfeea70c34 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -164,6 +164,7 @@ Einheit kapitulieren lassen Vzdávající se jednotka Fazer unidade se render + Egység kapitulálása Sync a unit to make them surrender.<br />Source: ace_captives @@ -172,6 +173,7 @@ Einheit synchronisieren, um sie kapitulieren zu lassen.<br />Quelle: ace_captives Synchronizuj s jednotkou, která se má vzdát.<br />Zdroj: ace_captives Sincroniza uma unidade para fazer com que ela se renda. <br/>Fonte: ace_captives + Egység szinkronizálása, hogy kapituláljon.<br />Forrás: ace_captives Captives Settings @@ -180,6 +182,7 @@ Nastavení zajatce Gefangenen-Einstellungen Ajustes de prisioneiros + Fogoly-beállítások Controls settings for surrender and cable ties @@ -188,6 +191,7 @@ Toto kontroluje nastavení kapitulace a pout Einstellungen zur Kapitulation und Kabelbindern Controla as configurações de rendição e abraçadeiras + Szabályozza a kapituláció és bilincselés beállításait Can handcuff own side @@ -196,6 +200,7 @@ Může spoutat spolubojovníky Kann Teamkollegen fesseln Pode algemar o próprio lado + Saját oldal megbilincselhető Can players cabletie units on their own side @@ -204,6 +209,7 @@ Mohou hráči spoutat jednotky na své straně Können Spieler eigene Einheiten fesseln Os jogadores podem algemar unidades do seu lado + A játékosok megkötözhetik-e a saját oldalukon lévő egységeket Allow surrendering @@ -212,6 +218,7 @@ Povolit vzdávání Kapitulation erlauben Permite rendição + Kapituláció engedélyezése Players can surrender after holstering their weapon @@ -220,6 +227,7 @@ Hráč se může vzdát poté, co si skryje zbraň Spieler können kapitulieren, nachdem sie ihre Waffe geholstert haben Jogadores podem se render depois de guardar sua arma + A játékosok megadhatják magukat a fegyverük elrakása után - + \ No newline at end of file diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index 6ed5e10d5a..b1faab907e 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -477,9 +477,9 @@ Überprüfe PBOs Zkontrolovat PBO Verificar PBOs + PBO-k ellenőrzése - Sprawdzaj spójność addonów z serwerem Este módulo verifica la integridad de los addons con los que iniciamos el simulador Dieses Modul überprüft ob jeder Spieler die richtigen PBO-Dateien hat. @@ -493,6 +493,7 @@ Aktion Akce Ação + Cselekvés What to do with people who do not have the right PBOs? @@ -501,6 +502,7 @@ Was soll mit Leuten passieren, die nicht die richtigen PBOs haben? Co udělat s lidmi, co nemají správné addony? O que fazer com pessoas que não tem os PBOs corretos? + Mi legyen azokkal a személyekkel, akiknek nincsenek meg a helyes PBO-k? Warn once @@ -509,6 +511,7 @@ Einmal verwarnen Upozornit jednou Avisar uma vez + Egyszeri figyelmeztetés Warn (permanent) @@ -517,6 +520,7 @@ Immer verwarnen Upozornit (permanentně) Avisar (permanente) + Figyelmeztetés (tartós) Kick @@ -525,6 +529,7 @@ Kicken Vyhodit Chutar + Kirúgás Check all addons @@ -533,6 +538,7 @@ Alle Addons überprüfen Zkontrolovat všechny addony Verificar todos addons + Összes bővítmény ellenőrzése Check all addons instead of only those of ACE? @@ -541,6 +547,7 @@ Alle Addons anstatt nur ACE überprüfen? Zkontrolovat všechny addony namísto jen těch od ACE? Verificar todos addons invés de só os do ACE? + Az összes bővítmény ellenőrzése, csak az ACE helyett? Whitelist @@ -549,6 +556,7 @@ Whitelist Seznam povolených Lista branca + Fehérlista What addons are allowed regardless? @@ -557,6 +565,7 @@ Welche Addons werden dennoch erlaubt? Jaké addony jsou povoleny? Quais addons são permitidos de qualquer maneira? + Milyen bővítmények vannak feltétlenül engedélyezve? LSD Vehicles @@ -565,6 +574,7 @@ LSD-Fahrzeuge LSD vozidla Veículos LSD + LSD járművek Adds LSD effect to synchronized vehicle @@ -573,6 +583,7 @@ Fügt einen LSD-Effekt zum synchronisierten Fahrzeug hinzu Přidá LSD efekt pro synchronizované vozidla Adiciona efeito LSD ao veículo sincronizado + LSD-effekt hozzáadása a szinkronizált járművekhez Toggle Handheld Device @@ -581,6 +592,7 @@ Ativa dispositivo de mão Przełącz urządzenie podręczne Přepnout ruční zařízení + Kézi eszköz kapcsolása Close Handheld Device @@ -589,6 +601,7 @@ Fecha dispositivo de mão Zamknij urządzenie podręczne Zavřít ruční zařízení + Kézi eszköz bezárása Cycle Handheld Devices @@ -597,6 +610,7 @@ Troca dispositivos de mão Następne urządzenie podręczne Procházet ruční zařízení + Kézi eszköz váltása - + \ No newline at end of file diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index a985b428c1..b4b9f7c7cf 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -476,7 +476,7 @@ Spínač mrtvého muže Czuwak Detonador de hombre muerto - Dead Man's Switch + Halott ember kapcsolója Detonador do homem morto Кнопка мертвеца Detonatore a rilascio @@ -512,6 +512,7 @@ Sprengstoffsystem Systém výbušnin Sistema de explosivos + Robbanóanyag-rendszer Require specialists? @@ -520,6 +521,7 @@ Benötigt Sprengstoffexperten? Vyžadovat specialistu? Requer especialista? + Specialisták igénylése? Require explosive specialists to disable explosives? Default: No @@ -528,6 +530,7 @@ Benötige Sprengstoffexperte um Sprengladungen zu entschärfen? Standard: Nein Vyžadovat specialistu na zneškodnění výbušniny? Výchozí: Ne Requer especialista em explosivos para desativar explosivos? Padrão: Não + Szükséges-e egy specialista a robbanóanyagok hatástalanításához? Alapértelmezett: Nem Punish non-specialists? @@ -536,6 +539,7 @@ Bestrafe Nicht-Sprengstoffexperten? Potrestat, pokud není specialista? Punir não especialistas? + Nem-specialisták büntetése? Increase the time it takes to complete actions for non-specialists? Default: Yes @@ -544,6 +548,7 @@ Entschärfungszeit für Nicht-Sprengstoffexperten erhöhen? Standard: Ja Zvýšit čas potřebný k dokončení akce pokud není specialista? Výchozí: Ano Aumentar o tempo necessário para completar ações por não especialistas? Padrão: Sim + Nem-specialisták esetén több ideig tartson a cselekvés befejezése? Alapértelmezett: Igen Explode on defusal? @@ -551,6 +556,7 @@ Eksplozja przy rozbrajaniu? Explodovat při zneškodňování? Explotar al desactivar? + Robbanás hatástalanításkor? Enable certain explosives to explode on defusal? Default: Yes @@ -558,6 +564,7 @@ Spraw, aby niektóre ładunki wybuchowe eksplodowały przy próbie ich rozbrojenia? Domyślnie:Tak Umožnit u některých výbušnin explozi při pokusu je zneškodnit? Výchozí: Ano ¿Habilitar ciertos explosivos para estallar al desactivar? Por defecto: Sí + Meghatározott robbanóanyagok felrobbanjanak-e hatástalanításkor? Alapértelmezett: Igen This module adjusts the settings related to explosives. @@ -565,6 +572,7 @@ Dieses Modul erlaubt die Einstellungen für Sprengstoffe zu verändern. Tento modul umoňuje přizpůsobit nastavení týkajících se výbušnin. Este módulo permite personalizar as definições relacionadas a explosivos. + Ez a modul a robbanóanyagokhoz kötött beállításokat szabályozza. \ No newline at end of file diff --git a/addons/finger/stringtable.xml b/addons/finger/stringtable.xml index bbc308fcd7..57fab198fb 100644 --- a/addons/finger/stringtable.xml +++ b/addons/finger/stringtable.xml @@ -4,37 +4,47 @@ Show finger indicator to self Отображать пальце-индикатор для показывающего игрока + Saját mutatási indikátor megjelenítése Render the indicator for the pointing player. This option doesn't affect whether the other players would see the indicator Отображать индикатор для показывающего игрока. Эта настройка не влияет на то, будутт ли другие игроки видеть индикатор + Az indikátor megjelenítése a mutató játékosnak. Ez a beállítás nem változtat azon, hogy más játékosok látják-e az indikátort. Finger indicator Пальце-индикатор + Ujj-indikátor Color of the finger-pointing indicator circle Цвет индикатора пальце-указания + Mutatási indikátor körének színe Action "point a finger at" Действие "показать пальцем на" + Cselekvés "ujj rámutatása" Points, and shows a virtual marker of where you are looking to nearby units. Can be held down. + Mutat, és elhelyez egy virtuális jelölőt a nézett területhez közeli egységekhez. Lenyomva tartható. Finger Settings + Ujj beállításai Finger Pointing Enabled + Mutatás engedélyezése Finger Max Range + Ujj maximum hatótávja How far away players can finger each other. [default: 4] + Milyen messziről ujjazhatják egymást a játékosok. [alapértelmezett: 4] - + \ No newline at end of file diff --git a/addons/frag/stringtable.xml b/addons/frag/stringtable.xml index 5a59b15a4a..c4fac44ec0 100644 --- a/addons/frag/stringtable.xml +++ b/addons/frag/stringtable.xml @@ -8,6 +8,7 @@ Splittersimulation Simulace fragmentace Simulação de fragmentação + Repesz-szimuláció Enable the ACE Fragmentation Simulation @@ -16,6 +17,7 @@ Aktiviere die ACE-Splittersimulation Povolit ACE simulaci fragmentace Ativa a simulação de fragmentação do ACE + Az ACE repesz-szimuláció engedélyezése Spalling Simulation @@ -82,4 +84,4 @@ (Somente SP) Requer um reinício de missão / editor. Habilita o rastreamento visual de projéteis de fragmentação e estilhaçamento apenas no modo de jogo SP. - + \ No newline at end of file diff --git a/addons/hearing/stringtable.xml b/addons/hearing/stringtable.xml index dbd063b752..6316e06043 100644 --- a/addons/hearing/stringtable.xml +++ b/addons/hearing/stringtable.xml @@ -116,6 +116,7 @@ Gehör Sluch Audição + Hallás Enable combat deafness? @@ -124,6 +125,7 @@ Aktiviere Taubheit im Gefecht? Povolit ztrátu sluchu? Ativar surdez em combate? + Harci süketség engedélyezése? Enable combat deafness? @@ -132,9 +134,9 @@ Aktiviere Taubheit im Gefecht? Povolit ztrátu sluchu? Ativar surdez em combate? + Harci süketség engedélyezése? - Głuchota bojowa pojawia się w momentach, kiedy stoimy w pobliżu broni wielkokalibrowej bez ochrony słuchu, lub np. podczas ostrzału artyleryjskiego. Moduł ten pozwala na włączenie lub wyłączenie tego efektu. Dieses Modul aktiviert/deaktiviert die Taubheit im Gefecht. Wenn aktiviert, können Spieler ohne Gehörschutz taub werden, wenn eine Waffe in ihrer Nähe abgefeuert wird oder eine Explosion stattfindet. Ztráta sluchu je možná ve chvíly, kdy se v bezprostřední blízkosti střílí z velkorážní zbraně nebo při bombardování a osoba je bez ochrany sluchu (např. špunty). Tento modul umožňuje tuto věc povolit nebo zakázat. diff --git a/addons/interact_menu/stringtable.xml b/addons/interact_menu/stringtable.xml index b55e8483a1..3963125481 100644 --- a/addons/interact_menu/stringtable.xml +++ b/addons/interact_menu/stringtable.xml @@ -90,6 +90,7 @@ Akcje Zeusa Akce Zeuse Acciones Zeus + Zeus cselekvések Interaction - Text Max @@ -230,6 +231,7 @@ Pozadí menu interakce Interaktionsmenü-Hintergrund Fundo do menu de interação + Cselekvő menü háttere Blur the background while the interaction menu is open. @@ -238,6 +240,7 @@ Rozmazat obraz pokud je interakční menu otevřené. Den Hintergrund verschwimmen lassen, während das Interaktionsmenü geöffnet ist. Desfocar o fundo enquanto o menu de interação está aberto. + A háttér elmosása a cselekvő menü használata alatt. Blur screen @@ -246,6 +249,7 @@ Rozmazaný obraz Verschwommenes Bild Desfoque de tela + Kép elmosása Black @@ -254,18 +258,21 @@ Černý obraz Preto Schwarz + Fekete Show actions for buildings Pokazuj akcje dla budynków Zobrazit akci pro budovy Mostrar acciones para edificios + Cselekvések mutatása épületeknél Adds interaction actions for opening doors and mounting ladders on buildings. (Note: There is a performance cost when opening interaction menu, especially in towns) Dodaje opcje interakcji dla otwierania drzwi oraz wchodzenia po drabinach do budynków. Uwaga: Użycie tej opcji może spowodować spadek wydajności menu interakcji, szczególnie w dużych miastach. Přidá možnost interakce pro otevření dvěří a umistňovat žebříky na budovy. (Poznámka: Použití této možnosti snižuje výkon při otevírání pomocí interakčního menu, zejména ve velkých městech.) Añade las acciones de interacción para la apertura de puertas y montaje de escaleras en los edificios. (Nota: Hay un coste de rendimiento al abrir el menú de interacción, especialmente en las ciudades) + Cselekvéseket engedélyez ajtók kinyitására és létrák mászására. (Figyelem: ez teljesítményvesztéssel járhat a menü megnyitásakor, főleg városokban) - + \ No newline at end of file diff --git a/addons/interaction/stringtable.xml b/addons/interaction/stringtable.xml index 5bd3282872..34a20f4df9 100644 --- a/addons/interaction/stringtable.xml +++ b/addons/interaction/stringtable.xml @@ -798,6 +798,7 @@ Otwórz Otevřít Abrir + Nyitás Interaction System @@ -806,6 +807,7 @@ Interaktionssystem Systém interakce Sistema de interação + Interakciós rendszer Enable Team Management @@ -814,6 +816,7 @@ Aktiviere Gruppenverwaltung Povolit správu týmu Habilitar gestão de equipes + Csapatkezelés engedélyezése Should players be allowed to use the Team Management Menu? Default: Yes @@ -822,6 +825,7 @@ Sollen Spieler das Gruppenverwaltungsmenü verwenden dürfen? Standard: Ja Mohou hráči použít menu správy týmu? Výchozí: Ano Devem os jogadores ter permissão de usar o menu de gestão de equipes? Padrão: Sim + A játékosoknak engedélyezve legyen a csapatkezelő menü? Alapértelmezett: Igen Team management allows color allocation for team members, taking team command and joining/leaving teams. @@ -830,6 +834,7 @@ Správa týmu se skládá z: přidělení barev pro členy týmu, převzetí velení, připojení/odpojení. O módulo de gestão de equipe é composto por: a atribuição de cores para os membros da equipe, comando das equipes, juntando-se / deixando equipes. La gestión del equipo permite la asignación de colores para los miembros del equipo, tomando el mando del equipo y uniendo/dejando equipos. + A csapatkezelés engedélyezi a tagok színének meghatározását, a vezetés átvételét, és csapatoknál be-és kilépést. \ No newline at end of file diff --git a/addons/map/stringtable.xml b/addons/map/stringtable.xml index 3f2d312fae..793dd88599 100644 --- a/addons/map/stringtable.xml +++ b/addons/map/stringtable.xml @@ -8,6 +8,7 @@ Karte Mapa Mapa + Térkép Map illumination? @@ -87,6 +88,7 @@ Blue Force Tracking Blue Force Tracking Rastreio de forças azuis + Blue Force követés BFT Enable @@ -94,6 +96,7 @@ Aktywuj BFT Povolit BFT Activar BFT + BFT engedélyezése Enable Blue Force Tracking. Default: No @@ -101,6 +104,7 @@ Aktywuj Blue Force Tracking. Domyślnie: Nie Povolit Blue Force Tracking. Výchozí: Ne Activar Blue Force Tracking. Por defecto: No + Blue Force követés engedélyezése. Alapértelmezett: Nem Interval @@ -109,6 +113,7 @@ Intervall Interval Intervalo + Intervallum How often the markers should be refreshed (in seconds) @@ -117,6 +122,7 @@ Wie oft sollen die Markierungen aktualisiert werden (in Sekunden) Jak často budou značky aktualizovány (v sekundách) Frequência em que os marcadores devem ser atualizados (em segundos) + Milyen gyakran frissüljenek a jelölők (másodpercben) Hide AI groups? @@ -125,6 +131,7 @@ KI-Gruppen verstecken? Skrýt AI skupiny? Esconder grupos de IA? + AI csoportok elrejtése? Hide markers for 'AI only' groups? @@ -133,6 +140,7 @@ Verstecke Marker für "nur KI"-Gruppen? Skrýt značky pouze pro AI skupiny? Esconder marcadores que pertencem ao grupo de IA? + Jelölők elrejtése "csak AI" csoportoknál? This module allows the tracking of allied units with BFT map markers. diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index 32c38397c0..8fe1afa08e 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -1593,6 +1593,7 @@ Keine Žádný Nada + Nincs Weak @@ -2213,6 +2214,7 @@ Obvázání odstraňuje skvrny od krve El vendaje elimina las manchas de sangre Bandagem remove manchas de sangue + A kötözés eltávolítja a vérfoltokat Pain is only temporarily suppressed @@ -2221,6 +2223,7 @@ Bolest je potlačena pouze dočasně El dolor se suprime solo temporalmente Dor é suprimida somente temporáriamente + A fájdalom csak ideiglenesen csökken Pain Effect Type @@ -2734,6 +2737,7 @@ ACE-Medicsystem ACE Zdravotnické ACE Médico + ACE Orvosi Rendszer Medical Settings [ACE] @@ -2743,6 +2747,7 @@ Medizinische Einstellungen [ACE] Lékařské nastavení [ACE] Ajustes médicos [ACE] + Orvosi beállítások [ACE] Medical Level @@ -2752,6 +2757,7 @@ Medizinisches Level Úroveň medického Nível médico + Orvosi szint What is the medical simulation level? @@ -2761,6 +2767,7 @@ Wie hoch soll das medizinische Simulationslevel sein? Jaká je úroveň lékařské simulace? Qual o nível de simulação médica? + Milyen komplex legyen az orvosi szimuláció? Basic @@ -2770,6 +2777,7 @@ Standard Základní Básica + Alap Advanced @@ -2779,6 +2787,7 @@ Erweitert Pokročilé Avançada + Fejlett Medics setting @@ -2788,6 +2797,7 @@ Medizinische Einstellungen Úroveň zdravotníků Configuração médica + Orvosok beállítása What is the level of detail prefered for medics? @@ -2796,6 +2806,7 @@ ¿Cuál es el nivel de detalle preferido para los médicos? Jaká úroveň detailů je preferována pro zdravotníky? Qual o nível de detalhe preferido para os médicos? + Mi a javasolt részletesség orvosok számára? Disable medics @@ -2805,6 +2816,7 @@ Sanitäter deaktivieren Zakázat zdravotníky Desativar médicos + Orvosok letiltása Enable Litter @@ -2814,6 +2826,7 @@ Abfälle aktivieren Povolit odpadky Ativar lixo médico + Szemét engedélyezése Enable litter being created upon treatment @@ -2823,6 +2836,7 @@ Aktiviere Abfälle, wenn eine Behandlung durchgeführt wurde Vytváří odpad zdravotnického materiálu pří léčení Ativar lixo ser criado após tratamento + Engedélyezi a szemét keletkezését ellátáskor Life time of litter objects @@ -2832,6 +2846,7 @@ Dauer des angezeigten Abfalls Životnost pro odpadky Tempo de vida dos objetos do lixo + Szemétobjektumok élettartama How long should litter objects stay? In seconds. -1 is forever. @@ -2841,6 +2856,7 @@ Wie lange sollen Abfälle am Boden liegen (in Sekunden)? -1 ist für immer. Za jak dlouho začnou odpadky mizet? V sekundách. -1 navždy. Quanto tempo os objetos do lixo devem ficar? Em segundos. -1 é para sempre. + Milyen sokáig legyenek jelen a szemétobjektumok (másodpercben)? A -1 végtelen időt jelent. Enable Screams @@ -2850,6 +2866,7 @@ Schreie aktivieren Povolit křik Ativar gritos + Kiáltások engedélyezése Enable screaming by injuried units @@ -2859,6 +2876,7 @@ Aktiviere Schreie bei verletzten Einheiten Povolit křičení zraněných jednotek Ativa gritos para unidades feridas + Engedélyezi a sérült egységek kiáltásait Player Damage @@ -2868,6 +2886,7 @@ Spielerschaden Poškození hráče Dano do jogador + Játékos sérülés What is the damage a player can take before being killed? @@ -2877,6 +2896,7 @@ Wie viel Schaden kann ein Spieler erleiden, bevor er getötet wird? Jaké poškození může hráč dostat než bude zabit? Qal é o dano que um jogador pode sofrer antes de morrer? + Mennyi sérülést szenvedhet el egy játékos, mielőtt meghal? AI Damage @@ -2886,6 +2906,7 @@ KI-Schaden Poškození AI Dano da IA + AI sérülés What is the damage an AI can take before being killed? @@ -2895,6 +2916,7 @@ Wie viel Schaden kann eine KI erleiden, bis sie getötet wird? Jaké poškození může AI dostat než bude zabito? Qual é o dano que uma IA pode sofrer antes de morrer? + Mennyi sérülést szenvedhet el egy AI, mielőtt meghal? AI Unconsciousness @@ -2904,6 +2926,7 @@ KI-Bewusstlosigkeit Bezvědomí AI Inconsciência da IA + AI eszméletlenség Allow AI to go unconscious @@ -2913,6 +2936,7 @@ KI kann bewusstlos werden Umožňuje AI upadnout do bezvědomí Permite IA ficar inconsciente + Engedélyezi az AI eszméletének elvesztését Remote Controlled AI @@ -2920,6 +2944,7 @@ IA controlada remotamente Zdalnie sterowane AI Vzdáleně ovládané AI + Távvezérelt AI Treat remote controlled units as AI not players? @@ -2927,6 +2952,7 @@ Tratar unidades remotamente controladas como IA? Traktuj jednostki zdalnie sterowane (przez Zeusa) jako AI, nie jako graczy? Ošetřit vzdáleně ovládané jednotky jako AI, ne jako hráče? + Távvezérelt egységek AI-ként, nem játékosként való kezelése? Disabled @@ -2936,6 +2962,7 @@ Deaktiviert Zakázáno Desativado + Letiltva Enabled @@ -2945,6 +2972,7 @@ Aktiviert Povoleno Ativado + Engedélyezve Prevent instant death @@ -2954,6 +2982,7 @@ Verhindere direkten Tod Zabránit okamžité smrti Previnir morte instantânea + Azonnali halál kiiktatása Have a unit move to unconscious instead of death @@ -2963,6 +2992,7 @@ Lässt eine Einheit bewusstlos werden anstatt zu sterben Jednotka upadne do bezvědomí namísto smrti Fazer a unidade ficar inconsciente invés de morrer + Egy egység kerüljön eszméletlen állapotba a halott helyett Bleeding coefficient @@ -2972,6 +3002,7 @@ Verblutungsmultiplikator Koeficient krvácení Coeficiente de sangramento + Vérzési koefficiens Coefficient to modify the bleeding speed @@ -2981,6 +3012,7 @@ Multiplikator um die Verblutungsgeschwindigkeit zu verändern Koeficient rychlosti krvácení Coeficiente para modificar a velocidade do sangramento + Egy szorzó a vérzés sebességének szabályozására Pain coefficient @@ -2990,6 +3022,7 @@ Schmerzmultiplikator Koeficient bolesti Coeficiente de dor + Fájdalmi koefficiens Coefficient to modify the pain intensity @@ -2999,6 +3032,7 @@ Multiplikator um den Schmerzintensität zu verändern Koeficient intenzity bolesti Coeficiente para modificar a instensidade de dor + Egy szorzó a fájdalom erősségének szabályozására Sync status @@ -3008,6 +3042,7 @@ Status synchronisieren Synchronizovat status Sincronizar estado + Szinkronizációs állapot Keep unit status synced. Recommended on. @@ -3017,6 +3052,7 @@ Status der Einheit synchron halten. Sollte aktiviert bleiben. Udržuje status jednotky synchronizovaný. Doporučeno zapnout. Mater o estado da unidade sincronizado. Recomendado ativado. + Egységállapotok szinkronizálása. Javasolt a bekapcsolása. Provides a medical system for both players and AI. @@ -3026,6 +3062,7 @@ Aktiviert ein medizinisches System für Spieler und KI. Poskytuje zdravotní systém pro hráče a AI. Proporciona o sistema médico para os jogadores e a IA. + Egy orvosi rendszert ad játékosok és AI-k számára. Advanced Medical Settings [ACE] @@ -3035,6 +3072,7 @@ Erweiterte medizinische Einstellungen [ACE] Pokročilé zdravotnické nastavení [ACE] Ajustes médicos avançados [ACE] + Fejlett orvosi beállítások [ACE] Enabled for @@ -3044,6 +3082,7 @@ Aktiviert für Povoleno pro Habilitado para + Engedélyezve... Select what units the advanced medical system will be enabled for @@ -3053,6 +3092,7 @@ Wähle aus welche Einheiten das erweiterte medizinische System haben Vyberte, pro jaké jednotky bude pokročilý zdravotní systém povolen Selecione quais unidades o sistema médico avançado será habilitado + Kiválasztható, mely egységek számára legyen engedélyezve a fejlett orvosi rendszer Players only @@ -3062,6 +3102,7 @@ Nur Spieler Pouze hráči Somente jogadores + Csak játékosok Players and AI @@ -3071,6 +3112,7 @@ Spieler und KI Hráči a AI Jogadores e IA + Játékosok és AI Enable Advanced wounds @@ -3080,6 +3122,7 @@ Aktiviere erweiterte Wunden Povolit pokročilé zranění Ativar ferimentos avançados + Komplex sebek engedélyezése Allow reopening of bandaged wounds? @@ -3089,6 +3132,7 @@ Erlaube das Öffnen von bandagierten Wunden? Umožnit znovuotevření zavázané rány? Permitr reabertura de ferimentos enfaixados? + Visszanyílhatnak a bekötözött sebek? Vehicle Crashes @@ -3098,6 +3142,7 @@ Fahrzeugunfälle Poškození z kolize Batidas de veículos + Járműbalesetek Do units take damage from a vehicle crash? @@ -3107,6 +3152,7 @@ Bekommen Einheiten von Fahrzeugunfällen Schaden? Dostane jednotka poškození při autonehodě? As unidades recebem dano de uma batida de veículo? + Sérülnek-e az egységek autós ütközés során? Allow PAK @@ -3116,6 +3162,7 @@ Erlaube Erstehilfekasten Povolit osobní lékárničky Permitir Kit de Primeiros Socorros + Elsősegélycsomag engedélyezése Who can use the PAK for full heal? @@ -3125,6 +3172,7 @@ Wer kann den Erstehilfekasten für eine Endheilung verwenden? Kdo může použít osobní lékárničku pro plné vyléčení? Quem pode usar o KPS para cura completa? + Ki használhatja az elsősegélycsomagot teljes gyógyításra? Anyone @@ -3134,6 +3182,7 @@ Jeder Kdokoliv Qualquer um + Akárki Medics only @@ -3143,6 +3192,7 @@ Nur Sanitäter Pouze zdravotník Somente médicos + Csak orvosok Doctors only @@ -3152,6 +3202,7 @@ Nur Ärzte Pouze doktor Somente doutores + Csak doktorok Remove PAK on use @@ -3161,6 +3212,7 @@ Entferne Erstehilfekasten bei Verwendung Odebrat osobní lékárničku po použití Remover o KPS depois do uso + Elsősegélycsomag eltávolítása használatkor Should PAK be removed on usage? @@ -3170,6 +3222,7 @@ Sollen Erstehilfekästen bei Verwendung entfernt werden? Má se osobní lékárnička odstranit po použití? Deve o KPS ser removido depois do uso? + Eltávolítódjon az elsősegélycsomag használatkor? Locations PAK @@ -3179,6 +3232,7 @@ Orte für Erstehilfekasten Lokace osobní lékárničky Localizações do KPS + Elsősegélycsomag helyek Where can the Personal Aid Kit be used? @@ -3188,16 +3242,19 @@ Wo kann der Erstehilfekasten verwendet werden? Kde může být použita osobní lékárnička? Onde o kit de primeiros socorros pode ser utilizado? + Hol lehet az elsősegélycsomagot használni? Condition PAK Podmínka osobní lékárničky Condición EPA + Elsősegélycsomag állapot When can the Personal Aid Kit be used? Kde může být použita osobní lékárnička? ¿Cuando se puede utilizar el Equipo de primeros auxilios? + Mikor lehet az elsősegélycsomagot használni? Anywhere @@ -3207,6 +3264,7 @@ Überall Kdekoliv Qualquer lugar + Akárhol Medical vehicles @@ -3216,6 +3274,7 @@ Medizinische Fahrzeuge Zdravotnická vozidla Veículos médcos + Orvosi járművek Medical facility @@ -3225,6 +3284,7 @@ Medizinische Einrichtungen Zdravotnické zařízení Instalação médica + Orvosi létesítmény Vehicles & facility @@ -3234,6 +3294,7 @@ Fahrzeuge & Einrichtungen Vozidla a zařízení Veículos e instalações + Járművek & létesítmény Disabled @@ -3243,6 +3304,7 @@ Deaktiviert Zakázáno Desativado + Letiltva Allow Surgical kit (Adv) @@ -3252,6 +3314,7 @@ Erlaube Operationskasten Povolit chirurgickou soupravu (Pokr.) Permite kit cirúrgico (avançado) + Sebészkészlet (Fejlett) engedélyezése Who can use the surgical kit? @@ -3261,6 +3324,7 @@ Wer kann den Operationskasten verwenden? Kdo může použít chirurgickou soupravu? Quem pode usar o kit cirúrgico? + Ki használhatja a sebészkészletet? Remove Surgical kit (Adv) @@ -3270,6 +3334,7 @@ Enrtferne Operationskasten (erweitert) Odebrat chirurgickou soupravu (Pokr.) Remover kit cirúrgico (avançado) + Sebészkészlet (Fejlett) eltávolítása Should Surgical kit be removed on usage? @@ -3279,6 +3344,7 @@ Entferne Operationskästen bei Verwendung? Odebrat chirurgickou soupravu po použití? Deve o kit cirúrgico ser removido após o uso? + Eltávolítódjon a sebészkészlet használatkor? Locations Surgical kit (Adv) @@ -3288,6 +3354,7 @@ Orte für Operationskästen (erweitert) Lokace chirurgické soupravy (Pokr.) Localizações do kit cirúrgico (avançado) + Sebészkészlet (Fejlett) helyei Where can the Surgical kit be used? @@ -3297,16 +3364,19 @@ Wo kann der Operationskasten verwendet werden? Kde může být použita chirurgická souprava? Onde o kit cirúrgico pode ser utilizado? + Hol lehet a sebészkészletet használni? Condition Surgical kit (Adv) Podmínka chirurgické soupravy (Pokr.) Condición de equipo quirúrgico (Av) + Sebészkészlet állapot When can the Surgical kit be used? Kde může být použita chirurgická souprava? ¿Cuando se puede utilizar el equipo quirúrgico? + Mikor lehet a sebészkészletet használni? Bloodstains @@ -3315,6 +3385,7 @@ Skvrny od krve Manchas de sangre Manchas de sangue + Vérfoltok Bandaging removes bloodstains @@ -3323,6 +3394,7 @@ Obvázání odstraňuje skvrny od krve El vendaje elimina las manchas de sangre Bandagem remove manchas de sangue + Kötözés eltávolítja a vérfoltokat Pain suppression @@ -3331,6 +3403,7 @@ Potlačení bolesti Supresión del dolor Supressão de dor + Fájdalomcsillapítás Pain is only temporarily suppressed, not removed @@ -3339,6 +3412,7 @@ Bolest je potlačena, ale jen dočastně El dolor se suprime solo temporalmente, no se elimina. Dor é somente temporáriamente suprimida, não removida + A fájdalom csak ideiglenesen csökken, nem távolítódik el Configure the treatment settings from ACE Medical @@ -3348,6 +3422,7 @@ Behandlungseinstellungen vom ACE-Medical konfigurieren Konfigurace nastavení léčby ze zdravotnické systému ACE Configure as opções de tratamento do ACE Médico + Kezelési lehetőségek konfigurálása az ACE Orvosi rendszerből Revive Settings [ACE] @@ -3357,6 +3432,7 @@ Wiederbelebungseinstellungen [ACE] Nastavení oživení [ACE] Sistema de reavivamento [ACE] + Újraélesztés beállításai [ACE] Enable Revive @@ -3366,6 +3442,7 @@ Erlaube Wiederbelebung Povolit oživení Habilitar reavivamento + Újraélesztés engedélyezése Enable a basic revive system @@ -3375,6 +3452,7 @@ Aktiviere Standard-Wiederbelebungssystem Povolit základní systém oživení Habilitar um sistema básico de reavivamento + Egy alap újraélesztési rendszer engedélyezése Max Revive time @@ -3384,6 +3462,7 @@ Maximale Wiederbelebungszeit Maximální čas pro oživení Tempo máximo de reavivamento + Maximum újraélesztési idő Max amount of seconds a unit can spend in revive state @@ -3393,6 +3472,7 @@ Maximale Zeitspanne in Sekunden die eine Einheit im Wiederbelebungszustand verbringen kann Maximální doba v agónii v sekundách Quantidade máxima de segundos que uma unidade pode gastar em um estado de reavivamento + Maximum másodperc, amit egy egység újraélesztési állapotban tölthet Max Revive lives @@ -3402,6 +3482,7 @@ Maximale Leben bei Wiederbelebung Maximální počet oživení Vidas máximas do reavivado + Maximum újraélesztési lehetőségek Max amount of lives a unit. 0 or -1 is disabled. @@ -3411,6 +3492,7 @@ Maximale Anzahl von Leben einer Einheit. 0 or -1 bedeutet deaktiviert. Maximální počet životu pro jednotku. 0 nebo -1 je zakázáno. Quantidade máxima de vidas por unidade. 0 ou -1 é desativado. + Egy egység maximum "életei". 0 vagy -1 letiltja. Provides a medical system for both players and AI. @@ -3420,6 +3502,7 @@ Aktiviert das Medicsystem für Spieler und KI. Poskytuje zdravotní systém pro hráče a AI. Proporciona um sistema médico para jogadores e IA. + Egy orvosi rendszert ad játékosok és AI-k számára. Set Medic Class [ACE] @@ -3429,6 +3512,7 @@ Setze Sanitäterklassen [ACE] Určit třídu medika [ACE] Definir classe médica [ACE] + Orvos beállítása [ACE] List @@ -3438,6 +3522,7 @@ Liste Seznam Lista + Lista List of unit names that will be classified as medic, separated by commas. @@ -3447,6 +3532,7 @@ Liste von Namen, die als Sanitäter verwendet werden. Wird durch Kommas getrennt. Seznam osob které budou klasifikovány jako zdravotník, oddělené čárkami. Lista dos nomes das unidades que se classificam como médicos, separados por vírgulas. + Azon egységek nevei, melyek orvosként vannak meghatározva, vesszővel elválasztva. Is Medic @@ -3456,6 +3542,7 @@ Ist Sanitäter Je zdravotník É médico + Orvos-e This module allows you to assign the medic class to selected units. @@ -3463,6 +3550,7 @@ Dieses Modul legt fest welche Einheit ein Sanitäter ist. Tento modul určuje, která jednotka je zdravotník. Este módulo determina qual unidade é um paramédico. + Ez a modul engedélyezi az orvosi jelző hozzárendelését kiválasztott egységekhez. None @@ -3472,6 +3560,7 @@ Keine Žádný Nada + Nincs Regular medic @@ -3481,6 +3570,7 @@ Normaler Sanitäter Řadový zdravotník Médico regular + Hagyományos orvos Doctor (Only Advanced Medics) @@ -3490,6 +3580,7 @@ Arzt (nur erweiterte Sanitäter) Doktor (Pouze pokročilý zdravotníci) Doutor (Somente médicos avançados) + Doktor (csak fejlett orvosok) Assigns the ACE medic class to a unit @@ -3499,6 +3590,7 @@ Weise die ACE-Sanitäterklasse einer Einheit zu Přiřadí ACE třídu zdravotníka do jednotky Atribui a classe médica do ACE a uma unidade + Az ACE orvosi jelző hozzárendelése egy egységhez Set Medical Vehicle [ACE] @@ -3508,6 +3600,7 @@ Setze medizinisches Fahrzeug [ACE] Určit zdravotnické vozidlo [ACE] Definir veículo médico [ACE] + Orvosi jármű beállítása [ACE] List @@ -3517,6 +3610,7 @@ Liste Seznam Lista + Lista List of vehicles that will be classified as medical vehicle, separated by commas. @@ -3526,6 +3620,7 @@ Liste ovn Fahrzeugen, die als medizinische Fahrzeuge verwendet werden. Wird durch Kommas getrennt. Seznam vozidel které budou klasifikovány jako zdravotnická vozidla, oddělené čárkami. Lista de veículos que serão classificados como veículos médicos, separados por vírgulas. + Orvosi járműveknek tekintett járművek listája, vesszővel elválasztva. Is Medical Vehicle @@ -3535,6 +3630,7 @@ Ist medizinisches Fahrzeug Je zdravotnické vozidlo É um veículo médico + Orvosi jármű-e Whatever or not the objects in the list will be a medical vehicle. @@ -3544,6 +3640,7 @@ Leg fest ob das Objekt in der Liste ein medizinisches Fahrzeug ist. Ať už jsou nebo nejsou objekty v seznamu budou zdravotnická vozidla. Se serão ou não os objetos dessa lista veículos médicos. + A listában lévő objektumok orvosi járművek-e, vagy sem. Assigns the ACE medic class to a unit @@ -3553,6 +3650,7 @@ Weist die ACE-Sanitäterklasse einer Einheit zu Přiřadí ACE třídu zdravotníka do jednotky Atribui a classe médica ACE a uma unidade + Hozzárendeli az ACE orvosi jelzőt egy egységhez Set Medical Facility [ACE] @@ -3562,6 +3660,7 @@ Setze medizinische Einrichtung [ACE] Určit zdravotnické zařízení [ACE] Definir instalação médica [ACE] + Orvosi létesítmény beállítása [ACE] Is Medical Facility @@ -3571,6 +3670,7 @@ Ist eine medizinische Einrichtung Je zdravotnické zařízení É uma instalação médica + Orvosi létesítmény-e Registers an object as a medical facility @@ -3580,6 +3680,7 @@ Definiert ein Objekt als medizinische Einrichtung Registruje objekt jako zdravotnické zařízení Registra um objeto como instalacão médica + Egy objektum orvosi létesítményként való regisztrálása Defines an object as a medical facility. This allows for more advanced treatments. Can be used on buildings and vehicles. @@ -3589,6 +3690,7 @@ Definiert ein Objekt als medizinische Einrichtung. Das ermöglicht weitere Behandlungen. Kann bei Gebäuden und Fahrzeugen verwendet werden. Definuje objekt jako zdravotnické zařízení. To umožňuje více pokročilé léčení. Může být použito na budovy nebo na vozidla. Define um objeto como instalação médica. Isso permite tratamentos mais avançados. Pode ser utilizado em edifícios e veículos. + Egy objektumot orvosi létesítményként határoz meg. Ez fejlett ellátási lehetőségeket engedélyez. Használható járműveken és épületeken. [ACE] Medical Supply Crate (Basic) @@ -3598,6 +3700,7 @@ [ACE] Medizinische Kiste (standard) [ACE] Zdravotnické zásoby (základní) [ACE] Caixa com suprimentos médicos + [ACE] Orvosi láda (Alap) [ACE] Medical Supply Crate (Advanced) @@ -3607,6 +3710,7 @@ [ACE] Medizinische Kiste (erweitert) [ACE] Zdravotnické zásoby (pokročilé) [ACE] Caixa com suprimentos médicos (Avançados) + [ACE] Orvosi láda (Fejlett) Yes @@ -3636,11 +3740,13 @@ Anytime Kdykoli Siempre + Akármikor Stable Stabilní Estable + Stabil \ No newline at end of file diff --git a/addons/microdagr/stringtable.xml b/addons/microdagr/stringtable.xml index a636ffa4de..8933de478f 100644 --- a/addons/microdagr/stringtable.xml +++ b/addons/microdagr/stringtable.xml @@ -308,6 +308,7 @@ MicroDAGR - Vyplnění mapy MicroDAGR-Kartenfüllung Preenchimento de mapa do MicroDAGR + MicroDAGR térképkitöltés MicroDAGR Map Fill @@ -316,6 +317,7 @@ MicroDAGR - Vyplnění mapy MicroDAGR-Kartenfüllung Preenchimento de mapa do MicroDAGR + MicroDAGR térképkitöltés How much map data is filled on MicroDAGR's @@ -324,6 +326,7 @@ Wie viel Daten auf einem MicroDAGR zu sehen sind Kolik informací je načteno do MicroDAGR? Quanta informação é preenchida no mapa do MicroDAGR + Mennyi térképadatot tartalmaz a MicroDAGR Full Satellite + Buildings @@ -332,6 +335,7 @@ Satellitenbild + Gebäude Satelit + Budovy Satélite completo + Edifícios + Teljes műholdas + épületek Topographical + Roads @@ -340,6 +344,7 @@ Topografisch + Straßen Topografické + Cesty Topográfico + Estradas + Topográfia + utak None (Cannot use map view) @@ -348,6 +353,7 @@ Keine (kann keine Kartenansicht verwenden) Žádný (Nelze použít zobrazení mapy) Nada (Não pode usar a tela de mapa) + Semmi (nem használható a térképnézet) Controls how much data is filled on the microDAGR items. Less data restricts the map view to show less on the minimap.<br />Source: microDAGR.pbo @@ -356,6 +362,7 @@ Steuert wie viel Daten auf dem microDAGR zu sehen ist. Weniger Daten schränken die Kartenansicht ein, um mehr auf der Minimap zu sehen.<br />Quelle: microDAGR.pbo Tento modul umožňuje kontrolovat, kolik informací je obsaženo v MicroDAGR. Menší množství dat omezené zobrazením mapy ukazují méně věcí na minimapě.<br />Zdroj: microDAGR.pbo Controla quantos dados são preenchidos nos itens microDAGR. Menos dados restringe a visualização de mapa para mostrar menos informações no minimapa<br/>Fonte: MicroDAGR.pbo + Meghatárroza a MicroDAGR objektumok térképének tartalmát. A kevesebb adat korlátozza a térképnézeti módot az eszközön. <br />Forrás: microDAGR.pbo - + \ No newline at end of file diff --git a/addons/missileguidance/stringtable.xml b/addons/missileguidance/stringtable.xml index 2845767f15..2a0544fab7 100644 --- a/addons/missileguidance/stringtable.xml +++ b/addons/missileguidance/stringtable.xml @@ -104,6 +104,7 @@ Aus Vypnout Desligado + Ki Player Only @@ -112,6 +113,7 @@ Nur Spieler Pouze hráči Somente jogador + Csak játékosok Player and AI @@ -120,6 +122,7 @@ Spieler und KI Hráči a AI Jogador e IA + Játékosok és AI \ No newline at end of file diff --git a/addons/missionmodules/stringtable.xml b/addons/missionmodules/stringtable.xml index b99285850d..dfa461072b 100644 --- a/addons/missionmodules/stringtable.xml +++ b/addons/missionmodules/stringtable.xml @@ -8,6 +8,7 @@ ACE-Missionsmodule ACE Moduly mise Módulo de missões ACE + ACE küldetési modulok Ambiance Sounds [ACE] @@ -16,6 +17,7 @@ Umgebungsgeräusche [ACE] Zvuky prostředí [ACE] [ACE] Sons ambientes + Ambiens hangok [ACE] Sounds @@ -24,6 +26,7 @@ Sounds Zvuky Sons + Hangok Class names of the ambiance sounds to be played. Seperated by ',' @@ -40,6 +43,7 @@ Mindestabstand Minimální vzdálenost Distância mínima + Minimális távolság Used for calculating a random position and sets the minimal distance between the players and the played sound file(s) @@ -56,6 +60,7 @@ Maximalabstand Maximální vzdálenost Distância máxima + Maximális távolság Used for calculating a random position and sets the maximum distance between the players and the played sound file(s) @@ -72,6 +77,7 @@ Minimale Verzögerung Minimální prodleva Atraso mínimo + Minimum késleltetés Minimal delay between sounds played @@ -88,6 +94,7 @@ Maximale Verzögerung Maximální prodleva Atraso máximo + Maximum késleltetés Maximum delay between sounds played @@ -104,6 +111,7 @@ Spielern folgen Následovat hráče Seguir jogadores + Játékosok követése Follow players. If set to false, loop will play sounds only nearby logic position. @@ -120,6 +128,7 @@ Lautstärke Hlasitost Volume + Hangerő The volume of the sounds played diff --git a/addons/mk6mortar/stringtable.xml b/addons/mk6mortar/stringtable.xml index 26ab485db2..300445d482 100644 --- a/addons/mk6mortar/stringtable.xml +++ b/addons/mk6mortar/stringtable.xml @@ -56,6 +56,7 @@ MK6-Einstellungen MK6 - Nastavení Ajustes do MK6 + MK6 beállítások Air Resistance @@ -64,6 +65,7 @@ Luftwiderstand Odpor vzduchu Resistência do Ar + Légellenállás For Player Shots, Model Air Resistance and Wind Effects @@ -80,6 +82,7 @@ Erlaube MK6-Computer MK6 - Povolit počítač Permitir computador do MK6 + MK6 számítógép engedélyezése Show the Computer and Rangefinder (these NEED to be removed if you enable air resistance) @@ -96,6 +99,7 @@ Erlaube MK6-Kompass MK6 - Povolit kompas Permitir bússula do MK6 + MK6 iránytű engedélyezése Show the MK6 Digital Compass @@ -104,9 +108,9 @@ Zeige MK6-Digitaler-Kompass MK6 - Zobrazit digitální kompas Mostra a bússula digital do MK6 + Az MK6 digitális iránytű megjelenítése - Moduł ten pozwala dostosować ustawienia moździerza MK6. Dieses Modul erlaubt das Einstellen des MK6-Mörsers. Tento modul umožňuje nastavení minometu MK6. diff --git a/addons/mx2a/stringtable.xml b/addons/mx2a/stringtable.xml index e8df673866..0de9ce7ff6 100644 --- a/addons/mx2a/stringtable.xml +++ b/addons/mx2a/stringtable.xml @@ -8,6 +8,7 @@ MX-2A MX-2A MX-2A + MX-2A Thermal imaging device @@ -16,6 +17,7 @@ Dispositivo de imagen térmica Termální dalekohled Dispositivo de imagem térmica + Hőleképező készülék - + \ No newline at end of file diff --git a/addons/optionsmenu/stringtable.xml b/addons/optionsmenu/stringtable.xml index 376935297e..74430baedc 100644 --- a/addons/optionsmenu/stringtable.xml +++ b/addons/optionsmenu/stringtable.xml @@ -248,6 +248,7 @@ Erlaube Config-Export [ACE] Povolit export natavení [ACE] [ACE] Permitir exportação de configurações + Konfiguráció-exportálás engedélyezése [ACE] Allow @@ -256,6 +257,7 @@ Erlaube Povolit Permitir + Engedélyezés Allow export of all settings to a server config formatted. @@ -280,6 +282,7 @@ Verstecken Skrýt Ocultar + Elrejtés Top right, downwards @@ -288,6 +291,7 @@ Open rechts, nach unten Vpravo nahoře, dolů Superior direito, para baixo + Jobb felül, lefele Top right, to the left @@ -296,6 +300,7 @@ Von rechts nach links Vpravo nahoře, do leva Superior direito, à esquerda + Jobb felül, balra Top left, downwards @@ -304,6 +309,7 @@ Von links, nach unten Vlevo nahoře, dolů Superior esquerdo, para baixo + Bal felül, lefele Top left, to the right @@ -312,6 +318,7 @@ Oben links nach rechts Vlevo nahoře, do prava Superior esquerdo, para a direita + Bal felül, jobbra Top @@ -320,6 +327,7 @@ Oben Nahoře Acima + Fent Bottom @@ -328,6 +336,7 @@ Unten Dole Abaixo + Alul Debug To Clipboard @@ -336,6 +345,7 @@ Debug do schránky Debug in die Zwischenablage Depuração para área de transferência + Debug a vágólapra Sends debug information to RPT and clipboard. @@ -344,12 +354,15 @@ Pošle debug informace do RPT a schránky. Protokolliert Debug-Informationen im RPT und speichert sie in der Zwischenablage. Envia informação de depuração para RPT e área de transferência. + Debug információt küld az RPT-be és a vágólapra. - + Headbug Fix + "Fejhiba" fix - + Resets your animation state. + Visszaállítja az animációs állapotodat. ACE News @@ -358,6 +371,7 @@ Notícias do ACE Wiadomości ACE ACE Novinky + ACE hírek Show News on Main Menu @@ -366,6 +380,7 @@ Mostrar notícias no menu principal Pokazuj wiadomości ACE w menu głównym Zobrazit novinky v hlavním menu + Hírek mutatása a főmenüben - + \ No newline at end of file diff --git a/addons/parachute/stringtable.xml b/addons/parachute/stringtable.xml index b9ccad48a4..66d6670e51 100644 --- a/addons/parachute/stringtable.xml +++ b/addons/parachute/stringtable.xml @@ -52,10 +52,12 @@ Cut Parachute Fallschirm abschneiden + Ejtőernyő elvágása Reserve Parachute Reserve Fallschirm + Tartalék ejtőernyő - + \ No newline at end of file diff --git a/addons/rangecard/stringtable.xml b/addons/rangecard/stringtable.xml index bda93bcab3..20c3a17e0f 100644 --- a/addons/rangecard/stringtable.xml +++ b/addons/rangecard/stringtable.xml @@ -8,6 +8,7 @@ Vzdálenostní tabulka Entfernungsspinne Tabela de distâncias + Távolsági kártya 50 METER increments -- MRAD/MRAD (reticle/turrets) @@ -16,6 +17,7 @@ Přidat 50 METRŮ -- MRAD/MRAD (síťka/věže) 50-Meter-Schritte MRAD/MRAD (Fadenkreuz/Geschützturm) Incrementos de 50 METROS - MRAD/MRAD (retícula/torres) + 50 MÉTERES lépések - MRAD/MRAD (célzó/lövegek) Open Range Card @@ -24,6 +26,7 @@ Otevřít vzdálenostní tabulku Öffne Entfernungsspinne Abrir tabela de distâncias + Távolsági kártya kinyitása Open Range Card Copy @@ -32,6 +35,7 @@ Otevřít kopii vzdálenostní tabulky Öffne Kopie der Entfernungsspinne Abrir cópia da tabela de distâncias + Távolsági kártya-másolat kinyitása Open Range Card @@ -40,6 +44,7 @@ Otevřít vzdálenostní tabulku Öffne Entfernungsspinne Abrir tabela de distäncias + Távolsági kártya kinyitása Open Range Card Copy @@ -48,6 +53,7 @@ Otevřít kopii vzdálenostní tabulky Öffne Kopie der Entfernungsspinne Abrir cópia da tabela de distâncias + Távolsági kártya-másolat kinyitása Copy Range Card @@ -56,6 +62,7 @@ Kopírovat vzdálenostní tabulku Kopiere Entfernungsspinne Copiar tabela de distäncias + Távolsági kártya másolása - + \ No newline at end of file diff --git a/addons/respawn/stringtable.xml b/addons/respawn/stringtable.xml index 4b649173f0..99d189ca50 100644 --- a/addons/respawn/stringtable.xml +++ b/addons/respawn/stringtable.xml @@ -152,6 +152,7 @@ Respawn-System Systém znovuzrození Sistema de Renascimento + Respawn-rendszer Save Gear? @@ -160,6 +161,7 @@ Ausrüstung speichern? Uložit výbavu? Salvar equipamento? + Felszerelés elmentése? Respawn with the gear a soldier had just before his death? @@ -168,6 +170,7 @@ Mit der Ausrüstung, die ein Soldat vor seinem Tod hatte, respawnen? Znovuubjevit s výbavou kterou měl voják před smrtí? Renascer com o equipamento que um soldado tinha antes de sua morte? + Az egység halála előtti felszerelésével való respawnolása? Remove bodies? @@ -176,6 +179,7 @@ Körper entfernen? Odstranit těla? Remover corpos? + Holttestek eltávolítása? Remove player bodies after disconnect? @@ -184,9 +188,9 @@ Entferne Spielerkörper nach dem Trennen einer Verbindung? Odstranit hráčova těla po odpojení? Remover corpos dos jogadores depois de desconectar? + Játékosi testek eltávolítása távozás után? - Moduł ten pozwala dostosować ustawienia odrodzenia (respawnu). Dieses Modul erlaubt es die Respawn-Einstellungen anzupassen. Tento modul umožňuje nastavení znovuzrození (spawn). @@ -199,9 +203,9 @@ Freundbeschuss-Nachrichten Upozornění na přátelskou střelbu Mensagens de fogo amigo + Baráti tűz üzenetek - Użycie tego modułu na misji spowoduje wyświetlenie wiadomości na czacie w przypadku, kiedy zostanie popełniony friendly fire - wyświetlona zostanie wtedy wiadomość kto kogo zabił. Zobrazí zprávu v chatu v případě, když budete střílet na vlastní jednotky. Ve zprávě se zobrazí kdo na koho střílel, popř. kdo koho zabil. Usando este módulo em uma missão para exibir mensagens chat, no caso de quando você faz um fogo amigo - então a mensagem será exibida mostrando quem matou quem. @@ -213,9 +217,9 @@ Rallypoint-System Systém shromáždění Sistema de ponto de encontro + Gyülekezőpont-rendszer - Moduł ten pozwala zastosować na misji "punkt zbiórki", do którego można szybko przeteleportować się z "bazy". Wymaga postawienia odpowiednich obiektów na mapie - bazy oraz flagi. Obydwa dostępne są w kategorii Puste -> ACE Odrodzenie. Tento modul umožňuje určit místo shromaždiště, kam se mohou jednokty rychle teleportovat ze "základny". Toto vyžaduje vhodné objekty v mapě - základna a vlajka. Oba dva můžete najít v kategorii Prázdné -> ACE Oživení. Este módulo permite que você aplique em uma missão "pontos de encontro", que pode rapidamente se teletransportar para a "base". Ele requer colocar objetos apropriados no mapa - base e bandeiras. Ambos estão disponíveis na categoria em branco -> ACE Revival. @@ -227,6 +231,7 @@ Bewege Rallypoint Přesun na shromaždiště Mover para ponto de encontro + Gyülekezőpont mozgatása ACE Respawn @@ -235,6 +240,7 @@ ACE-Respawn ACE Znovuzrození ACE Respawn + ACE Respawn \ No newline at end of file diff --git a/addons/sitting/stringtable.xml b/addons/sitting/stringtable.xml index 443c34c360..e26c2b36f0 100644 --- a/addons/sitting/stringtable.xml +++ b/addons/sitting/stringtable.xml @@ -7,6 +7,7 @@ Sentar Sednout si Sentarse + Leülés Stand Up @@ -14,6 +15,7 @@ Levantar Vstát Levantarse + Felállás Enable Sitting @@ -21,6 +23,7 @@ Aktywuj siadanie Povolit sezení Acivar asiento + Ülés engedélyezése Sitting @@ -28,6 +31,7 @@ Siadanie Sedící Sentarse + Ülés This module allows you to disable the ability to sit on chairs and toilets. @@ -35,6 +39,7 @@ Moduł ten pozwala na włączenie lub wyłączenie możliwości siadania na krzesłach i toaletach. Tento modul dovoluje zakázat možnost sedět na židlých a toaletách. Este módulo te permite desactivar la capacidad de sentarte en sillas y aseos. + Ez a modul lehetővé teszi a székekre és toalettekre való leülés letiltását. \ No newline at end of file diff --git a/addons/tacticalladder/stringtable.xml b/addons/tacticalladder/stringtable.xml index 4342ac5408..53a6935484 100644 --- a/addons/tacticalladder/stringtable.xml +++ b/addons/tacticalladder/stringtable.xml @@ -10,7 +10,7 @@ Telescopic Ladder Teleskopický žebřík Telescopic Ladder - Telescopic Ladder + Teleszkopikus létra Escada telescópica @@ -22,7 +22,7 @@ Deploy ladder Rozložit žebřík Deploy ladder - Deploy ladder + Létra lerakása Implantar escada @@ -34,7 +34,7 @@ Drop ladder Položit žebřík Drop ladder - Drop ladder + Létra eldobása Derrubar escada @@ -44,6 +44,7 @@ Upravit žebřík Ajustar escalera Ajustar escada + Létra állítása Position ladder @@ -54,7 +55,7 @@ Position ladder Umístit žebřík Position ladder - Position ladder + Létra elhelyezése Posicionar escada @@ -66,7 +67,7 @@ Pickup ladder Vzít žebřík Pickup ladder - Pickup ladder + Létra felvétele Pegar escada From 2b23958fd184b81585b0d938858bc6f66e23c6c9 Mon Sep 17 00:00:00 2001 From: Harakhti Date: Thu, 30 Jul 2015 16:06:32 +0200 Subject: [PATCH 004/371] Row 2 It gets tedious after a while, especially if your language lacks technical terms. That or my B2 language exam isn't good enough. --- addons/frag/stringtable.xml | 8 ++++++++ addons/map/stringtable.xml | 10 ++++++++++ addons/missionmodules/stringtable.xml | 7 +++++++ addons/mk6mortar/stringtable.xml | 2 ++ addons/nametags/stringtable.xml | 28 ++++++++++++++++++++++++++- addons/optionsmenu/stringtable.xml | 2 ++ addons/switchunits/stringtable.xml | 14 +++++++++++++- addons/vehiclelock/stringtable.xml | 3 +++ addons/viewdistance/stringtable.xml | 27 +++++++++++++++++++++++++- addons/weather/stringtable.xml | 14 ++++++++++++++ addons/winddeflection/stringtable.xml | 5 ++++- addons/yardage450/stringtable.xml | 5 ++++- addons/zeus/stringtable.xml | 17 +++++++++++++++- 13 files changed, 136 insertions(+), 6 deletions(-) diff --git a/addons/frag/stringtable.xml b/addons/frag/stringtable.xml index c4fac44ec0..205fb50c75 100644 --- a/addons/frag/stringtable.xml +++ b/addons/frag/stringtable.xml @@ -26,6 +26,7 @@ Explosionssimulation Simulace úlomků Simulação de estilhaços + Pattogzás-szimuláció Enable the ACE Spalling Simulation @@ -34,6 +35,7 @@ Aktiviere ACE-Explosionssimulation Povolit ACE simulaci úlomků Ativa a simulação de estilhaços do ACE + Az ACE pattogzás-szimuláció engedélyezése Maximum Projectiles Tracked @@ -42,6 +44,7 @@ Maximalzahl der verfolgten Projektile Maximální počet sledovaných projektilů Máximo de projéteis rastreados + Maximum követett repeszek This setting controls the maximum amount of projectiles the fragmentation and spalling system will track at any given time. If more projectiles are fired, they will not be tracked. Lower this setting if you do not want FPS drops at high-count projectile scenarios ( >200 rounds in the air at once) @@ -50,6 +53,7 @@ Diese Einstellung steuert die maximale Anzahl an Projektilen, die das Splitter- und Explosionssystem gleichzeitig verfolgen wird. Wenn mehr Projektile abgefeuert werden, werden sie nicht verfolgt werden. Diese Einstellung zu verringern, kann FPS-Einbrüche bei Szenarien mit vielen Projektilen verhindern (>200 Objekte gleichzeitig in der Luft) Toto nastavení kontroluje maximální množství projektilů z fragmentace a úlomků, která jsou sledována v dané době. Pokud je vystřeleno více projektilů, tak nebudou sledovány. Snižte toto nastavení pokud si nepřejete propady FPS v situacích, kde je velké množství projektilů ( >200 nábojů najednou ve vzduchu) Esta definição controla a quantidade máxima de projéteis que o sistema de fragmentação e estilhaçamento irá acompanhar em qualquer momento. Se mais projéteis são disparados, eles não serão rastreados. Diminua essa configuração se você não quiser que o FPS caia em cenários com alta contagem de projéteis (> 200 projéteis no ar ao mesmo tempo) + Ez a beállítás szabályozza a repeszeződés és pattogzás által kilőtt objektumok követett számát. Ha több ez a szám, ezek az objektumok nem lesznek követve. Csökkentsd ezt a beállítást, ha nem akarsz lassulásokat magas-törmelékmennyiségű helyzetekben (200+ repesz a levegőben egyszerre) Maximum Projectiles Per Frame @@ -58,6 +62,7 @@ Maks. liczba pocisków na klatkę Maximální počet projektilů ze jeden snímek Projéteis máximos por quadro + Maximum repesz/képkocka The number of spall track calculations to perform in any given frame. This helps spread the FPS impact of tracking spall rounds across multiple frames, limiting its impact even further. @@ -66,6 +71,7 @@ El número de cálculos de esquirlas que se hará en cualquier cuadro. Esto ayuda a dispersar el impacto en FPS del seguimiento de esquirlas de balas a través de múltiples cuadros, lo que limita aún más su impacto. Počet úlomků v daném snímku. Toto pomáhá rozšířit FPS dopad sledovaného úlomku napříč více snímky, omezuje jeho vliv ještě více. O número de cálculos por estilhaço rastreado para executar em qualquer quadro. Isso ajuda a distribuir o impacto no FPS do rastreamento de estilhaço em vários quadros, o que limita o seu impacto ainda mais. + A lepattogzási útvonalak számításának darabjai képkockánként. Ez eloszlatja az FPS-megszakadást több képkockára, ezzel csökkentve a súlyosságát. (SP Only) Frag/Spall Debug Tracing @@ -74,6 +80,7 @@ (Pouze SP) Debug sledování Frag/Úlomků (nur SP) Splitter-/Explosions-Debug-Verfolgung (Somente SP) Depuração de fragmentação e estilhaços traçantes + (Csak SP) Repesz/Pattogzás debug követés (SP Only) Requires a mission/editor restart. Enables visual tracing of fragmentation and spalling rounds in SP game mode only. @@ -82,6 +89,7 @@ (nur SP) Splitter-/Explosions-Debugging (Pouze SP) Vyžaduje restart mise/editoru. Aktivuje vizuální stopování fragmentace a úlomů pouze v režimu jednoho hráče. (Somente SP) Requer um reinício de missão / editor. Habilita o rastreamento visual de projéteis de fragmentação e estilhaçamento apenas no modo de jogo SP. + (Csak SP) Küldetés/Editor újraindítás szükséges. Engedélyezi a repeszek és pattogzó lövedékek vizuális nyomkövetését, csak egyjátékos módok alatt. \ No newline at end of file diff --git a/addons/map/stringtable.xml b/addons/map/stringtable.xml index 793dd88599..5fc03d4343 100644 --- a/addons/map/stringtable.xml +++ b/addons/map/stringtable.xml @@ -17,6 +17,7 @@ Kartenausleuchtung Osvětlení mapy Iluminação do mapa? + Térkép megvilágítása? Calculate dynamic map illumination based on light conditions? @@ -25,6 +26,7 @@ Berechne die Kartenauslichtung anhand des Umgebungslichts? Vypočítat dynamické osvětlení mapy na základně světelných podmínek? Calcular a iluminação dinâmica do mapa de acordo com as condições de luz? + Számítódjon a térkép megvilágítottsága a környezeti fényviszonyokból? Map shake? @@ -33,6 +35,7 @@ Kamerawackeln Třesení mapy? Tremor de mapa? + Térkép-rázkódás? Make map shake when walking? @@ -41,6 +44,7 @@ Kamerawackeln beim Gehen? Umožnit třesení mapy za pochodu? Tremer o mapa enquanto caminha? + Rázkódjon-e a térkép mozgáskor? Limit map zoom? @@ -49,6 +53,7 @@ Kartenzoom einschränken Omezit přiblížení mapy? Limitar zoom do mapa? + Térkép-nagyítás korlátozása? Limit the amount of zoom available for the map? @@ -57,6 +62,7 @@ Zoomstufe der Karte einschränken? Omezit stupeň přiblížení pro mapu? Limitar a quantidade de zoom disponível para o mapa? + Korlátozva legyen-e a nagyítás mennyisége a térképnél? Show cursor coordinates? @@ -65,6 +71,7 @@ Zeige Cursor-Koordinaten? Zobrazit souřadnice u kurzoru? Mostrar coordenadas no cursor? + Kurzor-koordináták mutatása? Show the grid coordinates on the mouse pointer? @@ -73,6 +80,7 @@ Gitter-Koordinaten auf dem Mauszeiger anzeigen? Zobrazit souřadnice u kurzoru v mapě? Mostrar as coordenadas de grade no ponteiro do mouse? + Mutatva legyen-e a kurzornál található rész rácskoordinátája? This module allows you to customize the map screen. @@ -80,6 +88,7 @@ Dieses Modul erweitert die Kartenfunktionen. Tento modul umožňuje přizpůsobit mapu s obrazem. Este módulo permite que você personalize a tela de mapa. + Ez a modul lehetővé teszi a térképnézet testreszabását. Blue Force Tracking @@ -148,6 +157,7 @@ Dieses Modul ermöglicht es verbündete Einheiten mit dem BFT auf der Karte zu verfolgen. Umožňuje sledovat přátelské jednokty na mapě v rámci BFT. Permite que você acompanhe as posições no mapa das unidades aliadas com marcadores RFA. + Ez a modul lehetővé teszi a szövetséges egységek követését BFT térképjelzőjkkel. \ No newline at end of file diff --git a/addons/missionmodules/stringtable.xml b/addons/missionmodules/stringtable.xml index dfa461072b..6085e00b32 100644 --- a/addons/missionmodules/stringtable.xml +++ b/addons/missionmodules/stringtable.xml @@ -52,6 +52,7 @@ Wird verwendet, um eine zufällige Position zu bestimmen und setzt den Mindestabstand zwischen Spielern und der/den abzuspielenden Sounddatei(en) fest Používá se pro výpočet náhodné pozice a určuje minimální vzdálenost mezi hráči a přehrávaným zvukem. Usada para calcular uma posição aleatória e definir a distância mínima entre os jogadores e os arquivos de sons que estão sendo reproduzidos. + Egy véletlenszerű pozíció számításához használt érték, amihez megadja a minimum távolságot a játékosok és a lejátszott hangfájl(ok) között Maximum Distance @@ -69,6 +70,7 @@ Wird verwendet, um eine zufällige Position zu bestimmen und setzt den Maximalabstand zwischen Spielern und der/den abzuspielenden Sounddatei(en) fest Používá se pro výpočet náhodné pozice a určuje maximální vzdálenost mezi hráči a přehrávaným zvukem. Usado para calcular uma posição aleatória e definir uma distância máxima entre os jogadores e os arquivos de sons que estão sendo reproduzidos. + Egy véletlenszerű pozíció számításához használt érték, amihez megadja a maximum távolságot a játékosok és a lejátszott hangfájl(ok) között Minimal Delay @@ -86,6 +88,7 @@ Minimale Verzögerung zwischen abzuspielenden Sounds Minimální prodleva mezi přehrávanými zvuky Atraso mínimo entre os sons reproduzidos + Minimum késleltetés a lejátszott hangok között Maximum Delay @@ -103,6 +106,7 @@ Maximale Verzögerung zwischen abzuspielenden Sounds Maximální prodleva mezi přehrávanými zvuky Atraso máximo entre os sons reproduzidos + Maximum késleltetés a lejátszott hangok között Follow Players @@ -120,6 +124,7 @@ Spielern folgen. Wenn auf falsch gesetzt, werden Sounds nur in der Nähe des Logikmoduls abgespielt. Následuj hráče. Pokud je FALSE, smyčka zvuku bude přehrávána na nejbližší pozici logiki. Segue os jogadores. Se esta desabilitado (falso), o loop reproduzirá os sons somente perto de sua posição lógica. + Játékosok követése. Ha le van tiltva, az ismétlés csak a legközelebbi logikai ponton játszik le hangokat. Volume @@ -137,6 +142,7 @@ Lautstärke der abzuspielenden Sounds Hlasitost přehrávaného zvuku O volume em que os sons serão reproduzidos + A lejátszott hangok hangereje Ambiance sounds loop (synced across MP) @@ -145,6 +151,7 @@ Umgebungsgeräusch-Schleife (im MP synchronisiert) Smyčka okkolního zvuku (synchronizováno v MP) Loop de sons ambientes (sincronizados através do MP) + Ambiens hangok folyamatossága (MP alatt szinkronizálva) \ No newline at end of file diff --git a/addons/mk6mortar/stringtable.xml b/addons/mk6mortar/stringtable.xml index 300445d482..394154a70b 100644 --- a/addons/mk6mortar/stringtable.xml +++ b/addons/mk6mortar/stringtable.xml @@ -74,6 +74,7 @@ Für Spielerschüsse, Luftwiderstand und Windeffekte Pro hráčovu střelbu, Model odporu vzduchu a povětrných podmínek Para disparos do jogador, modelo de resistência de ar e efeitos de vento + Játékos általi lövésekhez, legyen-e számított légellenállás és szélhatás Allow MK6 Computer @@ -91,6 +92,7 @@ Zeige den Computer und den Entfernungsmesser an (diese MÜSSEN entfernt werden, wenn der Luftwiderstand aktiviert ist) Zobrazit počítač a dálkoměr (toto MUSÍ být odstraněno pokud je zapnut odpor vzduchu) Mostra o computador e o medidor de distância (estes DEVEM ser removidos se você habilitar resistência do ar) + A távmérő és számítógép megjelenítése (ezeket el KELL távolítani ha a légellenállás engedélyezve van) Allow MK6 Compass diff --git a/addons/nametags/stringtable.xml b/addons/nametags/stringtable.xml index e811b3447c..56ca2e3a5f 100644 --- a/addons/nametags/stringtable.xml +++ b/addons/nametags/stringtable.xml @@ -116,6 +116,7 @@ Namensanzeigen Jmenovky Etiquetas de nome + Névcímkék Player Names View Dist. @@ -124,6 +125,7 @@ Spielernamen-Distanz Vzdálenost zobrazení jména hráčů Distância de visão dos nomes dos jogadores + Játékosok nevének látótávja Distance in meters at which player names are shown. Default: 5 @@ -132,6 +134,7 @@ Distanz in Metern bei der Spielernamen angezeigt werden. Standard: 5 Vzdálenost v metrech pro zobrazení jména. Výchozí: 5 Distância em metros que os nomes dos jogadores são mostrados. Padrão: 5 + Méterben megadott érték a játékosok nevének mutatására. Alapértelmezett: 5 Show name tags for AI? @@ -140,6 +143,7 @@ Zeige Namensanzeigen für KI? Zobrazit jmenovky pro AI? Mostrar nomes para IA? + Névcímkék megjelenítése AI-nál? Show the name and rank tags for friendly AI units? Default: Do not force @@ -148,6 +152,7 @@ Zeige den Namen und Rang für freundliche KI-Einheiten? Standard: nicht erwzingen Zobrazit jména a hodnosti pro spřátelené AI jednotky? Výchozí: Nevynucovat Mostra o nome e patente para unidades IA aliadas? Padrão: Não forçar + Mutassa-e a szövetséges AI egységek nevét és rangját? Alapértelmezett: Nincs felülbírálás Do Not Force @@ -156,6 +161,7 @@ Nicht erzwingen Nevynucovat Não forçar + Nincs felülbírálás Force Hide @@ -164,6 +170,7 @@ Verstecken erzwingen Vynuceno skrýt Ocultar forçado + Erőltetett rejtett Force Show @@ -172,6 +179,7 @@ Anzeigen erzwingen Vynuceno zobrazit Mostrar forçado + Erőltetett látható Show crew info? @@ -180,6 +188,7 @@ Zeige Besatzungsinfo? Zobrazit informace o posádce? Mostrar informação de tripulação? + Legénységi adatok megjelenítése? Show vehicle crew info, or by default allows players to choose it on their own. Default: Do Not Force @@ -188,6 +197,7 @@ Zeige Fahrzeugbesatzungsinfo oder erlaube Spielern es auszuwählen. Standard: nicht erzwingen. Zobrazit informace o posádce, nebo nechat aby si hráč vybral sám. Výchozí: Nevynucovat Mostrar informações de tripulação ou por padrão permitir a escolha dos jogadores. Padrão: Não forçar. + A legénységi adatok mutatása, alapértelmezett esetben a játékos által kiválasztható. Alapértelmezett: Nincs felülbírálás Show for Vehicles @@ -196,6 +206,7 @@ Zeige bei Fahrzeugen Zobrazit pro vozidla Mostrar para veículos + Mutatás járműveknél Show cursor NameTag for vehicle commander (only if client has name tags enabled)Default: No @@ -212,6 +223,7 @@ Este módulo permite personalizar la configuración y la distancia de las Etiquetas de nombre. Tento modul umožňuje si přizpůsobit nastavení a vzdálenost jmenovky. Este módulo permite que você personalize as configurações e distâncias de etiquetas de nome. + Ez a modul lehetővé teszi a névcímkék beállításainak testreszabását. Disabled @@ -220,6 +232,7 @@ Deaktiviert Zakázáno Desativado + Letiltva Enabled @@ -228,6 +241,7 @@ Aktiviert Povoleno Ativado + Engedélyezve Only on Cursor @@ -236,6 +250,7 @@ Nur bei Maus Pouze na kurzor Somente no cursor + Csak kurzorra Only on Keypress @@ -244,6 +259,7 @@ Nur bei Tastendruck Pouze na klávesu Somente em tecla ativada + Csak gombnyomásra Only on Cursor and Keypress @@ -252,6 +268,7 @@ Nur Maus und Tastendruck Pouze na kurzor a klávesu Somente em cursor ou tecla ativada + Csak kurzorra és gombnyomásra Force Show Only on Cursor @@ -260,6 +277,7 @@ Vynuceno zobrazit pouze na kurzor Erzwinge nur mit Mauszeiger anzuzeigen Forçar mostrar somente no cursor + Erőltetett látható, csak kurzorra Force Show Only on Keypress @@ -268,6 +286,7 @@ Vynuceno zobrazit pouze na klávesu Erzwinge nur mit Tastendruck anzuzeigen Forçar somente mostrar em tecla ativada + Erőltetett látható, csak gombnyomásra Force Show Only on Cursor and Keypress @@ -276,6 +295,7 @@ Vynuceno zobrazit pouze na kurzor a klávesu Erzwinge nur mit Mauszeiger und Tastendruck anzuzeigen Forçar mostrar somente em cursor e tecla ativada + Erőltetett látható, csak kurzorra és gombnyomásra Use Nametag settings @@ -284,6 +304,7 @@ Verwende Namenanzeigen Použít nastavení jmenovky Usar ajustes de etiquetas de nome + Névcímkék beállításának használata Always Show All @@ -292,6 +313,7 @@ Immer alle zeigen Vždy zobrazit vše Sempre mostrar tudo + Mindig minden mutatása Show player names and set their activation. Default: Enabled @@ -300,6 +322,7 @@ Zobrazit jména hráčů a nastavit jejich aktivaci. Výchozí: Povoleno Erlaubt das Anzeigen von Spielernamen und stellt ein, ob sie standardmäßig aktiviert oder deaktiviert sind. Standard: aktiviert Mostrar os nomes dos jogadores e definir sua ativação. Padrão: Ativado + Mutassa a játékosok nevét és kezelje az aktivációjukat. Alapértelmezett: Engedélyezve Effect of sound waves above the heads of speaking players after holding the PTT key. This option works with TFAR and ACRE2. @@ -308,6 +331,7 @@ Efekt zvukových vln nad hlavami hráčů když mluví skrz PTT klávesu. Tato volba funguje s TFAR a ACRE2. Es wird ein Schallwellensymbol über den Köpfen von sprechenden Spielern angezeigt, die ihre Push-to-Talk-Taste drücken. Diese Option funktioniert mit TFAR und ACRE2. Efeito de ondas sonoras acima das cabeças dos jogadores que falam depois mantendo pressionada a tecla PTT. Esta opção funciona com TFAR e ACRE2. + Hanghullám-effekt a beszélő játékosok feje felett a PTT-gomb lenyomásakor. Ez a beállítás TFAR és ACRE2 alatt működik. Nametags Size @@ -316,6 +340,7 @@ Velikost jmenovky Namensschildgröße Tamanho das etiquetas de nome + Névcímkék mérete Text and Icon Size Scaling @@ -324,6 +349,7 @@ Velikost textu a ikon Text- und Symbolgrößen Escala de tamanho dos ícones e textos + Szöveg és ikon méretének skálázása - + \ No newline at end of file diff --git a/addons/optionsmenu/stringtable.xml b/addons/optionsmenu/stringtable.xml index 74430baedc..b26bf6261a 100644 --- a/addons/optionsmenu/stringtable.xml +++ b/addons/optionsmenu/stringtable.xml @@ -266,6 +266,7 @@ Erlaube alle Einstellungen in einer Server-Config zu exportieren. Povolit exportovat všechna nastavení do formátu server configu. Permitir exportação de todas as configurações para uma configuração formatada de servidor. + Az összes beállítás szerver-konfigurációba való exportálásának engedélyezése. When allowed, you have access to the settings modification and export in SP. Clicking export will place the formated config on your clipboard. @@ -274,6 +275,7 @@ Wenn erlaubt, können die Einstellungsmodifikationen angezeigt und im SP exportiert werden. Wenn auf "Exportieren" geklickt wird, wird eine formatierte Config-Datei in der Zwischenablage abgespeichert. Pokud je povoleno, budete mít přístup k modifikaci nastavení a exportování v SP. Kliknutím na export umístníte formátovaný config do vaší schránky. Quando permitido, você tem acesso à modificação de definições e exportação em SP. Clicando em exportação colocará a configuração formatada em sua área de transferência. + Engedélyezéskor hozzáférést kapsz a beállítások módosításához és exportálásához egyjátékos módban. Exportáláskor a formázott konfiguráció a vágólapra kerül. Hide diff --git a/addons/switchunits/stringtable.xml b/addons/switchunits/stringtable.xml index 2d0bc91314..71ef5a9704 100644 --- a/addons/switchunits/stringtable.xml +++ b/addons/switchunits/stringtable.xml @@ -32,6 +32,7 @@ Einheiten-Switch-System? Systém výměny stran Sistema de troca de unidades + Egységváltó-rendszer Switch to West? @@ -40,6 +41,7 @@ Nach BLUFOR wechseln? Přesunout k BLUFOR? Trocar para Oeste? + Átváltás BLUFOR-ra? Allow switching to west units? @@ -48,6 +50,7 @@ Erlaube das Wechseln zu BLUFOR-Einheiten? Povolit přesun k BLUFOR? Permitir troca de unidades para o Oeste? + Nyugat-fakciós egységekre való váltás engedélyezése? Switch to East? @@ -56,6 +59,7 @@ Nach OPFOR wechseln? Přesunout k OPFOR? Trocar para Leste? + Átváltás OPFOR-ra? Allow switching to east units? @@ -64,6 +68,7 @@ Erlaube das Wechseln zu OPFOR-Einheiten? Povolit přesun k OPFOR? Permitir troca de unidades para o Leste? + Kelet-fakciós egységekre való váltás engedélyezése? Switch to Independent? @@ -72,6 +77,7 @@ Nach INDFOR wechseln? Přesunout k INDFOR? Trocar para Indenpendente + Átváltás INDFOR-ra? Allow switching to independent units? @@ -80,6 +86,7 @@ Erlaube das Wechseln zu INDFOR-Einheiten? Povolit přesun k INDFOR? Permitir troca de unidades para o Indenpendente? + Független egységekre való váltás engedélyezése? Switch to Civilian? @@ -88,6 +95,7 @@ Nach CIVILIAN wechseln? Přesunout k CIVILISTŮM? Trocar para Civis? + Átváltás civilre? Allow switching to civilian units? @@ -96,6 +104,7 @@ Erlaube das Wechseln zu CIVILIAN-Einheiten? Povolit přesun k CIVILISTŮM? Permitir troca de unidades para o Civil? + Civil egységekre való váltás engedélyezése? Enable Safe Zone? @@ -104,6 +113,7 @@ Aktiviere Sicherheitszone? Povolit bezpečné oblasti? Habilitar zona segura? + Biztonságos zóna engedélyezése? Enable a safe zone around enemy units? Players can't switch to units inside of the safe zone. @@ -112,6 +122,7 @@ Aktiviere eine Sicherheitszone um feindliche Einheiten? Spieler können nicht zu Einheiten in der Sicherheitszone wechseln. Povolit bezpečnou zónu kolem nepřátelských jednotek? Hráči se nemohou změnit strany/jednotky uvnitř bezpečné zóny. Habilitar uma zona segur ao redor das unidades inimigas? Jogadores não conseguirão trocar para unidades dentro dessa zona segura. + Engedélyezve legyen-e egy biztonságos zóna az ellenségek körül? A játékosok nem tudnak a biztonságos zónán belüli egységekre váltani. Safe Zone Radius @@ -120,6 +131,7 @@ Sicherheitszonenradius Oblast bezpečné zóny Raio da zona segura + Biztonságos zóna hatóköre The safe zone around players from a different team. Default: 200 @@ -128,9 +140,9 @@ Die Sicherheitszone um Spieler von einem anderen Team. Standard: 200 Bezpečná zóna kolem hráče z jiných týmu. Výchozí: 200 A zona segura ao redor dos jogadores de diferentes equipes. Padrão: 200 + A biztonságos zóna más csapatból lévő játékosok körül. Alapértelmezett: 200 - Moduł ten pozwala na zmianę strony w trakcie gry. Tento modul umožňuje přepínání mazi dostupnými stranami. Este módulo permite mudar o lado à disposição dos jogadores. diff --git a/addons/vehiclelock/stringtable.xml b/addons/vehiclelock/stringtable.xml index 89a64faf8a..1d567fba62 100644 --- a/addons/vehiclelock/stringtable.xml +++ b/addons/vehiclelock/stringtable.xml @@ -180,6 +180,7 @@ Unverändert Jak je Como está + Úgy-ahogy Locked @@ -188,6 +189,7 @@ Gesperrt Zamčeno Fechado + Zárva Unlocked @@ -196,6 +198,7 @@ Offen Odemčeno Aberto + Nyitva Default Lockpick Strength diff --git a/addons/viewdistance/stringtable.xml b/addons/viewdistance/stringtable.xml index bdf96f35a0..f5757a55cc 100644 --- a/addons/viewdistance/stringtable.xml +++ b/addons/viewdistance/stringtable.xml @@ -8,6 +8,7 @@ Omezovač dohlednosti Sichtweitenbegrenzung Limitador de distância de visão + Látótáv-korlátozó Allows limiting maximum view distance that can be set by players. @@ -16,6 +17,7 @@ Umožňuje určit maximální dohlednost, kterou si může hráč nastavit Erlaubt das Einschränken der maximalen Sichtweite, welche von Spielern eingestellt werden kann. Permite limitar a distância máxima de visão que pode ser definida pelos jogadores. + Lehetővé teszi a játékosok által a látótávolság maximumának korlátozását. Enable ACE viewdistance @@ -24,6 +26,7 @@ Povolit ACE dohlednost Aktiviere ACE-Sichtweite Habilitar distância de visão ACE + ACE látótávolság engedélyezése Enables ACE viewdistance @@ -32,6 +35,7 @@ Povolit ACE dohlednost Aktiviert ACE-Sichtweite Habilita a distância de visão ACE + Engedélyezi az ACE látótávolságot View Distance Limit @@ -40,6 +44,7 @@ Limit dohlednosti Sichtweitengrenze Limite da distância de visão + Látótáv-korlát Sets the limit for how high clients can raise their view distance (up to 10000) @@ -48,6 +53,7 @@ Stanoví limit jak daleko si může client zvýšit dohlednost (do 10000) Setze die Grenze fest, wie weit Spieler ihre Sichtweite erhöhen können (bis 10000) Estabelecer um limite de quão alto os clientes podem aumentar sua distância de visão (até 10000) + Korlátozza, mekkora látótávolságot állíthatnak be a kliensek (maximum 10000-ig) Limit for client's view distance set here and can overridden by module @@ -56,6 +62,7 @@ Limit dohlednoti pro klienty se nastavuje zde a může být potlačeno pomocí modulu. Stellt die Grenze für die Sichtweite des Spielers ein. Das kann von einem Modul überschrieben werden. Permite limitar a distância de visão máxima que pode ser definida por jogadores. Pode ser substituído por módulo. + A kliens látótávolsága itt állítható be, és felülbírálható modulok által Client View Distance (On Foot) @@ -64,6 +71,7 @@ Dohlednost (Pěšák) Spielersichtweite (zu Fuß) Distância de visão do cliente (A pé) + Kliens látótáv (gyalog) Changes in game view distance when the player is on foot. @@ -72,6 +80,7 @@ Změna dohlednosti pro hráče pokud jde po svých. Verändert die Sichtweite, wenn ein Spieler zu Fuß unterwegs ist. Muda a distância de visão do jogador dentro do jogo quando ele está a pé. + Megváltoztatja a játékon belüli látótávolságot, amennyiben a játékos gyalogosan van. Client View Distance (Land Vehicle) @@ -80,6 +89,7 @@ Dohlednost (Pozemní technika) Spielersichtweite (Landfahrzeuge) Distância de visão do cliente (Veículo terrestre) + Kliens látótáv (szárazföldi jármű) Changes in game view distance when the player is in a land vehicle. @@ -88,6 +98,7 @@ Změna dohlednosti pro hráče pokud je v pozemní technice. Verändert die Sichtweite, wenn ein Spieler in einem Landfahrzeug ist. Muda a distância de visão do jogador dentro do jogo quando ele está dentro de um veículo terrestre. + Megváltoztatja a játékon belüli látótávolságot, amennyiben a játékos szárazföldi járműben van. Client View Distance (Air Vehicle) @@ -96,6 +107,7 @@ Dohlednost (Vzdušná technika) Spielersichtweite (Luftfahrzeuge) Distância de visão do cliente (Veículo aéreo) + Kliens látótáv (légi jármű) Changes in game view distance when the player is in an air vehicle. @@ -104,6 +116,7 @@ Změna dohlednosti pro hráče pokud je ve vzdušné technice. Verändert die Sichtweite wenn ein Spieler in einem Luftfahrzeug ist. Muda a distância de visão do jogador dentro do jogo quando ele está dentro de um veículo aéreo. + Megváltoztatja a játékon belüli látótávolságot, amennyiben a játékos légi járműben van. Dynamic Object View Distance @@ -112,6 +125,7 @@ Dynamická dohlednost objektů Dynamische Objektsichtweite Distância de visão dinâmica dos objetos + Dinamikus objektum-látótáv Sets the object view distance as a coefficient of the view distance. @@ -120,6 +134,7 @@ Nastaví objekt dohlednosti jako koeficient dohlednosti. Passt die Objektsichtweite dynamisch der Sichtweite an. Estabelece a distância de visão dos objetos com um coeficiente da distância de visão. + Beállítja az objektum-látótávot a megadott látótáv koefficienseként. Off @@ -128,6 +143,7 @@ Vypnout Aus Desligado + Kikapcsolva Very Low @@ -136,6 +152,7 @@ Velmi málo Sehr niedrig Muito baixo + Minimális Low @@ -144,6 +161,7 @@ Málo Niedrig Baixo + Alacsony Medium @@ -152,6 +170,7 @@ Středně Mittel Médio + Közepes High @@ -160,6 +179,7 @@ Hodně Hoch Alto + Magas Very High @@ -168,6 +188,7 @@ Velmi hodně Sehr hoch Muito alto + Maximális View Distance: @@ -176,6 +197,7 @@ Dohlednost: Sichtweite: Distância de visão: + Látótávolság: Object View Distance is @@ -184,6 +206,7 @@ Dohlednost objektů je Objektsichtweite ist Distância de visão do objeto é + Az objektum-látótávolság: That option is invalid! The limit is @@ -192,6 +215,7 @@ Tato volba je neplatná! Limit je Diese Option ist ungültig! Die Grenze ist Essa opção é inválida. O limte é + Ez a beállítás érvénytelen! A maximum mennyiség Video Settings @@ -200,6 +224,7 @@ Nastavení videa Grafikeinstellungen Ajustes de vídeo + Videobeállítások - + \ No newline at end of file diff --git a/addons/weather/stringtable.xml b/addons/weather/stringtable.xml index 69e2d4a792..aa6243b519 100644 --- a/addons/weather/stringtable.xml +++ b/addons/weather/stringtable.xml @@ -20,6 +20,7 @@ Wetter Počasí Clima + Időjárás Multiplayer synchronized ACE weather module @@ -28,6 +29,7 @@ ACE-Wettermodul (synchron im Multiplayer) Synchronizovat ACE počasí v multiplayeru Módulo climático ACE para sincronismo multiplayer + Többjátékos szinkronizált ACE időjárás modul Weather propagation @@ -36,6 +38,7 @@ Wetterübertragung Změny počasí Propagação do clima + Időjárás-változás Enables server side weather propagation @@ -44,6 +47,7 @@ Aktiviere serverseitige Wetterübertragung Aktivuje změny počasí na straně serveru Ativa propagação de clima via server + Engedélyezi a szerveroldali időjárás-változást ACE Weather @@ -52,6 +56,7 @@ ACE-Wetter ACE počasí Clima ACE + ACE Időjárás Overrides the default weather (editor, mission settings) with ACE weather (map based) @@ -60,6 +65,7 @@ Überschreibt das Standardwetter (Editor, Missionseinstellungen) mit dem ACE-Wetter (kartenbasiert) Přepíše výchozí počasí (editor, nastavení mise) s ACE počasím (podle mapy) Sobreescreve o clima padrão (editor, ajustes de missão) pelo sistema de clima ACE (baseado por mapa) + Felülbírálja az alapértelmezett időjárást (editor, küldetésbeállítások) az ACE időjárással (térkép-alapú) Sync Rain @@ -68,6 +74,7 @@ Regen synchronisieren Synchronizuj déšť Sincronizar chuva + Eső szinkronizálása Synchronizes rain @@ -76,6 +83,7 @@ Synchronisiert den Regen Synchronizace deště Sincroniza a chuva + Szinkronizálja az esőt Sync Wind @@ -84,6 +92,7 @@ Wind synchronisieren Synchronizuj vítr Sincronizar vento + Szél szinkronizálása Synchronizes wind @@ -92,6 +101,7 @@ Synchronisiert den Wind Synchronizace větru Sincroniza o vento + Szinkronizálja a szelet Sync Misc @@ -100,6 +110,7 @@ Sonstiges synchronisieren Synchronizuj různé Sincronizar outros + Egyéb szinkronizálása Synchronizes lightnings, rainbow, fog, ... @@ -108,6 +119,7 @@ Synchronisiert Blitze, Regenbögen, Nebel, ... Synchronizace blesků, duhy, mlhy, ... Sincroniza relâmpagos, arco-íris, neblina... + Szinkronizálja a villámokat, szivárványokat, ködöt, ... Update Interval @@ -116,6 +128,7 @@ Aktualisierungsintervall Interval aktualizace Intervalo de atualização + Frissítési intervallum Defines the interval (seconds) between weather updates @@ -124,6 +137,7 @@ Definiert das Intervall (in Sekunden) zwischen Wetteraktualisierungen Určit interval (v sekundách) mezi aktualizacemi počasí Defina o intervalo (em segundos) entre as atualizações de clima + Megadja az intervallumot (másodpercben) az időjárás-frissítések között \ No newline at end of file diff --git a/addons/winddeflection/stringtable.xml b/addons/winddeflection/stringtable.xml index f7b4324233..d643dbfd7f 100644 --- a/addons/winddeflection/stringtable.xml +++ b/addons/winddeflection/stringtable.xml @@ -108,6 +108,7 @@ Simulationsintervall Interval simulace Intervalo de simulação + Szimulációs intervallum Defines the interval between every calculation step @@ -116,6 +117,7 @@ Definiert das Intervall zwischen jedem Berechnungsschritt Určuje interval mezi každým výpočtem Define o intervalo entre cada cálculo + Megszabja a számítási lépések közötti intervallumot Simulation Radius @@ -124,6 +126,7 @@ Simulationsradius Oblast simulace Radio da Simulação + Szimulációs hatókör Defines the radius around the player (in meters) at which projectiles are wind deflected @@ -142,4 +145,4 @@ Influência do vento na trajetória dos projéteis - + \ No newline at end of file diff --git a/addons/yardage450/stringtable.xml b/addons/yardage450/stringtable.xml index 30887673e7..7a3a6bdef2 100644 --- a/addons/yardage450/stringtable.xml +++ b/addons/yardage450/stringtable.xml @@ -8,6 +8,7 @@ Yardage 450 Yardage 450 Yardage 450 + Yardage 450 Laser Rangefinder @@ -16,6 +17,7 @@ Telémetro láser Laserový dálkoměr Medidor de Distância a laser + Lézeres távolságmérő Yardage 450 - Power Button @@ -24,6 +26,7 @@ Yardage 450 - Botón de encendido Yardage 450 - Tlačítko napájení Yardage 450 - Botão de energia + Yardage 450 - Főkapcsoló gomb - + \ No newline at end of file diff --git a/addons/zeus/stringtable.xml b/addons/zeus/stringtable.xml index 7c70978aa4..e4af41a208 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -8,6 +8,7 @@ Nastavení Zeuse Zeus-Einstellungen Ajustes do Zeus + Zeus beállítások Provides control over various aspects of Zeus. @@ -40,6 +41,7 @@ Orel Zeuse Zeus-Adler Águia do Zeus + Zeus sas Spawn an eagle that follows the Zeus camera. @@ -48,6 +50,7 @@ Vytvoří orla, který následuje kameru Zeuse. Erstelle einen Adler, der der Zeus-Kamera folgt. Cria uma águia que segue a câmera do Zeus + Lerak egy sast, ami követi a Zeus kamerát. Wind Sounds @@ -56,6 +59,7 @@ Zvuky větru Windgeräusche Sons de vento + Szélhangok Play wind sounds when Zeus remote controls a unit. @@ -72,6 +76,7 @@ Varování před dělostřelectvem Artilleriewarnung Aviso de explosivos + Tüzérségi figyelmeztetés Play a radio warning when Zeus uses ordnance. @@ -80,6 +85,7 @@ Přehrát varování (rádio) když Zeus použije dělostřelectvo. Spiele eine Radiowarnung ab, wenn Zeus Artillerie verwendet. Reproduz uma aviso via rádio quando o Zeus usa um explosivo. + Rádiós figyelmeztetés kiadása, ha a Zeus tüzérséget használ. Reveal Mines @@ -88,6 +94,7 @@ Odhalit miny Enthülle Minen Revelar minas + Aknák feltárása Reveal mines to allies and place map markers. @@ -96,6 +103,7 @@ Odhalí miny pro spojence a umístnit jejich značku na mapu. Enthülle Minen gegenüber Verbündeten und platziere Kartenmarkierungen. Revelar minas para aliados e colocar marcadores no mapa. + Feltárja az aknákat a szövetségeseknek, és jelölőket helyez el a térképen. Reveal to Allies @@ -104,6 +112,7 @@ Odhalit pro spojence An Verbündete weitergeben Revelar para aliados + Feltárás a szövetségeseknek Allies + Map Markers @@ -112,6 +121,7 @@ Spojenci + Značky na mapě Verbündete + Kartenmarkierungen Aliados + Marcadores no mapa + Szövetségesek + térkép jelölők Toggle Captive @@ -120,6 +130,7 @@ Přepnout - Vězeň Gefangennahme umschalten Alternar prisioneiro + Elfogott állapot váltása Toggle Surrender @@ -128,6 +139,7 @@ Přepnout - Vzdávání Aufgabe umschalten Alternar rendição + Kapituláló állapot váltása Toggle Unconscious @@ -136,6 +148,7 @@ Přepnout - Bezvědomí Bewusstlosigkeit umschalten Alternar inconsciência + Eszméletlen állapot váltása Unit must be alive @@ -168,6 +181,7 @@ Jednotka nemí být vězeň Einheit darf nicht gefangen sein Unidade não pode ser prisioneira + Csak elfogatlan egységeken használni Place on a unit @@ -188,6 +202,7 @@ Vyžaduje addon, který není přítomen Benötigt ein Addon, das nicht vorhanden ist Requer um addon que não está presente + Egy jelenleg hiányzó bővítményt igényel - + \ No newline at end of file From b2aa5eee45f601092061b11148707a78227d5bae Mon Sep 17 00:00:00 2001 From: Harakhti Date: Thu, 30 Jul 2015 16:28:50 +0200 Subject: [PATCH 005/371] Row 3 BINGO FUEL --- addons/slideshow/stringtable.xml | 13 +++++++++++++ addons/tripod/stringtable.xml | 10 +++++++--- addons/vehiclelock/stringtable.xml | 16 +++++++++++++--- addons/winddeflection/stringtable.xml | 7 +++++++ addons/zeus/stringtable.xml | 4 ++++ 5 files changed, 44 insertions(+), 6 deletions(-) diff --git a/addons/slideshow/stringtable.xml b/addons/slideshow/stringtable.xml index 63547c06e2..f9d96efe69 100644 --- a/addons/slideshow/stringtable.xml +++ b/addons/slideshow/stringtable.xml @@ -3,42 +3,55 @@ Slideshow + Vetítés This module allows you to set up slide-shows on different objects. One module per image list. Only objects with hiddenSelection 0 are supported. + Ez a modul lehetővé teszi a különböző objektumokon való vetítést. Egy modul/képlista. Csak "hiddenSelection 0"-t tartalmazó objektumok felelnek meg. Objects + Objektumok Object names (can also be synchronized objects) slide-show will be displayed on, separated by commas if multiple. Reference INFO for object support. + Objektum nevek (szinkronizált is lehet) amik a vetítésen megjelennek, több darab esetén vesszővel elválasztva. Objektumtámogatásért az INFO-t tekintsd meg. Controllers + Vezérlők Controller object names, separated by commas if multiple. + Vezérlő objektum nevek, vesszővel elválasztva több darab esetén. Images + Képek List of images that will be used for the slide-show, separated by commas, with full path correctly formatted (eg. images\image.paa). + A képek listája amit a vetítés használni fog, vesszővel elválasztva, megfelelően formázott teljes útvonallal (pl. képek\kép.paa) Interaction Names + Interakciós nevek List of names that will be used for interaction entries, separated by commas, in order of images. + Olyan nevek listája, melyek interakciós célra kellenek, vesszővel elválasztva, kép szerinti sorrendben. Slide Duration + Dia időtartam Duration of each slide. Default: 0 (Automatic Transitions Disabled) + A diák időtartama. Alapértelmezett: 0 (Automatikus váltás letiltva) Slides + Diák \ No newline at end of file diff --git a/addons/tripod/stringtable.xml b/addons/tripod/stringtable.xml index caddca415f..fc74ed8b92 100644 --- a/addons/tripod/stringtable.xml +++ b/addons/tripod/stringtable.xml @@ -10,7 +10,7 @@ SSWT Kit SSWT souprava SSWT Kit - SSWT Kit + SSWT Készlet Kit SSWT @@ -22,7 +22,7 @@ Place SSWT Kit Rozlož souprava SSWT Place SSWT Kit - Place SSWT Kit + SSWT készlet elhelyezése Colocar kit SSWT @@ -32,6 +32,7 @@ Zvednout SSWT soupravu SSWT-Werkzeug aufheben Pegar kit SSWT + SSWT készlet felvétele Adjust SSWT Kit @@ -40,6 +41,7 @@ Regulovat SSWT soupravu SSWT-Werkzeug anpassen Ajustar kit SSWT + SSWT készlet állítása Done @@ -48,6 +50,7 @@ Hotovo Fertig Feito + Kész + Modifier, adjust @@ -56,6 +59,7 @@ + Modifikátor, regulace + Modifikator, anpassen + Modificador, ajuste + + Módosító, szabályzás - + \ No newline at end of file diff --git a/addons/vehiclelock/stringtable.xml b/addons/vehiclelock/stringtable.xml index 1d567fba62..c190117fd0 100644 --- a/addons/vehiclelock/stringtable.xml +++ b/addons/vehiclelock/stringtable.xml @@ -140,6 +140,7 @@ Fahrzeugsperreinstellungen Nastavení zámku vozidla Configuração de fechadura do veículo + Jármű-zár beállítás Lock Vehicle Inventory @@ -148,6 +149,7 @@ Sperre Fahrzeuginventar Inventář zamčeného vozidla Bloquear inventário do veículo + Jármű rakodótér zárás Locks the inventory of locked vehicles @@ -156,6 +158,7 @@ Sperrt das Inventar von gesperrten Fahrzeugen Zamknout inventář u zamčených vozidel Bloqueia o inventário de veículos fechados + Bezárja a zárt járművek rakterét is Vehicle Starting Lock State @@ -164,6 +167,7 @@ Fahrzeuge spawnen gesperrt Počáteční stav zámku vozidla Estado inicial da fechadura dos veículos + Jármű kezdő zár-állapot Set lock state for all vehicles (removes ambiguous lock states) @@ -172,6 +176,7 @@ Setze Sperrstatus für alle Fahrzeuge (entfernt unklare Sperrzustände) Nastavit stav zámku u všech vozidel (odstraňuje nejednoznačné stavy zámků) Definir estados de fechadura para todos os veículos (remove estados de fechadura ambíguos) + Beállítja a zár-állapotot az összes járműhöz (eltávolítja az azonosíthatatlan zárállapotokat) As Is @@ -180,7 +185,7 @@ Unverändert Jak je Como está - Úgy-ahogy + Úgy-ahogy Locked @@ -189,7 +194,7 @@ Gesperrt Zamčeno Fechado - Zárva + Zárva Unlocked @@ -198,7 +203,7 @@ Offen Odemčeno Aberto - Nyitva + Nyitva Default Lockpick Strength @@ -207,6 +212,7 @@ Standard-Pick-Stärke Výchozí síla páčidla Durabilidade padrão da chave micha + Alapértelmezett zártörő-erősség Default Time to lockpick (in seconds). Default: 10 @@ -215,6 +221,7 @@ Standardzeit um ein Schloss zu knacken (in Sekunden). Standard: 10 Čas k vypáčení zámku (v sekundách). Výchozí: 10 Tempo padrão para forçar a fechadura (em segundos). Padrão: 10 + Alapértelmezett idő a zárfeltöréshez (másodpercben). Alapértelmezett: 10 Settings for lockpick strength and initial vehicle lock state. Removes ambiguous lock states.<br />Source: vehiclelock.pbo @@ -223,6 +230,7 @@ Einstellungen für Pick-Stärke und anfänglichen Fahrzeugsperrzustand. Entfernt unklare Sperrzustände.<br />Quelle: vehiclelock.pbo Nastavení síly vypáčení a počáteční stav zámku vozidla. Odstraňuje nejednoznačné stavy zámků.<br />Zdroj: vehiclelock.pbo Definições para a durabilidade da chave micha e estado inicial da fechadura do veículo. Remove estados de fechadura ambíguas <br /> Fonte: Vehiclelock.pbo + Beállítások a zártörő erősségére és alapértelmezett zár-állapotra a járműveken. Eltávolítja az azonosíthatatlan zár-állapotokat. <br />Forrás: vehiclelock.pbo Vehicle Key Assign @@ -231,6 +239,7 @@ Fahrzeugschlüsselzuweisung Přidělení klíče k vozidlu Atribuição de chave de veículo + Járműkulcs-osztás Sync with vehicles and players. Will handout custom keys to players for every synced vehicle. Only valid for objects present at mission start.<br />Source: vehiclelock.pbo @@ -239,6 +248,7 @@ Synchronisiere mit Fahrzeugen und Spielern. Wird eigene Schlüssel an Spieler für jedes synchronisierte Fahrzeuge aushändigen. Nur gültig für am Missionsstart existierende Fahrzeuge.<br />Quelle: vehiclelock.pbo Synchronizuj s vozidly a hráči. Hráč dostane klíč ke každému synchonizovanému vozidlu. Platné pouze pro objekty přítomné na začátku mise.<br />Zdroj: vehiclelock.pbo Sincronizar com veículos e jogadores. Irá distribuir chaves personalizadas para os jogadores para cada veículo sincronizado. Só é válido para objetos presentes no início da missão <br /> Fonte: vehiclelock.pbo + Szinkronizál a járművekkel és játékosokkal. Egyedi kulcsokat oszt ki a játékosoknak minden szinkronizált járműhöz. Csak a küldetés indításakor jelenlévő járművekhez érvényes. <br />Forrás: vehiclelock.pbo \ No newline at end of file diff --git a/addons/winddeflection/stringtable.xml b/addons/winddeflection/stringtable.xml index d643dbfd7f..dd96760310 100644 --- a/addons/winddeflection/stringtable.xml +++ b/addons/winddeflection/stringtable.xml @@ -68,6 +68,7 @@ Účinky větru Windablenkung Desvio de vento + Szél-hárítás Wind Deflection @@ -76,6 +77,7 @@ Windablenkung Účinky větru Desvio de vento + Szél-hárítás Enables wind deflection @@ -84,6 +86,7 @@ Aktiviert Windablenkung Umožňit vliv větru Ativa o desvio de vento + Engedélyezi a szél-hárítást Vehicle Enabled @@ -92,6 +95,7 @@ Fahrzeuge aktiviert Vozidla povolena Ativado em veículos + Jármű engedélyezve Enables wind deflection for static/vehicle gunners @@ -100,6 +104,7 @@ Aktiviere Windablenkung für statische oder Fahrzeugschützen Umožnit vliv větru pro střelce z vozidla/statiky Ativa o desvio de vento para atiradores de estáticas e veículos + Engedélyezi a szél-hárítást a statikus/jármű-lövészeknél Simulation Interval @@ -135,6 +140,7 @@ Gibt den Radius (in Metern) um den Spieler an, in dem Projektile vom Wind beeinflusst werden Definuje oblast kolem hráče (v metrech) v které je projektil ovlivněn větrem Define o raio ao redor do jogador (em metros) em qual os projéteis são desviados pelo vento + Meghatározza a játékos körüli hatókört (méterben), ahol a lövedékeket háríthatja a szél Wind influence on projectiles trajectory @@ -143,6 +149,7 @@ Windeinfluss auf die Geschossbahnen Vítr ovlivňuje trajektorii projektilu Influência do vento na trajetória dos projéteis + Szél hatása a lövedékek röppályájára \ No newline at end of file diff --git a/addons/zeus/stringtable.xml b/addons/zeus/stringtable.xml index e4af41a208..2246cd1786 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -17,6 +17,7 @@ Poskytuje kontrolu na různými aspekty Zeuse. Bietet die Steuerung verschiedener Zeus-Optionen an. Proporciona controle sobre diversos aspectos do Zeus. + Különböző beállítási lehetőségeket biztosít a Zeus részeihez. Ascension Messages @@ -25,6 +26,7 @@ Zpráva o novém Zeusovi Aufstiegsnachrichten Mensagens de ascensão + Felemelkedési üzenetek Display global popup messages when a player is assigned as Zeus. @@ -33,6 +35,7 @@ Zobrazit globální zprávu když je hráč přiřazen jako Zeus. Zeige globale Popup-Nachrichten wenn ein Spieler zu Zeus wird. Mostra uma mensagem popup quando um jogador é atribuido ao Zeus. + Globális üzeneteket jelez ki, ha egy játékos Zeus-nak lesz beosztva. Zeus Eagle @@ -68,6 +71,7 @@ Přehrát varování (vítr) když Zeus převezmě kontrolu nad jednotkou. Spiele Windgeräusche ab, wenn Zeus eine Einheit steuert. Reproduz sons de vento quando uma unidade é remotamente controlada pelo Zeus. + Szélhangokat játszik le, ha a Zeus távvezérel egy egységet. Ordnance Warning From 33314f8a9e7675f7e6694ebf86062d9e02213924 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Fri, 31 Jul 2015 23:32:25 +0100 Subject: [PATCH 006/371] Adjust spectator camera boom speed Vertical camera movement (boom) was previously at a constant speed. However this felt too slow at times, half the horizontal (dolly) speed should improve this. --- addons/spectator/functions/fnc_handleInterface.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index 864ae32adc..709c0263b2 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -224,7 +224,7 @@ switch (toLower _mode) do { [_display,nil,nil,true] call FUNC(toggleInterface); }; case 16: { // Q - GVAR(camBoom) = 0.5; + GVAR(camBoom) = 0.5 * GVAR(camSpeed); }; case 17: { // W GVAR(camDolly) set [1, GVAR(camSpeed)]; @@ -245,7 +245,7 @@ switch (toLower _mode) do { [_display,nil,true] call FUNC(toggleInterface); }; case 44: { // Z - GVAR(camBoom) = -0.5; + GVAR(camBoom) = -0.5 * GVAR(camSpeed); }; case 49: { // N if (_ctrl) then { From 861119f22fa2449bf77697a502ac46e246be9188 Mon Sep 17 00:00:00 2001 From: Harakhti Date: Sat, 1 Aug 2015 14:54:29 +0200 Subject: [PATCH 007/371] Sync rephrasing with upstream The humor wilts quickly. --- addons/finger/stringtable.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/finger/stringtable.xml b/addons/finger/stringtable.xml index 57fab198fb..0b1b4f65d7 100644 --- a/addons/finger/stringtable.xml +++ b/addons/finger/stringtable.xml @@ -44,7 +44,7 @@ How far away players can finger each other. [default: 4] - Milyen messziről ujjazhatják egymást a játékosok. [alapértelmezett: 4] + A maximális távolság, amelyben a közeli játékosoknak megjelenik az indikátor. [alapértelmezett: 4 méter] \ No newline at end of file From 612aa2d679515c0d74156c823852efe10083bf5a Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sat, 1 Aug 2015 18:10:11 +0100 Subject: [PATCH 008/371] Separate spectator physical and virtual states With the changes planned to allow spectator in the true death state, physical changes aren't applicable in all of the possible usage cases. This separates the physical process into new function ace_spectator_fnc_stageSpectator --- addons/spectator/XEH_preInit.sqf | 1 + .../spectator/functions/fnc_setSpectator.sqf | 49 +++---------- .../functions/fnc_stageSpectator.sqf | 68 +++++++++++++++++++ 3 files changed, 77 insertions(+), 41 deletions(-) create mode 100644 addons/spectator/functions/fnc_stageSpectator.sqf diff --git a/addons/spectator/XEH_preInit.sqf b/addons/spectator/XEH_preInit.sqf index e5872c3272..2cc65602cc 100644 --- a/addons/spectator/XEH_preInit.sqf +++ b/addons/spectator/XEH_preInit.sqf @@ -16,6 +16,7 @@ PREP(handleUnits); PREP(moduleSpectatorSettings); PREP(setCameraAttributes); PREP(setSpectator); +PREP(stageSpectator); PREP(transitionCamera); PREP(toggleInterface); PREP(updateCameraModes); diff --git a/addons/spectator/functions/fnc_setSpectator.sqf b/addons/spectator/functions/fnc_setSpectator.sqf index fd3dd9861c..f4dc86c3da 100644 --- a/addons/spectator/functions/fnc_setSpectator.sqf +++ b/addons/spectator/functions/fnc_setSpectator.sqf @@ -1,10 +1,14 @@ /* * Author: SilentSpike - * Sets target unit to the given spectator state + * Sets target unit to the given spectator state (virtually) + * To physically handle a spectator see ace_spectator_fnc_stageSpectator + * + * Units will be able to communicate in ACRE/TFAR as appropriate + * The spectator interface will be opened/closed * * Arguments: * 0: Unit to put into spectator state - * 1: New spectator state + * 1: Spectator state * * Return Value: * None @@ -17,10 +21,7 @@ #include "script_component.hpp" -params ["_unit",["_set",true,[true]],["_target",objNull,[objNull]]]; - -// No change, no service (but allow spectators who respawn to be reset) -if !(_set || (_unit getVariable [QGVAR(isSpectator), false])) exitWith {}; +params ["_unit", ["_set",true,[true]]]; // Only run for player units if !(isPlayer _unit) exitWith {}; @@ -29,49 +30,15 @@ if !(local _unit) exitwith { [[_unit, _set, _target], QFUNC(setSpectator), _unit] call EFUNC(common,execRemoteFnc); }; -// Prevent player falling into water -_unit enableSimulation !_set; - -// Move to/from group as appropriate -[_unit, _set, QGVAR(isSpectator), side group _unit] call EFUNC(common,switchToGroupSide); - if (_set) then { - // Move and hide the player ASAP to avoid being seen - _unit setPos (getMarkerPos QGVAR(respawn)); - - // Ghosts can't talk - [_unit, QGVAR(isSpectator)] call EFUNC(common,hideUnit); - [_unit, QGVAR(isSpectator)] call EFUNC(common,muteUnit); - ["open"] call FUNC(handleInterface); } else { ["close"] call FUNC(handleInterface); - - // Physical beings can talk - [_unit, QGVAR(isSpectator)] call EFUNC(common,unhideUnit); - [_unit, QGVAR(isSpectator)] call EFUNC(common,unmuteUnit); - - private "_marker"; - _marker = ["respawn_west","respawn_east","respawn_guerrila","respawn_civilian"] select ([west,east,resistance,civilian] find (side group _unit)); - _unit setPos (getMarkerPos _marker); }; -// Enable/disable input as appropriate -//[QGVAR(isSpectator), _set] call EFUNC(common,setDisableUserInputStatus); - // Handle common addon audio if (["ace_hearing"] call EFUNC(common,isModLoaded)) then {EGVAR(hearing,disableVolumeUpdate) = _set}; if (["acre_sys_radio"] call EFUNC(common,isModLoaded)) then {[_set] call acre_api_fnc_setSpectator}; if (["task_force_radio"] call EFUNC(common,isModLoaded)) then {[_unit, _set] call TFAR_fnc_forceSpectator}; -// Spectators ignore damage (vanilla and ace_medical) -_unit allowDamage !_set; -_unit setVariable [QEGVAR(medical,allowDamage), !_set]; - -// No theoretical change if an existing spectator was reset -if !(_set && (_unit getVariable [QGVAR(isSpectator), false])) then { - // Mark spectator state for reference - _unit setVariable [QGVAR(isSpectator), _set, true]; - - ["spectatorChanged",[_set]] call EFUNC(common,localEvent); -}; +["spectatorSet",[_set]] call EFUNC(common,localEvent); diff --git a/addons/spectator/functions/fnc_stageSpectator.sqf b/addons/spectator/functions/fnc_stageSpectator.sqf new file mode 100644 index 0000000000..2f6741e35a --- /dev/null +++ b/addons/spectator/functions/fnc_stageSpectator.sqf @@ -0,0 +1,68 @@ +/* + * Author: SilentSpike + * Sets target unit to the given spectator state (physically) + * To virtually handle a spectator see ace_spectator_fnc_setSpectator + * + * Units will be gathered at marker ace_spectator_respawn (or [0,0,0] by default) + * Upon unstage, units will be moved to the position they were in upon staging + * + * Arguments: + * 0: Unit to put into spectator stage + * 1: Spectator stage + * + * Return Value: + * None + * + * Example: + * [player, false] call ace_spectator_fnc_stageSpectator + * + * Public: Yes + */ + +#include "script_component.hpp" + +params ["_unit", ["_set",true,[true]]]; + +// No change, no service (but allow spectators who respawn to be reset) +if !(_set || (GETVAR(_unit,GVAR(isSpectator),false))) exitWith {}; + +// Only run for player units +if !(isPlayer _unit) exitWith {}; + +if !(local _unit) exitwith { + [[_unit, _set, _target], QFUNC(stageSpectator), _unit] call EFUNC(common,execRemoteFnc); +}; + +// Prevent player falling into water +_unit enableSimulation !_set; + +// Move to/from group as appropriate +[_unit, _set, QGVAR(isSpectator), side group _unit] call EFUNC(common,switchToGroupSide); + +if (_set) then { + // Move and hide the player ASAP to avoid being seen + GVAR(oldPos) = getPosATL _unit; + _unit setPos (getMarkerPos QGVAR(respawn)); + + // Ghosts can't talk + [_unit, QGVAR(isSpectator)] call EFUNC(common,hideUnit); + [_unit, QGVAR(isSpectator)] call EFUNC(common,muteUnit); +} else { + // Physical beings can talk + [_unit, QGVAR(isSpectator)] call EFUNC(common,unhideUnit); + [_unit, QGVAR(isSpectator)] call EFUNC(common,unmuteUnit); + + _unit setPosATL GVAR(oldPos); +}; + +// Spectators ignore damage (vanilla and ace_medical) +_unit allowDamage !_set; +_unit setVariable [QEGVAR(medical,allowDamage), !_set]; + +// No theoretical change if an existing spectator was reset +if !(_set isEqualTo (GETVAR(_unit,GVAR(isSpectator),false))) then { + // Mark spectator state for reference + _unit setVariable [QGVAR(isSpectator), _set, true]; + + ["spectatorStaged",[_set]] call EFUNC(common,localEvent); +}; From 38e08d513a91fe0c084ecfd2d8dfd575224961d2 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sun, 2 Aug 2015 12:34:35 +0100 Subject: [PATCH 009/371] Clear spectator display variable at preInit uiNamespace persists between missions and should be reset on mission start --- addons/spectator/XEH_preInit.sqf | 2 ++ addons/spectator/functions/fnc_handleInterface.sqf | 8 ++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/addons/spectator/XEH_preInit.sqf b/addons/spectator/XEH_preInit.sqf index 2cc65602cc..a77d731478 100644 --- a/addons/spectator/XEH_preInit.sqf +++ b/addons/spectator/XEH_preInit.sqf @@ -38,6 +38,8 @@ GVAR(camUnit) = objNull; GVAR(camVision) = -2; GVAR(camZoom) = 1.25; +SETUVAR(GVAR(display),nil); + GVAR(showComp) = true; GVAR(showHelp) = true; GVAR(showIcons) = true; diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index 709c0263b2..2fa0d1439c 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -95,9 +95,7 @@ switch (toLower _mode) do { case "onload": { _args params ["_display"]; - with uiNamespace do { - GVAR(display) = _display; - }; + SETUVAR(GVAR(display),_display); // Always show interface and hide map upon opening [_display,nil,nil,!GVAR(showInterface),GVAR(showMap)] call FUNC(toggleInterface); @@ -151,9 +149,7 @@ switch (toLower _mode) do { //_display displayAddEventHandler ["KeyDown", {[_this,'keydown'] call CBA_events_fnc_keyHandler}]; }; case "onunload": { - with uiNamespace do { - GVAR(display) = nil; - }; + SETUVAR(GVAR(display),nil); GVAR(camHandler) = nil; GVAR(compHandler) = nil; From 63c034e348421d22a01e84f923841b48e76deebc Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sun, 2 Aug 2015 12:47:26 +0100 Subject: [PATCH 010/371] Differentiate between staged and set spectators Existing variable "ace_spectator_isSpectator" split into counterparts "ace_spectator_isSet" and "ace_spectator_isStaged" in order to better manage spectator events --- addons/spectator/XEH_postInit.sqf | 2 +- .../spectator/functions/fnc_setSpectator.sqf | 11 ++++++++++- .../spectator/functions/fnc_stageSpectator.sqf | 18 +++++++++--------- addons/spectator/functions/fnc_updateUnits.sqf | 2 +- 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/addons/spectator/XEH_postInit.sqf b/addons/spectator/XEH_postInit.sqf index bad3758c19..45ac78e89c 100644 --- a/addons/spectator/XEH_postInit.sqf +++ b/addons/spectator/XEH_postInit.sqf @@ -2,7 +2,7 @@ //#include "initKeybinds.sqf"; // Add interaction menu exception -["isNotSpectating", {!((_this select 0) getVariable [QGVAR(isSpectator), false])}] call EFUNC(common,addCanInteractWithCondition); +["isNotSpectating", {!(GETVAR((_this select 0),GVAR(isStaged),false))}] call EFUNC(common,addCanInteractWithCondition); ["SettingsInitialized", { GVAR(availableModes) = [[0,1,2], [1,2], [0], [1], [2]] select GVAR(restrictModes); diff --git a/addons/spectator/functions/fnc_setSpectator.sqf b/addons/spectator/functions/fnc_setSpectator.sqf index f4dc86c3da..2f8e1d3c2d 100644 --- a/addons/spectator/functions/fnc_setSpectator.sqf +++ b/addons/spectator/functions/fnc_setSpectator.sqf @@ -23,6 +23,9 @@ params ["_unit", ["_set",true,[true]]]; +// No change, no service (but allow spectators to be reset) +if !(_set || (GETVAR(_unit,GVAR(isSet),false))) exitWith {}; + // Only run for player units if !(isPlayer _unit) exitWith {}; @@ -41,4 +44,10 @@ if (["ace_hearing"] call EFUNC(common,isModLoaded)) then {EGVAR(hearing,disableV if (["acre_sys_radio"] call EFUNC(common,isModLoaded)) then {[_set] call acre_api_fnc_setSpectator}; if (["task_force_radio"] call EFUNC(common,isModLoaded)) then {[_unit, _set] call TFAR_fnc_forceSpectator}; -["spectatorSet",[_set]] call EFUNC(common,localEvent); +// No theoretical change if an existing spectator was reset +if !(_set isEqualTo (GETVAR(_unit,GVAR(isSet),false))) then { + // Mark spectator state for reference + _unit setVariable [QGVAR(isSet), _set, true]; + + ["spectatorSet",[_set]] call EFUNC(common,localEvent); +}; diff --git a/addons/spectator/functions/fnc_stageSpectator.sqf b/addons/spectator/functions/fnc_stageSpectator.sqf index 2f6741e35a..84bd6ffced 100644 --- a/addons/spectator/functions/fnc_stageSpectator.sqf +++ b/addons/spectator/functions/fnc_stageSpectator.sqf @@ -23,8 +23,8 @@ params ["_unit", ["_set",true,[true]]]; -// No change, no service (but allow spectators who respawn to be reset) -if !(_set || (GETVAR(_unit,GVAR(isSpectator),false))) exitWith {}; +// No change, no service (but allow spectators to be reset) +if !(_set || (GETVAR(_unit,GVAR(isStaged),false))) exitWith {}; // Only run for player units if !(isPlayer _unit) exitWith {}; @@ -37,7 +37,7 @@ if !(local _unit) exitwith { _unit enableSimulation !_set; // Move to/from group as appropriate -[_unit, _set, QGVAR(isSpectator), side group _unit] call EFUNC(common,switchToGroupSide); +[_unit, _set, QGVAR(isStaged), side group _unit] call EFUNC(common,switchToGroupSide); if (_set) then { // Move and hide the player ASAP to avoid being seen @@ -45,12 +45,12 @@ if (_set) then { _unit setPos (getMarkerPos QGVAR(respawn)); // Ghosts can't talk - [_unit, QGVAR(isSpectator)] call EFUNC(common,hideUnit); - [_unit, QGVAR(isSpectator)] call EFUNC(common,muteUnit); + [_unit, QGVAR(isStaged)] call EFUNC(common,hideUnit); + [_unit, QGVAR(isStaged)] call EFUNC(common,muteUnit); } else { // Physical beings can talk - [_unit, QGVAR(isSpectator)] call EFUNC(common,unhideUnit); - [_unit, QGVAR(isSpectator)] call EFUNC(common,unmuteUnit); + [_unit, QGVAR(isStaged)] call EFUNC(common,unhideUnit); + [_unit, QGVAR(isStaged)] call EFUNC(common,unmuteUnit); _unit setPosATL GVAR(oldPos); }; @@ -60,9 +60,9 @@ _unit allowDamage !_set; _unit setVariable [QEGVAR(medical,allowDamage), !_set]; // No theoretical change if an existing spectator was reset -if !(_set isEqualTo (GETVAR(_unit,GVAR(isSpectator),false))) then { +if !(_set isEqualTo (GETVAR(_unit,GVAR(isStaged),false))) then { // Mark spectator state for reference - _unit setVariable [QGVAR(isSpectator), _set, true]; + _unit setVariable [QGVAR(isStaged), _set, true]; ["spectatorStaged",[_set]] call EFUNC(common,localEvent); }; diff --git a/addons/spectator/functions/fnc_updateUnits.sqf b/addons/spectator/functions/fnc_updateUnits.sqf index 0393fa0e36..ef8fc3b4f1 100644 --- a/addons/spectator/functions/fnc_updateUnits.sqf +++ b/addons/spectator/functions/fnc_updateUnits.sqf @@ -55,7 +55,7 @@ _filteredUnits = []; {(_x isKindOf "CAManBase")} && {(side group _x) in _sides} && // Side filter {simulationEnabled _x} && - {!(_x getVariable [QGVAR(isSpectator), false])} // Who watches the watchmen? + {!(_x getVariable [QGVAR(isStaged), false])} // Who watches the watchmen? ) then { _filteredUnits pushBack _x; }; From 52460182c9c662dacc76e27f21a5d9e8b37786e8 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sun, 2 Aug 2015 16:42:24 +0100 Subject: [PATCH 011/371] Enable spectator on death system New spectator on death system should enter spectator mode upon dying and exit upon respawning. Only virtual spectator state is suitable for this system since the body should remain as is. --- addons/spectator/functions/fnc_handleKilled.sqf | 9 ++++----- addons/spectator/functions/fnc_handleRespawn.sqf | 6 +++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/addons/spectator/functions/fnc_handleKilled.sqf b/addons/spectator/functions/fnc_handleKilled.sqf index 67c556cc3f..05671ed749 100644 --- a/addons/spectator/functions/fnc_handleKilled.sqf +++ b/addons/spectator/functions/fnc_handleKilled.sqf @@ -1,7 +1,7 @@ /* * Author: SilentSpike - * Cache necessary details and process unit for spectator on death - * Part of the basic spectator system + * Set inital camera attributes and set as spectator on death + * Part of the spectator during death system * * Arguments: * 0: Corpse @@ -17,11 +17,10 @@ params ["_unit","_killer"]; -// Remove from group to prevent appearing on HUD upon respawn -[_unit, true, QGVAR(isSpectator), side group _unit] call EFUNC(common,switchToGroupSide); - if (isNull _killer) then { [2,_unit] call FUNC(setCameraAttributes); } else { [2,_killer] call FUNC(setCameraAttributes); }; + +[_unit] call FUNC(setSpectator); diff --git a/addons/spectator/functions/fnc_handleRespawn.sqf b/addons/spectator/functions/fnc_handleRespawn.sqf index 9b6b0bb802..3e7dfa41f3 100644 --- a/addons/spectator/functions/fnc_handleRespawn.sqf +++ b/addons/spectator/functions/fnc_handleRespawn.sqf @@ -1,7 +1,7 @@ /* * Author: SilentSpike - * Start the interface on respawn - * Part of the basic spectator system + * Un-set as spectator on respawn + * Part of the spectator during death system * * Arguments: * 0: New unit @@ -15,4 +15,4 @@ #include "script_component.hpp" -[_this select 0] call FUNC(setSpectator); +[_unit,false] call FUNC(setSpectator); From 9b764bbba45a3980114676842d07c260379c55c2 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sun, 2 Aug 2015 17:27:32 +0100 Subject: [PATCH 012/371] Preserve Polish translations from master branch Since spectator was pushed back to a feature branch from the release branch these translations from a PR were also lost (as the commits were prior to the removal commit) when it was merged after the fact. --- addons/spectator/stringtable.xml | 70 +++++++++++++++++++++++++++++--- 1 file changed, 64 insertions(+), 6 deletions(-) diff --git a/addons/spectator/stringtable.xml b/addons/spectator/stringtable.xml index 8b91608981..1f74d08c43 100644 --- a/addons/spectator/stringtable.xml +++ b/addons/spectator/stringtable.xml @@ -3,195 +3,253 @@ Spectator Settings + Ustawienia obserwatora Configure how the spectator system will operate by default. + Skonfiguruj domyślne ustawienia obserwatora. Spectate on death + Obserwator po śmierci Enables spectator upon death. + Włącz obserwatora po śmierci Unit filter + Filtr jednostek Method of filtering spectatable units. + Wybierz jednostki, jakie będzie można obserwować po uruchomeniu obserwatora. No units + Brak jednostek Only players + Tylko gracze All units + Wszystkie jednostki Side filter + Filtr stron Method of filtering spectatable sides. + Wybierz strony, jakie będzie można obserwować po uruchomeniu obserwatora. Player side + Strona gracza Friendly sides + Strony sojusznicze Hostile sides + Strony wrogie All sides + Wszystkie strony Camera modes + Tryby kamery Camera modes that can be used. + Tryby kamery, jakie mogą być używane. All + Wszystkie Free only + Tylko wolna Internal only + Tylko wewnętrzna External only + Tylko zewnętrzna Internal and external + Wewnętrzna i zewnętrzna Vision modes + Tryby wizji Vision modes that can be used. + Tryby wizji, jakie mogą być używane. Night vision + Noktowizja Thermal imaging + Termowizja Unit icons + Ikony jednostek Render icons above spectatable units. + Renderuj ikony nad głowami jednostek, które można obserwować. - Spectator Controls + Sterowanie obserwatorem Free + Wolna Internal + Wewnętrzna External + Zewnętrzna Normal + Normalna Night + Noc Thermal + Termo - Free Camera Controls + Wolne sterowanie kamerą Camera Forward + Kamera naprzód Camera Backward + Kamera w tył Camera Left + Kamera w lewo Camera Right + Kamera w prawo Camera Up + Kamera w górę Camera Down + Kamera w dół Pan Camera + Panoramowanie Dolly Camera + Płynna kamera Lock Camera to Target + Zablokuj kamerę na celu - Zoom In/Out + Zoom +/- + Zoom +/- - Speed Up/Down + Speed +/- + Prędkość +/- Next Vision Mode + Następny tryb wizji Previous Vision Mode + Poprzedni tryb wizji - Interface Controls + Sterowanie interfejsem Toggle Interface + Przełącz interfejs Toggle Unit Icons + Przełącz ikony jednostek Toggle Unit List + Przełącz listę jednostek Toggle Toolbar + Przełącz pasek narzędzi Toggle Compass + Przełącz kompas Toggle Map + Przełącz mapę Toggle Help + Przełącz pomoc - Other Controls + Pozostałe sterowanie Next Camera + Następna kamera Previous Camera + Poprzednia kamera Next Unit + Następna jednostka Previous Unit + Poprzednia jednostka From b87b4ea16aba273aca2ad287239bd45f60c890c5 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Mon, 3 Aug 2015 00:22:50 +0100 Subject: [PATCH 013/371] Improve spectator GUI reopening prevention Using boolean instead of simply checking for the display. Checking for diplay was unreliable since it can be technically closed while theoretically open during the escape menu and such. --- addons/spectator/XEH_preInit.sqf | 2 +- addons/spectator/functions/fnc_handleInterface.sqf | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/addons/spectator/XEH_preInit.sqf b/addons/spectator/XEH_preInit.sqf index a77d731478..3b317ba904 100644 --- a/addons/spectator/XEH_preInit.sqf +++ b/addons/spectator/XEH_preInit.sqf @@ -38,7 +38,7 @@ GVAR(camUnit) = objNull; GVAR(camVision) = -2; GVAR(camZoom) = 1.25; -SETUVAR(GVAR(display),nil); +GVAR(open) = false; GVAR(showComp) = true; GVAR(showHelp) = true; diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index 2fa0d1439c..114f4e163b 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -23,7 +23,8 @@ switch (toLower _mode) do { // Safely open/close the interface case "open": { // Prevent reopening - if !(isNull (GETUVAR(GVAR(display),displayNull))) exitWith {}; + if (GVAR(open)) exitWith {}; + GVAR(open) = true; // Initalize camera variables GVAR(camBoom) = 0; @@ -57,13 +58,13 @@ switch (toLower _mode) do { }; case "close": { // Can't close a second time - if (isNull (GETUVAR(GVAR(display),displayNull))) exitWith {}; + if !(GVAR(open)) exitWith {}; + GVAR(open) = false; // Terminate interface while {dialog} do { closeDialog 0; }; - GETUVAR(GVAR(display),displayNull) closeDisplay 0; // Terminate camera GVAR(camera) cameraEffect ["terminate", "back"]; @@ -95,8 +96,6 @@ switch (toLower _mode) do { case "onload": { _args params ["_display"]; - SETUVAR(GVAR(display),_display); - // Always show interface and hide map upon opening [_display,nil,nil,!GVAR(showInterface),GVAR(showMap)] call FUNC(toggleInterface); @@ -149,8 +148,7 @@ switch (toLower _mode) do { //_display displayAddEventHandler ["KeyDown", {[_this,'keydown'] call CBA_events_fnc_keyHandler}]; }; case "onunload": { - SETUVAR(GVAR(display),nil); - + // Kill GUI PFHs GVAR(camHandler) = nil; GVAR(compHandler) = nil; GVAR(iconHandler) = nil; From 98b088f26f717d172c3bdb5e1a0695412ce38c5a Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Mon, 3 Aug 2015 00:24:36 +0100 Subject: [PATCH 014/371] Fix pre-spectator position saving When staging a spectator (physically applying the spectator state) the unit position is saved for potential later restoration. This shouldn't be done multiple times since the function can be called again to reset staged units. --- addons/spectator/functions/fnc_handleRespawn.sqf | 2 ++ addons/spectator/functions/fnc_stageSpectator.sqf | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/addons/spectator/functions/fnc_handleRespawn.sqf b/addons/spectator/functions/fnc_handleRespawn.sqf index 3e7dfa41f3..aa695dd553 100644 --- a/addons/spectator/functions/fnc_handleRespawn.sqf +++ b/addons/spectator/functions/fnc_handleRespawn.sqf @@ -15,4 +15,6 @@ #include "script_component.hpp" +params ["_unit","_oldUnit"]; + [_unit,false] call FUNC(setSpectator); diff --git a/addons/spectator/functions/fnc_stageSpectator.sqf b/addons/spectator/functions/fnc_stageSpectator.sqf index 84bd6ffced..bac5174601 100644 --- a/addons/spectator/functions/fnc_stageSpectator.sqf +++ b/addons/spectator/functions/fnc_stageSpectator.sqf @@ -40,13 +40,16 @@ _unit enableSimulation !_set; [_unit, _set, QGVAR(isStaged), side group _unit] call EFUNC(common,switchToGroupSide); if (_set) then { - // Move and hide the player ASAP to avoid being seen - GVAR(oldPos) = getPosATL _unit; - _unit setPos (getMarkerPos QGVAR(respawn)); + // Position should only be saved on first entry + if !(GETVAR(_unit,GVAR(isStaged),false)) then { + GVAR(oldPos) = getPosATL _unit; + }; // Ghosts can't talk [_unit, QGVAR(isStaged)] call EFUNC(common,hideUnit); [_unit, QGVAR(isStaged)] call EFUNC(common,muteUnit); + + _unit setPos (getMarkerPos QGVAR(respawn)); } else { // Physical beings can talk [_unit, QGVAR(isStaged)] call EFUNC(common,unhideUnit); From f5e7185aec965d0166cf8cae2e85a6b81d717a44 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Mon, 3 Aug 2015 13:04:36 +0100 Subject: [PATCH 015/371] Fix spectator camera exiting mechanism When using ACE_Player the camera would return to the dead body. It makes sense to simply pass the reset unit by reference to the camera exit code. --- addons/spectator/functions/fnc_handleInterface.sqf | 4 +++- addons/spectator/functions/fnc_setSpectator.sqf | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index 114f4e163b..255d282983 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -57,6 +57,8 @@ switch (toLower _mode) do { }; }; case "close": { + _args params ["_unit"]; + // Can't close a second time if !(GVAR(open)) exitWith {}; GVAR(open) = false; @@ -71,7 +73,7 @@ switch (toLower _mode) do { camDestroy GVAR(camera); // Return to player view - ACE_Player switchCamera "internal"; + _unit switchCamera "internal"; // Cleanup camera variables GVAR(camera) = nil; diff --git a/addons/spectator/functions/fnc_setSpectator.sqf b/addons/spectator/functions/fnc_setSpectator.sqf index 2f8e1d3c2d..b6e85926c5 100644 --- a/addons/spectator/functions/fnc_setSpectator.sqf +++ b/addons/spectator/functions/fnc_setSpectator.sqf @@ -36,7 +36,7 @@ if !(local _unit) exitwith { if (_set) then { ["open"] call FUNC(handleInterface); } else { - ["close"] call FUNC(handleInterface); + ["close",_unit] call FUNC(handleInterface); }; // Handle common addon audio From 5bfa4e597113356d534d28cef9b5dc011b761e6f Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Mon, 3 Aug 2015 15:18:09 +0100 Subject: [PATCH 016/371] Improve spectator camera vision mode on start The spectator camera should start in night vision mode if the sun to moon transition state is appropriate --- addons/spectator/functions/fnc_handleInterface.sqf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index 255d282983..315398ab0c 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -37,6 +37,11 @@ switch (toLower _mode) do { GVAR(mouse) = [false,false]; GVAR(mousePos) = [0.5,0.5]; + // Camera starts with night vision if it's dark + if (sunOrMoon < 1) then { + [nil,nil,-1] call FUNC(setCameraAttributes); + }; + // Initalize the camera view GVAR(camera) = "Camera" camCreate (ASLtoATL GVAR(camPos)); [] call FUNC(transitionCamera); From 7e9500f2ca6a240458b16031153565ff8e451efa Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Mon, 3 Aug 2015 21:38:44 +0100 Subject: [PATCH 017/371] Enable ace_spectator respawn framework integration Seamlessly integrates the spectator system with the vanilla respawn framework when the onDeath setting is enabled. This commit makes a lot of changes: - Edit BI functions used by the vanilla respawn framework to enable support for ace_spectator. - Set spectator state is now tracked using a GVAR for the local player since using a unit won't be reliable all of the time. However unit is still marked for any filtering purposes. - Instead of NV being used based on the sun to moon transition state by default, that functionality only takes place in the integrated system so that custom frameworks can do what they want. - Seagull units are hidden when using framework integration since they're spawned by the engine with respawn type 1 and they just hang around undesirably --- addons/spectator/XEH_postInit.sqf | 7 - addons/spectator/XEH_preInit.sqf | 12 +- addons/spectator/config.cpp | 35 +++ .../functions/fnc_bi_respawnBase.sqf | 35 +++ .../functions/fnc_bi_respawnCounter.sqf | 35 +++ .../functions/fnc_bi_respawnEndMission.sqf | 62 ++++ .../functions/fnc_bi_respawnInstant.sqf | 35 +++ .../functions/fnc_bi_respawnNone.sqf | 293 ++++++++++++++++++ .../functions/fnc_bi_respawnSeagull.sqf | 101 ++++++ .../functions/fnc_bi_respawnSpectator.sqf | 59 ++++ .../functions/fnc_bi_respawnWave.sqf | 43 +++ .../functions/fnc_handleInterface.sqf | 22 +- .../spectator/functions/fnc_handleKilled.sqf | 26 -- .../spectator/functions/fnc_handleRespawn.sqf | 20 -- .../functions/fnc_setCameraAttributes.sqf | 2 +- .../spectator/functions/fnc_setSpectator.sqf | 31 +- .../functions/fnc_stageSpectator.sqf | 4 +- 17 files changed, 736 insertions(+), 86 deletions(-) create mode 100644 addons/spectator/functions/fnc_bi_respawnBase.sqf create mode 100644 addons/spectator/functions/fnc_bi_respawnCounter.sqf create mode 100644 addons/spectator/functions/fnc_bi_respawnEndMission.sqf create mode 100644 addons/spectator/functions/fnc_bi_respawnInstant.sqf create mode 100644 addons/spectator/functions/fnc_bi_respawnNone.sqf create mode 100644 addons/spectator/functions/fnc_bi_respawnSeagull.sqf create mode 100644 addons/spectator/functions/fnc_bi_respawnSpectator.sqf create mode 100644 addons/spectator/functions/fnc_bi_respawnWave.sqf delete mode 100644 addons/spectator/functions/fnc_handleKilled.sqf delete mode 100644 addons/spectator/functions/fnc_handleRespawn.sqf diff --git a/addons/spectator/XEH_postInit.sqf b/addons/spectator/XEH_postInit.sqf index 45ac78e89c..35b463837f 100644 --- a/addons/spectator/XEH_postInit.sqf +++ b/addons/spectator/XEH_postInit.sqf @@ -7,11 +7,4 @@ ["SettingsInitialized", { GVAR(availableModes) = [[0,1,2], [1,2], [0], [1], [2]] select GVAR(restrictModes); GVAR(availableVisions) = [[-2,-1,0,1], [-2,-1], [-2,0,1], [-2]] select GVAR(restrictVisions); - - if !(hasInterface) exitWith {}; - - if (GVAR(onDeath)) then { - player addEventHandler ["Killed",FUNC(handleKilled)]; - player addEventHandler ["Respawn",FUNC(handleRespawn)]; - }; }] call EFUNC(common,addEventHandler); diff --git a/addons/spectator/XEH_preInit.sqf b/addons/spectator/XEH_preInit.sqf index 3b317ba904..73c629a0ce 100644 --- a/addons/spectator/XEH_preInit.sqf +++ b/addons/spectator/XEH_preInit.sqf @@ -2,15 +2,21 @@ ADDON = false; +PREP(bi_respawnBase); +PREP(bi_respawnCounter); +PREP(bi_respawnEndMission); +PREP(bi_respawnInstant); +PREP(bi_respawnNone); +PREP(bi_respawnSeagull); +PREP(bi_respawnSpectator); +PREP(bi_respawnWave); PREP(cacheUnitInfo); PREP(cycleCamera); PREP(handleCamera); PREP(handleCompass); PREP(handleIcons); PREP(handleInterface); -PREP(handleKilled); PREP(handleMouse); -PREP(handleRespawn); PREP(handleToolbar); PREP(handleUnits); PREP(moduleSpectatorSettings); @@ -38,7 +44,7 @@ GVAR(camUnit) = objNull; GVAR(camVision) = -2; GVAR(camZoom) = 1.25; -GVAR(open) = false; +GVAR(isSet) = false; GVAR(showComp) = true; GVAR(showHelp) = true; diff --git a/addons/spectator/config.cpp b/addons/spectator/config.cpp index e686c75294..eb73761e5f 100644 --- a/addons/spectator/config.cpp +++ b/addons/spectator/config.cpp @@ -16,3 +16,38 @@ class CfgPatches { #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" #include "ui\interface.hpp" + +class CfgRespawnTemplates { + class None { + onPlayerKilled = QFUNC(bi_respawnNone); + }; + class Spectator { + onPlayerKilled = QFUNC(bi_respawnSpectator); + onPlayerRespawn = QFUNC(bi_respawnSpectator); + }; + class Instant { + onPlayerKilled = QFUNC(bi_respawnInstant); + onPlayerRespawn = QFUNC(bi_respawnInstant); + }; + class Base { + onPlayerKilled = QFUNC(bi_respawnBase); + onPlayerRespawn = QFUNC(bi_respawnBase); + }; + class EndMission + { + onPlayerKilled = QFUNC(bi_respawnEndMission); + onPlayerRespawn = QFUNC(bi_respawnEndMission); + }; + class Seagull { + onPlayerRespawn = QFUNC(bi_respawnSeagull); + }; + class Wave + { + onPlayerKilled = QFUNC(bi_respawnWave); + onPlayerRespawn = QFUNC(bi_respawnWave); + }; + class Counter { + onPlayerKilled = QFUNC(bi_respawnCounter); + onPlayerRespawn = QFUNC(bi_respawnCounter); + }; +}; diff --git a/addons/spectator/functions/fnc_bi_respawnBase.sqf b/addons/spectator/functions/fnc_bi_respawnBase.sqf new file mode 100644 index 0000000000..7ea5b0c745 --- /dev/null +++ b/addons/spectator/functions/fnc_bi_respawnBase.sqf @@ -0,0 +1,35 @@ +/* + * Author: Bohemia Interactive + * Part of the BI respawn framework + * Handles base respawn type (respawn on marker) + * Edited to support ace_spectator integration + * + * Arguments: + * 0: Corpse/New Unit + * 1: Killer/Old Unit + * 2: Respawn Type + * 3: Respawn Delay + * + * Return Value: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +if !(GVAR(onDeath)) exitWith {}; + +params [["_unit",objNull,[objNull]], ["_killer",objNull,[objNull]]]; + +if (alive _unit) then { + [_unit,false] call FUNC(setSpectator); +} else { + private ["_vision","_pos"]; + if (isNull _killer) then {_killer = _unit}; + _vision = [-2,-1] select (sunOrMoon < 1); + _pos = (getPosATL _unit) vectorAdd [0,0,5]; + + [2,_killer,_vision,_pos,getDir _unit] call FUNC(setCameraAttributes); + [_unit] call FUNC(setSpectator); +}; diff --git a/addons/spectator/functions/fnc_bi_respawnCounter.sqf b/addons/spectator/functions/fnc_bi_respawnCounter.sqf new file mode 100644 index 0000000000..0bee90ec61 --- /dev/null +++ b/addons/spectator/functions/fnc_bi_respawnCounter.sqf @@ -0,0 +1,35 @@ +/* + * Author: Bohemia Interactive (Karel Moricky) + * Part of the BI respawn framework + * Handles the respawn timer display + * Edited to disable counter when spectator is opened + * + * Arguments: + * 0: Corpse/New Unit + * 1: Killer/Old Unit + * 2: Respawn Type + * 3: Respawn Delay + * + * Return Value: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +_player = [_this,0,objNull,[objnull]] call bis_fnc_param; + +_respawnDelay = [_this,3,0,[0]] call bis_fnc_param; + +if (!isplayer _player && !isnull _player && _respawnDelay > 0) exitwith {["Attempting to use the function on AI unit %1, can be used only on players."] call bis_fnc_error;}; + +//--- Engine-triggered respawn +_layer = "BIS_fnc_respawnCounter" call bis_fnc_rscLayer; + +if (!alive _player) then { + if (GVAR(onDeath) || (playerrespawntime < 1)) exitwith {}; + _layer cutrsc ["RscRespawnCounter","plain"]; +} else { + _layer cuttext ["","plain"]; +}; diff --git a/addons/spectator/functions/fnc_bi_respawnEndMission.sqf b/addons/spectator/functions/fnc_bi_respawnEndMission.sqf new file mode 100644 index 0000000000..23b8dacc17 --- /dev/null +++ b/addons/spectator/functions/fnc_bi_respawnEndMission.sqf @@ -0,0 +1,62 @@ +/* + * Author: Bohemia Interactive (Karel Moricky) + * Part of the BI respawn framework + * Ends the mission when all players are dead + * Edited to support ace_spectator integration + * + * Arguments: + * 0: Corpse/New Unit + * 1: Killer/Old Unit + * 2: Respawn Type + * 3: Respawn Delay + * + * Return Value: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +params [["_unit",objNull,[objNull]], ["_killer",objNull,[objNull]]]; +private ["_vision","_pos"]; + +if (isNull _killer) then {_killer = _unit}; +_vision = [-2,-1] select (sunOrMoon < 1); +_pos = (getPosATL _unit) vectorAdd [0,0,5]; + +if (ismultiplayer) then { + + _respawnType = 0 call bis_fnc_missionRespawnType; + if (_respawnType in [0,1,4,5]) then { + + //--- No more respawn slots + if ({isplayer _x && alive _x} count playableunits == 0) then { + [["endDeath",false],"bis_fnc_endmission"] call bis_fnc_mp; + } else { + if (GVAR(onDeath) && (_respawnType in [0,1])) then { + [2,_killer,_vision,_pos,getDir _unit] call FUNC(setCameraAttributes); + [_unit] call FUNC(setSpectator); + }; + }; + + //--- Don't end the script to prevent premature mission end + waituntil {false}; + } else { + + if (!alive _unit) then { + + //--- No more respawn tickets + if ([] call bis_fnc_respawntickets == 0 && {isplayer _x} count playableunits == 0) then { + [["endDeath",false],"bis_fnc_endmission"] call bis_fnc_mp; + } else { + if (GVAR(onDeath)) then { + [2,_killer,_vision,_pos,getDir _unit] call FUNC(setCameraAttributes); + [_unit] call FUNC(setSpectator); + }; + }; + } else { + [_unit,false] call FUNC(setSpectator); + }; + }; +}; diff --git a/addons/spectator/functions/fnc_bi_respawnInstant.sqf b/addons/spectator/functions/fnc_bi_respawnInstant.sqf new file mode 100644 index 0000000000..fd1d255cf9 --- /dev/null +++ b/addons/spectator/functions/fnc_bi_respawnInstant.sqf @@ -0,0 +1,35 @@ +/* + * Author: Bohemia Interactive + * Part of the BI respawn framework + * Handles instant respawn type (respawn at position of death) + * Edited to support ace_spectator integration + * + * Arguments: + * 0: Corpse/New Unit + * 1: Killer/Old Unit + * 2: Respawn Type + * 3: Respawn Delay + * + * Return Value: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +if !(GVAR(onDeath)) exitWith {}; + +params [["_unit",objNull,[objNull]], ["_killer",objNull,[objNull]]]; + +if (alive _unit) then { + [_unit,false] call FUNC(setSpectator); +} else { + private ["_vision","_pos"]; + if (isNull _killer) then {_killer = _unit}; + _vision = [-2,-1] select (sunOrMoon < 1); + _pos = (getPosATL _unit) vectorAdd [0,0,5]; + + [2,_killer,_vision,_pos,getDir _unit] call FUNC(setCameraAttributes); + [_unit] call FUNC(setSpectator); +}; diff --git a/addons/spectator/functions/fnc_bi_respawnNone.sqf b/addons/spectator/functions/fnc_bi_respawnNone.sqf new file mode 100644 index 0000000000..a5031a8fd9 --- /dev/null +++ b/addons/spectator/functions/fnc_bi_respawnNone.sqf @@ -0,0 +1,293 @@ +/* + * Author: Bohemia Interactive (Karel Moricky) + * Part of the BI respawn framework + * Shows death screen for respawn type "None" + * Edited to support ace_spectator integration + * + * Arguments: + * 0: Corpse + * 1: Killer + * 2: Respawn Type + * 3: Respawn Delay + * + * Return Value: + * None + * + * Public: No + */ +private ["_soundvolume","_musicvolume"]; + +#define BI_CONTROL (_display displayctrl _n) + +#include "script_component.hpp" + +disableserialization; +_player = _this select 0; +_killer = _this select 1; +if (isnull _killer) then {_killer = _player}; + +_musicvolume = musicvolume; +_soundvolume = soundvolume; //MUF-TODO: check if this is done before sound is faded in fn_feedbackMain.fsm + +_start = isnil "bis_fnc_respawnNone_start"; +if (_start) then { + bis_fnc_respawnNone_start = [daytime,time / 3600]; + + //3.5 fadesound 0; //MUF-commented + + sleep 2; + if (alive player) exitwith {}; + cutText ["","BLACK OUT",1]; + sleep 1.5; + BIS_fnc_feedback_allowPP = false; //MUF-switch health PP off + //(["HealthPP_black"] call bis_fnc_rscLayer) cutText ["","BLACK IN",1];//MUF-black in (remove black screen that was launched in FSM PP) + + if (ismultiplayer) then { + if (GVAR(onDeath)) then { + private ["_vision","_pos"]; + _vision = [-2,-1] select (sunOrMoon < 1); + _pos = (getPosATL _player) vectorAdd [0,0,5]; + + [2,_killer,_vision,_pos,getDir _player] call FUNC(setCameraAttributes); + [_player] call FUNC(setSpectator); + } else { + (finddisplay 46) createdisplay "RscDisplayMissionEnd"; + }; + } else {enableenddialog}; +}; +if (alive player) exitwith { + [player,false] call FUNC(setSpectator); + cuttext ["","plain"]; +}; //--- Terminate when player manages to switch do different unit already + +if (GVAR(onDeath)) exitWith {}; + +waituntil {!isnull (finddisplay 58)}; +_display = finddisplay 58; + +//--- Black fade in +_n = 1060; +BI_CONTROL ctrlsetfade 1; +if (_start) then { + + //--- Play ambient radio + setacctime 1; + 0 fademusic 0; + 4 fademusic 0.8; + playmusic format ['RadioAmbient%1',ceil random 1/*30*/]; + _musicEH = addMusicEventHandler ["MusicStop",{[] spawn {playmusic format ['RadioAmbient%1',ceil random 1/*30*/];};}]; + uinamespace setvariable ["bis_fnc_respawnNone_musicEH",_musicEH]; + _display displayaddeventhandler ["unload","removeMusicEventHandler ['MusicStop',uinamespace getvariable ['bis_fnc_respawnNone_musicEH',-1]];"]; + + BI_CONTROL ctrlcommit 4; +} else { + BI_CONTROL ctrlcommit 0; +}; +cuttext ["","plain"]; + +//--- HUD +_n = 5800; +BI_CONTROL ctrlsettext gettext (configfile >> "cfgingameui" >> "cursor" >> "select"); +BI_CONTROL ctrlsetposition [-10,-10,safezoneH * 0.07 * 3/4,safezoneH * 0.07]; +BI_CONTROL ctrlsettextcolor [1,1,1,1]; +BI_CONTROL ctrlcommit 0; + +//--- SITREP (ToDO: Localize) +_sitrep = "SITREP||"; +if (name _player != "Error: No unit") then { + _sitrep = _sitrep + "KIA: %4. %5|"; +}; +_sitrep = _sitrep + "TOD: %2 [%3]|LOC: %6 \ %7"; +if (_killer != _player) then { + _sitrep = _sitrep + "||ENY: %8"; + if (currentweapon _killer != "") then { + _sitrep = _sitrep + "|ENW: %9" + }; +}; +_sitrep = format [ + _sitrep, + 1 * safezoneH, + [bis_fnc_respawnNone_start select 0,"HH:MM:SS"] call bis_fnc_timetostring, + [bis_fnc_respawnNone_start select 1,"HH:MM:SS"] call bis_fnc_timetostring, + toupper localize format ["STR_SHORT_%1",rank _player], + toupper name _player, + mapGridPosition _player, + toupper worldname, + toupper ((configfile >> "cfgvehicles" >> typeof _killer) call bis_fnc_displayname), + toupper ((configfile >> "cfgweapons" >> currentweapon _killer) call bis_fnc_displayname) + +]; + +_n = 11000; +_bcgPos = ctrlposition BI_CONTROL; +_n = 5858; +//BI_CONTROL ctrlsetposition [_bcgPos select 0,safezoneY + ((_bcgPos select 0) - safezoneX) * 4/3,safezoneW - 2 * (_bcgPos select 2),safezoneH / 2]; +BI_CONTROL ctrlsetposition [(((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX), + ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY), + safezoneW - 2 * (_bcgPos select 2), + safezoneH / 2]; +BI_CONTROL ctrlcommit 0; +[BI_CONTROL,_sitrep] spawn { + scriptname "bis_fnc_respawnNone: SITREP"; + disableserialization; + _control = _this select 0; + _sitrepArray = toarray (_this select 1); + {_sitrepArray set [_foreachindex,tostring [_x]]} foreach _sitrepArray; + _sitrep = ""; + //_sitrepFormat = "%1"; + _sitrepFormat = "%1"; + + sleep 1; + for "_i" from 0 to (count _sitrepArray - 1) do { + _letter = _sitrepArray select _i; + _delay = if (_letter == "|") then {_letter = "
"; 1} else {0.01}; + _sitrep = _sitrep + _letter; + _control ctrlsetstructuredtext parsetext format [_sitrepFormat,_sitrep + "_"]; + //playsound ["IncomingChallenge",true]; + sleep _delay; + if (isnull _control) exitwith {}; + }; + _control ctrlsetstructuredtext parsetext format [_sitrepFormat,_sitrep]; +}; + + +//--- Create UAV camera +_camera = "camera" camcreate position player; +_camera cameraeffect ["internal","back"]; +_camera campreparefov 0.4; +_camera campreparetarget _killer; +showcinemaborder false; + +//--- Set PP effects +_saturation = 0.0 + random 0.3; +_ppColor = ppEffectCreate ["ColorCorrections", 1999]; +_ppColor ppEffectEnable true; +_ppColor ppEffectAdjust [1, 1, 0, [1, 1, 1, 0], [1 - _saturation, 1 - _saturation, 1 - _saturation, _saturation], [1, 0.25, 0, 1.0]]; +_ppColor ppEffectCommit 0; + +_ppGrain = ppEffectCreate ["filmGrain", 2012]; +_ppGrain ppEffectEnable true; +_ppGrain ppEffectAdjust [random 0.2, 1, 1, 0, 1]; +_ppGrain ppEffectCommit 0; + +//--- Camera update executed every frame +bis_fnc_respawnNone_player = _player; +bis_fnc_respawnNone_killer = _killer; +bis_fnc_respawnNone_camera = _camera; +bis_fnc_respawnNone_loop = { + scriptname "bis_fnc_respawnNone: camera"; + _display = _this select 0; + _player = bis_fnc_respawnNone_player; + _killer = bis_fnc_respawnNone_killer; + _camera = bis_fnc_respawnNone_camera; + + _sin = 20 * sin (time * 7); + _killerPos = [ + (visiblepositionasl _killer select 0), + (visiblepositionasl _killer select 1) + (_sin), + (visiblepositionasl _killer select 2) + (_sin) + ]; + + _dirToKiller = if (_killer == _player) then { + direction _player; + } else { + ([_player,_killerPos] call bis_fnc_dirto) + _sin; + }; + _pos = [ + visiblepositionasl _player, + -20, + _dirToKiller + ] call bis_fnc_relpos; + _pos set [2,((_pos select 2) + 7) max (getterrainheightasl _pos + 7)]; + + //--- Pitch + _heightCamera = getterrainheightasl _pos; + _heightKiller = getterrainheightasl _killerPos; + _height = _heightCamera - _heightKiller; + _dis = _killerPos distance _pos; + _angle = (asin (_height/_dis)); + + _camera setdir _dirtokiller; + [_camera,-_angle,_sin] call bis_fnc_setpitchbank; + _camera setposasl _pos; + + //--- HUD + _n = 5800; + _hudPos = (worldtoscreen position _player); + if (count _hudPos > 0) then { + _hudPosW = ctrlposition BI_CONTROL select 2; + _hudPosH = ctrlposition BI_CONTROL select 3; + _hudPos = [ + (_hudPos select 0) - _hudPosW / 2, + (_hudPos select 1) - _hudPosH / 2, + _hudPosW, + _hudPosH + ]; + BI_CONTROL ctrlsetposition _hudPos; + BI_CONTROL ctrlcommit 0; + }; +}; + +bis_fnc_respawnNone_keydown = { + _key = _this select 1; + + if (_key in (actionkeys 'nightvision') || _key < 0) then { + bis_fnc_respawnNone_vision = bis_fnc_respawnNone_vision + 1; + _vision = bis_fnc_respawnNone_vision % 4; + switch (_vision) do { + case 0: { + camusenvg false; + call compile 'false SetCamUseTi 0'; + }; + case 1: { + camusenvg true; + call compile 'false SetCamUseTi 0'; + }; + case 2: { + camusenvg false; + call compile 'true SetCamUseTi 0'; + }; + case 3: { + camusenvg false; + call compile 'true SetCamUseTi 1'; + }; + }; + }; +}; +//bis_fnc_respawnNone_vision = (1 + floor random 3) % 4; //--- Random vision (not NVG) +bis_fnc_respawnNone_vision = -1; +if (sunormoon < 1) then {bis_fnc_respawnNone_vision = 0;}; +[-1,-1] call bis_fnc_respawnNone_keydown; + +_display displayaddeventhandler ["mousemoving","_this call bis_fnc_respawnNone_loop"]; +_display displayaddeventhandler ["mouseholding","_this call bis_fnc_respawnNone_loop"]; +_display displayaddeventhandler ["keydown","_this call bis_fnc_respawnNone_keydown"]; + + +//--- Team Switch display opened +waituntil {isnull _display}; +_displayTeamSwitch = finddisplay 632; + +//--- Team Switch display closed - cleanup and restart the view +waituntil {isnull _displayTeamSwitch}; + +_camera cameraeffect ["terminate","back"]; +camdestroy _camera; + +bis_fnc_respawnNone_player = nil; +bis_fnc_respawnNone_killer = nil; +bis_fnc_respawnNone_camera = nil; +bis_fnc_respawnNone_loop = nil; + +ppeffectdestroy _ppColor; +ppeffectdestroy _ppGrain; + +if (!alive player) exitwith {_this call bis_fnc_respawnNone;}; + + +//--- Resurrection! +BIS_fnc_feedback_allowPP = true; +0 fadesound _soundvolume; +0 fademusic _musicvolume; +playmusic ""; +bis_fnc_respawnNone_start = nil; diff --git a/addons/spectator/functions/fnc_bi_respawnSeagull.sqf b/addons/spectator/functions/fnc_bi_respawnSeagull.sqf new file mode 100644 index 0000000000..2e01ffa6ea --- /dev/null +++ b/addons/spectator/functions/fnc_bi_respawnSeagull.sqf @@ -0,0 +1,101 @@ +/* + * Author: Bohemia Interactive + * Part of the BI respawn framework + * Correctly handles seagull respawn (not used by default) + * Edited to support ace_spectator integration + * + * Arguments: + * 0: Corpse/New Unit + * 1: Killer/Old Unit + * 2: Respawn Type + * 3: Respawn Delay + * + * Return Value: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +_seagull = _this select 0; +_player = _this select 1; +_this call bis_fnc_log; + +if (!isplayer _player && !isplayer _seagull) exitwith {["Attempting to use the function on AI unit %1, can be used only on players."] call bis_fnc_error;}; + +waituntil {missionnamespace getvariable ["BIS_fnc_feedback_allowDeathScreen",true]}; +BIS_fnc_feedback_allowPP = false; +//(["HealthPP_black"] call bis_fnc_rscLayer) cutText ["","BLACK IN",8]; + +if (GVAR(onDeath)) exitWith { + private ["_vision","_pos"]; + + if (isNull _player) then {_player = _seagull}; + _vision = [-2,-1] select (sunOrMoon < 1); + _pos = (getPosATL _player) vectorAdd [0,0,5]; + + [_seagull,QGVAR(isSeagull)] call EFUNC(common,hideUnit); + [2,_player,_vision,_pos,getDir _seagull] call FUNC(setCameraAttributes); + [_seagull] call FUNC(setSpectator); +}; + +_camera = "camera" camCreate [(position _player select 0)-0.75, (position _player select 1)-0.75,(position _player select 2) + 0.5]; +_camera cameraEffect ["internal","back"]; +_camera camSetFOV 0.800; +_camera camCommit 0; +waituntil {camCommitted _camera}; + +0 fadeMusic 0.5; +playMusic "Track06_Abandoned_Battlespace"; + +_camera camSetTarget vehicle _player; +_camera camSetRelPos [-0.82,-3.12,3.38]; +_camera camSetFOV 0.800; +_camera camCommit 7; + +sleep 1; +_preload = _player spawn {waitUntil {(preloadCamera getPos _this) && (2 preloadObject _this)}}; +sleep 5; +waituntil {camCommitted _camera}; + +_camera camSetRelPos [1.17,-21.71,2.07]; +_camera camSetFOV 0.400; +_camera camCommit 10; +sleep 2; +terminate _preload; +sleep 3; +_preload = _player spawn {waitUntil {(preloadCamera getPos _this) && (3 preloadObject _this)}}; +waituntil {camCommitted _camera}; + +_camera camSetTarget vehicle _player; +_camera camSetRelPos [5.80,1.29,5.07]; +_camera camSetFOV 0.300; +_camera camCommit 7; +sleep 2; +terminate _preload; +_preload = _seagull spawn {waitUntil {(preloadCamera getPos _this) && (4 preloadObject _this)}}; +waituntil {camCommitted _camera}; + +_camera camSetRelPos [2.71,19.55,12.94]; +_camera camSetFOV 0.700; +_camera camCommit 2; +waituntil {camCommitted _camera}; + +_camera camSetTarget _seagull; +_camera camSetRelPos [-6.66,18.99,2.59]; +_camera camSetFOV 0.700; +_camera camCommit 3; +waituntil {camCommitted _camera}; + +3 fadeMusic 0; + +_camera camSetRelPos [1.17,-21.71,-1.07]; +_camera camSetFOV 0.300; +_camera camCommit 3; +waituntil {camCommitted _camera}; +terminate _preload; + +_seagull switchCamera "EXTERNAL"; +_seagull cameraEffect ["terminate","back"]; +camDestroy _camera; diff --git a/addons/spectator/functions/fnc_bi_respawnSpectator.sqf b/addons/spectator/functions/fnc_bi_respawnSpectator.sqf new file mode 100644 index 0000000000..5097b61ab2 --- /dev/null +++ b/addons/spectator/functions/fnc_bi_respawnSpectator.sqf @@ -0,0 +1,59 @@ +/* + * Author: Bohemia Interactive + * Part of the BI respawn framework + * Opens BI spectator interface (default used by seagull respawn) + * Edited to support ace_spectator integration + * + * Arguments: + * 0: Corpse/New Unit + * 1: Killer/Old Unit + * 2: Respawn Type + * 3: Respawn Delay + * + * Return Value: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +params [["_unit",objNull,[objNull]], ["_killer",objNull,[objNull]], ["_respawn",-1,[0]]]; +private ["_vision","_pos"]; + +if (isNull _killer) then {_killer = _unit}; +_vision = [-2,-1] select (sunOrMoon < 1); +_pos = (getPosATL _unit) vectorAdd [0,0,5]; + +_layer = "BIS_fnc_respawnSpectator" call bis_fnc_rscLayer; + +if (!alive _unit) then { + if (GVAR(onDeath)) then { + [2,_killer,_vision,_pos,getDir _unit] call FUNC(setCameraAttributes); + [_unit] call FUNC(setSpectator); + } else { + _layer cutrsc ["RscSpectator","plain"]; + }; +} else { + if (_respawn == 1) then { + + //--- Open + waituntil {missionnamespace getvariable ["BIS_fnc_feedback_allowDeathScreen",true]}; + BIS_fnc_feedback_allowPP = false; + //(["HealthPP_black"] call bis_fnc_rscLayer) cutText ["","BLACK IN",1]; + if (GVAR(onDeath)) then { + [_unit,QGVAR(isSeagull)] call EFUNC(common,hideUnit); + [2,_killer,_vision,_pos,getDir _unit] call FUNC(setCameraAttributes); + [_unit] call FUNC(setSpectator); + } else { + _layer cutrsc ["RscSpectator","plain"]; + }; + } else { + if (GVAR(onDeath)) then { + [_unit,false] call FUNC(setSpectator); + }; + + //--- Close + _layer cuttext ["","plain"]; + }; +}; diff --git a/addons/spectator/functions/fnc_bi_respawnWave.sqf b/addons/spectator/functions/fnc_bi_respawnWave.sqf new file mode 100644 index 0000000000..371a8edcdc --- /dev/null +++ b/addons/spectator/functions/fnc_bi_respawnWave.sqf @@ -0,0 +1,43 @@ +/* + * Author: Bohemia Interactive + * Part of the BI respawn framework + * Handles wave respawning system + * Edited to support ace_spectator integration + * + * Arguments: + * 0: Corpse/New Unit + * 1: Killer/Old Unit + * 2: Respawn Type + * 3: Respawn Delay + * + * Return Value: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +params [["_unit",objNull,[objNull]], ["_killer",objNull,[objNull]], ["_respawn",0,[0]], ["_respawnDelay",0,[0]]]; + +if (!isplayer _unit && !isnull _unit) exitwith {["Attempting to use the function on AI unit %1, can be used only on players."] call bis_fnc_error;}; + +if (!alive _unit) then { + //--- Set the time only when it was not modified already + if (_respawnDelay != 0 && _respawnDelay == playerrespawntime) then { + setplayerrespawntime (_respawnDelay + _respawnDelay - (servertime % _respawnDelay)); + + if !(GVAR(onDeath)) exitWith {}; + private ["_vision","_pos"]; + + if (isNull _killer) then {_killer = _unit}; + _vision = [-2,-1] select (sunOrMoon < 1); + _pos = (getPosATL _unit) vectorAdd [0,0,5]; + + [2,_killer,_vision,_pos,getDir _unit] call FUNC(setCameraAttributes); + [_unit] call FUNC(setSpectator); + }; +} else { + setplayerrespawntime _respawndelay; + [_unit,false] call FUNC(setSpectator); +}; diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index 315398ab0c..5c8c958451 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -23,8 +23,7 @@ switch (toLower _mode) do { // Safely open/close the interface case "open": { // Prevent reopening - if (GVAR(open)) exitWith {}; - GVAR(open) = true; + if (GVAR(isSet)) exitWith {}; // Initalize camera variables GVAR(camBoom) = 0; @@ -37,15 +36,17 @@ switch (toLower _mode) do { GVAR(mouse) = [false,false]; GVAR(mousePos) = [0.5,0.5]; - // Camera starts with night vision if it's dark - if (sunOrMoon < 1) then { - [nil,nil,-1] call FUNC(setCameraAttributes); - }; - // Initalize the camera view GVAR(camera) = "Camera" camCreate (ASLtoATL GVAR(camPos)); [] call FUNC(transitionCamera); + // Close map + openMap [false,false]; + + // Close any BI layers/effects + BIS_fnc_feedback_allowPP = false; + ("BIS_fnc_respawnCounter" call BIS_fnc_rscLayer) cutText ["","plain"]; + // Close all existing dialogs while {dialog} do { closeDialog 0; @@ -65,8 +66,7 @@ switch (toLower _mode) do { _args params ["_unit"]; // Can't close a second time - if !(GVAR(open)) exitWith {}; - GVAR(open) = false; + if !(GVAR(isSet)) exitWith {}; // Terminate interface while {dialog} do { @@ -80,6 +80,10 @@ switch (toLower _mode) do { // Return to player view _unit switchCamera "internal"; + // Re-enable any BI effects + BIS_fnc_feedback_allowPP = true; + BIS_fnc_respawnNone_start = nil; + // Cleanup camera variables GVAR(camera) = nil; GVAR(camBoom) = nil; diff --git a/addons/spectator/functions/fnc_handleKilled.sqf b/addons/spectator/functions/fnc_handleKilled.sqf deleted file mode 100644 index 05671ed749..0000000000 --- a/addons/spectator/functions/fnc_handleKilled.sqf +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Author: SilentSpike - * Set inital camera attributes and set as spectator on death - * Part of the spectator during death system - * - * Arguments: - * 0: Corpse - * 1: Killer - * - * Return Value: - * None - * - * Public: No - */ - -#include "script_component.hpp" - -params ["_unit","_killer"]; - -if (isNull _killer) then { - [2,_unit] call FUNC(setCameraAttributes); -} else { - [2,_killer] call FUNC(setCameraAttributes); -}; - -[_unit] call FUNC(setSpectator); diff --git a/addons/spectator/functions/fnc_handleRespawn.sqf b/addons/spectator/functions/fnc_handleRespawn.sqf deleted file mode 100644 index aa695dd553..0000000000 --- a/addons/spectator/functions/fnc_handleRespawn.sqf +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Author: SilentSpike - * Un-set as spectator on respawn - * Part of the spectator during death system - * - * Arguments: - * 0: New unit - * 1: Old unit - * - * Return Value: - * None - * - * Public: No - */ - -#include "script_component.hpp" - -params ["_unit","_oldUnit"]; - -[_unit,false] call FUNC(setSpectator); diff --git a/addons/spectator/functions/fnc_setCameraAttributes.sqf b/addons/spectator/functions/fnc_setCameraAttributes.sqf index da2373318d..278a8c4758 100644 --- a/addons/spectator/functions/fnc_setCameraAttributes.sqf +++ b/addons/spectator/functions/fnc_setCameraAttributes.sqf @@ -51,7 +51,7 @@ if !(_vision in GVAR(availableVisions)) then { }; GVAR(camPan) = _heading % 360; -GVAR(camPosition) = (ATLtoASL _position); +GVAR(camPos) = (ATLtoASL _position); GVAR(camSpeed) = (_speed max 0.05) min 10; GVAR(camTilt) = (_tilt max -89) min 89; GVAR(camUnit) = _unit; diff --git a/addons/spectator/functions/fnc_setSpectator.sqf b/addons/spectator/functions/fnc_setSpectator.sqf index b6e85926c5..2d5ada415c 100644 --- a/addons/spectator/functions/fnc_setSpectator.sqf +++ b/addons/spectator/functions/fnc_setSpectator.sqf @@ -1,9 +1,9 @@ /* * Author: SilentSpike - * Sets target unit to the given spectator state (virtually) + * Sets target player to the given spectator state (virtually) * To physically handle a spectator see ace_spectator_fnc_stageSpectator * - * Units will be able to communicate in ACRE/TFAR as appropriate + * Player will be able to communicate in ACRE/TFAR as appropriate * The spectator interface will be opened/closed * * Arguments: @@ -23,20 +23,11 @@ params ["_unit", ["_set",true,[true]]]; -// No change, no service (but allow spectators to be reset) -if !(_set || (GETVAR(_unit,GVAR(isSet),false))) exitWith {}; - // Only run for player units if !(isPlayer _unit) exitWith {}; if !(local _unit) exitwith { - [[_unit, _set, _target], QFUNC(setSpectator), _unit] call EFUNC(common,execRemoteFnc); -}; - -if (_set) then { - ["open"] call FUNC(handleInterface); -} else { - ["close",_unit] call FUNC(handleInterface); + [[_unit, _set], QFUNC(setSpectator), _unit] call EFUNC(common,execRemoteFnc); }; // Handle common addon audio @@ -44,10 +35,14 @@ if (["ace_hearing"] call EFUNC(common,isModLoaded)) then {EGVAR(hearing,disableV if (["acre_sys_radio"] call EFUNC(common,isModLoaded)) then {[_set] call acre_api_fnc_setSpectator}; if (["task_force_radio"] call EFUNC(common,isModLoaded)) then {[_unit, _set] call TFAR_fnc_forceSpectator}; -// No theoretical change if an existing spectator was reset -if !(_set isEqualTo (GETVAR(_unit,GVAR(isSet),false))) then { - // Mark spectator state for reference - _unit setVariable [QGVAR(isSet), _set, true]; - - ["spectatorSet",[_set]] call EFUNC(common,localEvent); +if (_set) then { + ["open"] call FUNC(handleInterface); +} else { + ["close",_unit] call FUNC(handleInterface); }; + +// Mark spectator state for reference +_unit setVariable [QGVAR(isSet), _set, true]; +GVAR(isSet) = _set; + +["spectatorSet",[_set,_unit]] call EFUNC(common,localEvent); diff --git a/addons/spectator/functions/fnc_stageSpectator.sqf b/addons/spectator/functions/fnc_stageSpectator.sqf index bac5174601..3e17235e3e 100644 --- a/addons/spectator/functions/fnc_stageSpectator.sqf +++ b/addons/spectator/functions/fnc_stageSpectator.sqf @@ -30,7 +30,7 @@ if !(_set || (GETVAR(_unit,GVAR(isStaged),false))) exitWith {}; if !(isPlayer _unit) exitWith {}; if !(local _unit) exitwith { - [[_unit, _set, _target], QFUNC(stageSpectator), _unit] call EFUNC(common,execRemoteFnc); + [[_unit, _set], QFUNC(stageSpectator), _unit] call EFUNC(common,execRemoteFnc); }; // Prevent player falling into water @@ -49,7 +49,7 @@ if (_set) then { [_unit, QGVAR(isStaged)] call EFUNC(common,hideUnit); [_unit, QGVAR(isStaged)] call EFUNC(common,muteUnit); - _unit setPos (getMarkerPos QGVAR(respawn)); + _unit setPos (markerPos QGVAR(respawn)); } else { // Physical beings can talk [_unit, QGVAR(isStaged)] call EFUNC(common,unhideUnit); From 1b12d3728437a948d4e6779f724f7a6387e50396 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Tue, 4 Aug 2015 22:11:34 +0100 Subject: [PATCH 018/371] Replace spectator respawn changes with a template Hacking the BI respawn framework to support a spectator setting was intrusive and limiting. Instead of using a setting, I've opted to introduce a new respawn template that can be used within BI's respawn framework. The benefits of this approach are: - Compatibility isn't a concern, that responsibility is shifted onto mission designers. - Mission designers can use the functionality of the BI framework alongside the spectator system (combining templates, using different templates for different sides, etc.). - If a custom respawn framework is used, then this doesn't change anything. Custom frameworks are still fully supported via the public functions provided. - Remains simple to set up, just requires a description.ext edit --- addons/spectator/ACE_Settings.hpp | 4 - addons/spectator/CfgVehicles.hpp | 6 - addons/spectator/XEH_preInit.sqf | 10 +- addons/spectator/config.cpp | 34 +- .../functions/fnc_bi_respawnBase.sqf | 35 --- .../functions/fnc_bi_respawnCounter.sqf | 35 --- .../functions/fnc_bi_respawnEndMission.sqf | 62 ---- .../functions/fnc_bi_respawnInstant.sqf | 35 --- .../functions/fnc_bi_respawnNone.sqf | 293 ------------------ .../functions/fnc_bi_respawnSeagull.sqf | 101 ------ .../functions/fnc_bi_respawnSpectator.sqf | 59 ---- .../functions/fnc_bi_respawnWave.sqf | 43 --- .../functions/fnc_handleInterface.sqf | 5 +- .../functions/fnc_moduleSpectatorSettings.sqf | 1 - .../functions/fnc_respawnTemplate.sqf | 39 +++ .../functions/fnc_transitionCamera.sqf | 8 +- addons/spectator/stringtable.xml | 8 - 17 files changed, 52 insertions(+), 726 deletions(-) delete mode 100644 addons/spectator/functions/fnc_bi_respawnBase.sqf delete mode 100644 addons/spectator/functions/fnc_bi_respawnCounter.sqf delete mode 100644 addons/spectator/functions/fnc_bi_respawnEndMission.sqf delete mode 100644 addons/spectator/functions/fnc_bi_respawnInstant.sqf delete mode 100644 addons/spectator/functions/fnc_bi_respawnNone.sqf delete mode 100644 addons/spectator/functions/fnc_bi_respawnSeagull.sqf delete mode 100644 addons/spectator/functions/fnc_bi_respawnSpectator.sqf delete mode 100644 addons/spectator/functions/fnc_bi_respawnWave.sqf create mode 100644 addons/spectator/functions/fnc_respawnTemplate.sqf diff --git a/addons/spectator/ACE_Settings.hpp b/addons/spectator/ACE_Settings.hpp index 5e7907d19f..539f7cef2d 100644 --- a/addons/spectator/ACE_Settings.hpp +++ b/addons/spectator/ACE_Settings.hpp @@ -1,8 +1,4 @@ class ACE_Settings { - class GVAR(onDeath) { - typeName = "BOOL"; - value = 0; - }; class GVAR(filterUnits) { typeName = "SCALAR"; value = 1; diff --git a/addons/spectator/CfgVehicles.hpp b/addons/spectator/CfgVehicles.hpp index 7067257f23..8e685dae07 100644 --- a/addons/spectator/CfgVehicles.hpp +++ b/addons/spectator/CfgVehicles.hpp @@ -9,12 +9,6 @@ class CfgVehicles { isGlobal = 1; author = ECSTRING(common,ACETeam); class Arguments { - class systemEnable { - displayName = CSTRING(system_DisplayName); - description = CSTRING(system_Description); - typeName = "BOOL"; - defaultValue = 0; - }; class unitsFilter { displayName = CSTRING(units_DisplayName); description = CSTRING(units_Description); diff --git a/addons/spectator/XEH_preInit.sqf b/addons/spectator/XEH_preInit.sqf index 73c629a0ce..95c18f4a54 100644 --- a/addons/spectator/XEH_preInit.sqf +++ b/addons/spectator/XEH_preInit.sqf @@ -2,14 +2,6 @@ ADDON = false; -PREP(bi_respawnBase); -PREP(bi_respawnCounter); -PREP(bi_respawnEndMission); -PREP(bi_respawnInstant); -PREP(bi_respawnNone); -PREP(bi_respawnSeagull); -PREP(bi_respawnSpectator); -PREP(bi_respawnWave); PREP(cacheUnitInfo); PREP(cycleCamera); PREP(handleCamera); @@ -20,6 +12,7 @@ PREP(handleMouse); PREP(handleToolbar); PREP(handleUnits); PREP(moduleSpectatorSettings); +PREP(respawnTemplate); PREP(setCameraAttributes); PREP(setSpectator); PREP(stageSpectator); @@ -35,6 +28,7 @@ GVAR(availableModes) = [0,1,2]; GVAR(availableSides) = [west,east,resistance,civilian]; GVAR(availableVisions) = [-2,-1,0,1]; +GVAR(camAgent) = objNull; GVAR(camMode) = 0; GVAR(camPan) = 0; GVAR(camPos) = ATLtoASL [worldSize * 0.5, worldSize * 0.5, 20]; diff --git a/addons/spectator/config.cpp b/addons/spectator/config.cpp index eb73761e5f..6e32ed0413 100644 --- a/addons/spectator/config.cpp +++ b/addons/spectator/config.cpp @@ -18,36 +18,8 @@ class CfgPatches { #include "ui\interface.hpp" class CfgRespawnTemplates { - class None { - onPlayerKilled = QFUNC(bi_respawnNone); - }; - class Spectator { - onPlayerKilled = QFUNC(bi_respawnSpectator); - onPlayerRespawn = QFUNC(bi_respawnSpectator); - }; - class Instant { - onPlayerKilled = QFUNC(bi_respawnInstant); - onPlayerRespawn = QFUNC(bi_respawnInstant); - }; - class Base { - onPlayerKilled = QFUNC(bi_respawnBase); - onPlayerRespawn = QFUNC(bi_respawnBase); - }; - class EndMission - { - onPlayerKilled = QFUNC(bi_respawnEndMission); - onPlayerRespawn = QFUNC(bi_respawnEndMission); - }; - class Seagull { - onPlayerRespawn = QFUNC(bi_respawnSeagull); - }; - class Wave - { - onPlayerKilled = QFUNC(bi_respawnWave); - onPlayerRespawn = QFUNC(bi_respawnWave); - }; - class Counter { - onPlayerKilled = QFUNC(bi_respawnCounter); - onPlayerRespawn = QFUNC(bi_respawnCounter); + class ADDON { + onPlayerKilled = QFUNC(respawnTemplate); + onPlayerRespawn = QFUNC(respawnTemplate); }; }; diff --git a/addons/spectator/functions/fnc_bi_respawnBase.sqf b/addons/spectator/functions/fnc_bi_respawnBase.sqf deleted file mode 100644 index 7ea5b0c745..0000000000 --- a/addons/spectator/functions/fnc_bi_respawnBase.sqf +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Author: Bohemia Interactive - * Part of the BI respawn framework - * Handles base respawn type (respawn on marker) - * Edited to support ace_spectator integration - * - * Arguments: - * 0: Corpse/New Unit - * 1: Killer/Old Unit - * 2: Respawn Type - * 3: Respawn Delay - * - * Return Value: - * None - * - * Public: No - */ - -#include "script_component.hpp" - -if !(GVAR(onDeath)) exitWith {}; - -params [["_unit",objNull,[objNull]], ["_killer",objNull,[objNull]]]; - -if (alive _unit) then { - [_unit,false] call FUNC(setSpectator); -} else { - private ["_vision","_pos"]; - if (isNull _killer) then {_killer = _unit}; - _vision = [-2,-1] select (sunOrMoon < 1); - _pos = (getPosATL _unit) vectorAdd [0,0,5]; - - [2,_killer,_vision,_pos,getDir _unit] call FUNC(setCameraAttributes); - [_unit] call FUNC(setSpectator); -}; diff --git a/addons/spectator/functions/fnc_bi_respawnCounter.sqf b/addons/spectator/functions/fnc_bi_respawnCounter.sqf deleted file mode 100644 index 0bee90ec61..0000000000 --- a/addons/spectator/functions/fnc_bi_respawnCounter.sqf +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Author: Bohemia Interactive (Karel Moricky) - * Part of the BI respawn framework - * Handles the respawn timer display - * Edited to disable counter when spectator is opened - * - * Arguments: - * 0: Corpse/New Unit - * 1: Killer/Old Unit - * 2: Respawn Type - * 3: Respawn Delay - * - * Return Value: - * None - * - * Public: No - */ - -#include "script_component.hpp" - -_player = [_this,0,objNull,[objnull]] call bis_fnc_param; - -_respawnDelay = [_this,3,0,[0]] call bis_fnc_param; - -if (!isplayer _player && !isnull _player && _respawnDelay > 0) exitwith {["Attempting to use the function on AI unit %1, can be used only on players."] call bis_fnc_error;}; - -//--- Engine-triggered respawn -_layer = "BIS_fnc_respawnCounter" call bis_fnc_rscLayer; - -if (!alive _player) then { - if (GVAR(onDeath) || (playerrespawntime < 1)) exitwith {}; - _layer cutrsc ["RscRespawnCounter","plain"]; -} else { - _layer cuttext ["","plain"]; -}; diff --git a/addons/spectator/functions/fnc_bi_respawnEndMission.sqf b/addons/spectator/functions/fnc_bi_respawnEndMission.sqf deleted file mode 100644 index 23b8dacc17..0000000000 --- a/addons/spectator/functions/fnc_bi_respawnEndMission.sqf +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Author: Bohemia Interactive (Karel Moricky) - * Part of the BI respawn framework - * Ends the mission when all players are dead - * Edited to support ace_spectator integration - * - * Arguments: - * 0: Corpse/New Unit - * 1: Killer/Old Unit - * 2: Respawn Type - * 3: Respawn Delay - * - * Return Value: - * None - * - * Public: No - */ - -#include "script_component.hpp" - -params [["_unit",objNull,[objNull]], ["_killer",objNull,[objNull]]]; -private ["_vision","_pos"]; - -if (isNull _killer) then {_killer = _unit}; -_vision = [-2,-1] select (sunOrMoon < 1); -_pos = (getPosATL _unit) vectorAdd [0,0,5]; - -if (ismultiplayer) then { - - _respawnType = 0 call bis_fnc_missionRespawnType; - if (_respawnType in [0,1,4,5]) then { - - //--- No more respawn slots - if ({isplayer _x && alive _x} count playableunits == 0) then { - [["endDeath",false],"bis_fnc_endmission"] call bis_fnc_mp; - } else { - if (GVAR(onDeath) && (_respawnType in [0,1])) then { - [2,_killer,_vision,_pos,getDir _unit] call FUNC(setCameraAttributes); - [_unit] call FUNC(setSpectator); - }; - }; - - //--- Don't end the script to prevent premature mission end - waituntil {false}; - } else { - - if (!alive _unit) then { - - //--- No more respawn tickets - if ([] call bis_fnc_respawntickets == 0 && {isplayer _x} count playableunits == 0) then { - [["endDeath",false],"bis_fnc_endmission"] call bis_fnc_mp; - } else { - if (GVAR(onDeath)) then { - [2,_killer,_vision,_pos,getDir _unit] call FUNC(setCameraAttributes); - [_unit] call FUNC(setSpectator); - }; - }; - } else { - [_unit,false] call FUNC(setSpectator); - }; - }; -}; diff --git a/addons/spectator/functions/fnc_bi_respawnInstant.sqf b/addons/spectator/functions/fnc_bi_respawnInstant.sqf deleted file mode 100644 index fd1d255cf9..0000000000 --- a/addons/spectator/functions/fnc_bi_respawnInstant.sqf +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Author: Bohemia Interactive - * Part of the BI respawn framework - * Handles instant respawn type (respawn at position of death) - * Edited to support ace_spectator integration - * - * Arguments: - * 0: Corpse/New Unit - * 1: Killer/Old Unit - * 2: Respawn Type - * 3: Respawn Delay - * - * Return Value: - * None - * - * Public: No - */ - -#include "script_component.hpp" - -if !(GVAR(onDeath)) exitWith {}; - -params [["_unit",objNull,[objNull]], ["_killer",objNull,[objNull]]]; - -if (alive _unit) then { - [_unit,false] call FUNC(setSpectator); -} else { - private ["_vision","_pos"]; - if (isNull _killer) then {_killer = _unit}; - _vision = [-2,-1] select (sunOrMoon < 1); - _pos = (getPosATL _unit) vectorAdd [0,0,5]; - - [2,_killer,_vision,_pos,getDir _unit] call FUNC(setCameraAttributes); - [_unit] call FUNC(setSpectator); -}; diff --git a/addons/spectator/functions/fnc_bi_respawnNone.sqf b/addons/spectator/functions/fnc_bi_respawnNone.sqf deleted file mode 100644 index a5031a8fd9..0000000000 --- a/addons/spectator/functions/fnc_bi_respawnNone.sqf +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Author: Bohemia Interactive (Karel Moricky) - * Part of the BI respawn framework - * Shows death screen for respawn type "None" - * Edited to support ace_spectator integration - * - * Arguments: - * 0: Corpse - * 1: Killer - * 2: Respawn Type - * 3: Respawn Delay - * - * Return Value: - * None - * - * Public: No - */ -private ["_soundvolume","_musicvolume"]; - -#define BI_CONTROL (_display displayctrl _n) - -#include "script_component.hpp" - -disableserialization; -_player = _this select 0; -_killer = _this select 1; -if (isnull _killer) then {_killer = _player}; - -_musicvolume = musicvolume; -_soundvolume = soundvolume; //MUF-TODO: check if this is done before sound is faded in fn_feedbackMain.fsm - -_start = isnil "bis_fnc_respawnNone_start"; -if (_start) then { - bis_fnc_respawnNone_start = [daytime,time / 3600]; - - //3.5 fadesound 0; //MUF-commented - - sleep 2; - if (alive player) exitwith {}; - cutText ["","BLACK OUT",1]; - sleep 1.5; - BIS_fnc_feedback_allowPP = false; //MUF-switch health PP off - //(["HealthPP_black"] call bis_fnc_rscLayer) cutText ["","BLACK IN",1];//MUF-black in (remove black screen that was launched in FSM PP) - - if (ismultiplayer) then { - if (GVAR(onDeath)) then { - private ["_vision","_pos"]; - _vision = [-2,-1] select (sunOrMoon < 1); - _pos = (getPosATL _player) vectorAdd [0,0,5]; - - [2,_killer,_vision,_pos,getDir _player] call FUNC(setCameraAttributes); - [_player] call FUNC(setSpectator); - } else { - (finddisplay 46) createdisplay "RscDisplayMissionEnd"; - }; - } else {enableenddialog}; -}; -if (alive player) exitwith { - [player,false] call FUNC(setSpectator); - cuttext ["","plain"]; -}; //--- Terminate when player manages to switch do different unit already - -if (GVAR(onDeath)) exitWith {}; - -waituntil {!isnull (finddisplay 58)}; -_display = finddisplay 58; - -//--- Black fade in -_n = 1060; -BI_CONTROL ctrlsetfade 1; -if (_start) then { - - //--- Play ambient radio - setacctime 1; - 0 fademusic 0; - 4 fademusic 0.8; - playmusic format ['RadioAmbient%1',ceil random 1/*30*/]; - _musicEH = addMusicEventHandler ["MusicStop",{[] spawn {playmusic format ['RadioAmbient%1',ceil random 1/*30*/];};}]; - uinamespace setvariable ["bis_fnc_respawnNone_musicEH",_musicEH]; - _display displayaddeventhandler ["unload","removeMusicEventHandler ['MusicStop',uinamespace getvariable ['bis_fnc_respawnNone_musicEH',-1]];"]; - - BI_CONTROL ctrlcommit 4; -} else { - BI_CONTROL ctrlcommit 0; -}; -cuttext ["","plain"]; - -//--- HUD -_n = 5800; -BI_CONTROL ctrlsettext gettext (configfile >> "cfgingameui" >> "cursor" >> "select"); -BI_CONTROL ctrlsetposition [-10,-10,safezoneH * 0.07 * 3/4,safezoneH * 0.07]; -BI_CONTROL ctrlsettextcolor [1,1,1,1]; -BI_CONTROL ctrlcommit 0; - -//--- SITREP (ToDO: Localize) -_sitrep = "SITREP||"; -if (name _player != "Error: No unit") then { - _sitrep = _sitrep + "KIA: %4. %5|"; -}; -_sitrep = _sitrep + "TOD: %2 [%3]|LOC: %6 \ %7"; -if (_killer != _player) then { - _sitrep = _sitrep + "||ENY: %8"; - if (currentweapon _killer != "") then { - _sitrep = _sitrep + "|ENW: %9" - }; -}; -_sitrep = format [ - _sitrep, - 1 * safezoneH, - [bis_fnc_respawnNone_start select 0,"HH:MM:SS"] call bis_fnc_timetostring, - [bis_fnc_respawnNone_start select 1,"HH:MM:SS"] call bis_fnc_timetostring, - toupper localize format ["STR_SHORT_%1",rank _player], - toupper name _player, - mapGridPosition _player, - toupper worldname, - toupper ((configfile >> "cfgvehicles" >> typeof _killer) call bis_fnc_displayname), - toupper ((configfile >> "cfgweapons" >> currentweapon _killer) call bis_fnc_displayname) - -]; - -_n = 11000; -_bcgPos = ctrlposition BI_CONTROL; -_n = 5858; -//BI_CONTROL ctrlsetposition [_bcgPos select 0,safezoneY + ((_bcgPos select 0) - safezoneX) * 4/3,safezoneW - 2 * (_bcgPos select 2),safezoneH / 2]; -BI_CONTROL ctrlsetposition [(((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX), - ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY), - safezoneW - 2 * (_bcgPos select 2), - safezoneH / 2]; -BI_CONTROL ctrlcommit 0; -[BI_CONTROL,_sitrep] spawn { - scriptname "bis_fnc_respawnNone: SITREP"; - disableserialization; - _control = _this select 0; - _sitrepArray = toarray (_this select 1); - {_sitrepArray set [_foreachindex,tostring [_x]]} foreach _sitrepArray; - _sitrep = ""; - //_sitrepFormat = "%1"; - _sitrepFormat = "%1"; - - sleep 1; - for "_i" from 0 to (count _sitrepArray - 1) do { - _letter = _sitrepArray select _i; - _delay = if (_letter == "|") then {_letter = "
"; 1} else {0.01}; - _sitrep = _sitrep + _letter; - _control ctrlsetstructuredtext parsetext format [_sitrepFormat,_sitrep + "_"]; - //playsound ["IncomingChallenge",true]; - sleep _delay; - if (isnull _control) exitwith {}; - }; - _control ctrlsetstructuredtext parsetext format [_sitrepFormat,_sitrep]; -}; - - -//--- Create UAV camera -_camera = "camera" camcreate position player; -_camera cameraeffect ["internal","back"]; -_camera campreparefov 0.4; -_camera campreparetarget _killer; -showcinemaborder false; - -//--- Set PP effects -_saturation = 0.0 + random 0.3; -_ppColor = ppEffectCreate ["ColorCorrections", 1999]; -_ppColor ppEffectEnable true; -_ppColor ppEffectAdjust [1, 1, 0, [1, 1, 1, 0], [1 - _saturation, 1 - _saturation, 1 - _saturation, _saturation], [1, 0.25, 0, 1.0]]; -_ppColor ppEffectCommit 0; - -_ppGrain = ppEffectCreate ["filmGrain", 2012]; -_ppGrain ppEffectEnable true; -_ppGrain ppEffectAdjust [random 0.2, 1, 1, 0, 1]; -_ppGrain ppEffectCommit 0; - -//--- Camera update executed every frame -bis_fnc_respawnNone_player = _player; -bis_fnc_respawnNone_killer = _killer; -bis_fnc_respawnNone_camera = _camera; -bis_fnc_respawnNone_loop = { - scriptname "bis_fnc_respawnNone: camera"; - _display = _this select 0; - _player = bis_fnc_respawnNone_player; - _killer = bis_fnc_respawnNone_killer; - _camera = bis_fnc_respawnNone_camera; - - _sin = 20 * sin (time * 7); - _killerPos = [ - (visiblepositionasl _killer select 0), - (visiblepositionasl _killer select 1) + (_sin), - (visiblepositionasl _killer select 2) + (_sin) - ]; - - _dirToKiller = if (_killer == _player) then { - direction _player; - } else { - ([_player,_killerPos] call bis_fnc_dirto) + _sin; - }; - _pos = [ - visiblepositionasl _player, - -20, - _dirToKiller - ] call bis_fnc_relpos; - _pos set [2,((_pos select 2) + 7) max (getterrainheightasl _pos + 7)]; - - //--- Pitch - _heightCamera = getterrainheightasl _pos; - _heightKiller = getterrainheightasl _killerPos; - _height = _heightCamera - _heightKiller; - _dis = _killerPos distance _pos; - _angle = (asin (_height/_dis)); - - _camera setdir _dirtokiller; - [_camera,-_angle,_sin] call bis_fnc_setpitchbank; - _camera setposasl _pos; - - //--- HUD - _n = 5800; - _hudPos = (worldtoscreen position _player); - if (count _hudPos > 0) then { - _hudPosW = ctrlposition BI_CONTROL select 2; - _hudPosH = ctrlposition BI_CONTROL select 3; - _hudPos = [ - (_hudPos select 0) - _hudPosW / 2, - (_hudPos select 1) - _hudPosH / 2, - _hudPosW, - _hudPosH - ]; - BI_CONTROL ctrlsetposition _hudPos; - BI_CONTROL ctrlcommit 0; - }; -}; - -bis_fnc_respawnNone_keydown = { - _key = _this select 1; - - if (_key in (actionkeys 'nightvision') || _key < 0) then { - bis_fnc_respawnNone_vision = bis_fnc_respawnNone_vision + 1; - _vision = bis_fnc_respawnNone_vision % 4; - switch (_vision) do { - case 0: { - camusenvg false; - call compile 'false SetCamUseTi 0'; - }; - case 1: { - camusenvg true; - call compile 'false SetCamUseTi 0'; - }; - case 2: { - camusenvg false; - call compile 'true SetCamUseTi 0'; - }; - case 3: { - camusenvg false; - call compile 'true SetCamUseTi 1'; - }; - }; - }; -}; -//bis_fnc_respawnNone_vision = (1 + floor random 3) % 4; //--- Random vision (not NVG) -bis_fnc_respawnNone_vision = -1; -if (sunormoon < 1) then {bis_fnc_respawnNone_vision = 0;}; -[-1,-1] call bis_fnc_respawnNone_keydown; - -_display displayaddeventhandler ["mousemoving","_this call bis_fnc_respawnNone_loop"]; -_display displayaddeventhandler ["mouseholding","_this call bis_fnc_respawnNone_loop"]; -_display displayaddeventhandler ["keydown","_this call bis_fnc_respawnNone_keydown"]; - - -//--- Team Switch display opened -waituntil {isnull _display}; -_displayTeamSwitch = finddisplay 632; - -//--- Team Switch display closed - cleanup and restart the view -waituntil {isnull _displayTeamSwitch}; - -_camera cameraeffect ["terminate","back"]; -camdestroy _camera; - -bis_fnc_respawnNone_player = nil; -bis_fnc_respawnNone_killer = nil; -bis_fnc_respawnNone_camera = nil; -bis_fnc_respawnNone_loop = nil; - -ppeffectdestroy _ppColor; -ppeffectdestroy _ppGrain; - -if (!alive player) exitwith {_this call bis_fnc_respawnNone;}; - - -//--- Resurrection! -BIS_fnc_feedback_allowPP = true; -0 fadesound _soundvolume; -0 fademusic _musicvolume; -playmusic ""; -bis_fnc_respawnNone_start = nil; diff --git a/addons/spectator/functions/fnc_bi_respawnSeagull.sqf b/addons/spectator/functions/fnc_bi_respawnSeagull.sqf deleted file mode 100644 index 2e01ffa6ea..0000000000 --- a/addons/spectator/functions/fnc_bi_respawnSeagull.sqf +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Author: Bohemia Interactive - * Part of the BI respawn framework - * Correctly handles seagull respawn (not used by default) - * Edited to support ace_spectator integration - * - * Arguments: - * 0: Corpse/New Unit - * 1: Killer/Old Unit - * 2: Respawn Type - * 3: Respawn Delay - * - * Return Value: - * None - * - * Public: No - */ - -#include "script_component.hpp" - -_seagull = _this select 0; -_player = _this select 1; -_this call bis_fnc_log; - -if (!isplayer _player && !isplayer _seagull) exitwith {["Attempting to use the function on AI unit %1, can be used only on players."] call bis_fnc_error;}; - -waituntil {missionnamespace getvariable ["BIS_fnc_feedback_allowDeathScreen",true]}; -BIS_fnc_feedback_allowPP = false; -//(["HealthPP_black"] call bis_fnc_rscLayer) cutText ["","BLACK IN",8]; - -if (GVAR(onDeath)) exitWith { - private ["_vision","_pos"]; - - if (isNull _player) then {_player = _seagull}; - _vision = [-2,-1] select (sunOrMoon < 1); - _pos = (getPosATL _player) vectorAdd [0,0,5]; - - [_seagull,QGVAR(isSeagull)] call EFUNC(common,hideUnit); - [2,_player,_vision,_pos,getDir _seagull] call FUNC(setCameraAttributes); - [_seagull] call FUNC(setSpectator); -}; - -_camera = "camera" camCreate [(position _player select 0)-0.75, (position _player select 1)-0.75,(position _player select 2) + 0.5]; -_camera cameraEffect ["internal","back"]; -_camera camSetFOV 0.800; -_camera camCommit 0; -waituntil {camCommitted _camera}; - -0 fadeMusic 0.5; -playMusic "Track06_Abandoned_Battlespace"; - -_camera camSetTarget vehicle _player; -_camera camSetRelPos [-0.82,-3.12,3.38]; -_camera camSetFOV 0.800; -_camera camCommit 7; - -sleep 1; -_preload = _player spawn {waitUntil {(preloadCamera getPos _this) && (2 preloadObject _this)}}; -sleep 5; -waituntil {camCommitted _camera}; - -_camera camSetRelPos [1.17,-21.71,2.07]; -_camera camSetFOV 0.400; -_camera camCommit 10; -sleep 2; -terminate _preload; -sleep 3; -_preload = _player spawn {waitUntil {(preloadCamera getPos _this) && (3 preloadObject _this)}}; -waituntil {camCommitted _camera}; - -_camera camSetTarget vehicle _player; -_camera camSetRelPos [5.80,1.29,5.07]; -_camera camSetFOV 0.300; -_camera camCommit 7; -sleep 2; -terminate _preload; -_preload = _seagull spawn {waitUntil {(preloadCamera getPos _this) && (4 preloadObject _this)}}; -waituntil {camCommitted _camera}; - -_camera camSetRelPos [2.71,19.55,12.94]; -_camera camSetFOV 0.700; -_camera camCommit 2; -waituntil {camCommitted _camera}; - -_camera camSetTarget _seagull; -_camera camSetRelPos [-6.66,18.99,2.59]; -_camera camSetFOV 0.700; -_camera camCommit 3; -waituntil {camCommitted _camera}; - -3 fadeMusic 0; - -_camera camSetRelPos [1.17,-21.71,-1.07]; -_camera camSetFOV 0.300; -_camera camCommit 3; -waituntil {camCommitted _camera}; -terminate _preload; - -_seagull switchCamera "EXTERNAL"; -_seagull cameraEffect ["terminate","back"]; -camDestroy _camera; diff --git a/addons/spectator/functions/fnc_bi_respawnSpectator.sqf b/addons/spectator/functions/fnc_bi_respawnSpectator.sqf deleted file mode 100644 index 5097b61ab2..0000000000 --- a/addons/spectator/functions/fnc_bi_respawnSpectator.sqf +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Author: Bohemia Interactive - * Part of the BI respawn framework - * Opens BI spectator interface (default used by seagull respawn) - * Edited to support ace_spectator integration - * - * Arguments: - * 0: Corpse/New Unit - * 1: Killer/Old Unit - * 2: Respawn Type - * 3: Respawn Delay - * - * Return Value: - * None - * - * Public: No - */ - -#include "script_component.hpp" - -params [["_unit",objNull,[objNull]], ["_killer",objNull,[objNull]], ["_respawn",-1,[0]]]; -private ["_vision","_pos"]; - -if (isNull _killer) then {_killer = _unit}; -_vision = [-2,-1] select (sunOrMoon < 1); -_pos = (getPosATL _unit) vectorAdd [0,0,5]; - -_layer = "BIS_fnc_respawnSpectator" call bis_fnc_rscLayer; - -if (!alive _unit) then { - if (GVAR(onDeath)) then { - [2,_killer,_vision,_pos,getDir _unit] call FUNC(setCameraAttributes); - [_unit] call FUNC(setSpectator); - } else { - _layer cutrsc ["RscSpectator","plain"]; - }; -} else { - if (_respawn == 1) then { - - //--- Open - waituntil {missionnamespace getvariable ["BIS_fnc_feedback_allowDeathScreen",true]}; - BIS_fnc_feedback_allowPP = false; - //(["HealthPP_black"] call bis_fnc_rscLayer) cutText ["","BLACK IN",1]; - if (GVAR(onDeath)) then { - [_unit,QGVAR(isSeagull)] call EFUNC(common,hideUnit); - [2,_killer,_vision,_pos,getDir _unit] call FUNC(setCameraAttributes); - [_unit] call FUNC(setSpectator); - } else { - _layer cutrsc ["RscSpectator","plain"]; - }; - } else { - if (GVAR(onDeath)) then { - [_unit,false] call FUNC(setSpectator); - }; - - //--- Close - _layer cuttext ["","plain"]; - }; -}; diff --git a/addons/spectator/functions/fnc_bi_respawnWave.sqf b/addons/spectator/functions/fnc_bi_respawnWave.sqf deleted file mode 100644 index 371a8edcdc..0000000000 --- a/addons/spectator/functions/fnc_bi_respawnWave.sqf +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Author: Bohemia Interactive - * Part of the BI respawn framework - * Handles wave respawning system - * Edited to support ace_spectator integration - * - * Arguments: - * 0: Corpse/New Unit - * 1: Killer/Old Unit - * 2: Respawn Type - * 3: Respawn Delay - * - * Return Value: - * None - * - * Public: No - */ - -#include "script_component.hpp" - -params [["_unit",objNull,[objNull]], ["_killer",objNull,[objNull]], ["_respawn",0,[0]], ["_respawnDelay",0,[0]]]; - -if (!isplayer _unit && !isnull _unit) exitwith {["Attempting to use the function on AI unit %1, can be used only on players."] call bis_fnc_error;}; - -if (!alive _unit) then { - //--- Set the time only when it was not modified already - if (_respawnDelay != 0 && _respawnDelay == playerrespawntime) then { - setplayerrespawntime (_respawnDelay + _respawnDelay - (servertime % _respawnDelay)); - - if !(GVAR(onDeath)) exitWith {}; - private ["_vision","_pos"]; - - if (isNull _killer) then {_killer = _unit}; - _vision = [-2,-1] select (sunOrMoon < 1); - _pos = (getPosATL _unit) vectorAdd [0,0,5]; - - [2,_killer,_vision,_pos,getDir _unit] call FUNC(setCameraAttributes); - [_unit] call FUNC(setSpectator); - }; -} else { - setplayerrespawntime _respawndelay; - [_unit,false] call FUNC(setSpectator); -}; diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index 5c8c958451..777e8d2ea9 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -43,7 +43,7 @@ switch (toLower _mode) do { // Close map openMap [false,false]; - // Close any BI layers/effects + // Disable BI damage effects and remove counter layer BIS_fnc_feedback_allowPP = false; ("BIS_fnc_respawnCounter" call BIS_fnc_rscLayer) cutText ["","plain"]; @@ -80,9 +80,8 @@ switch (toLower _mode) do { // Return to player view _unit switchCamera "internal"; - // Re-enable any BI effects + // Re-enable BI damage effects BIS_fnc_feedback_allowPP = true; - BIS_fnc_respawnNone_start = nil; // Cleanup camera variables GVAR(camera) = nil; diff --git a/addons/spectator/functions/fnc_moduleSpectatorSettings.sqf b/addons/spectator/functions/fnc_moduleSpectatorSettings.sqf index 1fd20f50e4..c23fb7ad20 100644 --- a/addons/spectator/functions/fnc_moduleSpectatorSettings.sqf +++ b/addons/spectator/functions/fnc_moduleSpectatorSettings.sqf @@ -19,7 +19,6 @@ params ["_logic", "_units", "_activated"]; if !(_activated) exitWith {}; -[_logic, QGVAR(onDeath), "systemEnable"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(filterUnits), "unitsFilter"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(filterSides), "sidesFilter"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(restrictModes), "cameraModes"] call EFUNC(common,readSettingFromModule); diff --git a/addons/spectator/functions/fnc_respawnTemplate.sqf b/addons/spectator/functions/fnc_respawnTemplate.sqf new file mode 100644 index 0000000000..b03c6dfb06 --- /dev/null +++ b/addons/spectator/functions/fnc_respawnTemplate.sqf @@ -0,0 +1,39 @@ +/* + * Author: SilentSpike + * The ace_spectator respawn template, handles killed + respawn + * Can be used via BI's respawn framework, see: + * https://community.bistudio.com/wiki/Arma_3_Respawn + * + * Arguments: + * 0: Corpse/New Unit + * 1: Killer/Old Unit + * 2: Respawn Type + * 3: Respawn Delay + * + * Return Value: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +params [["_unit",objNull,[objNull]], ["_killer",objNull,[objNull]], ["_respawn",0,[0]], ["_respawnDelay",0,[0]]]; +private ["_vision","_pos"]; + +if (isNull _killer) then {_killer = _unit}; +_vision = [-2,-1] select (sunOrMoon < 1); +_pos = (getPosATL _unit) vectorAdd [0,0,5]; + +if (alive _unit) then { + if (_respawn == 1) then { + [_unit,QGVAR(isSeagull)] call EFUNC(common,hideUnit); + [2,_killer,_vision,_pos,getDir _unit] call FUNC(setCameraAttributes); + [_unit] call FUNC(setSpectator); + } else { + [_unit,false] call FUNC(setSpectator); + }; +} else { + [2,_killer,_vision,_pos,getDir _unit] call FUNC(setCameraAttributes); + [_unit] call FUNC(setSpectator); +}; diff --git a/addons/spectator/functions/fnc_transitionCamera.sqf b/addons/spectator/functions/fnc_transitionCamera.sqf index 07abbc94ab..a4d99445fb 100644 --- a/addons/spectator/functions/fnc_transitionCamera.sqf +++ b/addons/spectator/functions/fnc_transitionCamera.sqf @@ -53,8 +53,12 @@ if (_newMode == 0) then { // Free GVAR(camera) camSetFov -(linearConversion [0.01,2,GVAR(camZoom),-2,-0.01,true]); GVAR(camera) camCommit 0; - // Switch to camera to stop AI group chat - ACE_Player switchCamera "internal"; + // Agent is switched to in free cam to hide death table and prevent AI chat + if (isNull GVAR(camAgent)) then { + GVAR(camAgent) = createAgent ["VirtualMan_F",markerPos QGVAR(respawn),[],0,""]; + }; + + GVAR(camAgent) switchCamera "internal"; clearRadio; // If new vision isn't available then keep current (unless current also isn't) diff --git a/addons/spectator/stringtable.xml b/addons/spectator/stringtable.xml index 1f74d08c43..4eb0e25c0a 100644 --- a/addons/spectator/stringtable.xml +++ b/addons/spectator/stringtable.xml @@ -9,14 +9,6 @@ Configure how the spectator system will operate by default. Skonfiguruj domyślne ustawienia obserwatora. - - Spectate on death - Obserwator po śmierci - - - Enables spectator upon death. - Włącz obserwatora po śmierci - Unit filter Filtr jednostek From 7a0a1ead6ee8e143303ac4f1cd6f0e564dc0bbf4 Mon Sep 17 00:00:00 2001 From: jokoho48 Date: Wed, 5 Aug 2015 00:32:48 +0200 Subject: [PATCH 019/371] Updated parameterization in Advanced Ballistics module. --- addons/advanced_ballistics/ACE_Settings.hpp | 40 +++++++++---------- ..._calculateAmmoTemperatureVelocityShift.sqf | 5 +-- .../fnc_calculateAtmosphericCorrection.sqf | 9 ++--- ...fnc_calculateBarrelLengthVelocityShift.sqf | 7 +--- .../functions/fnc_calculateRetardation.sqf | 25 +++++------- .../fnc_calculateStabilityFactor.sqf | 10 +---- .../functions/fnc_displayProtractor.sqf | 17 ++++---- .../functions/fnc_handleFired.sqf | 30 +++++--------- .../functions/fnc_initModuleSettings.sqf | 5 +-- .../fnc_initializeTerrainExtension.sqf | 15 +++---- 10 files changed, 63 insertions(+), 100 deletions(-) diff --git a/addons/advanced_ballistics/ACE_Settings.hpp b/addons/advanced_ballistics/ACE_Settings.hpp index d88a9b1148..757385deb3 100644 --- a/addons/advanced_ballistics/ACE_Settings.hpp +++ b/addons/advanced_ballistics/ACE_Settings.hpp @@ -1,31 +1,31 @@ class ACE_Settings { class GVAR(enabled) { - displayName = CSTRING(enabled_DisplayName); - description = CSTRING(enabled_Description); + displayName = "Advanced Ballistics"; + description = "Enables advanced ballistics"; typeName = "BOOL"; value = 0; }; class GVAR(simulateForSnipers) { - displayName = CSTRING(simulateForSnipers_DisplayName); - description = CSTRING(simulateForSnipers_Description); + displayName = "Enabled For Snipers"; + description = "Enables advanced ballistics for non local snipers (when using high power optics)"; typeName = "BOOL"; value = 1; }; class GVAR(simulateForGroupMembers) { - displayName = CSTRING(simulateForGroupMembers_DisplayName); - description = CSTRING(simulateForGroupMembers_Description); + displayName = "Enabled For Group Members"; + description = "Enables advanced ballistics for non local group members"; typeName = "BOOL"; value = 0; }; class GVAR(simulateForEveryone) { - displayName = CSTRING(simulateForEveryone_DisplayName); - description = CSTRING(simulateForEveryone_Description); + displayName = "Enabled For Everyone"; + description = "Enables advanced ballistics for all non local players (enabling this may degrade performance during heavy firefights in multiplayer)"; typeName = "BOOL"; value = 0; }; class GVAR(disabledInFullAutoMode) { - displayName = CSTRING(disabledInFullAutoMod_DisplayName); - description = CSTRING(disabledInFullAutoMod_Description); + displayName = "Disabled In FullAuto Mode"; + description = "Disables advanced ballistics during full auto fire"; typeName = "BOOL"; value = 0; }; @@ -38,32 +38,32 @@ class ACE_Settings { }; */ class GVAR(ammoTemperatureEnabled) { - displayName = CSTRING(ammoTemperatureEnabled_DisplayName); - description = CSTRING(ammoTemperatureEnabled_Description); + displayName = "Enable Ammo Temperature Simulation"; + description = "Muzzle velocity varies with ammo temperature"; typeName = "BOOL"; value = 1; }; class GVAR(barrelLengthInfluenceEnabled) { - displayName = CSTRING(barrelLengthInfluenceEnabled_DisplayName); - description = CSTRING(barrelLengthInfluenceEnabled_Description); + displayName = "Enable Barrel Length Simulation"; + description = "Muzzle velocity varies with barrel length"; typeName = "BOOL"; value = 1; }; class GVAR(bulletTraceEnabled) { - displayName = CSTRING(bulletTraceEnabled_DisplayName); - description = CSTRING(bulletTraceEnabled_Description); + displayName = "Enable Bullet Trace Effect"; + description = "Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics)"; typeName = "BOOL"; value = 1; }; class GVAR(simulationInterval) { - displayName = CSTRING(simulationInterval_DisplayName); - description = CSTRING(simulationInterval_Description); + displayName = "Simulation Interval"; + description = "Defines the interval between every calculation step"; typeName = "SCALAR"; value = 0.0; }; class GVAR(simulationRadius) { - displayName = CSTRING(simulationRadius_DisplayName); - description = CSTRING(simulationRadius_Description); + displayName = "Simulation Radius"; + description = "Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles"; typeName = "SCALAR"; value = 3000; }; diff --git a/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf b/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf index 28df9d1d97..16b094b462 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf @@ -15,9 +15,8 @@ */ #include "script_component.hpp" -private ["_muzzleVelocityShiftTable", "_temperature", "_muzzleVelocityShift", "_temperatureIndexA", "_temperatureIndexB", "_temperatureRatio"]; -_muzzleVelocityShiftTable = _this select 0; -_temperature = _this select 1; +private ["_muzzleVelocityShift", "_temperatureIndexA", "_temperatureIndexB", "_temperatureRatio"]; +params["_muzzleVelocityShiftTable", "_temperature"]; if (count _muzzleVelocityShiftTable != 11) exitWith { 0 }; diff --git a/addons/advanced_ballistics/functions/fnc_calculateAtmosphericCorrection.sqf b/addons/advanced_ballistics/functions/fnc_calculateAtmosphericCorrection.sqf index b0166109f5..fac048c061 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateAtmosphericCorrection.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateAtmosphericCorrection.sqf @@ -17,12 +17,9 @@ */ #include "script_component.hpp" -private ["_ballisticCoefficient", "_temperature", "_pressure", "_relativeHumidity", "_atmosphereModel", "_airDensity"]; -_ballisticCoefficient = _this select 0; -_temperature = _this select 1; // in C -_pressure = _this select 2; // in hPa -_relativeHumidity = _this select 3; // as ratio 0-1 -_atmosphereModel = _this select 4; // "ICAO" or "ASM" +private "_airDensity"; + +params ["_ballisticCoefficient", "_temperature"/*in C*/, "_pressure"/*in hPa*/, "_relativeHumidity"/*as ratio 0-1*/, "_atmosphereModel"/*"ICAO" or "ASM"*/]; _airDensity = [_temperature, _pressure, _relativeHumidity] call EFUNC(weather,calculateAirDensity); diff --git a/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf b/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf index de037f49bc..1896ef816b 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf @@ -17,11 +17,8 @@ */ #include "script_component.hpp" -private ["_barrelLength", "_muzzleVelocityTable", "_barrelLengthTable", "_muzzleVelocity", "_lowerIndex", "_upperIndex", "_barrelLengthRatio", "_muzzleVelocityNew"]; -_barrelLength = _this select 0; -_muzzleVelocityTable = _this select 1; -_barrelLengthTable = _this select 2; -_muzzleVelocity = _this select 3; +private ["_lowerIndex", "_upperIndex", "_barrelLengthRatio", "_muzzleVelocityNew"]; +params ["_barrelLength", "_muzzleVelocityTable", "_barrelLengthTable", "_muzzleVelocity"]; if (_barrelLength == 0) exitWith { 0 }; if (count _muzzleVelocityTable != count _barrelLengthTable) exitWith { 0 }; diff --git a/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf b/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf index 433dafbe10..507410276e 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf @@ -18,18 +18,16 @@ // Source: GNU Exterior Ballistics -private ["_dragModel", "_dragCoefficient", "_velocity", "_A", "_M", "_result"]; -_dragModel = _this select 0; -_dragCoefficient = _this select 1; -_velocity = (_this select 2) * 3.2808399; +private ["_A", "_M", "_result"]; +params ["_dragModel", "_dragCoefficient", "_velocity"]; +_velocity = _velocity * 3.2808399; _A = -1; _M = -1; _result = 0; switch _dragModel do { - case 1: - { + case 1: { switch true do { case (_velocity > 4230) : { _A = 0.0001477404177730177; _M = 1.9565; }; case (_velocity > 3680) : { _A = 0.0001920339268755614; _M = 1.925 ; }; @@ -74,8 +72,7 @@ switch _dragModel do { case (_velocity > 0) : { _A = 0.00005206214107320588; _M = 2.000 ; }; }; }; - case 2: - { + case 2: { switch true do { case (_velocity > 1674) : { _A = 0.0079470052136733; _M = 1.36999902851493; }; case (_velocity > 1172) : { _A = 0.00100419763721974; _M = 1.65392237010294; }; @@ -86,8 +83,7 @@ switch _dragModel do { case (_velocity > 0) : { _A = 0.0000518033561289704; _M = 1.98160270524632; }; }; }; - case 5: - { + case 5: { switch true do { case (_velocity > 1730) : { _A = 0.00724854775171929; _M = 1.41538574492812; }; case (_velocity > 1228) : { _A = 0.0000350563361516117; _M = 2.13077307854948; }; @@ -98,8 +94,7 @@ switch _dragModel do { case (_velocity > 0) : { _A = 0.0000351963178524273; _M = 2.00477856801111; }; }; }; - case 6: - { + case 6: { switch true do { case (_velocity > 3236) : { _A = 0.0455384883480781; _M = 1.15997674041274; }; case (_velocity > 2065) : { _A = 0.07167261849653769; _M = 1.10704436538885; }; @@ -110,8 +105,7 @@ switch _dragModel do { case (_velocity > 0) : { _A = 0.0000750912466084823; _M = 1.92031057847052; }; }; }; - case 7: - { + case 7: { switch true do { case (_velocity > 4200) : { _A = 0.00000000129081656775919; _M = 3.24121295355962; }; case (_velocity > 3000) : { _A = 0.0171422231434847; _M = 1.27907168025204; }; @@ -124,8 +118,7 @@ switch _dragModel do { case (_velocity > 0) : { _A = 0.0000134504843776525; _M = 2.08702306738884; }; }; }; - case 8: - { + case 8: { switch true do { case (_velocity > 3571) : { _A = 0.0112263766252305; _M = 1.33207346655961; }; case (_velocity > 1841) : { _A = 0.0167252613732636; _M = 1.28662041261785; }; diff --git a/addons/advanced_ballistics/functions/fnc_calculateStabilityFactor.sqf b/addons/advanced_ballistics/functions/fnc_calculateStabilityFactor.sqf index 9b205c3ec2..d09e292138 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateStabilityFactor.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateStabilityFactor.sqf @@ -19,14 +19,8 @@ */ #include "script_component.hpp" -private ["_caliber", "_bulletLength", "_bulletMass", "_barrelTwist", "_muzzleVelocity", "_temperature", "_barometricPressure", "_l", "_t", "_stabilityFactor"]; -_caliber = _this select 0; -_bulletLength = _this select 1; -_bulletMass = _this select 2; -_barrelTwist = _this select 3; -_muzzleVelocity = _this select 4; -_temperature = _this select 5; -_barometricPressure = _this select 6; +private ["_l", "_t", "_stabilityFactor"]; +params ["_caliber", "_bulletLength", "_bulletMass", "_barrelTwist", "_muzzleVelocity", "_temperature", "_barometricPressure"]; // Source: http://www.jbmballistics.com/ballistics/bibliography/articles/miller_stability_1.pdf _t = _barrelTwist / _caliber; diff --git a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf index 1a4c344b2e..3acefff54e 100644 --- a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf +++ b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf @@ -32,30 +32,29 @@ EGVAR(weather,WindInfo) = false; GVAR(Protractor) = true; [{ + params ["","_idPFH"]; if !(GVAR(Protractor) && !(weaponLowered ACE_player) && currentWeapon ACE_player == primaryWeapon ACE_player) exitWith { GVAR(Protractor) = false; 1 cutText ["", "PLAIN"]; - [_this select 1] call cba_fnc_removePerFrameHandler; + [_idPFH] call cba_fnc_removePerFrameHandler; }; - - _refPosition = [SafeZoneX + 0.001, SafeZoneY + 0.001, 0.2, 0.2 * 4/3]; - + _inclinationAngle = asin((ACE_player weaponDirection currentWeapon ACE_player) select 2); _inclinationAngle = -58 max _inclinationAngle min 58; - + 1 cutRsc ["RscProtractor", "PLAIN", 1, false]; - + __ctrl1 ctrlSetScale 1; __ctrl1 ctrlCommit 0; __ctrl1 ctrlSetText QUOTE(PATHTOF(UI\protractor.paa)); __ctrl1 ctrlSetTextColor [1, 1, 1, 1]; - + __ctrl2 ctrlSetScale 1; - __ctrl2 ctrlSetPosition [(_refPosition select 0), (_refPosition select 1) - 0.0012 * _inclinationAngle, (_refPosition select 2), (_refPosition select 3)]; + __ctrl2 ctrlSetPosition [SafeZoneX + 0.001, SafeZoneY + 0.001 - 0.0012 * _inclinationAngle, 0.2, 0.2 * 4/3]; __ctrl2 ctrlCommit 0; __ctrl2 ctrlSetText QUOTE(PATHTOF(UI\protractor_marker.paa)); __ctrl2 ctrlSetTextColor [1, 1, 1, 1]; - + }, 0.1, []] call CBA_fnc_addPerFrameHandler; true diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index 7c01bd9f23..8285eb49cb 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -19,13 +19,8 @@ */ #include "script_component.hpp" -private ["_unit", "_weapon", "_mode", "_ammo", "_magazine", "_caliber", "_bullet", "_abort", "_AmmoCacheEntry", "_WeaponCacheEntry", "_opticsName", "_opticType", "_bulletTraceVisible", "_temperature", "_barometricPressure", "_bulletMass", "_bulletLength", "_muzzleVelocity", "_muzzleVelocityShift", "_bulletVelocity", "_bulletSpeed", "_bulletLength", "_barrelTwist", "_stabilityFactor"]; -_unit = _this select 0; -_weapon = _this select 1; -_mode = _this select 3; -_ammo = _this select 4; -_magazine = _this select 5; -_bullet = _this select 6; +private ["_abort", "_AmmoCacheEntry", "_WeaponCacheEntry", "_opticsName", "_opticType", "_bulletTraceVisible", "_temperature", "_barometricPressure", "_bulletMass", "_bulletLength", "_muzzleVelocity", "_muzzleVelocityShift", "_bulletVelocity", "_bulletSpeed", "_bulletLength", "_barrelTwist", "_stabilityFactor"]; +params ["_unit", "_weapon", "_mode", "_ammo", "_magazine", "_caliber", "_bullet"]; _abort = false; if (!hasInterface) exitWith {}; @@ -53,9 +48,7 @@ if (!GVAR(simulateForEveryone) && !(local _unit)) then { if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "CfgWeapons" >> _weapon >> _mode >> "autoFire") == 1) then { _abort = true; }; if (_abort || !(GVAR(extensionAvailable))) exitWith { - if (missionNamespace getVariable [QEGVAR(windDeflection,enabled), false]) then { - EGVAR(windDeflection,trackedBullets) pushBack [_bullet, getNumber(configFile >> "cfgAmmo" >> _ammo >> "airFriction")]; - }; + [_bullet, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")] call EFUNC(winddeflection,updateTrajectoryPFH); }; _AmmoCacheEntry = uiNamespace getVariable format[QGVAR(%1), _ammo]; @@ -120,21 +113,18 @@ GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000; [{ private ["_args", "_index", "_bullet", "_caliber", "_bulletTraceVisible", "_bulletVelocity", "_bulletPosition"]; - _args = _this select 0; - _bullet = _args select 0; - _caliber = _args select 1; - _bulletTraceVisible = _args select 2; - _index = _args select 3; - + params ["_args","_idPFH"]; + _args params["_bullet","_caliber","_bulletTraceVisible","_index"]; + _bulletVelocity = velocity _bullet; _bulletPosition = getPosASL _bullet; - + _bulletSpeed = vectorMagnitude _bulletVelocity; - + if (!alive _bullet || _bulletSpeed < 100) exitWith { - [_this select 1] call cba_fnc_removePerFrameHandler; + [_idPFH] call cba_fnc_removePerFrameHandler; }; - + if (_bulletTraceVisible && _bulletSpeed > 500) then { drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.02*_caliber,0.01*_caliber],[[0,0,0,0.65],[0,0,0,0.2]],[1,0],0,0,"","",""]; }; diff --git a/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf b/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf index 186c0d0649..7cfa50b7df 100644 --- a/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf +++ b/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf @@ -15,10 +15,7 @@ #include "script_component.hpp" -private ["_logic", "_units", "_activated"]; -_logic = _this select 0; -_units = _this select 1; -_activated = _this select 2; +params ["_logic","_units", "_activated"] if !(_activated) exitWith {}; diff --git a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf index b2fc7ba084..7587285963 100644 --- a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf +++ b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf @@ -33,19 +33,16 @@ _gridCells = _mapGrids * _mapGrids; GVAR(currentGrid) = 0; [{ - private ["_args", "_mapGrids", "_gridCells", "_initStartTime"]; - _args = _this select 0; - _mapGrids = _args select 0; - _gridCells = _args select 1; - _initStartTime = _args select 2; - + params ["_args","_idPFH"]; + _args params ["_mapGrids", "_gridCells", "_initStartTime"]; + if (GVAR(currentGrid) >= _gridCells) exitWith { if (GVAR(initMessageEnabled)) then { systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", ceil(ACE_time - _initStartTime)]; }; - [_this select 1] call cba_fnc_removePerFrameHandler; + [_idPFH] call cba_fnc_removePerFrameHandler; }; - + for "_i" from 1 to 50 do { _x = floor(GVAR(currentGrid) / _mapGrids) * 50; _y = (GVAR(currentGrid) - floor(GVAR(currentGrid) / _mapGrids) * _mapGrids) * 50; @@ -57,5 +54,5 @@ GVAR(currentGrid) = 0; GVAR(currentGrid) = GVAR(currentGrid) + 1; if (GVAR(currentGrid) >= _gridCells) exitWith {}; }; - + }, 0, [_mapGrids, _gridCells, _initStartTime]] call CBA_fnc_addPerFrameHandler From 3a2963c2526dc63e736c86552d7d9db631d40229 Mon Sep 17 00:00:00 2001 From: jokoho48 Date: Wed, 5 Aug 2015 02:09:51 +0200 Subject: [PATCH 020/371] Fixed mission semicolon --- addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf b/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf index 7cfa50b7df..55a443d778 100644 --- a/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf +++ b/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf @@ -15,7 +15,7 @@ #include "script_component.hpp" -params ["_logic","_units", "_activated"] +params ["_logic","_units", "_activated"]; if !(_activated) exitWith {}; From d95bc3c2993af0039d913bb78982b5e124d54834 Mon Sep 17 00:00:00 2001 From: jokoho48 Date: Wed, 5 Aug 2015 04:13:36 +0200 Subject: [PATCH 021/371] AB Performance Optimization (Part 1) --- ..._calculateAmmoTemperatureVelocityShift.sqf | 26 +++---- ...fnc_calculateBarrelLengthVelocityShift.sqf | 70 ++++++++++++------- 2 files changed, 59 insertions(+), 37 deletions(-) diff --git a/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf b/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf index 16b094b462..8013bbd80a 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf @@ -15,21 +15,23 @@ */ #include "script_component.hpp" -private ["_muzzleVelocityShift", "_temperatureIndexA", "_temperatureIndexB", "_temperatureRatio"]; +private ["_muzzleVelocityShiftTableUpperLimit", "_temperatureIndexFunction", + "_temperatureIndexA", "_temperatureIndexB", "_interpolationRatio"]; params["_muzzleVelocityShiftTable", "_temperature"]; -if (count _muzzleVelocityShiftTable != 11) exitWith { 0 }; +// Check if muzzleVelocityShiftTable is Larger Than 11 Entrys +_muzzleVelocityShiftTableUpperLimit = _muzzleVelocityShiftTable select 10; +if (isNil "_muzzleVelocityShiftTableUpperLimit") exitWith { 0 }; -_temperatureIndexA = floor((_temperature + 15) / 5); -_temperatureIndexA = 0 max _temperatureIndexA; -_temperatureIndexA = _temperatureIndexA min 10; +// Find exact data index required for given temperature +_temperatureIndexFunction = (_temperature + 15) / 5; -_temperatureIndexB = ceil((_temperature + 15) / 5); -_temperatureIndexB = 0 max _temperatureIndexB; -_temperatureIndexB = _temperatureIndexB min 10; +// lower and upper data index used for interpolation +_temperatureIndexA = (0 max (floor(_temperatureIndexFunction)) min 10; +_temperatureIndexB = (0 max (ceil(_temperatureIndexFunction))) min 10; -_temperatureRatio = ((_temperature + 15) / 5) - floor((_temperature + 15) / 5); +// Interpolation ratio +_interpolationRatio = _temperatureIndexFunction - floor(_temperatureIndexFunction); -_muzzleVelocityShift = (_muzzleVelocityShiftTable select _temperatureIndexA) * (1 - _temperatureRatio) + (_muzzleVelocityShiftTable select _temperatureIndexB) * _temperatureRatio; - -_muzzleVelocityShift +// Interpolation +(_muzzleVelocityShiftTable select _temperatureIndexA) * (1 - _interpolationRatio) + (_muzzleVelocityShiftTable select _temperatureIndexB) * _interpolationRatio // Return diff --git a/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf b/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf index 1896ef816b..513752c538 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf @@ -1,5 +1,5 @@ /* - * Author: Ruthberg + * Author: Ruthberg, MikeMatrix, joko // Jonas * * Calculates the muzzle velocity shift caused by different barrel lengths * @@ -17,36 +17,56 @@ */ #include "script_component.hpp" -private ["_lowerIndex", "_upperIndex", "_barrelLengthRatio", "_muzzleVelocityNew"]; +scopeName "main"; + +private ["_muzzleVelocityTableCount", "_barrelLengthTableCount", "_lowerDataIndex", + "_upperDataIndex", "_lowerBarrelLength", "_upperBarrelLength", "_lowerMuzzleVelocity", + "_upperMuzzleVelocity", "_interpolationRatio"]; params ["_barrelLength", "_muzzleVelocityTable", "_barrelLengthTable", "_muzzleVelocity"]; +// If barrel length is not defined, then there is no point in calculating muzzle velocity if (_barrelLength == 0) exitWith { 0 }; -if (count _muzzleVelocityTable != count _barrelLengthTable) exitWith { 0 }; -if (count _muzzleVelocityTable == 0 || count _barrelLengthTable == 0) exitWith { 0 }; -if (count _muzzleVelocityTable == 1) exitWith { (_muzzleVelocityTable select 0) - _muzzleVelocity }; -_lowerIndex = 0; -_upperIndex = (count _barrelLengthTable) - 1; +_muzzleVelocityTableCount = count _muzzleVelocityTable; +_barrelLengthTableCount = count _barrelLengthTable; -if (_barrelLength <= (_barrelLengthTable select _lowerIndex)) exitWith { (_muzzleVelocityTable select _lowerIndex) - _muzzleVelocity }; -if (_barrelLength >= (_barrelLengthTable select _upperIndex)) exitWith { (_muzzleVelocityTable select _upperIndex) - _muzzleVelocity }; +// Exit if tables are different sizes, have no elements or have only one element +if (_muzzleVelocityTableCount != _barrelLengthTableCount) exitWith { 0 }; +if (_muzzleVelocityTableCount == 0 || _barrelLengthTableCount == 0) exitWith { 0 }; +if (_muzzleVelocityTableCount == 1) exitWith { (_muzzleVelocityTable select 0) - _muzzleVelocity }; -for "_i" from 0 to (count _barrelLengthTable) - 1 do { - if (_barrelLength >= _barrelLengthTable select _i) then { - _lowerIndex = _i; - }; -}; -for "_i" from (count _barrelLengthTable) - 1 to 0 step -1 do { - if (_barrelLength <= _barrelLengthTable select _i) then { - _upperIndex = _i; +// If we have the precise barrel length value, return result immediately +if (_barrelLength in _barrelLengthTable) exitWith { + _muzzleVelocityTable select (_barrelLengthTable find _barrelLength) - _muzzleVelocity +}; + +// Limit values to lower and upper bound of data we have available +if (_barrelLength <= (_barrelLengthTable select 0)) exitWith { (_muzzleVelocityTable select 0) - _muzzleVelocity }; +if (_barrelLength >= (_barrelLengthTable select _barrelLengthTableCount - 1)) exitWith { (_muzzleVelocityTable select _barrelLengthTableCount - 1) - _muzzleVelocity }; + +// Find closest bordering values for barrel length +{ + if (_barrelLength >= _x) then { + _lowerDataIndex = _forEachIndex; + _upperDataIndex = _lowerDataIndex + 1; + breakTo "main"; }; +} forEach _barrelLengthTable; + +// Worst case scenario +if (isNil "_lowerDataIndex" || isNil "_upperDataIndex") exitWith {0}; + +_lowerBarrelLength = _barrelLengthTable select _lowerDataIndex; +_upperBarrelLength = _barrelLengthTable select _upperDataIndex; +_lowerMuzzleVelocity = _muzzleVelocityTable select _lowerDataIndex; +_upperMuzzleVelocity = _muzzleVelocityTable select _upperDataIndex; + +// Calculate interpolation ratio +_interpolationRatio = if (abs (_lowerBarrelLength - _upperBarrelLength) > 0) then { + (_upperBarrelLength - _barrelLength) / (_upperBarrelLength - _lowerBarrelLength) +} else { + 0 }; -_barrelLengthRatio = 0; -if ((_barrelLengthTable select _upperIndex) - (_barrelLengthTable select _lowerIndex) > 0) then { - _barrelLengthRatio = ((_barrelLengthTable select _upperIndex) - _barrelLength) / ((_barrelLengthTable select _upperIndex) - (_barrelLengthTable select _lowerIndex)); -}; - -_muzzleVelocityNew = (_muzzleVelocityTable select _lowerIndex) + ((_muzzleVelocityTable select _upperIndex) - (_muzzleVelocityTable select _lowerIndex)) * (1 - _barrelLengthRatio); - -_muzzleVelocityNew - _muzzleVelocity +// Calculate interpolated muzzle velocity +(_lowerMuzzleVelocity + ((_upperMuzzleVelocity - _lowerMuzzleVelocity) * (1 - _interpolationRatio))) - _muzzleVelocity // Return From 12aa0b5584a0c9cd97e58e125c02543a3c599bf2 Mon Sep 17 00:00:00 2001 From: jokoho48 Date: Wed, 5 Aug 2015 04:27:11 +0200 Subject: [PATCH 022/371] revert Merge Issue --- addons/advanced_ballistics/ACE_Settings.hpp | 40 ++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/addons/advanced_ballistics/ACE_Settings.hpp b/addons/advanced_ballistics/ACE_Settings.hpp index 757385deb3..d88a9b1148 100644 --- a/addons/advanced_ballistics/ACE_Settings.hpp +++ b/addons/advanced_ballistics/ACE_Settings.hpp @@ -1,31 +1,31 @@ class ACE_Settings { class GVAR(enabled) { - displayName = "Advanced Ballistics"; - description = "Enables advanced ballistics"; + displayName = CSTRING(enabled_DisplayName); + description = CSTRING(enabled_Description); typeName = "BOOL"; value = 0; }; class GVAR(simulateForSnipers) { - displayName = "Enabled For Snipers"; - description = "Enables advanced ballistics for non local snipers (when using high power optics)"; + displayName = CSTRING(simulateForSnipers_DisplayName); + description = CSTRING(simulateForSnipers_Description); typeName = "BOOL"; value = 1; }; class GVAR(simulateForGroupMembers) { - displayName = "Enabled For Group Members"; - description = "Enables advanced ballistics for non local group members"; + displayName = CSTRING(simulateForGroupMembers_DisplayName); + description = CSTRING(simulateForGroupMembers_Description); typeName = "BOOL"; value = 0; }; class GVAR(simulateForEveryone) { - displayName = "Enabled For Everyone"; - description = "Enables advanced ballistics for all non local players (enabling this may degrade performance during heavy firefights in multiplayer)"; + displayName = CSTRING(simulateForEveryone_DisplayName); + description = CSTRING(simulateForEveryone_Description); typeName = "BOOL"; value = 0; }; class GVAR(disabledInFullAutoMode) { - displayName = "Disabled In FullAuto Mode"; - description = "Disables advanced ballistics during full auto fire"; + displayName = CSTRING(disabledInFullAutoMod_DisplayName); + description = CSTRING(disabledInFullAutoMod_Description); typeName = "BOOL"; value = 0; }; @@ -38,32 +38,32 @@ class ACE_Settings { }; */ class GVAR(ammoTemperatureEnabled) { - displayName = "Enable Ammo Temperature Simulation"; - description = "Muzzle velocity varies with ammo temperature"; + displayName = CSTRING(ammoTemperatureEnabled_DisplayName); + description = CSTRING(ammoTemperatureEnabled_Description); typeName = "BOOL"; value = 1; }; class GVAR(barrelLengthInfluenceEnabled) { - displayName = "Enable Barrel Length Simulation"; - description = "Muzzle velocity varies with barrel length"; + displayName = CSTRING(barrelLengthInfluenceEnabled_DisplayName); + description = CSTRING(barrelLengthInfluenceEnabled_Description); typeName = "BOOL"; value = 1; }; class GVAR(bulletTraceEnabled) { - displayName = "Enable Bullet Trace Effect"; - description = "Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics)"; + displayName = CSTRING(bulletTraceEnabled_DisplayName); + description = CSTRING(bulletTraceEnabled_Description); typeName = "BOOL"; value = 1; }; class GVAR(simulationInterval) { - displayName = "Simulation Interval"; - description = "Defines the interval between every calculation step"; + displayName = CSTRING(simulationInterval_DisplayName); + description = CSTRING(simulationInterval_Description); typeName = "SCALAR"; value = 0.0; }; class GVAR(simulationRadius) { - displayName = "Simulation Radius"; - description = "Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles"; + displayName = CSTRING(simulationRadius_DisplayName); + description = CSTRING(simulationRadius_Description); typeName = "SCALAR"; value = 3000; }; From c7e104437f7b34bcf1148b5665f3572a69ad3748 Mon Sep 17 00:00:00 2001 From: jokoho48 Date: Wed, 5 Aug 2015 04:38:04 +0200 Subject: [PATCH 023/371] Update Docu Comments in AB --- .../functions/fnc_calculateAmmoTemperatureVelocityShift.sqf | 2 ++ .../functions/fnc_calculateBarrelLengthVelocityShift.sqf | 2 ++ .../advanced_ballistics/functions/fnc_calculateRetardation.sqf | 2 ++ addons/advanced_ballistics/functions/fnc_displayProtractor.sqf | 2 ++ .../functions/fnc_readAmmoDataFromConfig.sqf | 2 ++ .../functions/fnc_readWeaponDataFromConfig.sqf | 2 ++ 6 files changed, 12 insertions(+) diff --git a/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf b/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf index 8013bbd80a..6f45edb774 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf @@ -12,6 +12,8 @@ * * Return value: * None + * + * Public: No */ #include "script_component.hpp" diff --git a/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf b/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf index 513752c538..27e6480337 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf @@ -14,6 +14,8 @@ * * Return value: * None + * + * Public: No */ #include "script_component.hpp" diff --git a/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf b/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf index 507410276e..0111f6d8e1 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf @@ -13,6 +13,8 @@ * * Return value: * None + * + * Public: No */ #include "script_component.hpp" diff --git a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf index 3acefff54e..3877caa724 100644 --- a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf +++ b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf @@ -8,6 +8,8 @@ * * Return value: * None + * + * Public: No */ #include "script_component.hpp" diff --git a/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf b/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf index 10e7e60df2..1edc0ebef6 100644 --- a/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf +++ b/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf @@ -11,6 +11,8 @@ * * Return value: * None + * + * Public: No */ #include "script_component.hpp" diff --git a/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf b/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf index 8a1a29f7b0..1dbd0509e8 100644 --- a/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf +++ b/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf @@ -11,6 +11,8 @@ * * Return value: * None + * + * Public: No */ #include "script_component.hpp" From 6b58b0b3bd2d24758a84881c3fdb9ba7d8c785c4 Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Wed, 5 Aug 2015 05:01:30 +0200 Subject: [PATCH 024/371] AB Performance Optimization and documentation cleanup --- ..._calculateAmmoTemperatureVelocityShift.sqf | 5 +- ...fnc_calculateBarrelLengthVelocityShift.sqf | 5 +- .../functions/fnc_calculateRetardation.sqf | 185 +++++++++--------- .../fnc_calculateStabilityFactor.sqf | 2 +- .../functions/fnc_handleFired.sqf | 2 +- .../functions/fnc_initModuleSettings.sqf | 2 +- .../fnc_initializeTerrainExtension.sqf | 4 +- .../functions/fnc_readAmmoDataFromConfig.sqf | 18 +- .../fnc_readWeaponDataFromConfig.sqf | 9 +- 9 files changed, 114 insertions(+), 118 deletions(-) diff --git a/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf b/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf index 6f45edb774..fcffc85864 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf @@ -8,10 +8,7 @@ * 1: temperature - degrees celcius * * Return Value: - * 0: muzzle velocity shift - m/s - * - * Return value: - * None + * muzzle velocity shift - m/s * * Public: No */ diff --git a/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf b/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf index 27e6480337..9b904ebadd 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf @@ -10,10 +10,7 @@ * 3: muzzle velocity - m/s * * Return Value: - * 0: muzzle velocity shift - m/s - * - * Return value: - * None + * muzzle velocity shift - m/s * * Public: No */ diff --git a/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf b/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf index 0111f6d8e1..440b2653f2 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf @@ -4,15 +4,12 @@ * Calculates the retardation of the bullet * * Arguments: - * 0: drag model - 1-7 + * 0: drag model - integer 1-7 * 1: drag coefficient - bc * 2: velocity - m/s * * Return Value: - * 0: retardation - m/(s^2) - * - * Return value: - * None + * retardation - m/(s^2) * * Public: No */ @@ -20,121 +17,119 @@ // Source: GNU Exterior Ballistics -private ["_A", "_M", "_result"]; +private ["_A", "_M"]; params ["_dragModel", "_dragCoefficient", "_velocity"]; _velocity = _velocity * 3.2808399; _A = -1; _M = -1; -_result = 0; switch _dragModel do { case 1: { - switch true do { - case (_velocity > 4230) : { _A = 0.0001477404177730177; _M = 1.9565; }; - case (_velocity > 3680) : { _A = 0.0001920339268755614; _M = 1.925 ; }; - case (_velocity > 3450) : { _A = 0.0002894751026819746; _M = 1.875 ; }; - case (_velocity > 3295) : { _A = 0.0004349905111115636; _M = 1.825 ; }; - case (_velocity > 3130) : { _A = 0.0006520421871892662; _M = 1.775 ; }; - case (_velocity > 2960) : { _A = 0.0009748073694078696; _M = 1.725 ; }; - case (_velocity > 2830) : { _A = 0.001453721560187286; _M = 1.675 ; }; - case (_velocity > 2680) : { _A = 0.002162887202930376; _M = 1.625 ; }; - case (_velocity > 2460) : { _A = 0.003209559783129881; _M = 1.575 ; }; - case (_velocity > 2225) : { _A = 0.003904368218691249; _M = 1.55 ; }; - case (_velocity > 2015) : { _A = 0.003222942271262336; _M = 1.575 ; }; - case (_velocity > 1890) : { _A = 0.002203329542297809; _M = 1.625 ; }; - case (_velocity > 1810) : { _A = 0.001511001028891904; _M = 1.675 ; }; - case (_velocity > 1730) : { _A = 0.0008609957592468259; _M = 1.75 ; }; - case (_velocity > 1595) : { _A = 0.0004086146797305117; _M = 1.85 ; }; - case (_velocity > 1520) : { _A = 0.0001954473210037398; _M = 1.95 ; }; - case (_velocity > 1420) : { _A = 0.00005431896266462351; _M = 2.125 ; }; - case (_velocity > 1360) : { _A = 0.000008847742581674416; _M = 2.375 ; }; - case (_velocity > 1315) : { _A = 0.000001456922328720298; _M = 2.625 ; }; - case (_velocity > 1280) : { _A = 0.0000002419485191895565; _M = 2.875 ; }; - case (_velocity > 1220) : { _A = 0.00000001657956321067612; _M = 3.25 ; }; - case (_velocity > 1185) : { _A = 0.0000000004745469537157371; _M = 3.75 ; }; - case (_velocity > 1150) : { _A = 0.00000000001379746590025088; _M = 4.25 ; }; - case (_velocity > 1100) : { _A = 0.0000000000004070157961147882; _M = 4.75 ; }; - case (_velocity > 1060) : { _A = 0.00000000000002938236954847331; _M = 5.125 ; }; - case (_velocity > 1025) : { _A = 0.00000000000001228597370774746; _M = 5.25 ; }; - case (_velocity > 980) : { _A = 0.00000000000002916938264100495; _M = 5.125 ; }; - case (_velocity > 945) : { _A = 0.0000000000003855099424807451; _M = 4.75 ; }; - case (_velocity > 905) : { _A = 0.00000000001185097045689854; _M = 4.25 ; }; - case (_velocity > 860) : { _A = 0.0000000003566129470974951; _M = 3.75 ; }; - case (_velocity > 810) : { _A = 0.00000001045513263966272; _M = 3.25 ; }; - case (_velocity > 780) : { _A = 0.0000001291159200846216; _M = 2.875 ; }; - case (_velocity > 750) : { _A = 0.0000006824429329105383; _M = 2.625 ; }; - case (_velocity > 700) : { _A = 0.000003569169672385163; _M = 2.375 ; }; - case (_velocity > 640) : { _A = 0.00001839015095899579; _M = 2.125 ; }; - case (_velocity > 600) : { _A = 0.00005711174688734240; _M = 1.950 ; }; - case (_velocity > 550) : { _A = 0.00009226557091973427; _M = 1.875 ; }; - case (_velocity > 250) : { _A = 0.00009337991957131389; _M = 1.875 ; }; - case (_velocity > 100) : { _A = 0.00007225247327590413; _M = 1.925 ; }; - case (_velocity > 65) : { _A = 0.00005792684957074546; _M = 1.975 ; }; - case (_velocity > 0) : { _A = 0.00005206214107320588; _M = 2.000 ; }; + call { + if (_velocity > 4230) exitWith { _A = 0.0001477404177730177; _M = 1.9565; }; + if (_velocity > 3680) exitWith { _A = 0.0001920339268755614; _M = 1.925; }; + if (_velocity > 3450) exitWith { _A = 0.0002894751026819746; _M = 1.875; }; + if (_velocity > 3295) exitWith { _A = 0.0004349905111115636; _M = 1.825; }; + if (_velocity > 3130) exitWith { _A = 0.0006520421871892662; _M = 1.775; }; + if (_velocity > 2960) exitWith { _A = 0.0009748073694078696; _M = 1.725; }; + if (_velocity > 2830) exitWith { _A = 0.001453721560187286; _M = 1.675; }; + if (_velocity > 2680) exitWith { _A = 0.002162887202930376; _M = 1.625; }; + if (_velocity > 2460) exitWith { _A = 0.003209559783129881; _M = 1.575; }; + if (_velocity > 2225) exitWith { _A = 0.003904368218691249; _M = 1.55; }; + if (_velocity > 2015) exitWith { _A = 0.003222942271262336; _M = 1.575; }; + if (_velocity > 1890) exitWith { _A = 0.002203329542297809; _M = 1.625; }; + if (_velocity > 1810) exitWith { _A = 0.001511001028891904; _M = 1.675; }; + if (_velocity > 1730) exitWith { _A = 0.0008609957592468259; _M = 1.75; }; + if (_velocity > 1595) exitWith { _A = 0.0004086146797305117; _M = 1.85; }; + if (_velocity > 1520) exitWith { _A = 0.0001954473210037398; _M = 1.95; }; + if (_velocity > 1420) exitWith { _A = 0.00005431896266462351; _M = 2.125; }; + if (_velocity > 1360) exitWith { _A = 0.000008847742581674416; _M = 2.375; }; + if (_velocity > 1315) exitWith { _A = 0.000001456922328720298; _M = 2.625; }; + if (_velocity > 1280) exitWith { _A = 0.0000002419485191895565; _M = 2.875; }; + if (_velocity > 1220) exitWith { _A = 0.00000001657956321067612; _M = 3.25; }; + if (_velocity > 1185) exitWith { _A = 0.0000000004745469537157371; _M = 3.75; }; + if (_velocity > 1150) exitWith { _A = 0.00000000001379746590025088; _M = 4.25; }; + if (_velocity > 1100) exitWith { _A = 0.0000000000004070157961147882; _M = 4.75; }; + if (_velocity > 1060) exitWith { _A = 0.00000000000002938236954847331; _M = 5.125; }; + if (_velocity > 1025) exitWith { _A = 0.00000000000001228597370774746; _M = 5.25; }; + if (_velocity > 980) exitWith { _A = 0.00000000000002916938264100495; _M = 5.125; }; + if (_velocity > 945) exitWith { _A = 0.0000000000003855099424807451; _M = 4.75; }; + if (_velocity > 905) exitWith { _A = 0.00000000001185097045689854; _M = 4.25; }; + if (_velocity > 860) exitWith { _A = 0.0000000003566129470974951; _M = 3.75; }; + if (_velocity > 810) exitWith { _A = 0.00000001045513263966272; _M = 3.25; }; + if (_velocity > 780) exitWith { _A = 0.0000001291159200846216; _M = 2.875; }; + if (_velocity > 750) exitWith { _A = 0.0000006824429329105383; _M = 2.625; }; + if (_velocity > 700) exitWith { _A = 0.000003569169672385163; _M = 2.375; }; + if (_velocity > 640) exitWith { _A = 0.00001839015095899579; _M = 2.125; }; + if (_velocity > 600) exitWith { _A = 0.00005711174688734240; _M = 1.950; }; + if (_velocity > 550) exitWith { _A = 0.00009226557091973427; _M = 1.875; }; + if (_velocity > 250) exitWith { _A = 0.00009337991957131389; _M = 1.875; }; + if (_velocity > 100) exitWith { _A = 0.00007225247327590413; _M = 1.925; }; + if (_velocity > 65) exitWith { _A = 0.00005792684957074546; _M = 1.975; }; + if (_velocity > 0) exitWith { _A = 0.00005206214107320588; _M = 2.000; }; }; }; case 2: { - switch true do { - case (_velocity > 1674) : { _A = 0.0079470052136733; _M = 1.36999902851493; }; - case (_velocity > 1172) : { _A = 0.00100419763721974; _M = 1.65392237010294; }; - case (_velocity > 1060) : { _A = 0.0000000000000000000000715571228255369; _M = 7.91913562392361; }; - case (_velocity > 949) : { _A = 0.000000000139589807205091; _M = 3.81439537623717; }; - case (_velocity > 670) : { _A = 0.000234364342818625; _M = 1.71869536324748; }; - case (_velocity > 335) : { _A = 0.000177962438921838; _M = 1.76877550388679; }; - case (_velocity > 0) : { _A = 0.0000518033561289704; _M = 1.98160270524632; }; + call { + if (_velocity > 1674) exitWith { _A = 0.0079470052136733; _M = 1.36999902851493; }; + if (_velocity > 1172) exitWith { _A = 0.00100419763721974; _M = 1.65392237010294; }; + if (_velocity > 1060) exitWith { _A = 0.0000000000000000000000715571228255369; _M = 7.91913562392361; }; + if (_velocity > 949) exitWith { _A = 0.000000000139589807205091; _M = 3.81439537623717; }; + if (_velocity > 670) exitWith { _A = 0.000234364342818625; _M = 1.71869536324748; }; + if (_velocity > 335) exitWith { _A = 0.000177962438921838; _M = 1.76877550388679; }; + if (_velocity > 0) exitWith { _A = 0.0000518033561289704; _M = 1.98160270524632; }; }; }; case 5: { - switch true do { - case (_velocity > 1730) : { _A = 0.00724854775171929; _M = 1.41538574492812; }; - case (_velocity > 1228) : { _A = 0.0000350563361516117; _M = 2.13077307854948; }; - case (_velocity > 1116) : { _A = 0.000000000000184029481181151; _M = 4.81927320350395; }; - case (_velocity > 1004) : { _A = 0.000000000000000000000134713064017409; _M = 7.8100555281422 ; }; - case (_velocity > 837) : { _A = 0.000000103965974081168; _M = 2.84204791809926; }; - case (_velocity > 335) : { _A = 0.0001093015938698234; _M = 1.81096361579504; }; - case (_velocity > 0) : { _A = 0.0000351963178524273; _M = 2.00477856801111; }; + call { + if (_velocity > 1730) exitWith { _A = 0.00724854775171929; _M = 1.41538574492812; }; + if (_velocity > 1228) exitWith { _A = 0.0000350563361516117; _M = 2.13077307854948; }; + if (_velocity > 1116) exitWith { _A = 0.000000000000184029481181151; _M = 4.81927320350395; }; + if (_velocity > 1004) exitWith { _A = 0.000000000000000000000134713064017409; _M = 7.8100555281422; }; + if (_velocity > 837) exitWith { _A = 0.000000103965974081168; _M = 2.84204791809926; }; + if (_velocity > 335) exitWith { _A = 0.0001093015938698234; _M = 1.81096361579504; }; + if (_velocity > 0) exitWith { _A = 0.0000351963178524273; _M = 2.00477856801111; }; }; }; case 6: { - switch true do { - case (_velocity > 3236) : { _A = 0.0455384883480781; _M = 1.15997674041274; }; - case (_velocity > 2065) : { _A = 0.07167261849653769; _M = 1.10704436538885; }; - case (_velocity > 1311) : { _A = 0.00166676386084348; _M = 1.60085100195952; }; - case (_velocity > 1144) : { _A = 0.000000101482730119215; _M = 2.9569674731838 ; }; - case (_velocity > 1004) : { _A = 0.00000000000000000431542773103552; _M = 6.34106317069757; }; - case (_velocity > 670) : { _A = 0.0000204835650496866; _M = 2.11688446325998; }; - case (_velocity > 0) : { _A = 0.0000750912466084823; _M = 1.92031057847052; }; + call { + if (_velocity > 3236) exitWith { _A = 0.0455384883480781; _M = 1.15997674041274; }; + if (_velocity > 2065) exitWith { _A = 0.07167261849653769; _M = 1.10704436538885; }; + if (_velocity > 1311) exitWith { _A = 0.00166676386084348; _M = 1.60085100195952; }; + if (_velocity > 1144) exitWith { _A = 0.000000101482730119215; _M = 2.9569674731838; }; + if (_velocity > 1004) exitWith { _A = 0.00000000000000000431542773103552; _M = 6.34106317069757; }; + if (_velocity > 670) exitWith { _A = 0.0000204835650496866; _M = 2.11688446325998; }; + if (_velocity > 0) exitWith { _A = 0.0000750912466084823; _M = 1.92031057847052; }; }; }; case 7: { - switch true do { - case (_velocity > 4200) : { _A = 0.00000000129081656775919; _M = 3.24121295355962; }; - case (_velocity > 3000) : { _A = 0.0171422231434847; _M = 1.27907168025204; }; - case (_velocity > 1470) : { _A = 0.00233355948302505; _M = 1.52693913274526; }; - case (_velocity > 1260) : { _A = 0.000797592111627665; _M = 1.67688974440324; }; - case (_velocity > 1110) : { _A = 0.00000000000571086414289273; _M = 4.3212826264889 ; }; - case (_velocity > 960) : { _A = 0.0000000000000000302865108244904; _M = 5.99074203776707; }; - case (_velocity > 670) : { _A = 0.00000752285155782535; _M = 2.1738019851075 ; }; - case (_velocity > 540) : { _A = 0.0000131766281225189; _M = 2.08774690257991; }; - case (_velocity > 0) : { _A = 0.0000134504843776525; _M = 2.08702306738884; }; + call { + if (_velocity > 4200) exitWith { _A = 0.00000000129081656775919; _M = 3.24121295355962; }; + if (_velocity > 3000) exitWith { _A = 0.0171422231434847; _M = 1.27907168025204; }; + if (_velocity > 1470) exitWith { _A = 0.00233355948302505; _M = 1.52693913274526; }; + if (_velocity > 1260) exitWith { _A = 0.000797592111627665; _M = 1.67688974440324; }; + if (_velocity > 1110) exitWith { _A = 0.00000000000571086414289273; _M = 4.3212826264889; }; + if (_velocity > 960) exitWith { _A = 0.0000000000000000302865108244904; _M = 5.99074203776707; }; + if (_velocity > 670) exitWith { _A = 0.00000752285155782535; _M = 2.1738019851075; }; + if (_velocity > 540) exitWith { _A = 0.0000131766281225189; _M = 2.08774690257991; }; + if (_velocity > 0) exitWith { _A = 0.0000134504843776525; _M = 2.08702306738884; }; }; }; case 8: { - switch true do { - case (_velocity > 3571) : { _A = 0.0112263766252305; _M = 1.33207346655961; }; - case (_velocity > 1841) : { _A = 0.0167252613732636; _M = 1.28662041261785; }; - case (_velocity > 1120) : { _A = 0.00220172456619625; _M = 1.55636358091189; }; - case (_velocity > 1088) : { _A = 0.00000000000000020538037167098; _M = 5.80410776994789; }; - case (_velocity > 976) : { _A = 0.00000000000592182174254121; _M = 4.29275576134191; }; - case (_velocity > 0) : { _A = 0.000043917343795117; _M = 1.99978116283334; }; + call { + if (_velocity > 3571) exitWith { _A = 0.0112263766252305; _M = 1.33207346655961; }; + if (_velocity > 1841) exitWith { _A = 0.0167252613732636; _M = 1.28662041261785; }; + if (_velocity > 1120) exitWith { _A = 0.00220172456619625; _M = 1.55636358091189; }; + if (_velocity > 1088) exitWith { _A = 0.00000000000000020538037167098; _M = 5.80410776994789; }; + if (_velocity > 976) exitWith { _A = 0.00000000000592182174254121; _M = 4.29275576134191; }; + if (_velocity > 0) exitWith { _A = 0.000043917343795117; _M = 1.99978116283334; }; }; }; }; if (_A != -1 && _M != -1 && _velocity > 0 && _velocity < 10000) then { - _result = _A * (_velocity ^ _M) / _dragCoefficient; - _result = _result / 3.2808399; -}; - -_result + (_A * (_velocity ^ _M) / _dragCoefficient) / 3.2808399 +} else { + 0 +} diff --git a/addons/advanced_ballistics/functions/fnc_calculateStabilityFactor.sqf b/addons/advanced_ballistics/functions/fnc_calculateStabilityFactor.sqf index d09e292138..b3cc481e7b 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateStabilityFactor.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateStabilityFactor.sqf @@ -13,7 +13,7 @@ * 6: barometric Pressure - hPA * * Return Value: - * 0: stability factor + * stability factor * * Public: No */ diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index 8285eb49cb..ec7cbf28e9 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -13,7 +13,7 @@ * 6: projectile - Object of the projectile that was shot * * Return Value: - * Nothing + * None * * Public: No */ diff --git a/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf b/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf index 55a443d778..6e5371e461 100644 --- a/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf +++ b/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf @@ -8,7 +8,7 @@ * 2: activated * * Return Value: - * None + * None * * Public: No */ diff --git a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf index 7587285963..0b982ff76f 100644 --- a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf +++ b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf @@ -3,10 +3,10 @@ * Initializes the advanced ballistics dll extension with terrain data * * Arguments: - * Nothing + * None * * Return Value: - * Nothing + * None * * Public: No */ diff --git a/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf b/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf index 1edc0ebef6..6da578ff63 100644 --- a/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf +++ b/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf @@ -4,13 +4,21 @@ * Reads the ammo class config and updates the config cache * * Arguments: - * 0: ammo - classname + * 0: ammo - classname * * Return Value: - * 0: [_airFriction, _caliber, _bulletLength, _bulletMass, _transonicStabilityCoef, _dragModel, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _ammoTempMuzzleVelocityShifts, _muzzleVelocityTable, _barrelLengthTable] - * - * Return value: - * None + * 0: _airFriction + * 1: _caliber + * 2: _bulletLength + * 3: _bulletMass + * 4: _transonicStabilityCoef + * 5: _dragModel + * 6: _ballisticCoefficients + * 7: _velocityBoundaries + * 8: _atmosphereModel + * 9: _ammoTempMuzzleVelocityShifts + * 10: _muzzleVelocityTable + * 11: _barrelLengthTable * * Public: No */ diff --git a/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf b/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf index 1dbd0509e8..df3c9443e7 100644 --- a/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf +++ b/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf @@ -4,13 +4,12 @@ * Reads the weapon class config and updates the config cache * * Arguments: - * 0: weapon - classname + * 0: weapon - classname * * Return Value: - * 0: [_barrelTwist, _twistDirection, _barrelLength] - * - * Return value: - * None + * 0: _barrelTwist + * 1: _twistDirection + * 2: _barrelLength * * Public: No */ From f6bc36173448bcf1241678e06629517c1e5fcb57 Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Wed, 5 Aug 2015 05:04:34 +0200 Subject: [PATCH 025/371] Minimal performance improvement and fixed missing semicolon --- .../functions/fnc_calculateRetardation.sqf | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf b/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf index 440b2653f2..0bd801c6b9 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf @@ -21,9 +21,6 @@ private ["_A", "_M"]; params ["_dragModel", "_dragCoefficient", "_velocity"]; _velocity = _velocity * 3.2808399; -_A = -1; -_M = -1; - switch _dragModel do { case 1: { call { @@ -128,8 +125,8 @@ switch _dragModel do { }; }; -if (_A != -1 && _M != -1 && _velocity > 0 && _velocity < 10000) then { +if (!isNil "_A" && !isNil "_M" && _velocity > 0 && _velocity < 10000) then { (_A * (_velocity ^ _M) / _dragCoefficient) / 3.2808399 } else { 0 -} +}; From b8f1fa82aec8764cf98bbfd55cddf87ac12f4608 Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Wed, 5 Aug 2015 05:19:08 +0200 Subject: [PATCH 026/371] AB Performance Optimization (Part 2) --- .../functions/fnc_calculateStabilityFactor.sqf | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/addons/advanced_ballistics/functions/fnc_calculateStabilityFactor.sqf b/addons/advanced_ballistics/functions/fnc_calculateStabilityFactor.sqf index b3cc481e7b..671ab2ccb0 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateStabilityFactor.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateStabilityFactor.sqf @@ -19,21 +19,17 @@ */ #include "script_component.hpp" -private ["_l", "_t", "_stabilityFactor"]; +private ["_twist", "_length", "_stabilityFactor"]; params ["_caliber", "_bulletLength", "_bulletMass", "_barrelTwist", "_muzzleVelocity", "_temperature", "_barometricPressure"]; // Source: http://www.jbmballistics.com/ballistics/bibliography/articles/miller_stability_1.pdf -_t = _barrelTwist / _caliber; -_l = _bulletLength / _caliber; +_twist = _barrelTwist / _caliber; +_length = _bulletLength / _caliber; -_stabilityFactor = 7587000 * _bulletMass / (_t^2 * _caliber^3 * _l * (1 + _l^2)); +_stabilityFactor = 7587000 * _bulletMass / (_twist^2 * _caliber^3 * _length * (1 + _length^2)); if (_muzzleVelocity > 341.376) then { - _stabilityFactor = _stabilityFactor * (_muzzleVelocity / 853.44) ^ (1/3); + (_stabilityFactor * (_muzzleVelocity / 853.44) ^ (1/3)) * KELVIN(_temperature) / KELVIN(15) * 1013.25 / _barometricPressure } else { - _stabilityFactor = _stabilityFactor * (_muzzleVelocity / 341.376) ^ (1/3); + (_stabilityFactor * (_muzzleVelocity / 341.376) ^ (1/3)) * KELVIN(_temperature) / KELVIN(15) * 1013.25 / _barometricPressure }; - -_stabilityFactor = _stabilityFactor * KELVIN(_temperature) / KELVIN(15) * 1013.25 / _barometricPressure; - -_stabilityFactor From eca7f83cca6006bbc9b16607dcf4af88199c02cc Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Wed, 5 Aug 2015 06:01:38 +0200 Subject: [PATCH 027/371] AB Performance Optimization (Part 3) --- .../functions/fnc_displayProtractor.sqf | 7 +-- .../functions/fnc_initModuleSettings.sqf | 1 - .../functions/fnc_readAmmoDataFromConfig.sqf | 60 +++++++------------ 3 files changed, 22 insertions(+), 46 deletions(-) diff --git a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf index 3877caa724..9debec1dc8 100644 --- a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf +++ b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf @@ -17,8 +17,6 @@ #define __ctrl1 (__dsp displayCtrl 132950) #define __ctrl2 (__dsp displayCtrl 132951) -private ["_inclinationAngle", "_refPosition"]; - if (GVAR(Protractor)) exitWith { GVAR(Protractor) = false; 1 cutText ["", "PLAIN"]; @@ -41,9 +39,6 @@ GVAR(Protractor) = true; [_idPFH] call cba_fnc_removePerFrameHandler; }; - _inclinationAngle = asin((ACE_player weaponDirection currentWeapon ACE_player) select 2); - _inclinationAngle = -58 max _inclinationAngle min 58; - 1 cutRsc ["RscProtractor", "PLAIN", 1, false]; __ctrl1 ctrlSetScale 1; @@ -52,7 +47,7 @@ GVAR(Protractor) = true; __ctrl1 ctrlSetTextColor [1, 1, 1, 1]; __ctrl2 ctrlSetScale 1; - __ctrl2 ctrlSetPosition [SafeZoneX + 0.001, SafeZoneY + 0.001 - 0.0012 * _inclinationAngle, 0.2, 0.2 * 4/3]; + __ctrl2 ctrlSetPosition [SafeZoneX + 0.001, SafeZoneY + 0.001 - 0.0012 * (-58 max (asin((ACE_player weaponDirection currentWeapon ACE_player) select 2)) min 58), 0.2, 0.2 * 4/3]; __ctrl2 ctrlCommit 0; __ctrl2 ctrlSetText QUOTE(PATHTOF(UI\protractor_marker.paa)); __ctrl2 ctrlSetTextColor [1, 1, 1, 1]; diff --git a/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf b/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf index 6e5371e461..4898c51c10 100644 --- a/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf +++ b/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf @@ -12,7 +12,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_logic","_units", "_activated"]; diff --git a/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf b/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf index 6da578ff63..9839c1dcc3 100644 --- a/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf +++ b/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf @@ -4,7 +4,7 @@ * Reads the ammo class config and updates the config cache * * Arguments: - * 0: ammo - classname + * ammo - classname * * Return Value: * 0: _airFriction @@ -25,50 +25,32 @@ #include "script_component.hpp" private ["_ammo", "_airFriction", "_caliber", "_bulletLength", "_bulletMass", "_transonicStabilityCoef", "_dragModel", "_ballisticCoefficients", "_velocityBoundaries", "_atmosphereModel", "_ammoTempMuzzleVelocityShifts", "_muzzleVelocityTable", "_barrelLengthTable", "_result"]; -_ammo = _this; +_ammoConfig = configFile >> "CfgAmmo" >> _this; -_airFriction = getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction"); -_caliber = getNumber(configFile >> "CfgAmmo" >> _ammo >> "ACE_caliber"); -_bulletLength = getNumber(configFile >> "CfgAmmo" >> _ammo >> "ACE_bulletLength"); -_bulletMass = getNumber(configFile >> "CfgAmmo" >> _ammo >> "ACE_bulletMass"); -_transonicStabilityCoef = 0.5; -if (isNumber(configFile >> "CfgAmmo" >> _ammo >> "ACE_transonicStabilityCoef")) then { - _transonicStabilityCoef = getNumber(configFile >> "CfgAmmo" >> _ammo >> "ACE_transonicStabilityCoef"); +_airFriction = getNumber(_ammoConfig >> "airFriction"); +_caliber = getNumber(_ammoConfig >> "ACE_caliber"); +_bulletLength = getNumber(_ammoConfig >> "ACE_bulletLength"); +_bulletMass = getNumber(_ammoConfig >> "ACE_bulletMass"); +_transonicStabilityCoef = getNumber(_ammoConfig >> "ACE_transonicStabilityCoef"); +if (_transonicStabilityCoef == 0) then { + _transonicStabilityCoef = 0.5; }; -_dragModel = 1; -_ballisticCoefficients = []; -_velocityBoundaries = []; -_atmosphereModel = "ICAO"; -if (isNumber(configFile >> "CfgAmmo" >> _ammo >> "ACE_dragModel")) then { - _dragModel = getNumber(configFile >> "CfgAmmo" >> _ammo >> "ACE_dragModel"); - if (!(_dragModel in [1, 2, 5, 6, 7, 8])) then { - _dragModel = 1; - }; +_dragModel = getNumber(_ammoConfig >> "ACE_dragModel"); +if (_dragModel == 0 || !(_dragModel in [1, 2, 5, 6, 7, 8])) then { + _dragModel = 1; }; -if (isArray(configFile >> "CfgAmmo" >> _ammo >> "ACE_ballisticCoefficients")) then { - _ballisticCoefficients = getArray(configFile >> "CfgAmmo" >> _ammo >> "ACE_ballisticCoefficients"); -}; -if (isArray(configFile >> "CfgAmmo" >> _ammo >> "ACE_velocityBoundaries")) then { - _velocityBoundaries = getArray(configFile >> "CfgAmmo" >> _ammo >> "ACE_velocityBoundaries"); -}; -if (isText(configFile >> "CfgAmmo" >> _ammo >> "ACE_standardAtmosphere")) then { - _atmosphereModel = getText(configFile >> "CfgAmmo" >> _ammo >> "ACE_standardAtmosphere"); -}; -_ammoTempMuzzleVelocityShifts = []; -if (isArray(configFile >> "CfgAmmo" >> _ammo >> "ACE_ammoTempMuzzleVelocityShifts")) then { - _ammoTempMuzzleVelocityShifts = getArray(configFile >> "CfgAmmo" >> _ammo >> "ACE_ammoTempMuzzleVelocityShifts"); -}; -_muzzleVelocityTable = []; -_barrelLengthTable = []; -if (isArray(configFile >> "CfgAmmo" >> _ammo >> "ACE_muzzleVelocities")) then { - _muzzleVelocityTable = getArray(configFile >> "CfgAmmo" >> _ammo >> "ACE_muzzleVelocities"); -}; -if (isArray(configFile >> "CfgAmmo" >> _ammo >> "ACE_barrelLengths")) then { - _barrelLengthTable = getArray(configFile >> "CfgAmmo" >> _ammo >> "ACE_barrelLengths"); +_ballisticCoefficients = getArray(_ammoConfig >> "ACE_ballisticCoefficients"); +_velocityBoundaries = getArray(_ammoConfig >> "ACE_velocityBoundaries"); +_atmosphereModel = getText(_ammoConfig >> "ACE_standardAtmosphere"); +if (_atmosphereModel isEqualTo "") then { + _atmosphereModel = "ICAO"; }; +_ammoTempMuzzleVelocityShifts = getArray(_ammoConfig >> "ACE_ammoTempMuzzleVelocityShifts"); +_muzzleVelocityTable = getArray(_ammoConfig >> "ACE_muzzleVelocities"); +_barrelLengthTable = getArray(_ammoConfig >> "ACE_barrelLengths"); _result = [_airFriction, _caliber, _bulletLength, _bulletMass, _transonicStabilityCoef, _dragModel, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _ammoTempMuzzleVelocityShifts, _muzzleVelocityTable, _barrelLengthTable]; -uiNamespace setVariable [format[QGVAR(%1), _ammo], _result]; +uiNamespace setVariable [format[QGVAR(%1), _this], _result]; _result From 8fbcdfec5aed514c03c38623109c02233a732be4 Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Wed, 5 Aug 2015 10:04:24 +0200 Subject: [PATCH 028/371] Fixed missing bracket and parameter list issue in AB --- .../functions/fnc_calculateAmmoTemperatureVelocityShift.sqf | 2 +- addons/advanced_ballistics/functions/fnc_handleFired.sqf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf b/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf index fcffc85864..8b0c78e86c 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf @@ -26,7 +26,7 @@ if (isNil "_muzzleVelocityShiftTableUpperLimit") exitWith { 0 }; _temperatureIndexFunction = (_temperature + 15) / 5; // lower and upper data index used for interpolation -_temperatureIndexA = (0 max (floor(_temperatureIndexFunction)) min 10; +_temperatureIndexA = (0 max (floor(_temperatureIndexFunction))) min 10; _temperatureIndexB = (0 max (ceil(_temperatureIndexFunction))) min 10; // Interpolation ratio diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index ec7cbf28e9..7ce6a6ac7a 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -20,7 +20,7 @@ #include "script_component.hpp" private ["_abort", "_AmmoCacheEntry", "_WeaponCacheEntry", "_opticsName", "_opticType", "_bulletTraceVisible", "_temperature", "_barometricPressure", "_bulletMass", "_bulletLength", "_muzzleVelocity", "_muzzleVelocityShift", "_bulletVelocity", "_bulletSpeed", "_bulletLength", "_barrelTwist", "_stabilityFactor"]; -params ["_unit", "_weapon", "_mode", "_ammo", "_magazine", "_caliber", "_bullet"]; +params ["_unit", "_weapon", "", "_mode", "_ammo", "_magazine", "_bullet"]; _abort = false; if (!hasInterface) exitWith {}; From 9eb560ff3d81587301a53c28b93350b568eb3160 Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Wed, 5 Aug 2015 10:28:02 +0200 Subject: [PATCH 029/371] AB Performance Optimization (Part 4) --- .../functions/fnc_handleFired.sqf | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index 7ce6a6ac7a..0287d205b9 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -60,11 +60,14 @@ if (isNil {_WeaponCacheEntry}) then { _WeaponCacheEntry = _weapon call FUNC(readWeaponDataFromConfig); }; +_AmmoCacheEntry params ["_airFriction", "_caliber", "_bulletLength", "_bulletMass", "_transonicStabilityCoef", "_dragModel", "_ballisticCoefficients", "_velocityBoundaries", "_atmosphereModel", "_ammoTempMuzzleVelocityShifts", "_muzzleVelocityTable", "_barrelLengthTable"]; +_WeaponCacheEntry params ["_barrelTwist", "_twistDirection", "_barrelLength"]; + _bulletVelocity = velocity _bullet; _muzzleVelocity = vectorMagnitude _bulletVelocity; if (GVAR(barrelLengthInfluenceEnabled)) then { - _muzzleVelocityShift = [_WeaponCacheEntry select 2, _AmmoCacheEntry select 10, _AmmoCacheEntry select 11, _muzzleVelocity] call FUNC(calculateBarrelLengthVelocityShift); + _muzzleVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _muzzleVelocity] call FUNC(calculateBarrelLengthVelocityShift); if (_muzzleVelocityShift != 0) then { _bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift)); _bullet setVelocity _bulletVelocity; @@ -74,7 +77,7 @@ if (GVAR(barrelLengthInfluenceEnabled)) then { if (GVAR(ammoTemperatureEnabled)) then { _temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight); - _muzzleVelocityShift = [_AmmoCacheEntry select 9, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift); + _muzzleVelocityShift = [_ammoTempMuzzleVelocityShifts, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift); if (_muzzleVelocityShift != 0) then { _bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift)); _bullet setVelocity _bulletVelocity; @@ -95,12 +98,7 @@ if (GVAR(bulletTraceEnabled) && cameraView == "GUNNER") then { }; }; -_caliber = _AmmoCacheEntry select 1; -_bulletLength = _AmmoCacheEntry select 2; -_bulletMass = _AmmoCacheEntry select 3; -_barrelTwist = _WeaponCacheEntry select 0; _stabilityFactor = 1.5; - if (_caliber > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) then { _temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight); _barometricPressure = ((getPosASL _bullet) select 2) call EFUNC(weather,calculateBarometricPressure); @@ -109,7 +107,8 @@ if (_caliber > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) th GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000; -"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _AmmoCacheEntry select 0, _AmmoCacheEntry select 6, _AmmoCacheEntry select 7, _AmmoCacheEntry select 8, _AmmoCacheEntry select 5, _stabilityFactor, _WeaponCacheEntry select 1, _muzzleVelocity, _AmmoCacheEntry select 4, getPosASL _bullet, EGVAR(common,mapLatitude), EGVAR(weather,currentTemperature), EGVAR(common,mapAltitude), EGVAR(weather,currentHumidity), overcast, floor(ACE_time), ACE_time - floor(ACE_time)]; +_aceTimeSecond = floor ACE_time; +"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _airFriction, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _dragModel, _stabilityFactor, _twistDirection, _muzzleVelocity, _transonicStabilityCoef, getPosASL _bullet, EGVAR(common,mapLatitude), EGVAR(weather,currentTemperature), EGVAR(common,mapAltitude), EGVAR(weather,currentHumidity), overcast, _aceTimeSecond, ACE_time - _aceTimeSecond]; [{ private ["_args", "_index", "_bullet", "_caliber", "_bulletTraceVisible", "_bulletVelocity", "_bulletPosition"]; @@ -129,6 +128,7 @@ GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000; drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.02*_caliber,0.01*_caliber],[[0,0,0,0.65],[0,0,0,0.2]],[1,0],0,0,"","",""]; }; - call compile ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, floor(ACE_time), ACE_time - floor(ACE_time)]); + _aceTimeSecond = floor ACE_time; + call compile ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, _aceTimeSecond, ACE_time - _aceTimeSecond]); }, GVAR(simulationInterval), [_bullet, _caliber, _bulletTraceVisible, GVAR(currentbulletID)]] call CBA_fnc_addPerFrameHandler; From 79e607836b20f828f00f5c0525c42a779e64d123 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Wed, 5 Aug 2015 12:51:13 +0100 Subject: [PATCH 030/371] Add contributor email for Head --- AUTHORS.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AUTHORS.txt b/AUTHORS.txt index 70bd7af086..814ab311a3 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -68,8 +68,8 @@ Hamburger SV Harakhti havena Hawkins -Head -jokoho482 ` +Head +jokoho482 Jonpas Karneck Kavinsky From 07e09b60faa7b4b09663d53cb7baa414259bdbb8 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Wed, 5 Aug 2015 13:19:47 +0100 Subject: [PATCH 031/371] Stop spectator camera unit changing on corpses Previously the camera would be automatically moved away from corpses (when the unit currently being watched dies). This changes it to stay on them until the view is manually switched as users might want to stick around and watch whatever was going on at the time of death. --- addons/spectator/functions/fnc_handleInterface.sqf | 1 + addons/spectator/functions/fnc_handleUnits.sqf | 6 ++++-- addons/spectator/functions/fnc_transitionCamera.sqf | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index 777e8d2ea9..b85e73dabb 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -78,6 +78,7 @@ switch (toLower _mode) do { camDestroy GVAR(camera); // Return to player view + clearRadio; _unit switchCamera "internal"; // Re-enable BI damage effects diff --git a/addons/spectator/functions/fnc_handleUnits.sqf b/addons/spectator/functions/fnc_handleUnits.sqf index b64a1a2717..e8cd561da0 100644 --- a/addons/spectator/functions/fnc_handleUnits.sqf +++ b/addons/spectator/functions/fnc_handleUnits.sqf @@ -26,9 +26,11 @@ if (isNull _display) exitWith { [_this select 1] call CBA_fnc_removePerFrameHand // Remove all dead and null units from the list [] call FUNC(updateUnits); -// Camera shouldn't stay on unit that isn't in the list +// Camera shouldn't stay on unit that isn't in the list (unless dead) if !(GVAR(camUnit) in GVAR(unitList)) then { - [nil,1] call FUNC(cycleCamera); + if (alive GVAR(camUnit) || isNull GVAR(camUnit)) then { + [nil,1] call FUNC(cycleCamera); + }; }; // Reduce overhead when unit tree is hidden diff --git a/addons/spectator/functions/fnc_transitionCamera.sqf b/addons/spectator/functions/fnc_transitionCamera.sqf index a4d99445fb..4957540fa4 100644 --- a/addons/spectator/functions/fnc_transitionCamera.sqf +++ b/addons/spectator/functions/fnc_transitionCamera.sqf @@ -33,7 +33,7 @@ if !(_newMode in GVAR(availableModes)) then { }; // When no units available to spectate, exit to freecam -if (GVAR(unitList) isEqualTo []) then { +if ((GVAR(unitList) isEqualTo []) && (alive _newUnit || isNull _newUnit)) then { _newMode = 0; _newUnit = objNull; }; From 5200fd6a0298a593fc21d4233de494ff2867a927 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Wed, 5 Aug 2015 14:15:27 +0100 Subject: [PATCH 032/371] Add new option to spectator unit filter setting Adds an option to use playableUnits for scenarios where AI playable units are enabled. --- addons/spectator/ACE_Settings.hpp | 4 ++-- addons/spectator/CfgVehicles.hpp | 6 +++++- addons/spectator/functions/fnc_updateUnits.sqf | 2 +- addons/spectator/stringtable.xml | 3 +++ 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/addons/spectator/ACE_Settings.hpp b/addons/spectator/ACE_Settings.hpp index 539f7cef2d..2889fd2e0f 100644 --- a/addons/spectator/ACE_Settings.hpp +++ b/addons/spectator/ACE_Settings.hpp @@ -1,8 +1,8 @@ class ACE_Settings { class GVAR(filterUnits) { typeName = "SCALAR"; - value = 1; - values[] = {CSTRING(units_none), CSTRING(units_players), CSTRING(units_all)}; + value = 2; + values[] = {CSTRING(units_none), CSTRING(units_players), CSTRING(units_playable), CSTRING(units_all)}; }; class GVAR(filterSides) { typeName = "SCALAR"; diff --git a/addons/spectator/CfgVehicles.hpp b/addons/spectator/CfgVehicles.hpp index 8e685dae07..b63f349b0a 100644 --- a/addons/spectator/CfgVehicles.hpp +++ b/addons/spectator/CfgVehicles.hpp @@ -21,11 +21,15 @@ class CfgVehicles { class players { name = CSTRING(units_players); value = 1; + }; + class playable { + name = CSTRING(units_playable); + value = 2; default = 1; }; class all { name = CSTRING(units_all); - value = 2; + value = 3; }; }; }; diff --git a/addons/spectator/functions/fnc_updateUnits.sqf b/addons/spectator/functions/fnc_updateUnits.sqf index ef8fc3b4f1..75f1402179 100644 --- a/addons/spectator/functions/fnc_updateUnits.sqf +++ b/addons/spectator/functions/fnc_updateUnits.sqf @@ -36,7 +36,7 @@ if !(_newUnits isEqualTo []) exitWith { private ["_sides","_cond","_filteredUnits","_color","_icon"]; // Unit setting filter -_newUnits = [[],allPlayers,allUnits] select GVAR(filterUnits); +_newUnits = [[],allPlayers,playableUnits,allUnits] select GVAR(filterUnits); // Side setting filter _sides = []; diff --git a/addons/spectator/stringtable.xml b/addons/spectator/stringtable.xml index 4eb0e25c0a..5219ba7e2d 100644 --- a/addons/spectator/stringtable.xml +++ b/addons/spectator/stringtable.xml @@ -25,6 +25,9 @@ Only players Tylko gracze + + Playable Units + All units Wszystkie jednostki From c4e4f184ff4e15ba72bb0f4b2b759c5014002a21 Mon Sep 17 00:00:00 2001 From: jokoho48 Date: Wed, 5 Aug 2015 18:33:28 +0200 Subject: [PATCH 033/371] AB Performance Optimization (Part 5) --- addons/advanced_ballistics/XEH_postInit.sqf | 1 - .../fnc_initializeTerrainExtension.sqf | 8 ++++---- .../fnc_readWeaponDataFromConfig.sqf | 19 +++++++++---------- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/addons/advanced_ballistics/XEH_postInit.sqf b/addons/advanced_ballistics/XEH_postInit.sqf index b199acb9e5..6416e7908a 100644 --- a/addons/advanced_ballistics/XEH_postInit.sqf +++ b/addons/advanced_ballistics/XEH_postInit.sqf @@ -8,7 +8,6 @@ GVAR(Protractor) = false; GVAR(ProtractorStart) = ACE_time; GVAR(currentGrid) = 0; -GVAR(initMessageEnabled) = false; GVAR(extensionAvailable) = true; /* @TODO: Remove this until versioning is in sync with cmake/build versioning diff --git a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf index 0b982ff76f..53ac6aa874 100644 --- a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf +++ b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf @@ -22,9 +22,9 @@ _initStartTime = ACE_time; _mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize"); if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith { - if (GVAR(initMessageEnabled)) then { + #ifdef DEBUG_MODE_FULL systemChat "AdvancedBallistics: Terrain already initialized"; - }; + #endIf }; _mapGrids = ceil(_mapSize / 50) + 1; @@ -37,9 +37,9 @@ GVAR(currentGrid) = 0; _args params ["_mapGrids", "_gridCells", "_initStartTime"]; if (GVAR(currentGrid) >= _gridCells) exitWith { - if (GVAR(initMessageEnabled)) then { + #ifdef DEBUG_MODE_FULL systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", ceil(ACE_time - _initStartTime)]; - }; + #endif [_idPFH] call cba_fnc_removePerFrameHandler; }; diff --git a/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf b/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf index df3c9443e7..8e13dc04dc 100644 --- a/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf +++ b/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf @@ -4,7 +4,7 @@ * Reads the weapon class config and updates the config cache * * Arguments: - * 0: weapon - classname + * weapon - classname * * Return Value: * 0: _barrelTwist @@ -15,18 +15,17 @@ */ #include "script_component.hpp" -private ["_weapon", "_barrelTwist", "_twistDirection", "_barrelLength", "_result"]; -_weapon = _this; +private ["_weaponConfig", "_barrelTwist", "_twistDirection", "_barrelLength", "_result"]; +_weaponConfig = (configFile >> "CfgWeapons" >> _this); -_barrelTwist = getNumber(configFile >> "CfgWeapons" >> _weapon >> "ACE_barrelTwist"); +_barrelTwist = getNumber(_weaponConfig >> "ACE_barrelTwist"); _twistDirection = 1; -if (isNumber(configFile >> "CfgWeapons" >> _weapon >> "ACE_twistDirection")) then { - _twistDirection = getNumber(configFile >> "CfgWeapons" >> _weapon >> "ACE_twistDirection"); - if (_twistDirection != -1 && _twistDirection != 0 && _twistDirection != 1) then { - _twistDirection = 1; - }; +_twistDirection = getNumber(_weaponConfig >> "ACE_twistDirection"); +if !(_twistDirection in [-1, 0, 1]) then { + _twistDirection = 1; }; -_barrelLength = getNumber(configFile >> "CfgWeapons" >> _weapon >> "ACE_barrelLength"); + +_barrelLength = getNumber(_weaponConfig >> "ACE_barrelLength"); _result = [_barrelTwist, _twistDirection, _barrelLength]; From 0ab865171dd04a23ab9c3d27ee0fc8ff7d7447ad Mon Sep 17 00:00:00 2001 From: jokoho48 Date: Wed, 5 Aug 2015 18:50:37 +0200 Subject: [PATCH 034/371] AB Performance Optimization (Part 6) Add some todo comments --- .../functions/fnc_handleFired.sqf | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index 0287d205b9..d15f9a95e8 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -67,8 +67,13 @@ _bulletVelocity = velocity _bullet; _muzzleVelocity = vectorMagnitude _bulletVelocity; if (GVAR(barrelLengthInfluenceEnabled)) then { - _muzzleVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _muzzleVelocity] call FUNC(calculateBarrelLengthVelocityShift); - if (_muzzleVelocityShift != 0) then { + _muzzleVelocityShift = uiNamespace getVariable [format [QGVAR(%1_muzzleVelocityShift),_weapon],nil]; + if (isNil "_muzzleVelocityShift") then { + _muzzleVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _muzzleVelocity] call FUNC(calculateBarrelLengthVelocityShift); + uiNamespace setVariable [format [QGVAR(%1_muzzleVelocityShift),_weapon],_muzzleVelocityShift]; + }; + + if (_muzzleVelocityShift != 0) then { // @ combine with same functions _bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift)); _bullet setVelocity _bulletVelocity; _muzzleVelocity = _muzzleVelocity + _muzzleVelocityShift; @@ -76,9 +81,9 @@ if (GVAR(barrelLengthInfluenceEnabled)) then { }; if (GVAR(ammoTemperatureEnabled)) then { - _temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight); - _muzzleVelocityShift = [_ammoTempMuzzleVelocityShifts, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift); - if (_muzzleVelocityShift != 0) then { + _temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight); // @todo make it not Shoot dependent + _muzzleVelocityShift = [_ammoTempMuzzleVelocityShifts, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift); //@todo make it not Shoot dependent + if (_muzzleVelocityShift != 0) then { // @ combine with same functions _bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift)); _bullet setVelocity _bulletVelocity; _muzzleVelocity = _muzzleVelocity + _muzzleVelocityShift; @@ -100,7 +105,7 @@ if (GVAR(bulletTraceEnabled) && cameraView == "GUNNER") then { _stabilityFactor = 1.5; if (_caliber > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) then { - _temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight); + _temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight); // @todo double call not neede and make it not shoot dependet _barometricPressure = ((getPosASL _bullet) select 2) call EFUNC(weather,calculateBarometricPressure); _stabilityFactor = [_caliber, _bulletLength, _bulletMass, _barrelTwist, _muzzleVelocity, _temperature, _barometricPressure] call FUNC(calculateStabilityFactor); }; From 42b5abae116c27cad907aee5cc5dd85ad978c59c Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Wed, 5 Aug 2015 19:25:38 +0100 Subject: [PATCH 035/371] Add support for respawn counter to spectator UI Rather than hiding the BI respawn counter, it should be "integrated" into the UI via code if present. --- addons/spectator/UI/interface.hpp | 11 +++++- .../functions/fnc_handleInterface.sqf | 35 +++++++++++++++---- 2 files changed, 39 insertions(+), 7 deletions(-) diff --git a/addons/spectator/UI/interface.hpp b/addons/spectator/UI/interface.hpp index e8df31c280..bd6d34339f 100644 --- a/addons/spectator/UI/interface.hpp +++ b/addons/spectator/UI/interface.hpp @@ -1,6 +1,15 @@ +// Temporary fix until BI take care of it +class RscFrame { + x = 0; + y = 0; + w = 0; + h = 0; +}; + + class RscButtonMenu; class RscControlsGroupNoScrollbars; -class RscFrame; +//class RscFrame; class RscListNBox; class RscMapControl; class RscPicture; diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index b85e73dabb..b6608959b7 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -43,9 +43,8 @@ switch (toLower _mode) do { // Close map openMap [false,false]; - // Disable BI damage effects and remove counter layer + // Disable BI damage effects BIS_fnc_feedback_allowPP = false; - ("BIS_fnc_respawnCounter" call BIS_fnc_rscLayer) cutText ["","plain"]; // Close all existing dialogs while {dialog} do { @@ -81,7 +80,7 @@ switch (toLower _mode) do { clearRadio; _unit switchCamera "internal"; - // Re-enable BI damage effects + // Enable BI damage effects BIS_fnc_feedback_allowPP = true; // Cleanup camera variables @@ -154,9 +153,33 @@ switch (toLower _mode) do { [localize LSTRING(prevUnit),"Left Arrow"] ]; - // Hacky way to enable keybindings - //_display displayAddEventHandler ["KeyUp", {[_this,'keyup'] call CBA_events_fnc_keyHandler}]; - //_display displayAddEventHandler ["KeyDown", {[_this,'keydown'] call CBA_events_fnc_keyHandler}]; + // Handle support for BI's respawn counter + [{ + if !(isNull (GETUVAR(RscRespawnCounter,displayNull))) then { + disableSerialization; + private ["_counter","_title","_back","_timer","_frame","_x","_y"]; + _counter = GETUVAR(RscRespawnCounter,displayNull); + _title = _counter displayCtrl 1001; + _back = _counter displayCtrl 1002; + _timer = _counter displayCtrl 1003; + _frame = _counter ctrlCreate ["RscFrame",1008]; + + _x = safeZoneX + safeZoneW - TOOL_W * 4 - MARGIN * 3; + _y = safeZoneY + safeZoneH - TOOL_H; + + // Timer + _title ctrlSetPosition [_x,_y,TOOL_W,TOOL_H]; + _back ctrlSetPosition [_x,_y,TOOL_W,TOOL_H]; + _timer ctrlSetPosition [_x,_y,TOOL_W,TOOL_H]; + _frame ctrlSetPosition [_x,_y,TOOL_W,TOOL_H]; + _timer ctrlSetFontHeight TOOL_H; + + _title ctrlCommit 0; + _back ctrlCommit 0; + _timer ctrlCommit 0; + _frame ctrlCommit 0; + }; + },[],0.5] call EFUNC(common,waitAndExecute); }; case "onunload": { // Kill GUI PFHs From c808021c7c9ae480d2d27a4735516ed02f688049 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Wed, 5 Aug 2015 21:11:25 +0100 Subject: [PATCH 036/371] Tweak spectator interface layout - Swap the FOV and vision mode tools into a more logical order. - Shorten the unit list to prevent overlay with main UI - Fix name tool on dead units --- addons/spectator/UI/interface.hpp | 14 +++++++------- addons/spectator/functions/fnc_handleToolbar.sqf | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/addons/spectator/UI/interface.hpp b/addons/spectator/UI/interface.hpp index bd6d34339f..2ac33e4a64 100644 --- a/addons/spectator/UI/interface.hpp +++ b/addons/spectator/UI/interface.hpp @@ -121,11 +121,11 @@ class GVAR(interface) { idc = -1; style = 64; }; - class fovTool: viewTool { - idc = IDC_TOOL_FOV; + class visionTool: viewTool { + idc = IDC_TOOL_VISION; x = TOOL_W * 3 + MARGIN * 2; }; - class fovFrame: fovTool { + class visionFrame: visionTool { idc = -1; style = 64; }; @@ -137,11 +137,11 @@ class GVAR(interface) { idc = -1; style = 64; }; - class visionTool: viewTool { - idc = IDC_TOOL_VISION; + class fovTool: viewTool { + idc = IDC_TOOL_FOV; x = safeZoneW - TOOL_W * 2 - MARGIN; }; - class visionFrame: visionTool { + class fovFrame: fovTool { idc = -1; style = 64; }; @@ -160,7 +160,7 @@ class GVAR(interface) { x = safeZoneX; y = safeZoneY + TOOL_H * 2; w = TOOL_W * 2; - h = safeZoneH - TOOL_H * 4; + h = safeZoneH - TOOL_H * 6; sizeEx = H_PART(0.8); borderSize = 1; colorBorder[] = {COL_FORE}; diff --git a/addons/spectator/functions/fnc_handleToolbar.sqf b/addons/spectator/functions/fnc_handleToolbar.sqf index fd29ca532e..878f3e46de 100644 --- a/addons/spectator/functions/fnc_handleToolbar.sqf +++ b/addons/spectator/functions/fnc_handleToolbar.sqf @@ -1,6 +1,6 @@ /* * Author: Karel Moricky, SilentSpike - * Handles the spectator UI toolbar values and applies them to the camera + * Handles the spectator UI toolbar values * * Arguments: * 0: Parameters @@ -31,15 +31,15 @@ if (GVAR(camMode) == 0) then { _fov = format ["%1x", floor(GVAR(camZoom) * 100) * 0.01]; _speed = format ["%1 m/s", floor(GVAR(camSpeed) * 100) * 0.01]; } else { - _vision = format ["%1 m", floor(getPosASL GVAR(camUnit) select 2)]; - _fov = [side group GVAR(camUnit)] call BIS_fnc_sideName; + _vision = [side group GVAR(camUnit)] call BIS_fnc_sideName; + _fov = format ["%1 m", floor(getPosASL GVAR(camUnit) select 2)]; _speed = format ["%1 km/h", floor(speed GVAR(camUnit)) max 0]; }; -if (isNull GVAR(camUnit)) then { - _name = localize "STR_Special_None"; -} else { +if (alive GVAR(camUnit)) then { _name = GETVAR(GVAR(camUnit),GVAR(uName),""); +} else { + _name = localize "STR_Special_None"; }; _mode = [localize LSTRING(ViewFree),localize LSTRING(ViewInternal),localize LSTRING(ViewExternal)] select GVAR(camMode); From d1975a593dc6d88755b5792b1bd627181bc6d9f0 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Thu, 6 Aug 2015 00:39:14 +0100 Subject: [PATCH 037/371] Improve spectator pause menu emulation Makes the fake pause menu closer to the real thing for UX purposes --- .../functions/fnc_handleInterface.sqf | 40 ++++++++++--------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index b6608959b7..fdd84ee5ef 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -457,10 +457,10 @@ switch (toLower _mode) do { }; } forEach GVAR(unitList); }; - // Other + // Break from interface for escape menu case "escape": { _args params ["_display"]; - private ["_dlg","_key","_index","_ctrl","_config"]; + private "_dlg"; // Kill display _display closeDisplay 0; @@ -474,7 +474,6 @@ switch (toLower _mode) do { GVAR(mouse) = [false,false]; GVAR(mousePos) = [0.5,0.5]; - // Below is from EFUNC(common,disableUserInput) createDialog (["RscDisplayInterrupt", "RscDisplayMPInterrupt"] select isMultiplayer); disableSerialization; @@ -484,30 +483,35 @@ switch (toLower _mode) do { !(_key == 1) }]; - for "_index" from 100 to 2000 do { - (_dlg displayCtrl _index) ctrlEnable false; + // Disable save, respawn, options & manual buttons + (_dlg displayCtrl 103) ctrlEnable false; + if !(alive player) then { + (_dlg displayCtrl 1010) ctrlEnable false; }; + (_dlg displayCtrl 101) ctrlEnable false; + (_dlg displayCtrl 122) ctrlEnable false; - _ctrl = _dlg displayctrl 103; - _ctrl ctrlSetEventHandler ["buttonClick", QUOTE(while {dialog} do {closeDialog 0}; failMission 'LOSER';)]; - _ctrl ctrlEnable true; - _ctrl ctrlSetText "ABORT"; - _ctrl ctrlSetTooltip "Abort."; - - _ctrl = _dlg displayctrl ([104, 1010] select isMultiplayer); - _ctrl ctrlSetEventHandler ["buttonClick", QUOTE(closeDialog 0; player setDamage 1;)]; - _ctrl ctrlEnable (call {_config = missionConfigFile >> "respawnButton"; !isNumber _config || {getNumber _config == 1}}); - _ctrl ctrlSetText "RESPAWN"; - _ctrl ctrlSetTooltip "Respawn."; + // Initalize abort button (the "spawn" is a necessary evil) + (_dlg displayCtrl 104) ctrlAddEventHandler ["ButtonClick",{_this spawn { + disableSerialization; + _display = ctrlparent (_this select 0); + _abort = [localize "str_msg_confirm_return_lobby",nil,localize "str_disp_xbox_hint_yes",localize "str_disp_xbox_hint_no",_display,nil,true] call BIS_fnc_guiMessage; + if (_abort) then {_display closeDisplay 2; failMission "loser"}; + }}]; // PFH to re-open display when menu closes [{ if !(isNull (findDisplay 49)) exitWith {}; - createDialog QGVAR(interface); - [] call FUNC(transitionCamera); + // If still a spectator then re-enter the interface + if (GVAR(isSet)) then { + createDialog QGVAR(interface); + [] call FUNC(transitionCamera); + }; [_this select 1] call CBA_fnc_removePerFrameHandler; },0] call CBA_fnc_addPerFrameHandler; + + true }; }; From d6cc14a39d20afbd4734ab4c90ddfdbde63cee12 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Thu, 6 Aug 2015 00:52:39 +0100 Subject: [PATCH 038/371] Add zeus support to spectator UI Can only use zeus while alive, so it won't work using the respawn template. However it's useful for communities usign custom frameworks --- .../functions/fnc_handleInterface.sqf | 38 ++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index fdd84ee5ef..defe5332ba 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -225,6 +225,10 @@ switch (toLower _mode) do { case "onkeydown": { _args params ["_display","_dik","_shift","_ctrl","_alt"]; + if ((alive player) && {_dik in (actionKeys "curatorInterface")} && {!isNull (getAssignedCuratorLogic player)}) exitWith { + ["zeus", [_display]] call FUNC(handleInterface); + }; + // Handle held keys (prevent repeat calling) if (_dik in GVAR(heldKeys)) exitwith {}; // Exclude movement keys so that speed can be adjusted on fly @@ -457,7 +461,7 @@ switch (toLower _mode) do { }; } forEach GVAR(unitList); }; - // Break from interface for escape menu + // Break from interface for eexternal events case "escape": { _args params ["_display"]; private "_dlg"; @@ -511,6 +515,38 @@ switch (toLower _mode) do { [_this select 1] call CBA_fnc_removePerFrameHandler; },0] call CBA_fnc_addPerFrameHandler; + }; + case "zeus": { + _args params ["_display"]; + + // Kill display + _display closeDisplay 0; + + // Reset cam/UI vars + GVAR(camBoom) = 0; + GVAR(camDolly) = [0,0]; + + GVAR(ctrlKey) = false; + GVAR(heldKeys) = []; + GVAR(mouse) = [false,false]; + GVAR(mousePos) = [0.5,0.5]; + + openCuratorInterface; + + [{ + // PFH to re-open display when menu closes + [{ + if !((isNull curatorCamera) && {isNull (GETMVAR(bis_fnc_moduleRemoteControl_unit,objNull))}) exitWith {}; + + // If still a spectator then re-enter the interface + if (GVAR(isSet)) then { + createDialog QGVAR(interface); + [] call FUNC(transitionCamera); + }; + + [_this select 1] call CBA_fnc_removePerFrameHandler; + },0] call CBA_fnc_addPerFrameHandler; + },[],5] call EFUNC(common,waitAndExecute); true }; From 15a1a0d535e2484671237a43f58ad7e5d0d3cf1e Mon Sep 17 00:00:00 2001 From: jokoho48 Date: Thu, 6 Aug 2015 10:58:07 +0200 Subject: [PATCH 039/371] AB Performance Optimization (Part 7) --- .../functions/fnc_handleFired.sqf | 47 ++++++++++++------- 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index d15f9a95e8..a6e4611e2f 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -19,17 +19,22 @@ */ #include "script_component.hpp" +// Early Quiting +if (!hasInterface) exitWith {}; +if (!GVAR(enabled)) exitWith {}; + +// parameterization private ["_abort", "_AmmoCacheEntry", "_WeaponCacheEntry", "_opticsName", "_opticType", "_bulletTraceVisible", "_temperature", "_barometricPressure", "_bulletMass", "_bulletLength", "_muzzleVelocity", "_muzzleVelocityShift", "_bulletVelocity", "_bulletSpeed", "_bulletLength", "_barrelTwist", "_stabilityFactor"]; params ["_unit", "_weapon", "", "_mode", "_ammo", "_magazine", "_bullet"]; _abort = false; -if (!hasInterface) exitWith {}; -if (!alive _bullet) exitWith {}; -if (!GVAR(enabled)) exitWith {}; -if (!([_unit] call EFUNC(common,isPlayer))) exitWith {}; -if (underwater _unit) exitWith {}; + + if (!(_ammo isKindOf "BulletBase")) exitWith {}; +if (!alive _bullet) exitWith {}; +if (!([_unit] call EFUNC(common,isPlayer))) exitWith {}; if (_unit distance ACE_player > GVAR(simulationRadius)) exitWith {}; +if (underwater _unit) exitWith {}; if (!GVAR(simulateForEveryone) && !(local _unit)) then { // The shooter is non local _abort = true; @@ -51,18 +56,20 @@ if (_abort || !(GVAR(extensionAvailable))) exitWith { [_bullet, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")] call EFUNC(winddeflection,updateTrajectoryPFH); }; +// Get Weapon and Ammo Configurations _AmmoCacheEntry = uiNamespace getVariable format[QGVAR(%1), _ammo]; -if (isNil {_AmmoCacheEntry}) then { +if (isNil "_AmmoCacheEntry") then { _AmmoCacheEntry = _ammo call FUNC(readAmmoDataFromConfig); }; _WeaponCacheEntry = uiNamespace getVariable format[QGVAR(%1), _weapon]; -if (isNil {_WeaponCacheEntry}) then { +if (isNil "_WeaponCacheEntry") then { _WeaponCacheEntry = _weapon call FUNC(readWeaponDataFromConfig); }; _AmmoCacheEntry params ["_airFriction", "_caliber", "_bulletLength", "_bulletMass", "_transonicStabilityCoef", "_dragModel", "_ballisticCoefficients", "_velocityBoundaries", "_atmosphereModel", "_ammoTempMuzzleVelocityShifts", "_muzzleVelocityTable", "_barrelLengthTable"]; _WeaponCacheEntry params ["_barrelTwist", "_twistDirection", "_barrelLength"]; + _bulletVelocity = velocity _bullet; _muzzleVelocity = vectorMagnitude _bulletVelocity; @@ -72,24 +79,25 @@ if (GVAR(barrelLengthInfluenceEnabled)) then { _muzzleVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _muzzleVelocity] call FUNC(calculateBarrelLengthVelocityShift); uiNamespace setVariable [format [QGVAR(%1_muzzleVelocityShift),_weapon],_muzzleVelocityShift]; }; - - if (_muzzleVelocityShift != 0) then { // @ combine with same functions - _bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift)); - _bullet setVelocity _bulletVelocity; + if (_muzzleVelocityShift != 0) then { _muzzleVelocity = _muzzleVelocity + _muzzleVelocityShift; }; }; if (GVAR(ammoTemperatureEnabled)) then { - _temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight); // @todo make it not Shoot dependent - _muzzleVelocityShift = [_ammoTempMuzzleVelocityShifts, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift); //@todo make it not Shoot dependent - if (_muzzleVelocityShift != 0) then { // @ combine with same functions - _bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift)); - _bullet setVelocity _bulletVelocity; + _temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight); + _muzzleVelocityShift = [_ammoTempMuzzleVelocityShifts, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift); + if (_muzzleVelocityShift != 0) then { _muzzleVelocity = _muzzleVelocity + _muzzleVelocityShift; }; }; +if (GVAR(ammoTemperatureEnabled) || GVAR(barrelLengthInfluenceEnabled)) then { + if (_muzzleVelocityShift != 0) then { + _bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift)); + _bullet setVelocity _bulletVelocity; + }; +}; _bulletTraceVisible = false; if (GVAR(bulletTraceEnabled) && cameraView == "GUNNER") then { if (currentWeapon ACE_player in ["ACE_Vector", "Binocular", "Rangefinder", "Laserdesignator"]) then { @@ -105,7 +113,9 @@ if (GVAR(bulletTraceEnabled) && cameraView == "GUNNER") then { _stabilityFactor = 1.5; if (_caliber > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) then { - _temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight); // @todo double call not neede and make it not shoot dependet + if (isNil "_temperature") then { + _temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight); + }; _barometricPressure = ((getPosASL _bullet) select 2) call EFUNC(weather,calculateBarometricPressure); _stabilityFactor = [_caliber, _bulletLength, _bulletMass, _barrelTwist, _muzzleVelocity, _temperature, _barometricPressure] call FUNC(calculateStabilityFactor); }; @@ -121,7 +131,6 @@ _aceTimeSecond = floor ACE_time; _args params["_bullet","_caliber","_bulletTraceVisible","_index"]; _bulletVelocity = velocity _bullet; - _bulletPosition = getPosASL _bullet; _bulletSpeed = vectorMagnitude _bulletVelocity; @@ -129,6 +138,8 @@ _aceTimeSecond = floor ACE_time; [_idPFH] call cba_fnc_removePerFrameHandler; }; + _bulletPosition = getPosASL _bullet; + if (_bulletTraceVisible && _bulletSpeed > 500) then { drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.02*_caliber,0.01*_caliber],[[0,0,0,0.65],[0,0,0,0.2]],[1,0],0,0,"","",""]; }; From 92ef0bfe995632527c255099d45862a99a913a3f Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Thu, 6 Aug 2015 11:34:24 +0100 Subject: [PATCH 040/371] Whitelist spectator free camera boom keys Now that booming the free camera is influenced by the camera speed, the keys should be whitelisted from the held-key prevention system to allow the speed to be adjusted on the move. Also includes a failed attempt to fix the free camera map teleporting functionality. --- addons/spectator/UI/interface.hpp | 2 +- addons/spectator/functions/fnc_handleInterface.sqf | 12 +++++++----- addons/spectator/functions/fnc_transitionCamera.sqf | 4 +++- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/addons/spectator/UI/interface.hpp b/addons/spectator/UI/interface.hpp index 2ac33e4a64..182263e7b4 100644 --- a/addons/spectator/UI/interface.hpp +++ b/addons/spectator/UI/interface.hpp @@ -180,7 +180,7 @@ class GVAR(interface) { y = safeZoneY; w = safeZoneW; h = safeZoneH; - onMouseButtonDblClick = QUOTE([ARR_2('onMapDblClick',_this)] call FUNC(handleInterface)); + onMouseButtonDown = QUOTE([ARR_2('onMapClick',_this)] call FUNC(handleInterface)); onDraw = QUOTE([ARR_2('onDraw',_this)] call FUNC(handleInterface)); }; class helpSplash: RscControlsGroupNoScrollbars { diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index defe5332ba..502ce65fd4 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -40,8 +40,9 @@ switch (toLower _mode) do { GVAR(camera) = "Camera" camCreate (ASLtoATL GVAR(camPos)); [] call FUNC(transitionCamera); - // Close map + // Close map and clear radio openMap [false,false]; + clearRadio; // Disable BI damage effects BIS_fnc_feedback_allowPP = false; @@ -76,8 +77,9 @@ switch (toLower _mode) do { GVAR(camera) cameraEffect ["terminate", "back"]; camDestroy GVAR(camera); - // Return to player view clearRadio; + + // Return to player view _unit switchCamera "internal"; // Enable BI damage effects @@ -232,7 +234,7 @@ switch (toLower _mode) do { // Handle held keys (prevent repeat calling) if (_dik in GVAR(heldKeys)) exitwith {}; // Exclude movement keys so that speed can be adjusted on fly - if !(_dik in [17,30,31,32]) then { + if !(_dik in [16,17,30,31,32,44]) then { GVAR(heldKeys) pushBack _dik; }; @@ -422,8 +424,8 @@ switch (toLower _mode) do { _tree tvSort [[],false]; }; // Map events - case "onmapdblclick": { - _args params ["_map","_button","_x","_y"]; + case "onmapclick": { + _args params ["_map","_button","_x","_y","_shift","_ctrl","_alt"]; private ["_newPos","_oldZ"]; if ((GVAR(camMode) == 0) && (_button == 0)) then { diff --git a/addons/spectator/functions/fnc_transitionCamera.sqf b/addons/spectator/functions/fnc_transitionCamera.sqf index 4957540fa4..90a2dc776b 100644 --- a/addons/spectator/functions/fnc_transitionCamera.sqf +++ b/addons/spectator/functions/fnc_transitionCamera.sqf @@ -53,7 +53,9 @@ if (_newMode == 0) then { // Free GVAR(camera) camSetFov -(linearConversion [0.01,2,GVAR(camZoom),-2,-0.01,true]); GVAR(camera) camCommit 0; - // Agent is switched to in free cam to hide death table and prevent AI chat + // Agent is switched to in free cam to hide death table and prevent AI chat while allowing icons to draw + // However, map click events don't fire in free cam for some reason... + // (Why is so much stuff tied into the current camera unit BI?!) if (isNull GVAR(camAgent)) then { GVAR(camAgent) = createAgent ["VirtualMan_F",markerPos QGVAR(respawn),[],0,""]; }; From 87b9b5019c753fd35ce5afa364a4558f55d9d5cc Mon Sep 17 00:00:00 2001 From: jokoho48 Date: Thu, 6 Aug 2015 13:35:55 +0200 Subject: [PATCH 041/371] AB Performance Optimization (Part 8) --- .../functions/fnc_handleFired.sqf | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index a6e4611e2f..d93b6a4eac 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -23,7 +23,7 @@ if (!hasInterface) exitWith {}; if (!GVAR(enabled)) exitWith {}; -// parameterization +// Parameterization private ["_abort", "_AmmoCacheEntry", "_WeaponCacheEntry", "_opticsName", "_opticType", "_bulletTraceVisible", "_temperature", "_barometricPressure", "_bulletMass", "_bulletLength", "_muzzleVelocity", "_muzzleVelocityShift", "_bulletVelocity", "_bulletSpeed", "_bulletLength", "_barrelTwist", "_stabilityFactor"]; params ["_unit", "_weapon", "", "_mode", "_ammo", "_magazine", "_bullet"]; @@ -74,30 +74,26 @@ _bulletVelocity = velocity _bullet; _muzzleVelocity = vectorMagnitude _bulletVelocity; if (GVAR(barrelLengthInfluenceEnabled)) then { - _muzzleVelocityShift = uiNamespace getVariable [format [QGVAR(%1_muzzleVelocityShift),_weapon],nil]; - if (isNil "_muzzleVelocityShift") then { - _muzzleVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _muzzleVelocity] call FUNC(calculateBarrelLengthVelocityShift); + _barrelVelocityShift = uiNamespace getVariable [format [QGVAR(%1_muzzleVelocityShift),_weapon],nil]; + if (isNil "_barrelVelocityShift") then { + _barrelVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _muzzleVelocity] call FUNC(calculateBarrelLengthVelocityShift); uiNamespace setVariable [format [QGVAR(%1_muzzleVelocityShift),_weapon],_muzzleVelocityShift]; }; - if (_muzzleVelocityShift != 0) then { - _muzzleVelocity = _muzzleVelocity + _muzzleVelocityShift; - }; }; if (GVAR(ammoTemperatureEnabled)) then { _temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight); - _muzzleVelocityShift = [_ammoTempMuzzleVelocityShifts, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift); - if (_muzzleVelocityShift != 0) then { - _muzzleVelocity = _muzzleVelocity + _muzzleVelocityShift; - }; + _temperatureVelocityShift = ([_ammoTempMuzzleVelocityShifts, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift)); }; if (GVAR(ammoTemperatureEnabled) || GVAR(barrelLengthInfluenceEnabled)) then { if (_muzzleVelocityShift != 0) then { + _muzzleVelocity = _muzzleVelocity + (_barrelVelocityShift + _ammoTemperatureVelocityShift); _bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift)); _bullet setVelocity _bulletVelocity; }; }; + _bulletTraceVisible = false; if (GVAR(bulletTraceEnabled) && cameraView == "GUNNER") then { if (currentWeapon ACE_player in ["ACE_Vector", "Binocular", "Rangefinder", "Laserdesignator"]) then { From bcb21b782e1ed9d52ca5c7ac61b30d09e90ef795 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Thu, 6 Aug 2015 13:42:31 +0100 Subject: [PATCH 042/371] Overhaul spectator icon handling and rendering - Optimize and improve 3D icon drawing - Combine 2D and 3D PFHs into 1 - Render group icons outside of 200m, unit icons within - Store list of groups on units update to cut down on what needs to be done each frame - Change map control type to 100 to remove all default unit icons - Improve colour caching, group colours don't change, unit colours do - Remove icon setting, toggling should be at users discretion --- addons/spectator/ACE_Settings.hpp | 4 -- addons/spectator/UI/interface.hpp | 3 +- addons/spectator/XEH_preInit.sqf | 2 + .../spectator/functions/fnc_cacheUnitInfo.sqf | 11 +++- .../spectator/functions/fnc_handleIcons.sqf | 57 ++++++++----------- .../functions/fnc_handleInterface.sqf | 32 ++--------- addons/spectator/functions/fnc_handleMap.sqf | 46 +++++++++++++++ .../functions/fnc_transitionCamera.sqf | 6 -- .../spectator/functions/fnc_updateUnits.sqf | 7 ++- addons/spectator/stringtable.xml | 8 --- 10 files changed, 90 insertions(+), 86 deletions(-) create mode 100644 addons/spectator/functions/fnc_handleMap.sqf diff --git a/addons/spectator/ACE_Settings.hpp b/addons/spectator/ACE_Settings.hpp index 2889fd2e0f..78402cff23 100644 --- a/addons/spectator/ACE_Settings.hpp +++ b/addons/spectator/ACE_Settings.hpp @@ -19,8 +19,4 @@ class ACE_Settings { value = 0; values[] = {CSTRING(modes_all), CSTRING(visions_nv), CSTRING(visions_ti), "$STR_Special_None"}; }; - class GVAR(unitIcons) { - typeName = "BOOL"; - value = 1; - }; }; diff --git a/addons/spectator/UI/interface.hpp b/addons/spectator/UI/interface.hpp index 182263e7b4..0b4d33ea75 100644 --- a/addons/spectator/UI/interface.hpp +++ b/addons/spectator/UI/interface.hpp @@ -176,12 +176,13 @@ class GVAR(interface) { }; class mapOverlay: RscMapControl { idc = IDC_MAP; + type = 100; x = safeZoneX; y = safeZoneY; w = safeZoneW; h = safeZoneH; onMouseButtonDown = QUOTE([ARR_2('onMapClick',_this)] call FUNC(handleInterface)); - onDraw = QUOTE([ARR_2('onDraw',_this)] call FUNC(handleInterface)); + onDraw = QUOTE(_this call FUNC(handleMap)); }; class helpSplash: RscControlsGroupNoScrollbars { idc = IDC_HELP; diff --git a/addons/spectator/XEH_preInit.sqf b/addons/spectator/XEH_preInit.sqf index 95c18f4a54..2c29598ebc 100644 --- a/addons/spectator/XEH_preInit.sqf +++ b/addons/spectator/XEH_preInit.sqf @@ -8,6 +8,7 @@ PREP(handleCamera); PREP(handleCompass); PREP(handleIcons); PREP(handleInterface); +PREP(handleMap); PREP(handleMouse); PREP(handleToolbar); PREP(handleUnits); @@ -51,5 +52,6 @@ GVAR(showUnit) = true; GVAR(unitList) = []; GVAR(unitBlacklist) = []; GVAR(unitWhitelist) = []; +GVAR(groupList) = []; ADDON = true; diff --git a/addons/spectator/functions/fnc_cacheUnitInfo.sqf b/addons/spectator/functions/fnc_cacheUnitInfo.sqf index 13977bf398..9f40651748 100644 --- a/addons/spectator/functions/fnc_cacheUnitInfo.sqf +++ b/addons/spectator/functions/fnc_cacheUnitInfo.sqf @@ -19,15 +19,20 @@ params ["_unit"]; private ["_color","_icon","_name"]; -_color = [side group _unit] call BIS_fnc_sideColor; +// Group info only needs to be cached once (groups can't change) +if (isNil { GETVAR((group _unit),GVAR(gColor),nil) }) then { + _color = [side group _unit] call BIS_fnc_sideColor; + SETVAR((group _unit),GVAR(gColor),_color); +}; + +// Unit info should be updated each time _icon = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "Icon"); _name = [_unit,false] call EFUNC(common,getName); // Handle CfgVehicleIcons -if isText (configFile >> "CfgVehicleIcons" >> _icon) then { +if (isText (configFile >> "CfgVehicleIcons" >> _icon)) then { _icon = getText (configFile >> "CfgVehicleIcons" >> _icon); }; -SETVAR(_unit,GVAR(uColor),_color); SETVAR(_unit,GVAR(uIcon),_icon); SETVAR(_unit,GVAR(uName),_name); diff --git a/addons/spectator/functions/fnc_handleIcons.sqf b/addons/spectator/functions/fnc_handleIcons.sqf index c52943ad10..72c0d7dee6 100644 --- a/addons/spectator/functions/fnc_handleIcons.sqf +++ b/addons/spectator/functions/fnc_handleIcons.sqf @@ -1,5 +1,5 @@ /* - * Author: SilentSpike + * Author: Head, SilentSpike * Handles rendering the spectator 3D unit icons * * Arguments: @@ -17,41 +17,30 @@ #include "script_component.hpp" -// Kill PFH when not in free cam (or display is closed) -if (isNil QGVAR(iconHandler)) exitWith { [_this select 1] call CBA_fnc_removePerFrameHandler; }; - if !(GVAR(showIcons)) exitWith {}; +private ["_refPoint","_drawVehicles","_leader","_color","_txt","_unit"]; -private ["_cachedVehicles","_unit","_cameraPos","_cameraDir","_lambda","_uPos","_cmd","_txt"]; -_cachedVehicles = []; +// Draw groups unless leader is within distance +_refPoint = [GVAR(camera),GVAR(camUnit)] select (GVAR(camMode) > 0); +_drawVehicles = []; { - _unit = vehicle _x; + _leader = leader _x; + if ((_leader distanceSqr _refPoint) > 40000) then { + _color = GETVAR(_x,GVAR(gColor),[ARR_4(0,0,0,0)]); + _txt = groupID _x; - // Only try each vehicle once - if !(_unit in _cachedVehicles) then { - _cachedVehicles pushBack _unit; - - // Within 200m - if ((GVAR(camera) distanceSqr _unit) < 40000) then { - _cameraPos = (positionCameraToWorld [0, 0, 0]) call EFUNC(common,positionToASL); - _cameraDir = ((positionCameraToWorld [0, 0, 1]) call EFUNC(common,positionToASL)) vectorDiff _cameraPos; - - // Quick oclussion test (taken from interact_menu) - _lambda = ((getPosASL _x) vectorDiff _cameraPos) vectorDotProduct _cameraDir; - if (_lambda > -1) then { - _uPos = worldToScreen (visiblePosition _unit); - - // Only draw if onscreen - if ((_uPos select 0 > safeZoneXAbs) && (_uPos select 0 < safeZoneXAbs + safeZoneWAbs)) then { - if ((_uPos select 1 > safeZoneY) && (_uPos select 1 < safeZoneY + safeZoneH)) then { - // Use commander's info if available - _cmd = [_x, effectiveCommander _unit] select ((effectiveCommander _unit) in GVAR(unitList)); - _txt = ["", GETVAR(_cmd,GVAR(uName),"")] select (isPlayer _cmd); - - drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", GETVAR(_cmd,GVAR(uColor),[ARR_4(0,0,0,0)]), _unit modelToWorldVisual [0,0,3], 0.7, 0.7, 0, _txt, 1, 0.02]; - }; - }; - }; - }; + drawIcon3D ["\A3\ui_f\data\map\markers\nato\b_inf.paa", _color, _leader modelToWorldVisual [0,0,30], 1, 1, 0, _txt, 2, 0.02]; + } else { + _drawVehicles append (units _x); }; -} forEach GVAR(unitList); + false +} count GVAR(groupList); + +// Draw units for groups within distance +{ + _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]; + false +} count (_drawVehicles arrayIntersect GVAR(unitList)); diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index 502ce65fd4..d58566968c 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -114,6 +114,9 @@ switch (toLower _mode) do { // Keep unit list and tree up to date [FUNC(handleUnits), 21, _display] call CBA_fnc_addPerFrameHandler; + // Handle unit icons on map and 3D + GVAR(iconHandler) = addMissionEventHandler ["Draw3D",FUNC(handleIcons)]; + // Populate the help splash private "_help"; _help = (_display displayCtrl IDC_HELP) controlsGroupCtrl IDC_HELP_LIST; @@ -187,6 +190,7 @@ switch (toLower _mode) do { // Kill GUI PFHs GVAR(camHandler) = nil; GVAR(compHandler) = nil; + removeMissionEventHandler ["Draw3D",GVAR(iconHandler)]; GVAR(iconHandler) = nil; GVAR(toolHandler) = nil; }; @@ -435,34 +439,6 @@ switch (toLower _mode) do { [nil,nil,nil, _newPos] call FUNC(setCameraAttributes); }; }; - case "ondraw": { - _args params ["_map"]; - - if (GVAR(camMode) == 0) then { - _map drawIcon ["\A3\UI_F\Data\GUI\Rsc\RscDisplayMissionEditor\iconcamera_ca.paa",[0,0,0,1],GVAR(camera),24,24,GVAR(camPan)]; - }; - - if !(GVAR(showIcons)) exitWith {}; - - private ["_cachedVehicles","_unit","_color","_icon"]; - _cachedVehicles = []; - { - _unit = vehicle _x; - - if !(_unit in _cachedVehicles) then { - _cachedVehicles pushBack _unit; - - // Use previously cached info where possible - if (isNil { GETVAR(_unit,GVAR(uIcon),nil) }) then { - [_unit] call FUNC(cacheUnitInfo); - }; - - _color = GETVAR(_unit,GVAR(uColor),[ARR_4(0,0,0,0)]); - _icon = GETVAR(_unit,GVAR(uIcon),""); - _map drawIcon [_icon, _color, _unit, 24, 24, getDir _unit]; - }; - } forEach GVAR(unitList); - }; // Break from interface for eexternal events case "escape": { _args params ["_display"]; diff --git a/addons/spectator/functions/fnc_handleMap.sqf b/addons/spectator/functions/fnc_handleMap.sqf new file mode 100644 index 0000000000..a0000718bd --- /dev/null +++ b/addons/spectator/functions/fnc_handleMap.sqf @@ -0,0 +1,46 @@ +/* + * Author: Head, SilentSpike + * Handles rendering the spectator map icons + * + * Arguments: + * 0: Parameters + * 1: PFH handle + * + * Return Value: + * None + * + * Example: + * [ace_spectator_fnc_handleIcons, 0] call CBA_fnc_addPerFrameHandler; + * + * Public: No + */ + +#include "script_component.hpp" + +params ["_map"]; +private ["_cachedVehicles","_unit","_color","_icon"]; + +if (GVAR(camMode) == 0) then { + _map drawIcon ["\A3\UI_F\Data\GUI\Rsc\RscDisplayMissionEditor\iconcamera_ca.paa",[0,0,0,1],GVAR(camera),20,20,GVAR(camPan)]; +}; + +_cachedVehicles = []; +{ + _unit = vehicle _x; + + if !(_unit in _cachedVehicles) then { + _cachedVehicles pushBack _unit; + + // Use previously cached info where possible + if (GETVAR(_unit,GVAR(uIcon),"") == "") then { + [_unit] call FUNC(cacheUnitInfo); + }; + + // Function has caching built in + _color = [side effectiveCommander _unit] call BIS_fnc_sideColor; + _icon = GETVAR(_unit,GVAR(uIcon),""); + + _map drawIcon [_icon, _color, _unit, 19, 19, getDir _unit]; + }; + false +} count GVAR(unitList); diff --git a/addons/spectator/functions/fnc_transitionCamera.sqf b/addons/spectator/functions/fnc_transitionCamera.sqf index 90a2dc776b..b35b61b311 100644 --- a/addons/spectator/functions/fnc_transitionCamera.sqf +++ b/addons/spectator/functions/fnc_transitionCamera.sqf @@ -79,11 +79,6 @@ if (_newMode == 0) then { // Free // Handle camera movement if (isNil QGVAR(camHandler)) then { GVAR(camHandler) = [FUNC(handleCamera), 0] call CBA_fnc_addPerFrameHandler; }; - - // Handle unit icons - if (GVAR(unitIcons)) then { - if (isNil QGVAR(iconHandler)) then { GVAR(iconHandler) = [FUNC(handleIcons), 0] call CBA_fnc_addPerFrameHandler; }; - }; } else { // When null unit is given choose random if (isNull _newUnit) then { @@ -111,7 +106,6 @@ if (_newMode == 0) then { // Free // Terminate camera view GVAR(camera) cameraEffect ["terminate", "back"]; GVAR(camHandler) = nil; - GVAR(iconHandler) = nil; cameraEffectEnableHUD true; }; diff --git a/addons/spectator/functions/fnc_updateUnits.sqf b/addons/spectator/functions/fnc_updateUnits.sqf index 75f1402179..50494cf499 100644 --- a/addons/spectator/functions/fnc_updateUnits.sqf +++ b/addons/spectator/functions/fnc_updateUnits.sqf @@ -33,7 +33,7 @@ if !(_newUnits isEqualTo []) exitWith { }; }; -private ["_sides","_cond","_filteredUnits","_color","_icon"]; +private ["_sides","_cond","_filteredUnits","_filteredGroups"]; // Unit setting filter _newUnits = [[],allPlayers,playableUnits,allUnits] select GVAR(filterUnits); @@ -63,10 +63,13 @@ _filteredUnits = []; _filteredUnits append GVAR(unitWhitelist); // Cache icons and colour for drawing +_filteredGroups = []; { // Intentionally re-applied to units in case their status changes [_x] call FUNC(cacheUnitInfo); + _filteredGroups pushBack (group _x); } forEach _filteredUnits; -// Replace previous list entirely (removes any no longer valid) +// Replace previous lists entirely (removes any no longer valid) GVAR(unitList) = _filteredUnits arrayIntersect _filteredUnits; +GVAR(groupList) = _filteredGroups arrayIntersect _filteredGroups; diff --git a/addons/spectator/stringtable.xml b/addons/spectator/stringtable.xml index 5219ba7e2d..4d615d4e1e 100644 --- a/addons/spectator/stringtable.xml +++ b/addons/spectator/stringtable.xml @@ -100,14 +100,6 @@ Thermal imaging Termowizja - - Unit icons - Ikony jednostek - - - Render icons above spectatable units. - Renderuj ikony nad głowami jednostek, które można obserwować. - Spectator Controls From 4c9b6e94cfa915a70b3911d18acda892c7ff8c66 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Fri, 7 Aug 2015 00:05:21 +0100 Subject: [PATCH 043/371] Overhaul and improve spectator unit tree UX The old method of refreshing the tree on each update would reset all expanded/collapsed nodes. Now the code will cull any units/groups/sides no longer spectatable from the list and cache the ones that are still valid. The cached data is then used to populate the list with new units. Add coloured unit icons beside units in the list for quick user reference of side and type. Store group netIDs in respective nodes for possible use in code. --- addons/spectator/UI/interface.hpp | 4 +- .../functions/fnc_handleInterface.sqf | 85 ++++++++++++------- 2 files changed, 55 insertions(+), 34 deletions(-) diff --git a/addons/spectator/UI/interface.hpp b/addons/spectator/UI/interface.hpp index 0b4d33ea75..ea5f5f0e53 100644 --- a/addons/spectator/UI/interface.hpp +++ b/addons/spectator/UI/interface.hpp @@ -158,9 +158,9 @@ class GVAR(interface) { class unitTree: RscTree { idc = IDC_UNIT; x = safeZoneX; - y = safeZoneY + TOOL_H * 2; + y = safeZoneY + TOOL_H * 6; w = TOOL_W * 2; - h = safeZoneH - TOOL_H * 6; + h = safeZoneH - TOOL_H * 13; sizeEx = H_PART(0.8); borderSize = 1; colorBorder[] = {COL_FORE}; diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index d58566968c..9687ba8b2a 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -367,17 +367,43 @@ switch (toLower _mode) do { }; case "onunitsupdate": { _args params ["_tree"]; - private ["_curSelData","_cachedGrps","_cachedSides","_grp","_side","_sNode","_gNode","_uNode"]; + private ["_cachedUnits","_cachedGrps","_cachedSides","_s","_g","_grp","_u","_unit","_side"]; - // Cache current selection - _curSelData = _tree tvData (tvCurSel _tree); - - // Clear the tree - tvClear _tree; - - // Update the tree from the unit list + // Cache existing group and side nodes and cull removed data + _cachedUnits = []; _cachedGrps = []; _cachedSides = []; + for "_s" from 0 to ((_tree tvCount []) - 1) do { + for "_g" from 0 to ((_tree tvCount [_s]) - 1) do { + _grp = groupFromNetID (_tree tvData [_s,_g]); + + if (_grp in GVAR(groupList)) then { + _cachedGrps pushBack _grp; + _cachedGrps pushBack _g; + + for "_u" from 0 to ((_tree tvCount [_s,_g])) do { + _unit = objectFromNetId (_tree tvData [_s,_g,_u]); + + if (_unit in GVAR(unitList)) then { + _cachedUnits pushBack _unit; + } else { + _tree tvDelete [_s,_g,_u]; + }; + }; + } else { + _tree tvDelete [_s,_g]; + }; + }; + + if ((_tree tvCount [_s]) > 0) then { + _cachedSides pushBack (_tree tvText [_s]); + _cachedSides pushBack _s; + } else { + _tree tvDelete [_s]; + }; + }; + + // Update the tree from the unit list { _grp = group _x; _side = [side _grp] call BIS_fnc_sideName; @@ -385,47 +411,42 @@ switch (toLower _mode) do { // Use correct side node if !(_side in _cachedSides) then { // Add side node - _sNode = _tree tvAdd [[], _side]; + _s = _tree tvAdd [[], _side]; + _tree tvExpand [_s]; _cachedSides pushBack _side; - _cachedSides pushBack _sNode; + _cachedSides pushBack _s; } else { // If side already processed, use existing node - _sNode = _cachedSides select ((_cachedSides find _side) + 1); + _s = _cachedSides select ((_cachedSides find _side) + 1); }; // Use correct group node if !(_grp in _cachedGrps) then { // Add group node - _gNode = _tree tvAdd [[_sNode], groupID _grp]; + _g = _tree tvAdd [[_s], groupID _grp]; + _tree tvSetData [[_s,_g], netID _grp]; _cachedGrps pushBack _grp; - _cachedGrps pushBack _gNode; + _cachedGrps pushBack _g; } else { // If group already processed, use existing node - _gNode = _cachedGrps select ((_cachedGrps find _grp) + 1); + _g = _cachedGrps select ((_cachedGrps find _grp) + 1); }; - _uNode = _tree tvAdd [[_sNode,_gNode], GETVAR(_x,GVAR(uName),"")]; - _tree tvSetData [[_sNode,_gNode,_uNode], netID _x]; + _u = _tree tvAdd [[_s,_g], GETVAR(_x,GVAR(uName),"")]; + _tree tvSetData [[_s,_g,_u], netID _x]; + _tree tvSetPicture [[_s,_g,_u], GETVAR(_x,GVAR(uIcon),"")]; + _tree tvSetPictureColor [[_s,_g,_u], GETVAR(_grp,GVAR(gColor),[ARR_4(1,1,1,1)])]; - // Preserve the previous selection - if (_curSelData == (_tree tvData [_sNode,_gNode,_uNode])) then { - _tree tvSetCurSel [_sNode,_gNode,_uNode]; - }; - - _tree tvSort [[_sNode,_gNode],false]; - _tree tvExpand [_sNode,_gNode]; - } forEach GVAR(unitList); - - { - if (typeName _x == "SCALAR") then { - _tree tvSort [[_x],false]; - _tree tvExpand [_x]; - }; - } forEach _cachedSides; + _tree tvSort [[_s,_g],false]; + } forEach (GVAR(unitList) - _cachedUnits); _tree tvSort [[],false]; + + if ((_tree tvCount []) <= 0) then { + _tree tvAdd [[], localize LSTRING(units_none)]; + }; }; // Map events case "onmapclick": { @@ -439,7 +460,7 @@ switch (toLower _mode) do { [nil,nil,nil, _newPos] call FUNC(setCameraAttributes); }; }; - // Break from interface for eexternal events + // Break from interface for external events case "escape": { _args params ["_display"]; private "_dlg"; From f59536b5a3c26c1bee28f77ae01c8d739c06ad19 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Fri, 7 Aug 2015 00:28:54 +0100 Subject: [PATCH 044/371] Remove legacy spectator settings module argument --- addons/spectator/CfgVehicles.hpp | 6 ------ addons/spectator/functions/fnc_moduleSpectatorSettings.sqf | 1 - 2 files changed, 7 deletions(-) diff --git a/addons/spectator/CfgVehicles.hpp b/addons/spectator/CfgVehicles.hpp index b63f349b0a..f6869462ac 100644 --- a/addons/spectator/CfgVehicles.hpp +++ b/addons/spectator/CfgVehicles.hpp @@ -109,12 +109,6 @@ class CfgVehicles { }; }; }; - class unitIcons { - displayName = CSTRING(icons_DisplayName); - description = CSTRING(icons_Description); - typeName = "BOOL"; - defaultValue = 1; - }; }; class ModuleDescription { description = CSTRING(Settings_Description); diff --git a/addons/spectator/functions/fnc_moduleSpectatorSettings.sqf b/addons/spectator/functions/fnc_moduleSpectatorSettings.sqf index c23fb7ad20..52b6e5d8fa 100644 --- a/addons/spectator/functions/fnc_moduleSpectatorSettings.sqf +++ b/addons/spectator/functions/fnc_moduleSpectatorSettings.sqf @@ -23,4 +23,3 @@ if !(_activated) exitWith {}; [_logic, QGVAR(filterSides), "sidesFilter"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(restrictModes), "cameraModes"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(restrictVisions), "visionModes"] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(unitIcons), "unitIcons"] call EFUNC(common,readSettingFromModule); From 043c5c47c5765c64d32e8df23d408db87a8df75b Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Fri, 7 Aug 2015 01:44:32 +0100 Subject: [PATCH 045/371] Improve spectator help window layout Having the help window in the centre of the screen blocked too much of the users view and also clashed with the MPTable element (the table that appears on death, aka "respawnDialog"). It was moved to the right of the screen and now mirrors the unit list. To save screen space, the action keys are given as tooltips for the listbox entries so users must mouse over for more info. --- addons/spectator/UI/interface.hpp | 53 +++++++++++-------- .../functions/fnc_handleInterface.sqf | 39 +++++++------- 2 files changed, 50 insertions(+), 42 deletions(-) diff --git a/addons/spectator/UI/interface.hpp b/addons/spectator/UI/interface.hpp index ea5f5f0e53..5dbea22273 100644 --- a/addons/spectator/UI/interface.hpp +++ b/addons/spectator/UI/interface.hpp @@ -10,7 +10,7 @@ class RscFrame { class RscButtonMenu; class RscControlsGroupNoScrollbars; //class RscFrame; -class RscListNBox; +class RscListBox; class RscMapControl; class RscPicture; class RscText; @@ -163,12 +163,13 @@ class GVAR(interface) { h = safeZoneH - TOOL_H * 13; sizeEx = H_PART(0.8); borderSize = 1; + colorText[] = {COL_FORE}; colorBorder[] = {COL_FORE}; colorBackground[] = {COL_BACK}; colorSelect[] = { - "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.77])", - "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.51])", - "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.08])", + QUOTE(GETPRVAR(GUI_BCG_RGB_R,0.77)), + QUOTE(GETPRVAR(GUI_BCG_RGB_G,0.51)), + QUOTE(GETPRVAR(GUI_BCG_RGB_B,0.08)), 1 }; multiselectEnabled = 0; @@ -184,35 +185,43 @@ class GVAR(interface) { onMouseButtonDown = QUOTE([ARR_2('onMapClick',_this)] call FUNC(handleInterface)); onDraw = QUOTE(_this call FUNC(handleMap)); }; - class helpSplash: RscControlsGroupNoScrollbars { + class helpWindow: RscControlsGroupNoScrollbars { idc = IDC_HELP; - x = 0.5 - W_PART(12); - y = 0.5 - H_PART(12); - w = W_PART(24); - h = H_PART(24); + x = safeZoneX + safeZoneW - TOOL_W * 2; + y = safeZoneY + TOOL_H * 6; + w = TOOL_W * 2; + h = safeZoneH - TOOL_H * 13; + colorText[] = {COL_FORE}; + colorSelectBackground[] = {COL_FORE_D}; + colorSelectBackground2[] = {COL_BACK}; + colorBackground[] = {0,0,0,0}; class controls { - class helpBack: RscText { + class helpTitle: RscText { x = 0; y = 0; - w = W_PART(24); - h = H_PART(24); - colorBackground[] = {COL_BACK}; - }; - class helpTitle: helpBack { + w = TOOL_W * 2; h = H_PART(1); - colorText[]={COL_FORE}; + colorText[] = {COL_FORE}; colorBackground[] = {COL_FORE_D}; sizeEx = H_PART(1); text = CSTRING(HelpTitle); }; - class helpContent: RscListNBox { + class helpContent: RscListBox { idc = IDC_HELP_LIST; - x = W_PART(1); - y = H_PART(2); - W = W_PART(22); - H = H_PART(21); + x = 0; + y = H_PART(1); + w = TOOL_W * 2; + h = safeZoneH - TOOL_H * 14; + colorBackground[] = {COL_BACK}; default = 1; - columns[] = {0.01,0.5}; + }; + class helpFrame: RscText { + x = 0; + y = 0; + w = TOOL_W * 2; + h = safeZoneH - TOOL_H * 13; + colorText[] = {COL_FORE}; + style = 64; }; }; }; diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index 9687ba8b2a..ef3363b72c 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -117,27 +117,27 @@ switch (toLower _mode) do { // Handle unit icons on map and 3D GVAR(iconHandler) = addMissionEventHandler ["Draw3D",FUNC(handleIcons)]; - // Populate the help splash + // Populate the help window private "_help"; _help = (_display displayCtrl IDC_HELP) controlsGroupCtrl IDC_HELP_LIST; { - // Add space before category titles - if (count _x == 1) then { - _help lnbAddRow [""]; + _i = _help lbAdd (_x select 0); + if ((_x select 1) == "") then { + _help lbSetPicture [_i,"\A3\ui_f\data\map\markers\military\dot_CA.paa"]; + _help lbSetPictureColor [_i,[COL_FORE]]; + } else { + _help lbSetTooltip [_i,_x select 1]; }; - - _help lnbAddRow _x; } forEach [ [localize LSTRING(uiControls),""], - [localize LSTRING(uiToggleHelp),"H"], - [localize LSTRING(uiToggleMap),"M"], [localize LSTRING(uiToggleUnits),"1"], - [localize LSTRING(uiToggleTools),"2"], - [localize LSTRING(uiToggleCompass),"3"], - [localize LSTRING(uiToggleIcons),"4"], + [localize LSTRING(uiToggleHelp),"2"], + [localize LSTRING(uiToggleTools),"3"], + [localize LSTRING(uiToggleCompass),"4"], + [localize LSTRING(uiToggleIcons),"5"], + [localize LSTRING(uiToggleMap),"M"], [localize LSTRING(uiToggleInterface),"Backspace"], - - [localize LSTRING(freeCamControls)], + [localize LSTRING(freeCamControls),""], [localize LSTRING(freeCamForward),"W"], [localize LSTRING(freeCamBackward),"S"], [localize LSTRING(freeCamLeft),"A"], @@ -150,8 +150,7 @@ switch (toLower _mode) do { [localize LSTRING(freeCamZoom),"Ctrl + Scrollwheel"], [localize LSTRING(freeCamNextVis),"N"], [localize LSTRING(freeCamPrevVis),"Ctrl + N"], - - [localize LSTRING(otherControls)], + [localize LSTRING(otherControls),""], [localize LSTRING(nextCam),"Up Arrow"], [localize LSTRING(prevCam),"Down Arrow"], [localize LSTRING(nextUnit),"Right Arrow"], @@ -250,12 +249,15 @@ switch (toLower _mode) do { [_display,nil,nil,nil,nil,nil,true] call FUNC(toggleInterface); }; case 3: { // 2 - [_display,nil,nil,nil,nil,true] call FUNC(toggleInterface); + [_display,nil,true] call FUNC(toggleInterface); }; case 4: { // 3 - [_display,true] call FUNC(toggleInterface); + [_display,nil,nil,nil,nil,true] call FUNC(toggleInterface); }; case 5: { // 4 + [_display,true] call FUNC(toggleInterface); + }; + case 6: { // 5 GVAR(showIcons) = !GVAR(showIcons); }; case 14: { // Backspace @@ -279,9 +281,6 @@ switch (toLower _mode) do { case 32: { // D GVAR(camDolly) set [0, GVAR(camSpeed)]; }; - case 35: { // H - [_display,nil,true] call FUNC(toggleInterface); - }; case 44: { // Z GVAR(camBoom) = -0.5 * GVAR(camSpeed); }; From 485f9438bb1e2aa56e908156b0a7fd5f883a69d5 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Fri, 7 Aug 2015 01:51:46 +0100 Subject: [PATCH 046/371] Change spectator UI toggle to include help window With new layout of help window the toggle UX also changes. User expects help window to toggle as part of overall UI. --- .../spectator/functions/fnc_toggleInterface.sqf | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/addons/spectator/functions/fnc_toggleInterface.sqf b/addons/spectator/functions/fnc_toggleInterface.sqf index 609c7cd757..4a03de4271 100644 --- a/addons/spectator/functions/fnc_toggleInterface.sqf +++ b/addons/spectator/functions/fnc_toggleInterface.sqf @@ -31,17 +31,8 @@ _map = _display displayCtrl IDC_MAP; _tool = _display displayCtrl IDC_TOOL; _unit = _display displayCtrl IDC_UNIT; -// Map and help operate outside of interface -GVAR(showHelp) = [GVAR(showHelp), !GVAR(showHelp)] select _toggleHelp; +// Map operates outside of interface GVAR(showMap) = [GVAR(showMap), !GVAR(showMap)] select _toggleMap; - -// When help changes with map open, minimise the map -if (GVAR(showMap) && _toggleHelp) then { - GVAR(showHelp) = true; - GVAR(showMap) = false; -}; - -_help ctrlShow GVAR(showHelp); _map ctrlShow GVAR(showMap); if (GVAR(showMap)) then { @@ -62,16 +53,18 @@ if (GVAR(showMap)) then { if (GVAR(showInterface)) then { // Can only toggle interface elements with interface shown GVAR(showComp) = [GVAR(showComp), !GVAR(showComp)] select _toggleComp; + GVAR(showHelp) = [GVAR(showHelp), !GVAR(showHelp)] select _toggleHelp; GVAR(showTool) = [GVAR(showTool), !GVAR(showTool)] select _toggleTool; GVAR(showUnit) = [GVAR(showUnit), !GVAR(showUnit)] select _toggleUnit; _comp ctrlShow GVAR(showComp); + _help ctrlShow GVAR(showHelp); _tool ctrlShow GVAR(showTool); _unit ctrlShow GVAR(showUnit); } else { { _x ctrlShow false; - } forEach [_comp,_tool,_unit]; + } forEach [_comp,_help,_tool,_unit]; }; }; From a330e7b0c52d88e221911ce943a5a5a9471664cb Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Fri, 7 Aug 2015 09:18:42 +0200 Subject: [PATCH 047/371] Code cleanup of Switchunits module --- .../functions/fnc_addMapFunction.sqf | 7 ++-- .../functions/fnc_handleMapClick.sqf | 18 +++++----- .../switchunits/functions/fnc_initPlayer.sqf | 7 ++-- .../switchunits/functions/fnc_isValidAi.sqf | 15 ++++----- .../switchunits/functions/fnc_markAiOnMap.sqf | 27 +++++++-------- addons/switchunits/functions/fnc_module.sqf | 3 +- .../functions/fnc_nearestPlayers.sqf | 7 ++-- .../functions/fnc_startSwitchUnits.sqf | 4 +-- .../switchunits/functions/fnc_switchBack.sqf | 15 ++++----- .../switchunits/functions/fnc_switchUnit.sqf | 33 +++++-------------- 10 files changed, 54 insertions(+), 82 deletions(-) diff --git a/addons/switchunits/functions/fnc_addMapFunction.sqf b/addons/switchunits/functions/fnc_addMapFunction.sqf index 7204e73d36..3a7b20601c 100644 --- a/addons/switchunits/functions/fnc_addMapFunction.sqf +++ b/addons/switchunits/functions/fnc_addMapFunction.sqf @@ -10,19 +10,18 @@ * None * * Example: - * [_unit, _sides] call FUNC(addMapFunction) + * [_unit, _sides] call ace_switchunits_fnc_addMapFunction * * Public: No */ - #include "script_component.hpp" -PARAMS_2(_unit,_sides); +params ["_unit", "_sides"]; ["theMapClick", "onMapSingleClick", { // IGNORE_PRIVATE_WARNING(_pos,_shift,_alt) if (alive ACE_player && {GVAR(OriginalUnit) getVariable ["ACE_CanSwitchUnits", false]}) then { [_this, _pos, _shift, _alt] call FUNC(handleMapClick); }; - + }, [_unit, _sides]] call BIS_fnc_addStackedEventHandler; diff --git a/addons/switchunits/functions/fnc_handleMapClick.sqf b/addons/switchunits/functions/fnc_handleMapClick.sqf index e8efa2640f..03a94f81af 100644 --- a/addons/switchunits/functions/fnc_handleMapClick.sqf +++ b/addons/switchunits/functions/fnc_handleMapClick.sqf @@ -3,24 +3,25 @@ * Switches to a unit close to a clicked map position * * Arguments: - * 0: unit - * 1: sides > + * 0: Faction + * 0: unit + * 1: sides + * 1: Map Position * * Return Value: * None * * Example: - * [unit, _sides] call FUNC(handleMapClick) + * [[unit, _sides], [20, 30]] call ace_switchunits_fnc_handleMapClick * * Public: No */ - #include "script_component.hpp" -private ["_sides", "_pos", "_sideNearest"]; +private ["_sideNearest"]; -_sides = (_this select 0) select 1; -_pos = _this select 1; +params ["_faction", "_pos"]; +_faction params ["", "_sides"]; _sideNearest = []; @@ -28,7 +29,8 @@ _sideNearest = []; if ([_x] call FUNC(isValidAi) && (side group _x in _sides)) then { _sideNearest pushBack _x; }; -} forEach (nearestObjects [_pos, ["Man"], 15]); + nil +} count (nearestObjects [_pos, ["Man"], 15]); if (count _sideNearest > 0) then { [_sideNearest select 0] call FUNC(switchUnit); diff --git a/addons/switchunits/functions/fnc_initPlayer.sqf b/addons/switchunits/functions/fnc_initPlayer.sqf index 67669c071c..80388a9d2b 100644 --- a/addons/switchunits/functions/fnc_initPlayer.sqf +++ b/addons/switchunits/functions/fnc_initPlayer.sqf @@ -10,24 +10,21 @@ * None * * Example: - * [player, [west]] call FUNC(initPlayer) + * [player, [west]] call ace_switchunits_fnc_initPlayer * * Public: No */ - #include "script_component.hpp" -PARAMS_2(_playerUnit,_sides); +params ["_playerUnit", "_sides"]; if (vehicle _playerUnit == _playerUnit) then { - [_sides] call FUNC(markAiOnMap); _playerUnit setVariable [QGVAR(IsPlayerUnit), true]; _playerUnit allowDamage false; GVAR(OriginalUnit) = _playerUnit; - //GVAR(OriginalName) = [_playerUnit] call EFUNC(common,getName); GVAR(OriginalName) = name _playerUnit; GVAR(OriginalGroup) = group _playerUnit; diff --git a/addons/switchunits/functions/fnc_isValidAi.sqf b/addons/switchunits/functions/fnc_isValidAi.sqf index 61c2401da9..0b6a35c257 100644 --- a/addons/switchunits/functions/fnc_isValidAi.sqf +++ b/addons/switchunits/functions/fnc_isValidAi.sqf @@ -6,22 +6,19 @@ * 0: unit * * Return Value: - * Boolean + * Valid AI * * Example: - * [_unit] call FUNC(isValidAi) + * [_unit] call ace_switchunits_fnc_isValidAi * * Public: Yes */ - #include "script_component.hpp" -private "_unit"; - -_unit = _this select 0; +params ["_unit"]; !([_unit] call EFUNC(common,isPlayer) || {_unit in playableUnits} -|| {vehicle _unit != _unit} -|| {_unit getVariable [QGVAR(IsPlayerUnit), false]} -|| {_unit getVariable [QGVAR(IsPlayerControlled), false]}) +|| {vehicle _unit != _unit} +|| {_unit getVariable [QGVAR(IsPlayerUnit), false]} +|| {_unit getVariable [QGVAR(IsPlayerControlled), false]}) // return diff --git a/addons/switchunits/functions/fnc_markAiOnMap.sqf b/addons/switchunits/functions/fnc_markAiOnMap.sqf index 620b805cb9..011768845a 100644 --- a/addons/switchunits/functions/fnc_markAiOnMap.sqf +++ b/addons/switchunits/functions/fnc_markAiOnMap.sqf @@ -1,7 +1,7 @@ /* * Author: bux578 * Creates markers for AI units for given sides. - * Marks players in a different colour. + * Marks players in a different colour. * * Arguments: * 0: side @@ -10,28 +10,24 @@ * None * * Example: - * [[west, east]] call FUNC(markAiOnMap) + * [[west, east]] call ace_switchunits_fnc_markAiOnMap * * Public: No */ - #include "script_component.hpp" -private "_sidesToShow"; -_sidesToShow = _this select 0; +params ["_sidesToShow"]; GVAR(AllMarkerNames) = []; -DFUNC(pfhMarkAiOnMap) = { - private ["_args", "_sides"]; - _args = _this select 0; - _sides = _args select 0; - +_fnc_pfhMarkAiOnMap = { + params ["_args"]; + _args params ["_sides"]; // delete markers { - deleteMarkerLocal _x; - } forEach GVAR(AllMarkerNames); + deleteMarkerLocal _x; + } count GVAR(AllMarkerNames); // reset the array GVAR(AllMarkerNames) = []; @@ -48,7 +44,7 @@ DFUNC(pfhMarkAiOnMap) = { _marker = createMarkerLocal [_markerName, position _x]; _markerName setMarkerTypeLocal "mil_triangle"; _markerName setMarkerShapeLocal "ICON"; - _markerName setMarkerSizeLocal [0.5,0.7]; + _markerName setMarkerSizeLocal [0.5, 0.7]; _markerName setMarkerDirLocal getDir _x; // commy's one liner magic @@ -63,9 +59,10 @@ DFUNC(pfhMarkAiOnMap) = { }; GVAR(AllMarkerNames) pushBack _markerName; + nil }; - } forEach allUnits; + } count allUnits; }; }; -[FUNC(pfhMarkAiOnMap), 1.5, [_sidesToShow]] call CBA_fnc_addPerFrameHandler; +[_fnc_pfhMarkAiOnMap, 1.5, [_sidesToShow]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/switchunits/functions/fnc_module.sqf b/addons/switchunits/functions/fnc_module.sqf index 9563dea71f..ec9164a866 100644 --- a/addons/switchunits/functions/fnc_module.sqf +++ b/addons/switchunits/functions/fnc_module.sqf @@ -15,12 +15,11 @@ * * Public: No */ - #include "script_component.hpp" if !(isServer) exitWith {}; -EXPLODE_3_PVT(_this,_logic,_units,_activated); +params ["_logic", "_units", "_activated"]; if !(_activated) exitWith {}; diff --git a/addons/switchunits/functions/fnc_nearestPlayers.sqf b/addons/switchunits/functions/fnc_nearestPlayers.sqf index 987c4e3528..64e347d7da 100644 --- a/addons/switchunits/functions/fnc_nearestPlayers.sqf +++ b/addons/switchunits/functions/fnc_nearestPlayers.sqf @@ -10,7 +10,7 @@ * Player units > * * Example: - * [[300,300,0], 100] call FUNC(nearestPlayers) + * [[300,300,0], 100] call ace_switchunits_fnc_nearestPlayers * * Public: Yes */ @@ -18,10 +18,7 @@ private ["_nearestPlayers"]; -PARAMS_2(_position,_radius); - -_position = _this select 0; -_radius = _this select 1; +params ["_position", "_radius"]; _nearestPlayers = []; diff --git a/addons/switchunits/functions/fnc_startSwitchUnits.sqf b/addons/switchunits/functions/fnc_startSwitchUnits.sqf index 7985bfa094..481b04d2cd 100644 --- a/addons/switchunits/functions/fnc_startSwitchUnits.sqf +++ b/addons/switchunits/functions/fnc_startSwitchUnits.sqf @@ -9,14 +9,14 @@ * None * * Example: - * [_player] call FUNC(startSwitchUnits) + * [_player] call ace_switchunits_fnc_startSwitchUnits * * Public: No */ #include "script_component.hpp" -PARAMS_1(_player); +params ["_player"]; if (GVAR(EnableSwitchUnits)) then { private "_sides"; diff --git a/addons/switchunits/functions/fnc_switchBack.sqf b/addons/switchunits/functions/fnc_switchBack.sqf index c9ca731427..3ebf49a3ab 100644 --- a/addons/switchunits/functions/fnc_switchBack.sqf +++ b/addons/switchunits/functions/fnc_switchBack.sqf @@ -10,20 +10,19 @@ * None * * Example: - * [_originalPlayerUnit, _currentUnit] call FUNC(switchBack) + * [_originalPlayerUnit, _currentUnit] call ace_switchunits_fnc_switchBack * * Public: Yes */ - #include "script_component.hpp" -PARAMS_1(_originalPlayerUnit); +params ["_originalPlayerUnit"]; [_originalPlayerUnit] joinSilent GVAR(OriginalGroup); -DFUNC(pfhSwitchBack) = { - PARAMS_2(_args,_pfID); - EXPLODE_2_PVT(_args,_originalPlayerUnit,_currentUnit); +_fnc_pfhSwitchBack = { + params ["_args", "_pfhId"]; + _args params ["_originalPlayerUnit", "_currentUnit"]; if (local _originalPlayerUnit) exitWith { selectPlayer _originalPlayerUnit; @@ -33,8 +32,8 @@ DFUNC(pfhSwitchBack) = { _layer = "BIS_fnc_respawnCounter" call bis_fnc_rscLayer; _layer cuttext ["","plain"]; - [(_this select 1)] call cba_fnc_removePerFrameHandler; + [_pfhId] call cba_fnc_removePerFrameHandler; }; }; -[FUNC(pfhSwitchBack), 0.2, _this] call CBA_fnc_addPerFrameHandler; +[_fnc_pfhSwitchBack, 0.2, _this] call CBA_fnc_addPerFrameHandler; diff --git a/addons/switchunits/functions/fnc_switchUnit.sqf b/addons/switchunits/functions/fnc_switchUnit.sqf index c57012afdb..2079982fc0 100644 --- a/addons/switchunits/functions/fnc_switchUnit.sqf +++ b/addons/switchunits/functions/fnc_switchUnit.sqf @@ -3,24 +3,21 @@ * Switches to the new given player unit * * Arguments: - * 0: current unit - * 1: the unit to switch to + * 0: the unit to switch to * * Return Value: * None * * Example: - * [_unit] call FUNC(switchUnit) + * [_unit] call ace_switchunits_fnc_switchUnit * * Public: Yes */ - - #include "script_component.hpp" private ["_nearestEnemyPlayers", "_allNearestPlayers", "_oldUnit", "_leave"]; -PARAMS_1(_unit); +params ["_unit"]; // don't switch to original player units if (!([_unit] call FUNC(isValidAi))) exitWith {}; @@ -29,14 +26,12 @@ if (!([_unit] call FUNC(isValidAi))) exitWith {}; _leave = false; if (GVAR(EnableSafeZone)) then { - _allNearestPlayers = [position _unit, GVAR(SafeZoneRadius)] call FUNC(nearestPlayers); _nearestEnemyPlayers = [_allNearestPlayers, {((side GVAR(OriginalGroup)) getFriend (side _this) < 0.6) && !(_this getVariable [QGVAR(IsPlayerControlled), false])}] call EFUNC(common,filter); if (count _nearestEnemyPlayers > 0) exitWith { _leave = true; }; - }; // exitWith doesn't exit past the "if(EnableSafeZone)" block @@ -49,21 +44,12 @@ if (_leave) exitWith { //[_unit] joinSilent group player; [[_unit, player], QUOTE({(_this select 0) setVariable [ARR_3(QUOTE(QGVAR(OriginalOwner)), owner (_this select 0), true)]; (_this select 0) setOwner owner (_this select 1)}), 1] call EFUNC(common,execRemoteFnc); -_oldUnit = player; - - -DFUNC(pfhSwitchUnit) = { - - private ["_args", "_unit", "_oldUnit", "_respawnEhId", "_oldOwner"]; - _args = _this select 0; - - _unit = _args select 0; - _oldUnit = _args select 1; - - +_fnc_pfhSwitchUnit = { + private ["_respawnEhId", "_oldOwner"]; + params ["_args", "_pfhId"]; + _args params ["_unit", "_oldUnit"]; if (local _unit) exitWith { - _oldUnit setVariable [QGVAR(IsPlayerControlled), false, true]; _oldUnit setVariable [QGVAR(PlayerControlledName), "", true]; @@ -90,9 +76,8 @@ DFUNC(pfhSwitchUnit) = { [localize LSTRING(SwitchedUnit)] call EFUNC(common,displayTextStructured); - [(_this select 1)] call cba_fnc_removePerFrameHandler; - + [_pfhId] call cba_fnc_removePerFrameHandler; }; }; -[FUNC(pfhSwitchUnit), 0.2, [_unit, _oldUnit]] call CBA_fnc_addPerFrameHandler; +[_fnc_pfhSwitchUnit, 0.2, [_unit, player]] call CBA_fnc_addPerFrameHandler; From da97472600fa5f78668e6b855c2f0823133f0414 Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Fri, 7 Aug 2015 12:56:10 +0200 Subject: [PATCH 048/371] Added ace specific logging methods --- addons/main/script_macros.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index e67c45e675..78205a8d11 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -97,5 +97,9 @@ // Time functions for accuracy per frame #define ACE_tickTime (ACE_time + (diag_tickTime - ACE_diagTime)) +#define ACE_LOG(module,level,message) diag_log text format [QUOTE([ACE] (%1) %2: %3), module, level, message]; +#define ACE_LOGERROR(message) ACE_LOG(QUOTE(COMPONENT),"ERROR",message) +#define ACE_LOGWARNING(message) ACE_LOG(QUOTE(COMPONENT),"WARNING",message) +#define ACE_LOGINFO(message) ACE_LOG(QUOTE(COMPONENT),"INFO",message) -#include "script_debug.hpp" \ No newline at end of file +#include "script_debug.hpp" From f143db7fc067133e53e81897ff614297a5a25109 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Fri, 7 Aug 2015 12:07:22 +0100 Subject: [PATCH 049/371] Draw player names on spectator map --- addons/spectator/UI/interface.hpp | 6 +++--- addons/spectator/functions/fnc_handleMap.sqf | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/addons/spectator/UI/interface.hpp b/addons/spectator/UI/interface.hpp index 5dbea22273..51105b216b 100644 --- a/addons/spectator/UI/interface.hpp +++ b/addons/spectator/UI/interface.hpp @@ -167,9 +167,9 @@ class GVAR(interface) { colorBorder[] = {COL_FORE}; colorBackground[] = {COL_BACK}; colorSelect[] = { - QUOTE(GETPRVAR(GUI_BCG_RGB_R,0.77)), - QUOTE(GETPRVAR(GUI_BCG_RGB_G,0.51)), - QUOTE(GETPRVAR(GUI_BCG_RGB_B,0.08)), + "profilenamespace getvariable ['GUI_BCG_RGB_R',0.77]", + "profilenamespace getvariable ['GUI_BCG_RGB_G',0.51]", + "profilenamespace getvariable ['GUI_BCG_RGB_B',0.08]", 1 }; multiselectEnabled = 0; diff --git a/addons/spectator/functions/fnc_handleMap.sqf b/addons/spectator/functions/fnc_handleMap.sqf index a0000718bd..4eeb5fd7e1 100644 --- a/addons/spectator/functions/fnc_handleMap.sqf +++ b/addons/spectator/functions/fnc_handleMap.sqf @@ -18,7 +18,7 @@ #include "script_component.hpp" params ["_map"]; -private ["_cachedVehicles","_unit","_color","_icon"]; +private ["_cachedVehicles","_unit","_color","_icon","_txt"]; if (GVAR(camMode) == 0) then { _map drawIcon ["\A3\UI_F\Data\GUI\Rsc\RscDisplayMissionEditor\iconcamera_ca.paa",[0,0,0,1],GVAR(camera),20,20,GVAR(camPan)]; @@ -39,8 +39,9 @@ _cachedVehicles = []; // Function has caching built in _color = [side effectiveCommander _unit] call BIS_fnc_sideColor; _icon = GETVAR(_unit,GVAR(uIcon),""); + _txt = ["", GETVAR(_x,GVAR(uName),"")] select (isPlayer _x); - _map drawIcon [_icon, _color, _unit, 19, 19, getDir _unit]; + _map drawIcon [_icon, _color, _unit, 19, 19, getDir _unit, _txt, 1, 0.03]; }; false } count GVAR(unitList); From 702e50b731fd849c59a1ee1a7e531601ff703b52 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Fri, 7 Aug 2015 12:30:50 +0100 Subject: [PATCH 050/371] Improve spectator UI respawn counter blending When the BI respawn counter is blended with the spectator UI its colours are also updated to match --- addons/spectator/functions/fnc_handleInterface.sqf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index ef3363b72c..db701366b0 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -176,7 +176,11 @@ switch (toLower _mode) do { _back ctrlSetPosition [_x,_y,TOOL_W,TOOL_H]; _timer ctrlSetPosition [_x,_y,TOOL_W,TOOL_H]; _frame ctrlSetPosition [_x,_y,TOOL_W,TOOL_H]; + + _title ctrlSetBackgroundColor [0,0,0,0]; + _back ctrlSetBackgroundColor [COL_BACK]; _timer ctrlSetFontHeight TOOL_H; + _frame ctrlSetTextColor [COL_FORE]; _title ctrlCommit 0; _back ctrlCommit 0; From 1c79c8fa45fc55c85cd90458803879ae22a8e6de Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Fri, 7 Aug 2015 15:15:04 +0100 Subject: [PATCH 051/371] Update spectator UI styling Adds a title to the unit tree to match the help list and enters the title text. --- addons/spectator/UI/interface.hpp | 67 +++++++++++++------ .../spectator/functions/fnc_handleUnits.sqf | 2 +- addons/spectator/script_component.hpp | 5 +- addons/spectator/stringtable.xml | 3 + 4 files changed, 53 insertions(+), 24 deletions(-) diff --git a/addons/spectator/UI/interface.hpp b/addons/spectator/UI/interface.hpp index 51105b216b..a7790d6da0 100644 --- a/addons/spectator/UI/interface.hpp +++ b/addons/spectator/UI/interface.hpp @@ -137,11 +137,11 @@ class GVAR(interface) { idc = -1; style = 64; }; - class fovTool: viewTool { + class zoomTool: viewTool { idc = IDC_TOOL_FOV; x = safeZoneW - TOOL_W * 2 - MARGIN; }; - class fovFrame: fovTool { + class zoomFrame: zoomTool { idc = -1; style = 64; }; @@ -155,25 +155,52 @@ class GVAR(interface) { }; }; }; - class unitTree: RscTree { + class unitTree: RscControlsGroupNoScrollbars { idc = IDC_UNIT; x = safeZoneX; y = safeZoneY + TOOL_H * 6; w = TOOL_W * 2; h = safeZoneH - TOOL_H * 13; - sizeEx = H_PART(0.8); - borderSize = 1; - colorText[] = {COL_FORE}; - colorBorder[] = {COL_FORE}; - colorBackground[] = {COL_BACK}; - colorSelect[] = { - "profilenamespace getvariable ['GUI_BCG_RGB_R',0.77]", - "profilenamespace getvariable ['GUI_BCG_RGB_G',0.51]", - "profilenamespace getvariable ['GUI_BCG_RGB_B',0.08]", - 1 + class controls { + class unitTitle: RscText { + x = 0; + y = 0; + w = TOOL_W * 2; + h = H_PART(1); + style = 2; + colorText[] = {COL_FORE}; + colorBackground[] = {COL_FORE_D}; + sizeEx = H_PART(1); + text = CSTRING(UnitTitle); + }; + class unitTree: RscTree { + idc = IDC_UNIT_TREE; + x = 0; + y = H_PART(1); + w = TOOL_W * 2; + h = safeZoneH - TOOL_H * 14; + sizeEx = H_PART(0.8); + colorText[] = {COL_FORE}; + colorBorder[] = {0,0,0,0}; + colorBackground[] = {COL_BACK}; + colorSelect[] = { + "profilenamespace getvariable ['GUI_BCG_RGB_R',0.77]", + "profilenamespace getvariable ['GUI_BCG_RGB_G',0.51]", + "profilenamespace getvariable ['GUI_BCG_RGB_B',0.08]", + 1 + }; + multiselectEnabled = 0; + onTreeDblClick = QUOTE([ARR_2('onTreeDblClick',_this)] call FUNC(handleInterface)); + }; + class unitFrame: RscFrame { + x = 0; + y = 0; + w = TOOL_W * 2; + h = safeZoneH - TOOL_H * 13; + shadow = 2; + colorText[] = {COL_FORE}; + }; }; - multiselectEnabled = 0; - onTreeDblClick = QUOTE([ARR_2('onTreeDblClick',_this)] call FUNC(handleInterface)); }; class mapOverlay: RscMapControl { idc = IDC_MAP; @@ -191,16 +218,13 @@ class GVAR(interface) { y = safeZoneY + TOOL_H * 6; w = TOOL_W * 2; h = safeZoneH - TOOL_H * 13; - colorText[] = {COL_FORE}; - colorSelectBackground[] = {COL_FORE_D}; - colorSelectBackground2[] = {COL_BACK}; - colorBackground[] = {0,0,0,0}; class controls { class helpTitle: RscText { x = 0; y = 0; w = TOOL_W * 2; h = H_PART(1); + style = 2; colorText[] = {COL_FORE}; colorBackground[] = {COL_FORE_D}; sizeEx = H_PART(1); @@ -213,15 +237,16 @@ class GVAR(interface) { w = TOOL_W * 2; h = safeZoneH - TOOL_H * 14; colorBackground[] = {COL_BACK}; + sizeEx = H_PART(0.8); default = 1; }; - class helpFrame: RscText { + class helpFrame: RscFrame { x = 0; y = 0; w = TOOL_W * 2; h = safeZoneH - TOOL_H * 13; + shadow = 2; colorText[] = {COL_FORE}; - style = 64; }; }; }; diff --git a/addons/spectator/functions/fnc_handleUnits.sqf b/addons/spectator/functions/fnc_handleUnits.sqf index e8cd561da0..c32961024c 100644 --- a/addons/spectator/functions/fnc_handleUnits.sqf +++ b/addons/spectator/functions/fnc_handleUnits.sqf @@ -36,5 +36,5 @@ if !(GVAR(camUnit) in GVAR(unitList)) then { // Reduce overhead when unit tree is hidden if (ctrlShown (_display displayCtrl IDC_UNIT)) then { // Reduce overhead by spreading across frames - [FUNC(handleInterface),["onUnitsUpdate",[_display displayCtrl IDC_UNIT]],1] call EFUNC(common,waitAndExecute); + [FUNC(handleInterface),["onUnitsUpdate",[(_display displayCtrl IDC_UNIT) controlsGroupCtrl IDC_UNIT_TREE]],1] call EFUNC(common,waitAndExecute); }; diff --git a/addons/spectator/script_component.hpp b/addons/spectator/script_component.hpp index a726c6c67f..de2ee22363 100644 --- a/addons/spectator/script_component.hpp +++ b/addons/spectator/script_component.hpp @@ -49,8 +49,9 @@ #define IDC_TOOL_VISION 3004 #define IDC_UNIT 6002 +#define IDC_UNIT_TREE 6005 // UI colours -#define COL_BACK 0.1,0.1,0.1,0.8 +#define COL_BACK 0.1,0.1,0.1,0.7 #define COL_FORE 1,1,1,1 -#define COL_FORE_D 0.1,0.1,0.1,1 +#define COL_FORE_D 0.1,0.1,0.1,0.8 diff --git a/addons/spectator/stringtable.xml b/addons/spectator/stringtable.xml index 4d615d4e1e..30af5d1aa6 100644 --- a/addons/spectator/stringtable.xml +++ b/addons/spectator/stringtable.xml @@ -101,6 +101,9 @@ Termowizja + + Spectator Units + Spectator Controls Sterowanie obserwatorem From c5d9ec5d500a83db1bc3e85c4dc9c005f89f8fb0 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Fri, 7 Aug 2015 18:59:48 +0100 Subject: [PATCH 052/371] Add speed boost button to spectator free camera Sometimes you just want a burst of speed rather than to adjust it and then adjust it back. Also swapped the speed/zoom scrolling modifier around. --- .../functions/fnc_handleInterface.sqf | 33 ++++++++++--------- addons/spectator/stringtable.xml | 3 ++ 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index db701366b0..80d87cf40a 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -114,7 +114,7 @@ switch (toLower _mode) do { // Keep unit list and tree up to date [FUNC(handleUnits), 21, _display] call CBA_fnc_addPerFrameHandler; - // Handle unit icons on map and 3D + // Handle 3D unit icons GVAR(iconHandler) = addMissionEventHandler ["Draw3D",FUNC(handleIcons)]; // Populate the help window @@ -146,8 +146,9 @@ switch (toLower _mode) do { [localize LSTRING(freeCamDown),"Z"], [localize LSTRING(freeCamPan),"RMB (Hold)"], [localize LSTRING(freeCamDolly),"LMB (Hold)"], - [localize LSTRING(freeCamSpeed),"Scrollwheel"], - [localize LSTRING(freeCamZoom),"Ctrl + Scrollwheel"], + [localize LSTRING(freeCamZoom),"Scrollwheel"], + [localize LSTRING(freeCamSpeed),"Ctrl + Scrollwheel"], + [localize LSTRING(freeCamBoost),"Shift (Hold)"], [localize LSTRING(freeCamNextVis),"N"], [localize LSTRING(freeCamPrevVis),"Ctrl + N"], [localize LSTRING(otherControls),""], @@ -220,9 +221,9 @@ switch (toLower _mode) do { // Scroll to change speed, modifier for zoom if (GVAR(ctrlKey)) then { - [nil,nil,nil,nil,nil,nil, GVAR(camZoom) + _zChange * 0.1] call FUNC(setCameraAttributes); - } else { [nil,nil,nil,nil,nil,nil,nil, GVAR(camSpeed) + _zChange * 0.2] call FUNC(setCameraAttributes); + } else { + [nil,nil,nil,nil,nil,nil, GVAR(camZoom) + _zChange * 0.1] call FUNC(setCameraAttributes); }; }; case "onmousemoving": { @@ -268,31 +269,33 @@ switch (toLower _mode) do { [_display,nil,nil,true] call FUNC(toggleInterface); }; case 16: { // Q - GVAR(camBoom) = 0.5 * GVAR(camSpeed); + GVAR(camBoom) = 0.5 * GVAR(camSpeed) * ([1, 2] select _shift); }; case 17: { // W - GVAR(camDolly) set [1, GVAR(camSpeed)]; + GVAR(camDolly) set [1, GVAR(camSpeed) * ([1, 2] select _shift)]; }; case 29: { // Ctrl GVAR(ctrlKey) = true; }; case 30: { // A - GVAR(camDolly) set [0, -GVAR(camSpeed)]; + GVAR(camDolly) set [0, -GVAR(camSpeed) * ([1, 2] select _shift)]; }; case 31: { // S - GVAR(camDolly) set [1, -GVAR(camSpeed)]; + GVAR(camDolly) set [1, -GVAR(camSpeed) * ([1, 2] select _shift)]; }; case 32: { // D - GVAR(camDolly) set [0, GVAR(camSpeed)]; + GVAR(camDolly) set [0, GVAR(camSpeed) * ([1, 2] select _shift)]; }; case 44: { // Z - GVAR(camBoom) = -0.5 * GVAR(camSpeed); + GVAR(camBoom) = -0.5 * GVAR(camSpeed) * ([1, 2] select _shift); }; case 49: { // N - if (_ctrl) then { - [nil,nil,-1] call FUNC(cycleCamera); - } else { - [nil,nil,1] call FUNC(cycleCamera); + if (GVAR(camMode) == 0) then { + if (_ctrl) then { + [nil,nil,-1] call FUNC(cycleCamera); + } else { + [nil,nil,1] call FUNC(cycleCamera); + }; }; }; case 50: { // M diff --git a/addons/spectator/stringtable.xml b/addons/spectator/stringtable.xml index 30af5d1aa6..b174608d03 100644 --- a/addons/spectator/stringtable.xml +++ b/addons/spectator/stringtable.xml @@ -181,6 +181,9 @@ Speed +/- Prędkość +/- + + Speed Boost + Next Vision Mode Następny tryb wizji From 57bda372f0f221f049ecbeebf9d9f0d2ff88ae15 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Fri, 7 Aug 2015 19:00:31 +0100 Subject: [PATCH 053/371] Adjust spectator free camera speed with zoom --- addons/spectator/functions/fnc_handleCamera.sqf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/spectator/functions/fnc_handleCamera.sqf b/addons/spectator/functions/fnc_handleCamera.sqf index 7f53b59009..1d1d5bef9e 100644 --- a/addons/spectator/functions/fnc_handleCamera.sqf +++ b/addons/spectator/functions/fnc_handleCamera.sqf @@ -23,9 +23,9 @@ if (isNil QGVAR(camHandler)) exitWith { [_this select 1] call CBA_fnc_removePerF private ["_oldPos","_mX","_mY","_mZ","_pan","_x","_y","_z"]; _oldPos = getPosASL GVAR(camera); -_mX = GVAR(camDolly) select 0; -_mY = GVAR(camDolly) select 1; -_mZ = GVAR(camBoom); +_mX = (GVAR(camDolly) select 0) / ((GVAR(camZoom) * 0.8) max 1); +_mY = (GVAR(camDolly) select 1) / ((GVAR(camZoom) * 0.8) max 1); +_mZ = GVAR(camBoom) / ((GVAR(camZoom) * 0.8) max 1); _pan = (GVAR(camPan) + 360) % 360; _x = (_oldPos select 0) + (_mX * cos(_pan)) + (_mY * sin(_pan)); From 2b56b919dba3c1d3daf1b47599756f64b4bf2985 Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Sat, 8 Aug 2015 11:28:08 +0200 Subject: [PATCH 054/371] Fixed missing private in Switchunits --- addons/switchunits/functions/fnc_switchUnit.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/switchunits/functions/fnc_switchUnit.sqf b/addons/switchunits/functions/fnc_switchUnit.sqf index 2079982fc0..ca1c054032 100644 --- a/addons/switchunits/functions/fnc_switchUnit.sqf +++ b/addons/switchunits/functions/fnc_switchUnit.sqf @@ -15,7 +15,7 @@ */ #include "script_component.hpp" -private ["_nearestEnemyPlayers", "_allNearestPlayers", "_oldUnit", "_leave"]; +private ["_nearestEnemyPlayers", "_allNearestPlayers", "_oldUnit", "_leave", "_fnc_pfhSwitchUnit"]; params ["_unit"]; From e59f0ce822ab64c8a8fd6c330341e16113437282 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sat, 8 Aug 2015 12:24:49 +0100 Subject: [PATCH 055/371] Fix spectator respawn template for types 0 and 1 Type 0 worked, but the mission didn't end when all players were killed. Type 1 didn't work because isPlayer isn't true for seagulls. So spectator virtual state is now entirely unassociated from objects in the game. --- .../functions/fnc_handleInterface.sqf | 2 +- .../functions/fnc_respawnTemplate.sqf | 11 +++++--- .../spectator/functions/fnc_setSpectator.sqf | 26 +++++++------------ .../functions/fnc_stageSpectator.sqf | 9 +++---- 4 files changed, 22 insertions(+), 26 deletions(-) diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index 80d87cf40a..d06c19bd38 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -80,7 +80,7 @@ switch (toLower _mode) do { clearRadio; // Return to player view - _unit switchCamera "internal"; + player switchCamera "internal"; // Enable BI damage effects BIS_fnc_feedback_allowPP = true; diff --git a/addons/spectator/functions/fnc_respawnTemplate.sqf b/addons/spectator/functions/fnc_respawnTemplate.sqf index b03c6dfb06..b808c43eab 100644 --- a/addons/spectator/functions/fnc_respawnTemplate.sqf +++ b/addons/spectator/functions/fnc_respawnTemplate.sqf @@ -21,6 +21,11 @@ params [["_unit",objNull,[objNull]], ["_killer",objNull,[objNull]], ["_respawn",0,[0]], ["_respawnDelay",0,[0]]]; private ["_vision","_pos"]; +// End mission when all are dead with respawn type "None" +if ((_respawn == 0) && {{alive _x} count allPlayers <= 0}) exitWith { + [["endDeath",false],"BIS_fnc_endMission"] call EFUNC(common,execRemoteFnc); +}; + if (isNull _killer) then {_killer = _unit}; _vision = [-2,-1] select (sunOrMoon < 1); _pos = (getPosATL _unit) vectorAdd [0,0,5]; @@ -29,11 +34,11 @@ if (alive _unit) then { if (_respawn == 1) then { [_unit,QGVAR(isSeagull)] call EFUNC(common,hideUnit); [2,_killer,_vision,_pos,getDir _unit] call FUNC(setCameraAttributes); - [_unit] call FUNC(setSpectator); + [true] call FUNC(setSpectator); } else { - [_unit,false] call FUNC(setSpectator); + [false] call FUNC(setSpectator); }; } else { [2,_killer,_vision,_pos,getDir _unit] call FUNC(setCameraAttributes); - [_unit] call FUNC(setSpectator); + [true] call FUNC(setSpectator); }; diff --git a/addons/spectator/functions/fnc_setSpectator.sqf b/addons/spectator/functions/fnc_setSpectator.sqf index 2d5ada415c..4f41e073d7 100644 --- a/addons/spectator/functions/fnc_setSpectator.sqf +++ b/addons/spectator/functions/fnc_setSpectator.sqf @@ -1,48 +1,42 @@ /* * Author: SilentSpike - * Sets target player to the given spectator state (virtually) + * Sets local client to the given spectator state (virtually) * To physically handle a spectator see ace_spectator_fnc_stageSpectator * - * Player will be able to communicate in ACRE/TFAR as appropriate + * Client will be able to communicate in ACRE/TFAR as appropriate * The spectator interface will be opened/closed * * Arguments: - * 0: Unit to put into spectator state - * 1: Spectator state + * 0: Spectator state of local client * * Return Value: * None * * Example: - * [player, true] call ace_spectator_fnc_setSpectator + * [true] call ace_spectator_fnc_setSpectator * * Public: Yes */ #include "script_component.hpp" -params ["_unit", ["_set",true,[true]]]; +params [["_set",true,[true]]]; -// Only run for player units -if !(isPlayer _unit) exitWith {}; - -if !(local _unit) exitwith { - [[_unit, _set], QFUNC(setSpectator), _unit] call EFUNC(common,execRemoteFnc); -}; +// Only clients can be spectators +if !(hasInterface) exitWith {}; // Handle common addon audio if (["ace_hearing"] call EFUNC(common,isModLoaded)) then {EGVAR(hearing,disableVolumeUpdate) = _set}; if (["acre_sys_radio"] call EFUNC(common,isModLoaded)) then {[_set] call acre_api_fnc_setSpectator}; -if (["task_force_radio"] call EFUNC(common,isModLoaded)) then {[_unit, _set] call TFAR_fnc_forceSpectator}; +if (["task_force_radio"] call EFUNC(common,isModLoaded)) then {[player, _set] call TFAR_fnc_forceSpectator}; if (_set) then { ["open"] call FUNC(handleInterface); } else { - ["close",_unit] call FUNC(handleInterface); + ["close"] call FUNC(handleInterface); }; // Mark spectator state for reference -_unit setVariable [QGVAR(isSet), _set, true]; GVAR(isSet) = _set; -["spectatorSet",[_set,_unit]] call EFUNC(common,localEvent); +["spectatorSet",[_set]] call EFUNC(common,localEvent); diff --git a/addons/spectator/functions/fnc_stageSpectator.sqf b/addons/spectator/functions/fnc_stageSpectator.sqf index 3e17235e3e..7f0d862719 100644 --- a/addons/spectator/functions/fnc_stageSpectator.sqf +++ b/addons/spectator/functions/fnc_stageSpectator.sqf @@ -7,7 +7,7 @@ * Upon unstage, units will be moved to the position they were in upon staging * * Arguments: - * 0: Unit to put into spectator stage + * 0: Unit to put into spectator stage * 1: Spectator stage * * Return Value: @@ -21,19 +21,16 @@ #include "script_component.hpp" -params ["_unit", ["_set",true,[true]]]; +params [["_unit",player,[objNull]], ["_set",true,[true]]]; // No change, no service (but allow spectators to be reset) if !(_set || (GETVAR(_unit,GVAR(isStaged),false))) exitWith {}; -// Only run for player units -if !(isPlayer _unit) exitWith {}; - if !(local _unit) exitwith { [[_unit, _set], QFUNC(stageSpectator), _unit] call EFUNC(common,execRemoteFnc); }; -// Prevent player falling into water +// Prevent unit falling into water _unit enableSimulation !_set; // Move to/from group as appropriate From 9c29ff0c57e4d97107604cbcd74e15932453f809 Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Sat, 8 Aug 2015 13:34:35 +0200 Subject: [PATCH 056/371] Inlined PFHs in Switchunits --- addons/switchunits/functions/fnc_markAiOnMap.sqf | 6 ++---- addons/switchunits/functions/fnc_switchBack.sqf | 6 ++---- addons/switchunits/functions/fnc_switchUnit.sqf | 8 +++----- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/addons/switchunits/functions/fnc_markAiOnMap.sqf b/addons/switchunits/functions/fnc_markAiOnMap.sqf index 011768845a..db43c58f43 100644 --- a/addons/switchunits/functions/fnc_markAiOnMap.sqf +++ b/addons/switchunits/functions/fnc_markAiOnMap.sqf @@ -20,7 +20,7 @@ params ["_sidesToShow"]; GVAR(AllMarkerNames) = []; -_fnc_pfhMarkAiOnMap = { +[{ params ["_args"]; _args params ["_sides"]; @@ -63,6 +63,4 @@ _fnc_pfhMarkAiOnMap = { }; } count allUnits; }; -}; - -[_fnc_pfhMarkAiOnMap, 1.5, [_sidesToShow]] call CBA_fnc_addPerFrameHandler; +}, 1.5, [_sidesToShow]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/switchunits/functions/fnc_switchBack.sqf b/addons/switchunits/functions/fnc_switchBack.sqf index 3ebf49a3ab..c3cb99588a 100644 --- a/addons/switchunits/functions/fnc_switchBack.sqf +++ b/addons/switchunits/functions/fnc_switchBack.sqf @@ -20,7 +20,7 @@ params ["_originalPlayerUnit"]; [_originalPlayerUnit] joinSilent GVAR(OriginalGroup); -_fnc_pfhSwitchBack = { +[{ params ["_args", "_pfhId"]; _args params ["_originalPlayerUnit", "_currentUnit"]; @@ -34,6 +34,4 @@ _fnc_pfhSwitchBack = { [_pfhId] call cba_fnc_removePerFrameHandler; }; -}; - -[_fnc_pfhSwitchBack, 0.2, _this] call CBA_fnc_addPerFrameHandler; +}, 0.2, _this] call CBA_fnc_addPerFrameHandler; diff --git a/addons/switchunits/functions/fnc_switchUnit.sqf b/addons/switchunits/functions/fnc_switchUnit.sqf index ca1c054032..793e72bb71 100644 --- a/addons/switchunits/functions/fnc_switchUnit.sqf +++ b/addons/switchunits/functions/fnc_switchUnit.sqf @@ -15,7 +15,7 @@ */ #include "script_component.hpp" -private ["_nearestEnemyPlayers", "_allNearestPlayers", "_oldUnit", "_leave", "_fnc_pfhSwitchUnit"]; +private ["_nearestEnemyPlayers", "_allNearestPlayers", "_oldUnit", "_leave"]; params ["_unit"]; @@ -44,7 +44,7 @@ if (_leave) exitWith { //[_unit] joinSilent group player; [[_unit, player], QUOTE({(_this select 0) setVariable [ARR_3(QUOTE(QGVAR(OriginalOwner)), owner (_this select 0), true)]; (_this select 0) setOwner owner (_this select 1)}), 1] call EFUNC(common,execRemoteFnc); -_fnc_pfhSwitchUnit = { +[{ private ["_respawnEhId", "_oldOwner"]; params ["_args", "_pfhId"]; _args params ["_unit", "_oldUnit"]; @@ -78,6 +78,4 @@ _fnc_pfhSwitchUnit = { [_pfhId] call cba_fnc_removePerFrameHandler; }; -}; - -[_fnc_pfhSwitchUnit, 0.2, [_unit, player]] call CBA_fnc_addPerFrameHandler; +}, 0.2, [_unit, player]] call CBA_fnc_addPerFrameHandler; From 5b881224c5a231c35fb96d79183f240265915e89 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sat, 8 Aug 2015 13:19:07 +0100 Subject: [PATCH 057/371] Allow admins to use chat in the spectator UI --- addons/spectator/functions/fnc_handleInterface.sqf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index d06c19bd38..21d6266fba 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -238,6 +238,9 @@ switch (toLower _mode) do { if ((alive player) && {_dik in (actionKeys "curatorInterface")} && {!isNull (getAssignedCuratorLogic player)}) exitWith { ["zeus", [_display]] call FUNC(handleInterface); }; + if ((isServer || {serverCommandAvailable "#kick"}) && {_dik in (actionKeys "Chat" + actionKeys "PrevChannel" + actionKeys "NextChannel")}) exitWith { + false + }; // Handle held keys (prevent repeat calling) if (_dik in GVAR(heldKeys)) exitwith {}; From be7b156c49170da938b120cd16d45ec7c6daa245 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sat, 8 Aug 2015 15:49:07 +0100 Subject: [PATCH 058/371] Add "focus on unit" to spectator free camera Pressing F will move the free camera to a position viewing the unit currently selected in the list. Fixes map teleporting functionality also. --- addons/spectator/UI/interface.hpp | 23 ++++++++-------- .../functions/fnc_handleInterface.sqf | 26 +++++++++++++++++-- .../functions/fnc_setCameraAttributes.sqf | 9 ++++--- .../functions/fnc_transitionCamera.sqf | 3 +-- addons/spectator/stringtable.xml | 3 +++ 5 files changed, 45 insertions(+), 19 deletions(-) diff --git a/addons/spectator/UI/interface.hpp b/addons/spectator/UI/interface.hpp index a7790d6da0..e8bc6c210f 100644 --- a/addons/spectator/UI/interface.hpp +++ b/addons/spectator/UI/interface.hpp @@ -155,7 +155,7 @@ class GVAR(interface) { }; }; }; - class unitTree: RscControlsGroupNoScrollbars { + class unitWindow: RscControlsGroupNoScrollbars { idc = IDC_UNIT; x = safeZoneX; y = safeZoneY + TOOL_H * 6; @@ -191,6 +191,7 @@ class GVAR(interface) { }; multiselectEnabled = 0; onTreeDblClick = QUOTE([ARR_2('onTreeDblClick',_this)] call FUNC(handleInterface)); + onTreeSelChanged = QUOTE([ARR_2('onTreeSelChanged',_this)] call FUNC(handleInterface)); }; class unitFrame: RscFrame { x = 0; @@ -202,16 +203,6 @@ class GVAR(interface) { }; }; }; - class mapOverlay: RscMapControl { - idc = IDC_MAP; - type = 100; - x = safeZoneX; - y = safeZoneY; - w = safeZoneW; - h = safeZoneH; - onMouseButtonDown = QUOTE([ARR_2('onMapClick',_this)] call FUNC(handleInterface)); - onDraw = QUOTE(_this call FUNC(handleMap)); - }; class helpWindow: RscControlsGroupNoScrollbars { idc = IDC_HELP; x = safeZoneX + safeZoneW - TOOL_W * 2; @@ -250,5 +241,15 @@ class GVAR(interface) { }; }; }; + class mapOverlay: RscMapControl { + idc = IDC_MAP; + type = 100; + x = safeZoneX; + y = safeZoneY; + w = safeZoneW; + h = safeZoneH; + onMouseButtonDown = QUOTE([ARR_2('onMapClick',_this)] call FUNC(handleInterface)); + onDraw = QUOTE(_this call FUNC(handleMap)); + }; }; }; diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index 21d6266fba..eda24dccf6 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -35,6 +35,7 @@ switch (toLower _mode) do { GVAR(heldKeys) = []; GVAR(mouse) = [false,false]; GVAR(mousePos) = [0.5,0.5]; + GVAR(treeSel) = objNull; // Initalize the camera view GVAR(camera) = "Camera" camCreate (ASLtoATL GVAR(camPos)); @@ -96,6 +97,7 @@ switch (toLower _mode) do { GVAR(heldKeys) = nil; GVAR(mouse) = nil; GVAR(mousePos) = nil; + GVAR(treeSel) = nil; // Reset nametag settings if (["ace_nametags"] call EFUNC(common,isModLoaded)) then { @@ -146,11 +148,12 @@ switch (toLower _mode) do { [localize LSTRING(freeCamDown),"Z"], [localize LSTRING(freeCamPan),"RMB (Hold)"], [localize LSTRING(freeCamDolly),"LMB (Hold)"], + [localize LSTRING(freeCamFocus),"F"], + [localize LSTRING(freeCamNextVis),"N"], + [localize LSTRING(freeCamPrevVis),"Ctrl + N"], [localize LSTRING(freeCamZoom),"Scrollwheel"], [localize LSTRING(freeCamSpeed),"Ctrl + Scrollwheel"], [localize LSTRING(freeCamBoost),"Shift (Hold)"], - [localize LSTRING(freeCamNextVis),"N"], - [localize LSTRING(freeCamPrevVis),"Ctrl + N"], [localize LSTRING(otherControls),""], [localize LSTRING(nextCam),"Up Arrow"], [localize LSTRING(prevCam),"Down Arrow"], @@ -289,6 +292,14 @@ switch (toLower _mode) do { case 32: { // D GVAR(camDolly) set [0, GVAR(camSpeed) * ([1, 2] select _shift)]; }; + case 33: { // F + private ["_sel","_vector"]; + _sel = GVAR(treeSel); + if !((GVAR(camMode) == 0) && {isNull _sel} && {_sel in GVAR(unitList)}) then { + _vector = (positionCameraToWorld [0,0,0]) vectorDiff (positionCameraToWorld [0,0,25]); + [nil,nil,nil,(getPosATL _sel) vectorAdd _vector] call FUNC(setCameraAttributes); + }; + }; case 44: { // Z GVAR(camBoom) = -0.5 * GVAR(camSpeed) * ([1, 2] select _shift); }; @@ -374,6 +385,15 @@ switch (toLower _mode) do { [_newMode,_newUnit] call FUNC(transitionCamera); }; }; + case "ontreeselchanged": { + _args params ["_tree","_sel"]; + + if (count _sel == 3) then { + GVAR(treeSel) = objectFromNetId (_tree tvData _sel); + } else { + GVAR(treeSel) = objNull; + }; + }; case "onunitsupdate": { _args params ["_tree"]; private ["_cachedUnits","_cachedGrps","_cachedSides","_s","_g","_grp","_u","_unit","_side"]; @@ -485,6 +505,7 @@ switch (toLower _mode) do { GVAR(heldKeys) = []; GVAR(mouse) = [false,false]; GVAR(mousePos) = [0.5,0.5]; + GVAR(treeSel) = objNull; createDialog (["RscDisplayInterrupt", "RscDisplayMPInterrupt"] select isMultiplayer); @@ -538,6 +559,7 @@ switch (toLower _mode) do { GVAR(heldKeys) = []; GVAR(mouse) = [false,false]; GVAR(mousePos) = [0.5,0.5]; + GVAR(treeSel) = objNull; openCuratorInterface; diff --git a/addons/spectator/functions/fnc_setCameraAttributes.sqf b/addons/spectator/functions/fnc_setCameraAttributes.sqf index 278a8c4758..8eb6fe51ac 100644 --- a/addons/spectator/functions/fnc_setCameraAttributes.sqf +++ b/addons/spectator/functions/fnc_setCameraAttributes.sqf @@ -51,7 +51,6 @@ if !(_vision in GVAR(availableVisions)) then { }; GVAR(camPan) = _heading % 360; -GVAR(camPos) = (ATLtoASL _position); GVAR(camSpeed) = (_speed max 0.05) min 10; GVAR(camTilt) = (_tilt max -89) min 89; GVAR(camUnit) = _unit; @@ -59,8 +58,10 @@ GVAR(camVision) = _vision; GVAR(camZoom) = (_zoom min 2) max 0.01; // Apply if camera exists -if !(isNil QGVAR(camera)) then { - [_mode,_unit,_vision] call FUNC(transitionCamera); -} else { +if (isNil QGVAR(camera)) then { GVAR(camMode) = _mode; + GVAR(camPos) = (ATLtoASL _position); +} else { + [_mode,_unit,_vision] call FUNC(transitionCamera); + GVAR(camera) setPosATL _position; }; diff --git a/addons/spectator/functions/fnc_transitionCamera.sqf b/addons/spectator/functions/fnc_transitionCamera.sqf index b35b61b311..72cb9f1a45 100644 --- a/addons/spectator/functions/fnc_transitionCamera.sqf +++ b/addons/spectator/functions/fnc_transitionCamera.sqf @@ -53,8 +53,7 @@ if (_newMode == 0) then { // Free GVAR(camera) camSetFov -(linearConversion [0.01,2,GVAR(camZoom),-2,-0.01,true]); GVAR(camera) camCommit 0; - // Agent is switched to in free cam to hide death table and prevent AI chat while allowing icons to draw - // However, map click events don't fire in free cam for some reason... + // Agent is switched to in free cam to hide death table and prevent AI chat while allowing icons to draw (also prevents systemChat and unit HUD) // (Why is so much stuff tied into the current camera unit BI?!) if (isNull GVAR(camAgent)) then { GVAR(camAgent) = createAgent ["VirtualMan_F",markerPos QGVAR(respawn),[],0,""]; diff --git a/addons/spectator/stringtable.xml b/addons/spectator/stringtable.xml index b174608d03..c4b9b6b631 100644 --- a/addons/spectator/stringtable.xml +++ b/addons/spectator/stringtable.xml @@ -184,6 +184,9 @@ Speed Boost + + Focus on Unit + Next Vision Mode Następny tryb wizji From d7730103c98c0cf5d677abeb42128de29e375aaf Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sat, 8 Aug 2015 17:22:04 +0100 Subject: [PATCH 059/371] Update ace_spectator readme --- addons/spectator/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/spectator/README.md b/addons/spectator/README.md index b3e586149b..b827bdcc49 100644 --- a/addons/spectator/README.md +++ b/addons/spectator/README.md @@ -1,7 +1,11 @@ ace_spectator ======= -Spectator. Includes features from Splendid Cam, and much more. +A flexible spectator framework for mission makers to use. + +Includes a public API for integration into custom respawn frameworks and a template for use with the vanilla respawn framework. + +For more information, see: http://ace3mod.com/wiki/feature/spectator.html ## Maintainers From 213deeffb405ac85138bd8376b25274922b6af02 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sat, 8 Aug 2015 18:31:37 +0100 Subject: [PATCH 060/371] Add keys to adjust spectator camera speed and zoom Allows for finer control of the speed and zoom, as well as a quick way to reset either. --- addons/spectator/XEH_preInit.sqf | 2 +- .../functions/fnc_handleInterface.sqf | 40 ++++++++++---- addons/spectator/stringtable.xml | 53 +++++++++++-------- 3 files changed, 61 insertions(+), 34 deletions(-) diff --git a/addons/spectator/XEH_preInit.sqf b/addons/spectator/XEH_preInit.sqf index 2c29598ebc..a40f4a0dcb 100644 --- a/addons/spectator/XEH_preInit.sqf +++ b/addons/spectator/XEH_preInit.sqf @@ -33,7 +33,7 @@ GVAR(camAgent) = objNull; GVAR(camMode) = 0; GVAR(camPan) = 0; GVAR(camPos) = ATLtoASL [worldSize * 0.5, worldSize * 0.5, 20]; -GVAR(camSpeed) = 1; +GVAR(camSpeed) = 2.5; GVAR(camTilt) = -10; GVAR(camUnit) = objNull; GVAR(camVision) = -2; diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index eda24dccf6..80ee564ab5 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -148,17 +148,21 @@ switch (toLower _mode) do { [localize LSTRING(freeCamDown),"Z"], [localize LSTRING(freeCamPan),"RMB (Hold)"], [localize LSTRING(freeCamDolly),"LMB (Hold)"], - [localize LSTRING(freeCamFocus),"F"], - [localize LSTRING(freeCamNextVis),"N"], - [localize LSTRING(freeCamPrevVis),"Ctrl + N"], - [localize LSTRING(freeCamZoom),"Scrollwheel"], - [localize LSTRING(freeCamSpeed),"Ctrl + Scrollwheel"], [localize LSTRING(freeCamBoost),"Shift (Hold)"], - [localize LSTRING(otherControls),""], + [localize LSTRING(freeCamFocus),"F"], + [localize LSTRING(attributeControls),""], [localize LSTRING(nextCam),"Up Arrow"], [localize LSTRING(prevCam),"Down Arrow"], [localize LSTRING(nextUnit),"Right Arrow"], - [localize LSTRING(prevUnit),"Left Arrow"] + [localize LSTRING(prevUnit),"Left Arrow"], + [localize LSTRING(nextVis),"N"], + [localize LSTRING(prevVis),"Ctrl + N"], + [localize LSTRING(adjZoom),"Scrollwheel"], + [localize LSTRING(adjSpeed),"Ctrl + Scrollwheel"], + [localize LSTRING(incZoom),"Num-/Num+"], + [localize LSTRING(incSpeed),"Ctrl + Num-/Num+"], + [localize LSTRING(reZoom),"Alt + Num-"], + [localize LSTRING(reSpeed),"Alt + Num+"] ]; // Handle support for BI's respawn counter @@ -247,8 +251,8 @@ switch (toLower _mode) do { // Handle held keys (prevent repeat calling) if (_dik in GVAR(heldKeys)) exitwith {}; - // Exclude movement keys so that speed can be adjusted on fly - if !(_dik in [16,17,30,31,32,44]) then { + // Exclude movement/adjustment keys so that speed can be adjusted on fly + if !(_dik in [16,17,30,31,32,44,74,78]) then { GVAR(heldKeys) pushBack _dik; }; @@ -295,7 +299,7 @@ switch (toLower _mode) do { case 33: { // F private ["_sel","_vector"]; _sel = GVAR(treeSel); - if !((GVAR(camMode) == 0) && {isNull _sel} && {_sel in GVAR(unitList)}) then { + if ((GVAR(camMode) == 0) && {!isNull _sel} && {_sel in GVAR(unitList)}) then { _vector = (positionCameraToWorld [0,0,0]) vectorDiff (positionCameraToWorld [0,0,25]); [nil,nil,nil,(getPosATL _sel) vectorAdd _vector] call FUNC(setCameraAttributes); }; @@ -318,6 +322,22 @@ switch (toLower _mode) do { case 57: { // Spacebar // Freecam attachment here, if in external then set cam pos and attach }; + case 74: { // Num - + if (_alt) exitWith { [nil,nil,nil,nil,nil,nil, 1.25] call FUNC(setCameraAttributes); }; + if (_ctrl) then { + [nil,nil,nil,nil,nil,nil,nil, GVAR(camSpeed) - 0.05] call FUNC(setCameraAttributes); + } else { + [nil,nil,nil,nil,nil,nil, GVAR(camZoom) - 0.01] call FUNC(setCameraAttributes); + }; + }; + case 78: { // Num + + if (_alt) exitWith { [nil,nil,nil,nil,nil,nil,nil, 2.5] call FUNC(setCameraAttributes); }; + if (_ctrl) then { + [nil,nil,nil,nil,nil,nil,nil, GVAR(camSpeed) + 0.05] call FUNC(setCameraAttributes); + } else { + [nil,nil,nil,nil,nil,nil, GVAR(camZoom) + 0.01] call FUNC(setCameraAttributes); + }; + }; case 200: { // Up arrow [-1] call FUNC(cycleCamera); }; diff --git a/addons/spectator/stringtable.xml b/addons/spectator/stringtable.xml index c4b9b6b631..895a279844 100644 --- a/addons/spectator/stringtable.xml +++ b/addons/spectator/stringtable.xml @@ -134,8 +134,7 @@ - Free Camera Controls - Wolne sterowanie kamerą + Free Camera Camera Forward @@ -173,31 +172,14 @@ Lock Camera to Target Zablokuj kamerę na celu - - Zoom +/- - Zoom +/- - - - Speed +/- - Prędkość +/- - Speed Boost Focus on Unit - - Next Vision Mode - Następny tryb wizji - - - Previous Vision Mode - Poprzedni tryb wizji - - Interface Controls - Sterowanie interfejsem + Interface Toggle Interface @@ -227,9 +209,8 @@ Toggle Help Przełącz pomoc - - Other Controls - Pozostałe sterowanie + + Camera Attributes Next Camera @@ -247,5 +228,31 @@ Previous Unit Poprzednia jednostka + + Next Vision Mode + Następny tryb wizji + + + Previous Vision Mode + Poprzedni tryb wizji + + + Adjust Zoom + + + Adjust Speed + + + Increment Zoom + + + Increment Speed + + + Reset Zoom + + + Reset Speed + From 182eef39de65cc53d413df36db6b7286bca20c68 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sat, 8 Aug 2015 18:41:38 +0100 Subject: [PATCH 061/371] Adjust spectator camera pan and tilt with zoom --- addons/spectator/functions/fnc_handleCamera.sqf | 11 +++++++---- addons/spectator/functions/fnc_handleMouse.sqf | 9 ++++++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/addons/spectator/functions/fnc_handleCamera.sqf b/addons/spectator/functions/fnc_handleCamera.sqf index 1d1d5bef9e..960a20df80 100644 --- a/addons/spectator/functions/fnc_handleCamera.sqf +++ b/addons/spectator/functions/fnc_handleCamera.sqf @@ -20,12 +20,15 @@ // Kill PFH when not in free cam (or display is closed) if (isNil QGVAR(camHandler)) exitWith { [_this select 1] call CBA_fnc_removePerFrameHandler; }; -private ["_oldPos","_mX","_mY","_mZ","_pan","_x","_y","_z"]; +private ["_oldPos","_zoomMod","_mX","_mY","_mZ","_pan","_x","_y","_z"]; _oldPos = getPosASL GVAR(camera); -_mX = (GVAR(camDolly) select 0) / ((GVAR(camZoom) * 0.8) max 1); -_mY = (GVAR(camDolly) select 1) / ((GVAR(camZoom) * 0.8) max 1); -_mZ = GVAR(camBoom) / ((GVAR(camZoom) * 0.8) max 1); + +// Dolly/Boom amount should be influnced by zoom level (it should really be exponential) +_zoomMod = (GVAR(camZoom) * 0.8) max 1; +_mX = (GVAR(camDolly) select 0) / _zoomMod; +_mY = (GVAR(camDolly) select 1) / _zoomMod; +_mZ = GVAR(camBoom) / _zoomMod; _pan = (GVAR(camPan) + 360) % 360; _x = (_oldPos select 0) + (_mX * cos(_pan)) + (_mY * sin(_pan)); diff --git a/addons/spectator/functions/fnc_handleMouse.sqf b/addons/spectator/functions/fnc_handleMouse.sqf index 8158ba95b5..1c2b62798c 100644 --- a/addons/spectator/functions/fnc_handleMouse.sqf +++ b/addons/spectator/functions/fnc_handleMouse.sqf @@ -18,7 +18,7 @@ #include "script_component.hpp" params ["_x","_y"]; -private ["_leftButton","_rightButton","_oldX","_oldY","_deltaX","_deltaY"]; +private ["_leftButton","_rightButton","_oldX","_oldY","_deltaX","_deltaY","_zoomMod"]; _leftButton = GVAR(mouse) select 0; _rightButton = GVAR(mouse) select 1; @@ -35,8 +35,11 @@ if (_leftButton) then { GVAR(camDolly) set [1, _deltaY * 100 * GVAR(camSpeed)]; } else { if (_rightButton) then { - GVAR(camPan) = GVAR(camPan) - (_deltaX * 360); - GVAR(camTilt) = ((GVAR(camTilt) + (_deltaY * 180)) min 89) max -89; + // Pan/Tilt amount should be influnced by zoom level (it should really be exponential) + _zoomMod = (GVAR(camZoom) * 0.8) max 1; + + GVAR(camPan) = GVAR(camPan) - ((_deltaX * 360) / _zoomMod); + GVAR(camTilt) = ((GVAR(camTilt) + ((_deltaY * 180) / _zoomMod)) min 89) max -89; }; }; From a6acff9178bf2a6072d9a67673ca623ccdd2c092 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 8 Aug 2015 14:40:19 -0500 Subject: [PATCH 062/371] Setting to disable hearing for zeus RC --- addons/hearing/ACE_Settings.hpp | 6 ++++++ addons/hearing/CfgVehicles.hpp | 6 ++++++ addons/hearing/functions/fnc_earRinging.sqf | 1 + addons/hearing/functions/fnc_moduleHearing.sqf | 2 ++ addons/hearing/stringtable.xml | 8 +++++++- 5 files changed, 22 insertions(+), 1 deletion(-) diff --git a/addons/hearing/ACE_Settings.hpp b/addons/hearing/ACE_Settings.hpp index 867914b857..262c3edc34 100644 --- a/addons/hearing/ACE_Settings.hpp +++ b/addons/hearing/ACE_Settings.hpp @@ -19,4 +19,10 @@ class ACE_Settings { isClientSettable = 1; displayName = CSTRING(DisableEarRinging); }; + class GVAR(enabledForZeusUnits) { + value = 1; + typeName = "BOOL"; + displayName = CSTRING(enabledForZeusUnits_DisplayName); + description = CSTRING(enabledForZeusUnits_Description); + }; }; diff --git a/addons/hearing/CfgVehicles.hpp b/addons/hearing/CfgVehicles.hpp index 44ea8f734f..2273653c3a 100644 --- a/addons/hearing/CfgVehicles.hpp +++ b/addons/hearing/CfgVehicles.hpp @@ -130,6 +130,12 @@ class CfgVehicles { }; }; }; + class enabledForZeusUnits { + displayName = CSTRING(enabledForZeusUnits_DisplayName); + description = CSTRING(enabledForZeusUnits_Description); + typeName = "BOOL"; + defaultValue = 1; + }; }; class ModuleDescription { description = CSTRING(Module_Description); diff --git a/addons/hearing/functions/fnc_earRinging.sqf b/addons/hearing/functions/fnc_earRinging.sqf index 6a896c1820..de70c4f860 100644 --- a/addons/hearing/functions/fnc_earRinging.sqf +++ b/addons/hearing/functions/fnc_earRinging.sqf @@ -21,6 +21,7 @@ PARAMS_2(_unit,_strength); if (_unit != ACE_player) exitWith {}; if (_strength < 0.05) exitWith {}; if (!isNull curatorCamera) exitWith {}; +if ((!GVAR(enabledForZeusUnits)) && {player != ACE_player}) exitWith {}; if (_unit getVariable ["ACE_hasEarPlugsin", false]) then { _strength = _strength / 4; diff --git a/addons/hearing/functions/fnc_moduleHearing.sqf b/addons/hearing/functions/fnc_moduleHearing.sqf index 6ec0af0231..fed6335c07 100644 --- a/addons/hearing/functions/fnc_moduleHearing.sqf +++ b/addons/hearing/functions/fnc_moduleHearing.sqf @@ -21,4 +21,6 @@ if ((_logic getVariable "DisableEarRinging") != -1) then { [_logic, QGVAR(DisableEarRinging), "DisableEarRinging"] call EFUNC(common,readSettingFromModule); }; +[_logic, QGVAR(enabledForZeusUnits), "enabledForZeusUnits"] call EFUNC(common,readSettingFromModule); + diag_log text "[ACE]: Hearing Module Initialized."; diff --git a/addons/hearing/stringtable.xml b/addons/hearing/stringtable.xml index a3af102580..403434cf4f 100644 --- a/addons/hearing/stringtable.xml +++ b/addons/hearing/stringtable.xml @@ -118,7 +118,7 @@ Audição - Enable combat deafness? + Combat Deafness Wł. głuchotę bojową ¿Habilitar sordera de combate? Aktiviere Taubheit im Gefecht? @@ -140,5 +140,11 @@ Ztráta sluchu je možná ve chvíly, kdy se v bezprostřední blízkosti střílí z velkorážní zbraně nebo při bombardování a osoba je bez ochrany sluchu (např. špunty). Tento modul umožňuje tuto věc povolit nebo zakázat. Este módulo ativa / desativa surdez em combate. Quando ativado, os jogadores podem ficar surdos quando uma arma é disparada ao seu redor ou uma explosão ocorre sem proteção auditiva. + + Effect Zeus RC + + + Allow zeus remote controlled units to be able to take hearing damage. + \ No newline at end of file From 323832474fc94d271a86ee750758184b4b20d5a1 Mon Sep 17 00:00:00 2001 From: jokoho48 Date: Sun, 9 Aug 2015 14:53:13 +0200 Subject: [PATCH 063/371] Code cleanup of Dragging module --- addons/dragging/XEH_clientInit.sqf | 8 +- addons/dragging/XEH_serverInit.sqf | 2 +- addons/dragging/functions/fnc_canCarry.sqf | 18 ++-- addons/dragging/functions/fnc_canDrag.sqf | 14 ++-- addons/dragging/functions/fnc_canDrop.sqf | 17 ++-- .../dragging/functions/fnc_canDrop_carry.sqf | 17 ++-- addons/dragging/functions/fnc_carryObject.sqf | 17 ++-- .../dragging/functions/fnc_carryObjectPFH.sqf | 23 +++-- addons/dragging/functions/fnc_dragObject.sqf | 24 +++--- .../dragging/functions/fnc_dragObjectPFH.sqf | 24 ++++-- addons/dragging/functions/fnc_dropObject.sqf | 17 ++-- .../functions/fnc_dropObject_carry.sqf | 17 ++-- addons/dragging/functions/fnc_getWeight.sqf | 83 +++++++++---------- .../functions/fnc_handleAnimChanged.sqf | 18 +++- .../dragging/functions/fnc_handleKilled.sqf | 21 ++++- .../functions/fnc_handlePlayerChanged.sqf | 23 +++-- .../fnc_handlePlayerWeaponChanged.sqf | 23 +++-- .../functions/fnc_handleScrollWheel.sqf | 20 ++--- .../functions/fnc_handleUnconscious.sqf | 25 ++++-- addons/dragging/functions/fnc_initObject.sqf | 19 ++--- addons/dragging/functions/fnc_initPerson.sqf | 10 +-- .../functions/fnc_isObjectOnObject.sqf | 18 +++- .../dragging/functions/fnc_setCarryable.sqf | 26 +++--- .../dragging/functions/fnc_setDraggable.sqf | 16 ++-- addons/dragging/functions/fnc_startCarry.sqf | 19 ++--- .../dragging/functions/fnc_startCarryPFH.sqf | 31 ++++--- addons/dragging/functions/fnc_startDrag.sqf | 11 +-- .../dragging/functions/fnc_startDragPFH.sqf | 29 ++++--- 28 files changed, 335 insertions(+), 255 deletions(-) diff --git a/addons/dragging/XEH_clientInit.sqf b/addons/dragging/XEH_clientInit.sqf index 21d699c688..e80d63cfde 100644 --- a/addons/dragging/XEH_clientInit.sqf +++ b/addons/dragging/XEH_clientInit.sqf @@ -1,7 +1,7 @@ // by PabstMirror, commy2 #include "script_component.hpp" -[{_this call DFUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler); +[DFUNC(handleScrollWheel)] call EFUNC(common,addScrollWheelEventHandler); if (isNil "ACE_maxWeightDrag") then { ACE_maxWeightDrag = 800; @@ -15,11 +15,11 @@ if (isNil "ACE_maxWeightCarry") then { ["isNotCarrying", {!((_this select 0) getVariable [QGVAR(isCarrying), false])}] call EFUNC(common,addCanInteractWithCondition); // release object on player change. This does work when returning to lobby, but not when hard disconnecting. -["playerChanged", {_this call DFUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler); +["playerChanged", DFUNC(handlePlayerChanged)] call EFUNC(common,addEventhandler); ["playerVehicleChanged", {[ACE_player, objNull] call DFUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler); -["playerWeaponChanged", {_this call DFUNC(handlePlayerWeaponChanged)}] call EFUNC(common,addEventhandler); +["playerWeaponChanged", DFUNC(handlePlayerWeaponChanged)] call EFUNC(common,addEventhandler); // handle waking up dragged unit and falling unconscious while dragging -["medical_onUnconscious", {_this call DFUNC(handleUnconscious)}] call EFUNC(common,addEventhandler); +["medical_onUnconscious", DFUNC(handleUnconscious)] call EFUNC(common,addEventhandler); //@todo Captivity? diff --git a/addons/dragging/XEH_serverInit.sqf b/addons/dragging/XEH_serverInit.sqf index f6c231d275..01d78ef4e3 100644 --- a/addons/dragging/XEH_serverInit.sqf +++ b/addons/dragging/XEH_serverInit.sqf @@ -2,4 +2,4 @@ #include "script_component.hpp" // release object on hard disconnection. Function is identical to killed -addMissionEventHandler ["HandleDisconnect", {_this call DFUNC(handleKilled)}]; +addMissionEventHandler ["HandleDisconnect", DFUNC(handleKilled)]; diff --git a/addons/dragging/functions/fnc_canCarry.sqf b/addons/dragging/functions/fnc_canCarry.sqf index 6472124aef..0e44e3b860 100644 --- a/addons/dragging/functions/fnc_canCarry.sqf +++ b/addons/dragging/functions/fnc_canCarry.sqf @@ -3,19 +3,19 @@ * * Check if unit can carry the object. Doesn't check weight. * - * Argument: - * 0: Unit that should do the carrying (Object) - * 1: Object to carry (Object) + * Arguments: + * 0: Unit that should do the carrying + * 1: Object to carry * - * Return value: - * Can the unit carry the object? (Bool) + * Return Value: + * Can the unit carry the object? + * + * Public: No */ #include "script_component.hpp" -private ["_unit", "_target"]; - -_unit = _this select 0; -_target = _this select 1; +private +params ["_unit", "_target"]; if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false}; diff --git a/addons/dragging/functions/fnc_canDrag.sqf b/addons/dragging/functions/fnc_canDrag.sqf index 7eedfce179..4ab3562ba2 100644 --- a/addons/dragging/functions/fnc_canDrag.sqf +++ b/addons/dragging/functions/fnc_canDrag.sqf @@ -3,12 +3,14 @@ * * Check if unit can drag the object. Doesn't check weight. * - * Argument: - * 0: Unit that should do the dragging (Object) - * 1: Object to drag (Object) + * Arguments: + * 0: Unit that should do the dragging + * 1: Object to drag * - * Return value: - * Can the unit drag the object? (Bool) + * Return Value: + * Can the unit drag the object? + * + * Public: No */ #include "script_component.hpp" @@ -22,4 +24,4 @@ if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false}; // a static weapon has to be empty for dragging if ((typeOf _target) isKindOf "StaticWeapon" && {count crew _target > 0}) exitWith {false}; -alive _target && {vehicle _target == _target} && {_target getVariable [QGVAR(canDrag), false]} && {animationState _target in ["", "unconscious"] || (_target getvariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})}; \ No newline at end of file +alive _target && {vehicle _target == _target} && {_target getVariable [QGVAR(canDrag), false]} && {animationState _target in ["", "unconscious"] || (_target getvariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})}; diff --git a/addons/dragging/functions/fnc_canDrop.sqf b/addons/dragging/functions/fnc_canDrop.sqf index df75b9540f..58c02cab07 100644 --- a/addons/dragging/functions/fnc_canDrop.sqf +++ b/addons/dragging/functions/fnc_canDrop.sqf @@ -3,19 +3,18 @@ * * Check if unit can drop the object. * - * Argument: - * 0: Unit that currently drags a object (Object) - * 1: Object that is dragged (Object) + * Arguments: + * 0: Unit that currently drags a object + * 1: Object that is dragged * - * Return value: - * Can the unit drop the object? (Bool) + * Return Value: + * Can the unit drop the object? + * + * Public: No */ #include "script_component.hpp" -private ["_unit", "_target"]; - -_unit = _this select 0; -_target = _this select 1; +params ["_unit", "_target"]; if !([_unit, _target, ["isNotDragging"]] call EFUNC(common,canInteractWith)) exitWith {false}; diff --git a/addons/dragging/functions/fnc_canDrop_carry.sqf b/addons/dragging/functions/fnc_canDrop_carry.sqf index 9efbbe9b0f..430b12c642 100644 --- a/addons/dragging/functions/fnc_canDrop_carry.sqf +++ b/addons/dragging/functions/fnc_canDrop_carry.sqf @@ -3,19 +3,18 @@ * * Check if unit can drop the carried object. * - * Argument: - * 0: Unit that currently carries a object (Object) - * 1: Object that is carried (Object) + * Arguments: + * 0: Unit that currently carries a object + * 1: Object that is carried * - * Return value: - * Can the unit drop the object? (Bool) + * Return Value: + * Can the unit drop the object? + * + * Public: No */ #include "script_component.hpp" -private ["_unit", "_target"]; - -_unit = _this select 0; -_target = _this select 1; +params ["_unit", "_target"]; if !([_unit, _target, ["isNotCarrying"]] call EFUNC(common,canInteractWith)) exitWith {false}; diff --git a/addons/dragging/functions/fnc_carryObject.sqf b/addons/dragging/functions/fnc_carryObject.sqf index bb413d8240..7f70b2bdc5 100644 --- a/addons/dragging/functions/fnc_carryObject.sqf +++ b/addons/dragging/functions/fnc_carryObject.sqf @@ -3,19 +3,18 @@ * * Carry an object. * - * Argument: - * 0: Unit that should do the carrying (Object) - * 1: Object to carry (Object) + * Arguments: + * 0: Unit that should do the carrying + * 1: Object to carry * - * Return value: - * NONE. + * Return Value: + * None + * + * Public: No */ #include "script_component.hpp" -private ["_unit", "_target"]; - -_unit = _this select 0; -_target = _this select 1; +params ["_unit", "_target"]; // get attachTo offset and direction. private ["_position", "_direction"]; diff --git a/addons/dragging/functions/fnc_carryObjectPFH.sqf b/addons/dragging/functions/fnc_carryObjectPFH.sqf index 3ad1f89f77..3c28c9737b 100644 --- a/addons/dragging/functions/fnc_carryObjectPFH.sqf +++ b/addons/dragging/functions/fnc_carryObjectPFH.sqf @@ -1,4 +1,16 @@ -// by commy2 +/* + * Author: commy2 + * + * PFH for Crarry Object + * + * Arguments: + * ? + * + * Return Value: + * None + * + * Public: No + */ #include "script_component.hpp" #ifdef DEBUG_ENABLED_DRAGGING @@ -6,16 +18,15 @@ #endif private ["_unit", "_target"]; - -_unit = _this select 0 select 0; -_target = _this select 0 select 1; +params ["_args", "_idPFH"]; +_args params ["_unit","_target"]; if !(_unit getVariable [QGVAR(isCarrying), false]) exitWith { - [_this select 1] call CBA_fnc_removePerFrameHandler; + [_idPFH] call CBA_fnc_removePerFrameHandler; }; // drop if the crate is destroyed OR (target moved away from carrier (weapon disasembled)) if ((!([_target] call EFUNC(common,isAlive))) || {(_unit distance _target) > 10}) then { [_unit, _target] call FUNC(dropObject_carry); - [_this select 1] call CBA_fnc_removePerFrameHandler; + [_idPFH] call CBA_fnc_removePerFrameHandler; }; diff --git a/addons/dragging/functions/fnc_dragObject.sqf b/addons/dragging/functions/fnc_dragObject.sqf index e4b200c4dd..65fa277403 100644 --- a/addons/dragging/functions/fnc_dragObject.sqf +++ b/addons/dragging/functions/fnc_dragObject.sqf @@ -3,28 +3,25 @@ * * Drag an object. Called from ace_dragging_fnc_startDrag * - * Argument: - * 0: Unit that should do the dragging (Object) - * 1: Object to drag (Object) + * Arguments: + * 0: Unit that should do the dragging + * 1: Object to drag * - * Return value: - * NONE. + * Return Value: + * None + * + * Public: No */ #include "script_component.hpp" -private ["_unit", "_target"]; - -_unit = _this select 0; -_target = _this select 1; +private ["_position", "_direction", "_offset", "_actionID"]; +params ["_unit", "_target"]; // get attachTo offset and direction. -private ["_position", "_direction"]; - _position = _target getVariable [QGVAR(dragPosition), [0, 0, 0]]; _direction = _target getVariable [QGVAR(dragDirection), 0]; // add height offset of model -private "_offset"; _offset = (_target modelToWorldVisual [0, 0, 0] select 2) - (_unit modelToWorldVisual [0, 0, 0] select 2); _position = _position vectorAdd [0, 0, _offset]; @@ -41,7 +38,6 @@ _unit setVariable [QGVAR(isDragging), true, true]; _unit setVariable [QGVAR(draggedObject), _target, true]; // add scrollwheel action to release object -private "_actionID"; _actionID = _unit getVariable [QGVAR(ReleaseActionID), -1]; if (_actionID != -1) then { @@ -50,7 +46,7 @@ if (_actionID != -1) then { _actionID = _unit addAction [ format ["%1", localize LSTRING(Drop)], - QUOTE([ARR_2(_this select 0, (_this select 0) getVariable [ARR_2(QUOTE(QGVAR(draggedObject)),objNull)])] call FUNC(dropObject)), + QUOTE(param ['_unit']; [ARR_2('_unit', ('_unit') getVariable [ARR_2(QUOTE(QGVAR(draggedObject)),objNull)])] call FUNC(dropObject)), nil, 20, false, diff --git a/addons/dragging/functions/fnc_dragObjectPFH.sqf b/addons/dragging/functions/fnc_dragObjectPFH.sqf index 465107af39..dea8897b27 100644 --- a/addons/dragging/functions/fnc_dragObjectPFH.sqf +++ b/addons/dragging/functions/fnc_dragObjectPFH.sqf @@ -1,21 +1,31 @@ -// by commy2 +/* + * Author: commy2 + * + * PFH for Drag Object + * + * Arguments: + * ? + * + * Return Value: + * None + * + * Public: No + */ #include "script_component.hpp" #ifdef DEBUG_ENABLED_DRAGGING systemChat format ["%1 dragObjectPFH running", ACE_time]; #endif -private ["_unit", "_target"]; - -_unit = _this select 0 select 0; -_target = _this select 0 select 1; +params ["_args", "_idPFH"]; +_args params ["_unit", "_target"]; if !(_unit getVariable [QGVAR(isDragging), false]) exitWith { - [_this select 1] call CBA_fnc_removePerFrameHandler; + [_idPFH] call CBA_fnc_removePerFrameHandler; }; // drop if the crate is destroyed OR (target moved away from carrier (weapon disasembled)) if ((!([_target] call EFUNC(common,isAlive))) || {(_unit distance _target) > 10}) then { [_unit, _target] call FUNC(dropObject); - [_this select 1] call CBA_fnc_removePerFrameHandler; + [_idPFH] call CBA_fnc_removePerFrameHandler; }; diff --git a/addons/dragging/functions/fnc_dropObject.sqf b/addons/dragging/functions/fnc_dropObject.sqf index 9589457dbe..2ae07be091 100644 --- a/addons/dragging/functions/fnc_dropObject.sqf +++ b/addons/dragging/functions/fnc_dropObject.sqf @@ -3,19 +3,18 @@ * * Drop a dragged object. * - * Argument: - * 0: Unit that drags the other object (Object) - * 1: Dragged object to drop (Object) + * Arguments: + * 0: Unit that drags the other object + * 1: Dragged object to drop * - * Return value: - * NONE. + * Return Value: + * None + * + * Public: No */ #include "script_component.hpp" -private ["_unit", "_target"]; - -_unit = _this select 0; -_target = _this select 1; +params ["_unit", "_target"]; // remove scroll wheel action _unit removeAction (_unit getVariable [QGVAR(ReleaseActionID), -1]); diff --git a/addons/dragging/functions/fnc_dropObject_carry.sqf b/addons/dragging/functions/fnc_dropObject_carry.sqf index b6dfe9fc45..86009ac867 100644 --- a/addons/dragging/functions/fnc_dropObject_carry.sqf +++ b/addons/dragging/functions/fnc_dropObject_carry.sqf @@ -3,19 +3,18 @@ * * Drop a carried object. * - * Argument: - * 0: Unit that carries the other object (Object) - * 1: Carried object to drop (Object) + * Arguments: + * 0: Unit that carries the other object + * 1: Carried object to drop * - * Return value: - * NONE. + * Return Value: + * None + * + * Public: No */ #include "script_component.hpp" -private ["_unit", "_target"]; - -_unit = _this select 0; -_target = _this select 1; +params ["_unit", "_target"]; // remove scroll wheel action _unit removeAction (_unit getVariable [QGVAR(ReleaseActionID), -1]); diff --git a/addons/dragging/functions/fnc_getWeight.sqf b/addons/dragging/functions/fnc_getWeight.sqf index 871c49db89..d6e1b65ba5 100644 --- a/addons/dragging/functions/fnc_getWeight.sqf +++ b/addons/dragging/functions/fnc_getWeight.sqf @@ -1,54 +1,45 @@ /* - Name: AGM_Drag_fnc_GetWeight - - Author(s): - L-H, edited by commy2 - - Description: - Returns the weight of a crate. - - Parameters: - 0: OBJECT - Crate to get weight of - - Returns: - NUMBER - Weight - - Example: - _weight = Crate1 call AGM_Drag_fnc_GetWeight; + * Author: L-H, edited by commy2, rewritten by joko // Jonas + * + * Returns the weight of a crate. + * + * Arguments: + * Crate to get weight of + * + * Return Value: + * Total Weight + * + * Example: + * _weight = Crate1 call ace_dragging_fnc_getweight; + * + * Public: No */ #include "script_component.hpp" -private "_object"; +private "_totalWeight"; -_object = _this select 0; - -private ["_totalWeight", "_fnc","_fnc_Extra"]; +// Initialize the total weight. _totalWeight = 0; -_fnc_Extra = { - private ["_weight", "_items"]; - _items = _this select 0; - _weight = 0; - { - _weight = _weight + (getNumber (ConfigFile >> (_this select 1) >> _x >> (_this select 2) >> "mass") * ((_items select 1) select _foreachIndex)); - } foreach (_items select 0); - - _weight -}; -_fnc = { - private ["_weight", "_items"]; - _items = _this select 0; - _weight = 0; - { - _weight = _weight + (getNumber (ConfigFile >> (_this select 1) >> _x >> "mass") * ((_items select 1) select _foreachIndex)); - } foreach (_items select 0); - - _weight -}; -_totalWeight = ([getMagazineCargo _object, "CfgMagazines"] call _fnc); -_totalWeight = _totalWeight + ([getItemCargo _object, "CfgWeapons", "ItemInfo"] call _fnc_Extra); -_totalWeight = _totalWeight + ([getWeaponCargo _object, "CfgWeapons", "WeaponSlotsInfo"] call _fnc_Extra); -_totalWeight = _totalWeight + ([getBackpackCargo _object, "CfgVehicles"] call _fnc); -_totalWeight = _totalWeight * 0.5; // Mass in Arma isn't an exact amount but rather a volume/weight value. This attempts to work around that by making it a usable value. (sort of). +// Cycle through all item types with their assigned config paths. +{ + _x params["_items","_getConfigCode"]; + _items params ["_item", "_count"] + // Cycle through all items and read their mass out of the config. + { + // Multiply mass with amount of items and add the mass to the total weight. + _totalWeight = _totalWeight + (getNumber ((call _getConfigCode) >> "mass") * (_count select _forEachIndex)); + } forEach _item; + true +} count [ + [getMagazineCargo _this, {configFile >> "CfgMagazines" >> _x}], + [getBackpackCargo _this, {configFile >> "CfgVehicles" >> _x}], + [getItemCargo _this, {configFile >> "CfgWeapons" >> _x >> "ItemInfo"}], + [getWeaponCargo _this, {configFile >> "CfgWeapons" >> _x >> "WeaponSlotsInfo"}] +]; -_totalWeight +// add Weight of create to totalWeight +_totalWeight = _totalWeight + (getNumber (configFile >> "CfgVehicles" >> _this >> "mass")); + +// Mass in Arma isn't an exact amount but rather a volume/weight value. This attempts to work around that by making it a usable value. (sort of). +_totalWeight * 0.5 diff --git a/addons/dragging/functions/fnc_handleAnimChanged.sqf b/addons/dragging/functions/fnc_handleAnimChanged.sqf index 14b2eff611..2c3a654842 100644 --- a/addons/dragging/functions/fnc_handleAnimChanged.sqf +++ b/addons/dragging/functions/fnc_handleAnimChanged.sqf @@ -1,4 +1,20 @@ -// by commy2 +/* + * Author: commy2 + * + * Handle the Animaion for a Unit for Dragging Module + * + * Arguments: + * 0: Unit + * 1: Animaion + * + * Return Value: + * None + * + * Example: + * [_unit, "amovpercmstpsnonwnondnon"] call ace_dragging_fnc_handleAnimChanged; + * + * Public: No +*/ #include "script_component.hpp" private ["_unit", "_anim"]; diff --git a/addons/dragging/functions/fnc_handleKilled.sqf b/addons/dragging/functions/fnc_handleKilled.sqf index 4dcfc77fcd..a7d9c5eb8f 100644 --- a/addons/dragging/functions/fnc_handleKilled.sqf +++ b/addons/dragging/functions/fnc_handleKilled.sqf @@ -1,9 +1,22 @@ -// by commy2 +/* + * Author: commy2 + * + * Handle the Kill of the Dragger + * + * Arguments: + * 0: Unit + * + * Return Value: + * None + * + * Example: + * [_unit] call ace_dragging_fnc_handleKilled; + * + * Public: No +*/ #include "script_component.hpp" -private "_unit"; - -_unit = _this select 0; +params ["_unit"]; if (_unit getVariable [QGVAR(isDragging), false]) then { private "_draggedObject"; diff --git a/addons/dragging/functions/fnc_handlePlayerChanged.sqf b/addons/dragging/functions/fnc_handlePlayerChanged.sqf index e2dd41021b..4ea46749bb 100644 --- a/addons/dragging/functions/fnc_handlePlayerChanged.sqf +++ b/addons/dragging/functions/fnc_handlePlayerChanged.sqf @@ -1,10 +1,23 @@ -// by commy2 +/* + * Author: commy2 + * + * Handle the Event if player is Changed + * + * Arguments: + * 0: New Player Unit + * 1: Old Player Unit + * + * Return Value: + * None + * + * Example: + * [_unitNew, _unitOld] call ace_dragging_fnc_handlePlayerChanged; + * + * Public: No +*/ #include "script_component.hpp" -private ["_newPlayer", "_oldPlayer"]; - -_newPlayer = _this select 0; -_oldPlayer = _this select 1; +params ["_newPlayer", "_oldPlayer"]; { if (_x getVariable [QGVAR(isDragging), false]) then { diff --git a/addons/dragging/functions/fnc_handlePlayerWeaponChanged.sqf b/addons/dragging/functions/fnc_handlePlayerWeaponChanged.sqf index a7f9be7681..e0f1b2a8e4 100644 --- a/addons/dragging/functions/fnc_handlePlayerWeaponChanged.sqf +++ b/addons/dragging/functions/fnc_handlePlayerWeaponChanged.sqf @@ -1,10 +1,23 @@ -// by commy2 +/* + * Author: commy2 + * + * Handle the Weapon Changed Event + * + * Arguments: + * 0: Unit + * 1: Weapon + * + * Return Value: + * None + * + * Example: + * [_unit, _currentWeapon] call ace_dragging_fnc_handlePlayerWeaponChanged; + * + * Public: No +*/ #include "script_component.hpp" -private ["_unit", "_weapon"]; - -_unit = _this select 0; -_weapon = _this select 1; +params ["_unit", "_weapon"]; if (_unit getVariable [QGVAR(isDragging), false]) then { diff --git a/addons/dragging/functions/fnc_handleScrollWheel.sqf b/addons/dragging/functions/fnc_handleScrollWheel.sqf index 96f46413bc..ac3941a79e 100644 --- a/addons/dragging/functions/fnc_handleScrollWheel.sqf +++ b/addons/dragging/functions/fnc_handleScrollWheel.sqf @@ -3,38 +3,38 @@ * * Handles raising and lowering the dragged weapon to be able to place it on top of objects. * - * Argument: - * 0: Scroll amount (Number) + * Arguments: + * 0: Scroll amount * - * Return value: - * Handled or not. (Bool) + * Return Value: + * Handled or not. + * + * Public: No */ #include "script_component.hpp" +private ["_unit", "_carriedItem", "_position", "_maxHeight", ] + +params ["_scrollAmount"]; + // requires modifier key to be hold down if (GETMVAR(ACE_Modifier,0) == 0) exitWith {false}; -private "_unit"; _unit = ACE_player; // EH is always assigned. Exit and don't overwrite input if not carrying if !(_unit getVariable [QGVAR(isCarrying), false]) exitWith {false}; -private "_scrollAmount"; -_scrollAmount = _this select 0; // move carried item 15 cm per scroll interval _scrollAmount = _scrollAmount * 0.15; -private "_carriedItem"; _carriedItem = _unit getVariable [QGVAR(carriedObject), objNull]; //disabled for persons if (_carriedItem isKindOf "CAManBase") exitWith {false}; -private ["_position", "_maxHeight"]; - _position = getPosATL _carriedItem; _maxHeight = (_unit modelToWorldVisual [0,0,0]) select 2; diff --git a/addons/dragging/functions/fnc_handleUnconscious.sqf b/addons/dragging/functions/fnc_handleUnconscious.sqf index 31c703f37b..6cdc9d26cf 100644 --- a/addons/dragging/functions/fnc_handleUnconscious.sqf +++ b/addons/dragging/functions/fnc_handleUnconscious.sqf @@ -1,17 +1,29 @@ -// by commy2 +/* + * Author: commy2 + * + * Handle the Unconscious of a Unit while Dragging + * + * Arguments: + * 0: Unit + * + * Return Value: + * None + * + * Example: + * [_unit] call ace_dragging_fnc_handlePlayerWeaponChanged; + * + * Public: No +*/ #include "script_component.hpp" -private ["_unit", "_isUnconscious"]; +private ["_player", "_draggedObject", "_carriedObject"]; -_unit = _this select 0; -_isUnconscious = _this select 1; +params ["_unit"]; -private "_player"; _player = ACE_player; if (_player getVariable [QGVAR(isDragging), false]) then { - private "_draggedObject"; _draggedObject = _player getVariable [QGVAR(draggedObject), objNull]; // handle falling unconscious @@ -28,7 +40,6 @@ if (_player getVariable [QGVAR(isDragging), false]) then { if (_player getVariable [QGVAR(isCarrying), false]) then { - private "_carriedObject"; _carriedObject = _player getVariable [QGVAR(carriedObject), objNull]; // handle falling unconscious diff --git a/addons/dragging/functions/fnc_initObject.sqf b/addons/dragging/functions/fnc_initObject.sqf index 65866bd028..37999d4dc5 100644 --- a/addons/dragging/functions/fnc_initObject.sqf +++ b/addons/dragging/functions/fnc_initObject.sqf @@ -4,32 +4,29 @@ * Initialize variables for drag or carryable objects. Called from init EH. * * Argument: - * 0: Any object (Object) + * 0: Any object * - * Return value: - * NONE. + * Return Value: + * None + * + * Public: No */ #include "script_component.hpp" -private "_object"; +private ["_position", "_direction", "config"]; -_object = _this select 0; +params ["_object"]; -private "_config"; _config = configFile >> "CfgVehicles" >> typeOf _object; if (getNumber (_config >> QGVAR(canDrag)) == 1) then { - private ["_position", "_direction"]; - _position = getArray (_config >> QGVAR(dragPosition)); _direction = getNumber (_config >> QGVAR(dragDirection)); [_object, true, _position, _direction] call FUNC(setDraggable); }; -if (getNumber (_config >> QGVAR(canCarry)) == 1) then { - private ["_position", "_direction"]; - +if (getNumber (_config >> QGVAR(canCarry)) == 1) then _position = getArray (_config >> QGVAR(carryPosition)); _direction = getNumber (_config >> QGVAR(carryDirection)); diff --git a/addons/dragging/functions/fnc_initPerson.sqf b/addons/dragging/functions/fnc_initPerson.sqf index 0dc2af1389..c0a951771c 100644 --- a/addons/dragging/functions/fnc_initPerson.sqf +++ b/addons/dragging/functions/fnc_initPerson.sqf @@ -4,16 +4,16 @@ * Initialize variables for drag or carryable persons. Called from init EH. * * Argument: - * 0: Any Unit (Object) + * 0: Unit * * Return value: - * NONE. + * None + * + * Public: No */ #include "script_component.hpp" -private "_unit"; - -_unit = _this select 0; +params ["_unit"]; [_unit, true, [0,1.1,0.092], 180] call FUNC(setDraggable); [_unit, true, [0.4,-0.1,-1.25], 195] call FUNC(setCarryable); // hard-coded selection: "LeftShoulder" diff --git a/addons/dragging/functions/fnc_isObjectOnObject.sqf b/addons/dragging/functions/fnc_isObjectOnObject.sqf index 0a8624820e..e8ab5f307a 100644 --- a/addons/dragging/functions/fnc_isObjectOnObject.sqf +++ b/addons/dragging/functions/fnc_isObjectOnObject.sqf @@ -1,6 +1,16 @@ -// by commy2 - -private "_object"; -_object = _this select 0; +/* + * Author: commy2 + * + * Check if Object is Overlapping + * + * Argument: + * 0: Object + * + * Return value: + * + * + * Public: No + */ +params ["_object"]; (getPosATL _object select 2) - (getPos _object select 2) > 1E-5 diff --git a/addons/dragging/functions/fnc_setCarryable.sqf b/addons/dragging/functions/fnc_setCarryable.sqf index 52c6e5643a..6bf05e5fde 100644 --- a/addons/dragging/functions/fnc_setCarryable.sqf +++ b/addons/dragging/functions/fnc_setCarryable.sqf @@ -4,25 +4,21 @@ * Enable the object to be carried. * * Argument: - * 0: Any object (Object) - * 1: true to enable carrying, false to disable (Bool) - * 2: Position offset for attachTo command (Array, optinal; default: [0,1,1]) - * 3: Direction in degree to rotate the object after attachTo (Number, optional; default: 0) + * 0: Any object + * 1: true to enable carrying, false to disable + * 2: Position offset for attachTo command (default: [0,1,1]) + * 3: Direction in degree to rotate the object after attachTo (default: 0) * - * Return value: - * NONE. + * Return Value: + * None + * + * Public: Yes */ #include "script_component.hpp" -private ["_carryAction", "_dropAction", "_object", "_enableCarry", "_position", "_direction"]; -//IGNORE_PRIVATE_WARNING("_player", "_target"); +private ["_carryAction", "_dropAction", "_type", "_initializedClasses"]; -_this resize 4; - -_object = _this select 0; -_enableCarry = _this select 1; -_position = _this select 2; -_direction = _this select 3; +params ["_object", "_enableCarry", "_position", "_direction"]; if (isNil "_position") then { _position = _object getVariable [QGVAR(carryPosition), [0,1,1]]; @@ -38,8 +34,6 @@ _object setVariable [QGVAR(carryPosition), _position]; _object setVariable [QGVAR(carryDirection), _direction]; // add action to class if it is not already present -private ["_type", "_initializedClasses"]; - _type = typeOf _object; _initializedClasses = GETGVAR(initializedClasses_carry,[]); diff --git a/addons/dragging/functions/fnc_setDraggable.sqf b/addons/dragging/functions/fnc_setDraggable.sqf index 7745bd2d3e..bbfca9d868 100644 --- a/addons/dragging/functions/fnc_setDraggable.sqf +++ b/addons/dragging/functions/fnc_setDraggable.sqf @@ -10,19 +10,15 @@ * 3: Direction in degree to rotate the object after attachTo (Number, optional; default: 0) * * Return value: - * NONE. + * None + * + * Public: Yes */ #include "script_component.hpp" -private ["_dragAction", "_dropAction", "_object", "_enableDrag", "_position", "_direction"]; +private ["_dragAction", "_dropAction", "_type", "_initializedClasses"]; //IGNORE_PRIVATE_WARNING("_player", "_target"); - -_this resize 4; - -_object = _this select 0; -_enableDrag = _this select 1; -_position = _this select 2; -_direction = _this select 3; +params ["_object", "_enableDrag", "_position", "_direction"]; if (isNil "_position") then { _position = _object getVariable [QGVAR(dragPosition), [0,0,0]]; @@ -38,8 +34,6 @@ _object setVariable [QGVAR(dragPosition), _position]; _object setVariable [QGVAR(dragDirection), _direction]; // add action to class if it is not already present -private ["_type", "_initializedClasses"]; - _type = typeOf _object; _initializedClasses = GETGVAR(initializedClasses,[]); diff --git a/addons/dragging/functions/fnc_startCarry.sqf b/addons/dragging/functions/fnc_startCarry.sqf index 5521bec375..c905bad8f3 100644 --- a/addons/dragging/functions/fnc_startCarry.sqf +++ b/addons/dragging/functions/fnc_startCarry.sqf @@ -3,29 +3,28 @@ * * Start the carrying process. * - * Argument: - * 0: Unit that should do the carrying (Object) - * 1: Object to carry (Object) + * Arguments: + * 0: Unit that should do the carrying + * 1: Object to carry * - * Return value: - * NONE. + * Return Value: + * None + * + * Public: No */ #include "script_component.hpp" -private ["_unit", "_target"]; +private ["_weight", "_timer"]; -_unit = _this select 0; -_target = _this select 1; +params ["_unit", "_target"]; // check weight -private "_weight"; _weight = [_target] call FUNC(getWeight); if (_weight > GETMVAR(ACE_maxWeightCarry,1E11)) exitWith { [localize LSTRING(UnableToDrag)] call EFUNC(common,displayTextStructured); }; -private "_timer"; _timer = ACE_time + 5; // handle objects vs persons diff --git a/addons/dragging/functions/fnc_startCarryPFH.sqf b/addons/dragging/functions/fnc_startCarryPFH.sqf index 47824a8e76..ae5ad17978 100644 --- a/addons/dragging/functions/fnc_startCarryPFH.sqf +++ b/addons/dragging/functions/fnc_startCarryPFH.sqf @@ -1,25 +1,34 @@ -// by commy2 +/* + * Author: commy2 + * + * Carry PFH + * + * Arguments: + * ? + * + * Return Value: + * None + * + * Public: No + */ #include "script_component.hpp" #ifdef DEBUG_ENABLED_DRAGGING systemChat format ["%1 startCarryPFH running", ACE_time]; #endif -private ["_unit", "_target", "_timeOut"]; - -_unit = _this select 0 select 0; -_target = _this select 0 select 1; -_timeOut = _this select 0 select 2; +params ["_args", "_idPFH"]; +_args params ["_unit", "_target", "_timeOut"]; // handle aborting carry if !(_unit getVariable [QGVAR(isCarrying), false]) exitWith { - [_this select 1] call CBA_fnc_removePerFrameHandler; + [_idPFH] call CBA_fnc_removePerFrameHandler; }; // same as dragObjectPFH, checks if object is deleted or dead OR (target moved away from carrier (weapon disasembled)) if ((!([_target] call EFUNC(common,isAlive))) || {(_unit distance _target) > 10}) then { [_unit, _target] call FUNC(dropObject); - [_this select 1] call CBA_fnc_removePerFrameHandler; + [_idPFH] call CBA_fnc_removePerFrameHandler; }; // handle persons vs objects @@ -27,11 +36,11 @@ if (_target isKindOf "CAManBase") then { if (ACE_time > _timeOut) exitWith { [_unit, _target] call FUNC(carryObject); - [_this select 1] call CBA_fnc_removePerFrameHandler; + [_idPFH] call CBA_fnc_removePerFrameHandler; }; } else { if (ACE_time > _timeOut) exitWith { - [_this select 1] call CBA_fnc_removePerFrameHandler; + [_idPFH] call CBA_fnc_removePerFrameHandler; // drop if in timeout private "_draggedObject"; @@ -43,7 +52,7 @@ if (_target isKindOf "CAManBase") then { if (stance _unit == "STAND") exitWith { [_unit, _target] call FUNC(carryObject); - [_this select 1] call CBA_fnc_removePerFrameHandler; + [_idPFH] call CBA_fnc_removePerFrameHandler; }; }; diff --git a/addons/dragging/functions/fnc_startDrag.sqf b/addons/dragging/functions/fnc_startDrag.sqf index 1d4eb9a158..43a8a14695 100644 --- a/addons/dragging/functions/fnc_startDrag.sqf +++ b/addons/dragging/functions/fnc_startDrag.sqf @@ -4,18 +4,15 @@ * Start the dragging process. * * Argument: - * 0: Unit that should do the dragging (Object) - * 1: Object to drag (Object) + * 0: Unit that should do the dragging + * 1: Object to drag * * Return value: - * NONE. + * None */ #include "script_component.hpp" -private ["_unit", "_target"]; - -_unit = _this select 0; -_target = _this select 1; +params ["_unit", "_target"]; // check weight private "_weight"; diff --git a/addons/dragging/functions/fnc_startDragPFH.sqf b/addons/dragging/functions/fnc_startDragPFH.sqf index 65cf0a2431..f527cda7d8 100644 --- a/addons/dragging/functions/fnc_startDragPFH.sqf +++ b/addons/dragging/functions/fnc_startDragPFH.sqf @@ -1,30 +1,39 @@ -// by commy2 +/* + * Author: commy2 + * + * Drag PFH + * + * Arguments: + * ? + * + * Return Value: + * None + * + * Public: No + */ #include "script_component.hpp" #ifdef DEBUG_ENABLED_DRAGGING systemChat format ["%1 startDragPFH running", ACE_time]; #endif -private ["_unit", "_target", "_timeOut"]; - -_unit = _this select 0 select 0; -_target = _this select 0 select 1; -_timeOut = _this select 0 select 2; +params ["_args", "_idPFH"]; +_args params ["_unit", "_target", "_timeOut"]; // handle aborting drag if !(_unit getVariable [QGVAR(isDragging), false]) exitWith { - [_this select 1] call CBA_fnc_removePerFrameHandler; + [_idPFH] call CBA_fnc_removePerFrameHandler; }; // same as dragObjectPFH, checks if object is deleted or dead OR (target moved away from carrier (weapon disasembled)) if ((!([_target] call EFUNC(common,isAlive))) || {(_unit distance _target) > 10}) then { [_unit, _target] call FUNC(dropObject); - [_this select 1] call CBA_fnc_removePerFrameHandler; + [_idPFH] call CBA_fnc_removePerFrameHandler; }; // timeout. Do nothing. Quit. ACE_time, because anim length is linked to ingame ACE_time. if (ACE_time > _timeOut) exitWith { - [_this select 1] call CBA_fnc_removePerFrameHandler; + [_idPFH] call CBA_fnc_removePerFrameHandler; // drop if in timeout private "_draggedObject"; @@ -36,5 +45,5 @@ if (ACE_time > _timeOut) exitWith { if (animationState _unit in DRAG_ANIMATIONS) exitWith { [_unit, _target] call FUNC(dragObject); - [_this select 1] call CBA_fnc_removePerFrameHandler; + [_idPFH] call CBA_fnc_removePerFrameHandler; }; From 79cf8dd98e1c990ba2c24b054b75e126b5bed844 Mon Sep 17 00:00:00 2001 From: jokoho48 Date: Sun, 9 Aug 2015 15:20:50 +0200 Subject: [PATCH 064/371] Fixing Some Spelling Remove Some forgotten Commands --- addons/dragging/functions/fnc_canCarry.sqf | 1 - addons/dragging/functions/fnc_carryObjectPFH.sqf | 3 +-- addons/dragging/functions/fnc_handleAnimChanged.sqf | 4 ++-- addons/dragging/functions/fnc_handleKilled.sqf | 2 +- addons/dragging/functions/fnc_handlePlayerChanged.sqf | 2 +- addons/dragging/functions/fnc_handleUnconscious.sqf | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/addons/dragging/functions/fnc_canCarry.sqf b/addons/dragging/functions/fnc_canCarry.sqf index 0e44e3b860..a6b8fed5ab 100644 --- a/addons/dragging/functions/fnc_canCarry.sqf +++ b/addons/dragging/functions/fnc_canCarry.sqf @@ -14,7 +14,6 @@ */ #include "script_component.hpp" -private params ["_unit", "_target"]; if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false}; diff --git a/addons/dragging/functions/fnc_carryObjectPFH.sqf b/addons/dragging/functions/fnc_carryObjectPFH.sqf index 3c28c9737b..d0eb7fda17 100644 --- a/addons/dragging/functions/fnc_carryObjectPFH.sqf +++ b/addons/dragging/functions/fnc_carryObjectPFH.sqf @@ -1,7 +1,7 @@ /* * Author: commy2 * - * PFH for Crarry Object + * PFH for Carry Object * * Arguments: * ? @@ -17,7 +17,6 @@ systemChat format ["%1 carryObjectPFH running", ACE_time]; #endif -private ["_unit", "_target"]; params ["_args", "_idPFH"]; _args params ["_unit","_target"]; diff --git a/addons/dragging/functions/fnc_handleAnimChanged.sqf b/addons/dragging/functions/fnc_handleAnimChanged.sqf index 2c3a654842..0694687ca4 100644 --- a/addons/dragging/functions/fnc_handleAnimChanged.sqf +++ b/addons/dragging/functions/fnc_handleAnimChanged.sqf @@ -1,11 +1,11 @@ /* * Author: commy2 * - * Handle the Animaion for a Unit for Dragging Module + * Handle the animaion for a Unit for Dragging Module * * Arguments: * 0: Unit - * 1: Animaion + * 1: animaion * * Return Value: * None diff --git a/addons/dragging/functions/fnc_handleKilled.sqf b/addons/dragging/functions/fnc_handleKilled.sqf index a7d9c5eb8f..2d0923d624 100644 --- a/addons/dragging/functions/fnc_handleKilled.sqf +++ b/addons/dragging/functions/fnc_handleKilled.sqf @@ -1,7 +1,7 @@ /* * Author: commy2 * - * Handle the Kill of the Dragger + * Handle death of the dragger * * Arguments: * 0: Unit diff --git a/addons/dragging/functions/fnc_handlePlayerChanged.sqf b/addons/dragging/functions/fnc_handlePlayerChanged.sqf index 4ea46749bb..41c9091c72 100644 --- a/addons/dragging/functions/fnc_handlePlayerChanged.sqf +++ b/addons/dragging/functions/fnc_handlePlayerChanged.sqf @@ -1,7 +1,7 @@ /* * Author: commy2 * - * Handle the Event if player is Changed + * Handle player changes. * * Arguments: * 0: New Player Unit diff --git a/addons/dragging/functions/fnc_handleUnconscious.sqf b/addons/dragging/functions/fnc_handleUnconscious.sqf index 6cdc9d26cf..b87e36b92d 100644 --- a/addons/dragging/functions/fnc_handleUnconscious.sqf +++ b/addons/dragging/functions/fnc_handleUnconscious.sqf @@ -10,7 +10,7 @@ * None * * Example: - * [_unit] call ace_dragging_fnc_handlePlayerWeaponChanged; + * [_unit] call ace_dragging_fnc_handleUnconscious; * * Public: No */ From c30cb45bd63fc40a0f6d8087f82655ac0363227d Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sun, 9 Aug 2015 20:59:57 +0100 Subject: [PATCH 065/371] Optimize spectator UI held key prevention system --- addons/spectator/functions/fnc_handleInterface.sqf | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index 80ee564ab5..335b71bbe1 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -33,6 +33,7 @@ switch (toLower _mode) do { // Initalize display variables GVAR(ctrlKey) = false; GVAR(heldKeys) = []; + GVAR(heldKeys) resize 255; GVAR(mouse) = [false,false]; GVAR(mousePos) = [0.5,0.5]; GVAR(treeSel) = objNull; @@ -250,10 +251,10 @@ switch (toLower _mode) do { }; // Handle held keys (prevent repeat calling) - if (_dik in GVAR(heldKeys)) exitwith {}; + if (GVAR(heldKeys) param [_dik,false]) exitwith {}; // Exclude movement/adjustment keys so that speed can be adjusted on fly if !(_dik in [16,17,30,31,32,44,74,78]) then { - GVAR(heldKeys) pushBack _dik; + GVAR(heldKeys) set [_dik,true]; }; switch (_dik) do { @@ -358,7 +359,7 @@ switch (toLower _mode) do { _args params ["_display","_dik","_shift","_ctrl","_alt"]; // No longer being held - GVAR(heldKeys) = GVAR(heldKeys) - [_dik]; + GVAR(heldKeys) set [_dik,nil]; switch (_dik) do { case 16: { // Q @@ -523,6 +524,7 @@ switch (toLower _mode) do { GVAR(ctrlKey) = false; GVAR(heldKeys) = []; + GVAR(heldKeys) resize 255; GVAR(mouse) = [false,false]; GVAR(mousePos) = [0.5,0.5]; GVAR(treeSel) = objNull; @@ -577,6 +579,7 @@ switch (toLower _mode) do { GVAR(ctrlKey) = false; GVAR(heldKeys) = []; + GVAR(heldKeys) resize 255; GVAR(mouse) = [false,false]; GVAR(mousePos) = [0.5,0.5]; GVAR(treeSel) = objNull; From 4cce799ace5fcc1fb73265d8233370cffebac75a Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Mon, 10 Aug 2015 22:08:13 -0500 Subject: [PATCH 066/371] #2045 - Push SDV sub, cleanup push --- addons/interaction/CfgVehicles.hpp | 4 ++-- addons/interaction/XEH_postInit.sqf | 7 +++++++ addons/interaction/functions/fnc_push.sqf | 16 ++++++++-------- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp index 6a492b14ad..d3260fd577 100644 --- a/addons/interaction/CfgVehicles.hpp +++ b/addons/interaction/CfgVehicles.hpp @@ -501,8 +501,8 @@ class CfgVehicles { class ACE_Push { displayName = CSTRING(Push); distance = 6; - condition = QUOTE(getMass _target < 1000 && {alive _target}); - statement = QUOTE([ARR_2(_target, [ARR_3(2 * (vectorDir _player select 0), 2 * (vectorDir _player select 1), 0.5)])] call DFUNC(push);); + condition = QUOTE(((getMass _target) <= 2600) && {alive _target} && {(vectorMagnitude (velocity _target)) < 3}); + statement = QUOTE(_this call FUNC(push)); showDisabled = 0; priority = -1; }; diff --git a/addons/interaction/XEH_postInit.sqf b/addons/interaction/XEH_postInit.sqf index 7fe151dac1..8db2d34ad1 100644 --- a/addons/interaction/XEH_postInit.sqf +++ b/addons/interaction/XEH_postInit.sqf @@ -10,6 +10,13 @@ ACE_Modifier = 0; _group selectLeader _leader; }] call EFUNC(common,addEventHandler); +//Pushing boats from FUNC(push) +[QGVAR(pushBoat), { + params ["_boat", "_newVelocity"]; + _boat setVelocity _newVelocity; +}] call EFUNC(common,addEventHandler); + + if (!hasInterface) exitWith {}; GVAR(isOpeningDoor) = false; diff --git a/addons/interaction/functions/fnc_push.sqf b/addons/interaction/functions/fnc_push.sqf index 946a5118be..86ad673d9c 100644 --- a/addons/interaction/functions/fnc_push.sqf +++ b/addons/interaction/functions/fnc_push.sqf @@ -4,23 +4,23 @@ * * Arguments: * 0: Boat - * 1: Velocity + * 1: Player * * Return Value: * None * * Example: - * [target, [vector]] call ace_interaction_fnc_push + * [Boats, Jose] call ace_interaction_fnc_push * * Public: No */ - + #include "script_component.hpp" -PARAMS_2(_boat,_velocity); +params ["_boat", "_player"]; -if !(local _boat) exitWith { - [_this, QUOTE(FUNC(push)), _boat] call EFUNC(common,execRemoteFnc); -}; +private ["_newVelocity"]; -_boat setVelocity _velocity; +_newVelocity = [2 * (vectorDir _player select 0), 2 * (vectorDir _player select 1), 0.5]; + +[QGVAR(pushBoat), [_boat], [_boat, _newVelocity]] call EFUNC(common,targetEvent); From 95aa9f604bf83d29ad51267cc1d62ded6eaf2f18 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Tue, 11 Aug 2015 13:53:55 +0100 Subject: [PATCH 067/371] Fix manual pre-setting of spectator camera unit If the spectator camera unit was set before the camera had ever opened then the unit list wouldn't be populated and as such the camera would automatically abort to free mode since the unit wasn't available to spectate. So now I'm running the updateUnits function before opening the camera to pre-populate the list. --- addons/spectator/functions/fnc_handleInterface.sqf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index 335b71bbe1..95f05d01ec 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -38,6 +38,9 @@ switch (toLower _mode) do { GVAR(mousePos) = [0.5,0.5]; GVAR(treeSel) = objNull; + // Update units before opening to support pre-set camera unit + [] call FUNC(updateUnits); + // Initalize the camera view GVAR(camera) = "Camera" camCreate (ASLtoATL GVAR(camPos)); [] call FUNC(transitionCamera); From 2144a56be15544e54b289b0f1af7c972e2919b17 Mon Sep 17 00:00:00 2001 From: voiper Date: Tue, 11 Aug 2015 10:49:39 -0700 Subject: [PATCH 068/371] Fix attempt. --- addons/map/ACE_Settings.hpp | 4 + addons/map/CfgAmmo.hpp | 48 +++++++ addons/map/CfgSounds.hpp | 7 + addons/map/CfgVehicles.hpp | 29 +++- addons/map/XEH_postInitClient.sqf | 66 +++++++-- addons/map/XEH_preInit.sqf | 5 + addons/map/config.cpp | 2 + .../functions/fnc_blueForceTrackingModule.sqf | 9 +- .../functions/fnc_compileFlashlightMenu.sqf | 65 +++++++++ .../map/functions/fnc_determineMapLight.sqf | 4 +- addons/map/functions/fnc_flashlightGlow.sqf | 41 ++++++ .../map/functions/fnc_getUnitFlashlights.sqf | 29 ++++ addons/map/functions/fnc_moduleMap.sqf | 4 +- addons/map/functions/fnc_simulateMapLight.sqf | 136 ++++++++++++++++++ addons/map/functions/fnc_switchFlashlight.sqf | 25 ++++ addons/map/functions/fnc_updateMapEffects.sqf | 24 ++-- addons/map/stringtable.xml | 45 ++++-- 17 files changed, 502 insertions(+), 41 deletions(-) create mode 100644 addons/map/CfgAmmo.hpp create mode 100644 addons/map/CfgSounds.hpp create mode 100644 addons/map/functions/fnc_compileFlashlightMenu.sqf create mode 100644 addons/map/functions/fnc_flashlightGlow.sqf create mode 100644 addons/map/functions/fnc_getUnitFlashlights.sqf create mode 100644 addons/map/functions/fnc_simulateMapLight.sqf create mode 100644 addons/map/functions/fnc_switchFlashlight.sqf diff --git a/addons/map/ACE_Settings.hpp b/addons/map/ACE_Settings.hpp index 15e2a174e4..4e2a5d5706 100644 --- a/addons/map/ACE_Settings.hpp +++ b/addons/map/ACE_Settings.hpp @@ -15,6 +15,10 @@ class ACE_Settings { value = 1; typeName = "BOOL"; }; + class GVAR(mapGlow) { + value = 1; + typeName = "BOOL"; + }; class GVAR(mapShake) { value = 1; typeName = "BOOL"; diff --git a/addons/map/CfgAmmo.hpp b/addons/map/CfgAmmo.hpp new file mode 100644 index 0000000000..59d91d68f4 --- /dev/null +++ b/addons/map/CfgAmmo.hpp @@ -0,0 +1,48 @@ +class CfgAmmo { + + class FlareCore; + + class FlareBase: FlareCore {}; + class F_20mm_White: FlareBase {}; + + class ACE_FlashlightProxy_White: F_20mm_White { + model = ""; + effectFlare = "FlareShell"; + + triggerTime = 0; + intensity = 1; + flareSize = 1; + timeToLive = 10e10; + + lightColor[] = {1,1,1,1}; + + grenadeBurningSound[] = {}; + grenadeFireSound[] = {}; + soundTrigger[] = {}; + SmokeShellSoundHit1[] = {}; + SmokeShellSoundHit2[] = {}; + SmokeShellSoundHit3[] = {}; + SmokeShellSoundLoop1[] = {}; + SmokeShellSoundLoop2[] = {}; + }; + + class ACE_FlashlightProxy_Red: ACE_FlashlightProxy_White { + intensity = 2.5; + lightColor[] = {1,0,0,1}; + }; + + class ACE_FlashlightProxy_Green: ACE_FlashlightProxy_White { + intensity = 1.5; + lightColor[] = {0,1,0,1}; + }; + + class ACE_FlashlightProxy_Blue: ACE_FlashlightProxy_White { + intensity = 2.5; + lightColor[] = {0.25,0.25,1,1}; + }; + + class ACE_FlashlightProxy_Yellow: ACE_FlashlightProxy_White { + intensity = 1.5; + lightColor[] = {1,1,0.5,1}; + }; +}; \ No newline at end of file diff --git a/addons/map/CfgSounds.hpp b/addons/map/CfgSounds.hpp new file mode 100644 index 0000000000..ede59914a7 --- /dev/null +++ b/addons/map/CfgSounds.hpp @@ -0,0 +1,7 @@ +class CfgSounds { + class ACE_map_flashlightClick { + name = "ACE_map_flashlightClick"; + sound[] = {"\a3\sounds_f\weapons\Other\dry4.wss", 0.2, 2}; + titles[] = {}; + }; +}; \ No newline at end of file diff --git a/addons/map/CfgVehicles.hpp b/addons/map/CfgVehicles.hpp index 30cae96ef6..130df03af8 100644 --- a/addons/map/CfgVehicles.hpp +++ b/addons/map/CfgVehicles.hpp @@ -1,4 +1,20 @@ class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class ACE_MapFlashlight { + displayName = CSTRING(Action_Flashlights); + icon = QUOTE(\a3\ui_f\data\IGUI\Cfg\VehicleToggles\lightsiconon_ca.paa); + condition = QUOTE(GVAR(mapIllumination) && visibleMap && (count ([ACE_player] call FUNC(getUnitFlashlights)) > 0)); + statement = "true"; + exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"}; + insertChildren = QUOTE(_this call DFUNC(compileFlashlightMenu)); + showDisabled = 0; + priority = 99; + }; + }; + }; + class ACE_Module; class ACE_ModuleMap: ACE_Module { author = ECSTRING(common,ACETeam); @@ -15,6 +31,12 @@ class CfgVehicles { typeName = "BOOL"; defaultValue = 1; }; + class MapGlow { + displayName = CSTRING(MapGlow_DisplayName); + description = CSTRING(MapGlow_Description); + typeName = "BOOL"; + defaultValue = 1; + }; class MapShake { displayName = CSTRING(MapShake_DisplayName); description = CSTRING(MapShake_Description); @@ -39,13 +61,14 @@ class CfgVehicles { }; }; - class ACE_ModuleBlueForceTracking: ACE_Module { + class Module_F; + class ACE_ModuleBlueForceTracking: Module_F { author = ECSTRING(common,ACETeam); category = "ACE"; displayName = CSTRING(BFT_Module_DisplayName); function = QFUNC(blueForceTrackingModule); scope = 2; - isGlobal = 0; + isGlobal = 1; icon = PATHTOF(UI\Icon_Module_BFTracking_ca.paa); class Arguments { class Enabled { @@ -71,4 +94,4 @@ class CfgVehicles { description = CSTRING(BFT_Module_Description); }; }; -}; +}; \ No newline at end of file diff --git a/addons/map/XEH_postInitClient.sqf b/addons/map/XEH_postInitClient.sqf index 95f42db431..f358dcf944 100644 --- a/addons/map/XEH_postInitClient.sqf +++ b/addons/map/XEH_postInitClient.sqf @@ -1,23 +1,24 @@ #include "script_component.hpp" // Exit on Headless as well -if !(hasInterface) exitWith {}; +if (!hasInterface) exitWith {}; LOG(MSG_INIT); // Calculate the maximum zoom allowed for this map call FUNC(determineZoom); -// This spawn is probably worth keeping, as pfh don't work natively on the briefing screen and IDK how reliable the hack we implemented for them is. -// The thread dies as soon as the mission start, so it's not really compiting for scheduler space. -[] spawn { - // Wait until the map display is detected - waitUntil {(!isNull findDisplay 12)}; +[{ + if (isNull findDisplay 12) exitWith {}; GVAR(lastStillPosition) = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [0.5, 0.5]; GVAR(lastStillTime) = ACE_time; GVAR(isShaking) = false; + //map sizes are multiples of 1280 + GVAR(worldSize) = worldSize / 1280; + GVAR(mousePos) = [0.5,0.5]; + //Allow panning the lastStillPosition while mapShake is active GVAR(rightMouseButtonLastPos) = []; ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", {[] call FUNC(updateMapEffects);}]; @@ -42,13 +43,60 @@ call FUNC(determineZoom); GVAR(rightMouseButtonLastPos) = []; }; }]; -}; + + //get mouse position on map + ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["MouseMoving", { + GVAR(mousePos) = (_this select 0) ctrlMapScreenToWorld [_this select 1, _this select 2]; + }]; + ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["MouseHolding", { + GVAR(mousePos) = (_this select 0) ctrlMapScreenToWorld [_this select 1, _this select 2]; + }]; + + [_this select 1] call CBA_fnc_removePerFrameHandler; +}, 0] call CBA_fnc_addPerFrameHandler; ["SettingsInitialized", { // Start Blue Force Tracking if Enabled if (GVAR(BFT_Enabled)) then { - diag_log text "[ACE] Blue Force Tracking Enabled (client)"; GVAR(BFT_markers) = []; [FUNC(blueForceTrackingUpdate), GVAR(BFT_Interval), []] call CBA_fnc_addPerFrameHandler; }; -}] call EFUNC(common,addEventHandler); + + //illumination settings + if (GVAR(mapIllumination)) then { + GVAR(flashlightInUse) = ""; + GVAR(aceNVG) = ["ace_nightvision"] call EFUNC(common,isModLoaded); + GVAR(glow) = objNull; + + ["playerInventoryChanged", { + _flashlights = [ACE_player] call FUNC(getUnitFlashlights); + if ((GVAR(flashlightInUse) != "") && !(GVAR(flashlightInUse) in _flashlights)) then { + GVAR(flashlightInUse) = ""; + }; + }] call EFUNC(common,addEventHandler); + + if (GVAR(mapGlow)) then { + ["visibleMapChanged", { + params ["_player", "_mapOn"]; + if (_mapOn) then { + if (!alive _player && !isNull GVAR(glow)) then { + GVAR(flashlightInUse) = ""; + }; + if (GVAR(flashlightInUse) != "") then { + if (isNull GVAR(glow)) then { + [GVAR(flashlightInUse)] call FUNC(flashlightGlow); + }; + } else { + if (!isNull GVAR(glow)) then { + [""] call FUNC(flashlightGlow); + }; + }; + } else { + if (!isNull GVAR(glow)) then { + [""] call FUNC(flashlightGlow); + }; + }; + }] call EFUNC(common,addEventHandler); + }; + }; +}] call EFUNC(common,addEventHandler); \ No newline at end of file diff --git a/addons/map/XEH_preInit.sqf b/addons/map/XEH_preInit.sqf index c5645a52e7..9e123a3877 100644 --- a/addons/map/XEH_preInit.sqf +++ b/addons/map/XEH_preInit.sqf @@ -5,10 +5,15 @@ LOG(MSG_INIT); PREP(blueForceTrackingModule); PREP(blueForceTrackingUpdate); +PREP(compileFlashlightMenu); PREP(determineMapLight); PREP(determineZoom); +PREP(flashlightGlow); +PREP(getUnitFlashlights); PREP(moduleMap); PREP(onDrawMap); +PREP(simulateMapLight); +PREP(switchFlashlight); PREP(updateMapEffects); ADDON = true; diff --git a/addons/map/config.cpp b/addons/map/config.cpp index 078c06b41d..84ed030779 100644 --- a/addons/map/config.cpp +++ b/addons/map/config.cpp @@ -27,6 +27,8 @@ class RscEdit; #include "CfgEventHandlers.hpp" #include "CfgMarkers.hpp" #include "CfgVehicles.hpp" +#include "CfgAmmo.hpp" +#include "CfgSounds.hpp" class RscMapControl { maxSatelliteAlpha = 0.5; diff --git a/addons/map/functions/fnc_blueForceTrackingModule.sqf b/addons/map/functions/fnc_blueForceTrackingModule.sqf index 33049c38ca..bab776c9ab 100644 --- a/addons/map/functions/fnc_blueForceTrackingModule.sqf +++ b/addons/map/functions/fnc_blueForceTrackingModule.sqf @@ -12,12 +12,15 @@ #include "script_component.hpp" -if (!isServer) exitWith {}; +if !(hasInterface) exitWith {}; -PARAMS_1(_logic); +PARAMS_3(_logic,_units,_activated); + +if !(_activated) exitWith {}; [_logic, QGVAR(BFT_Enabled), "Enabled"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(BFT_Interval), "Interval"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(BFT_HideAiGroups), "HideAiGroups"] call EFUNC(common,readSettingFromModule); -diag_log text "[ACE]: Blue Force Tracking Module initialized. (server)"; +diag_log text "[ACE]: Blue Force Tracking Module initialized."; +TRACE_2("[ACE]: Blue Force Tracking Module initialized.", GVAR(BFT_Interval), GVAR(BFT_HideAiGroups)); diff --git a/addons/map/functions/fnc_compileFlashlightMenu.sqf b/addons/map/functions/fnc_compileFlashlightMenu.sqf new file mode 100644 index 0000000000..0d081bb57c --- /dev/null +++ b/addons/map/functions/fnc_compileFlashlightMenu.sqf @@ -0,0 +1,65 @@ +/* + * Author: voiper + * Compile list of flashlight classnames and add to the "Flashlight" parent menu. + * + * Arguments: + * 0: Vehicle + * 1: Player + * 3: Parameters + * + * Return value: + * None + * + * Example: + * [_player, _player, []] call ace_map_fnc_compileFlashlightMenu; + * + * Public: No + */ + +#include "script_component.hpp" + +params ["_vehicle", "_player", "_parameters"]; + +_actions = []; +_flashlights = [_player] call FUNC(getUnitFlashlights); + +//add all carried flashlight menus and on/off submenu actions +{ + _displayName = getText (configFile >> "CfgWeapons" >> _x >> "displayName"); + _icon = getText (configFile >> "CfgWeapons" >> _x >> "picture"); + + _children = { + params ["_vehicle", "_player", "_flashlight"]; + _actions = []; + + _onAction = [ + (_flashlight + "_On"), + "On", + "", + {[_this select 2] call FUNC(switchFlashlight)}, + {GVAR(flashlightInUse) != (_this select 2)}, + {}, + _flashlight + ] call EFUNC(interact_menu,createAction); + + _offAction = [ + (_flashlight + "_Off"), + "Off", + "", + {[""] call FUNC(switchFlashlight)}, + {GVAR(flashlightInUse) == (_this select 2)}, + {}, + _flashlight + ] call EFUNC(interact_menu,createAction); + + _actions pushBack [_onAction, [], _player]; + _actions pushBack [_offAction, [], _player]; + + _actions + }; + + _parentAction = [_x, _displayName, _icon, {true}, {true}, _children, _x] call EFUNC(interact_menu,createAction); + _actions pushBack [_parentAction, [], _player]; +} forEach _flashlights; + +_actions \ No newline at end of file diff --git a/addons/map/functions/fnc_determineMapLight.sqf b/addons/map/functions/fnc_determineMapLight.sqf index 9c205299e6..8204b4b7f8 100644 --- a/addons/map/functions/fnc_determineMapLight.sqf +++ b/addons/map/functions/fnc_determineMapLight.sqf @@ -55,11 +55,13 @@ _fnc_calcColor = { _lightLevel = 0.04 + (0.96 * call EFUNC(common,ambientBrightness)); +/* // check if player has NVG enabled if (currentVisionMode _unit == 1) exitWith { // stick to nvg color [true, [154/255,253/255,177/255,0.5]] }; +*/ // Do not obscure the map if the ambient light level is above 0.95 if (_lightLevel > 0.95) exitWith { @@ -122,4 +124,4 @@ if (_lightLevel > 0.95) exitWith { }; // Calculate resulting map color -[true, [_lightTint, _lightLevel] call _fnc_calcColor] +[true, [_lightTint, _lightLevel] call _fnc_calcColor] \ No newline at end of file diff --git a/addons/map/functions/fnc_flashlightGlow.sqf b/addons/map/functions/fnc_flashlightGlow.sqf new file mode 100644 index 0000000000..76cc871232 --- /dev/null +++ b/addons/map/functions/fnc_flashlightGlow.sqf @@ -0,0 +1,41 @@ +/* + * Author: voiper + * Add or remove global flashlight glow for when player is looking at map. + * + * Arguments: + * 0: Flashlight classname ("" for off) + * + * Return value: + * None + * + * Example: + * ["ACE_Flashlight_MX991"] call ace_map_fnc_flashlightGlow; + * + * Public: No + */ + +#include "script_component.hpp" + +params ["_flashlight"]; + +_light = GVAR(glow); +if (!isNull _light) then {deleteVehicle _light}; + +if (_flashlight != "") then { + _colour = getText (configFile >> "CfgWeapons" >> _flashlight >> "ItemInfo" >> "FlashLight" >> "ACE_Flashlight_Colour"); + + _class = switch (_colour) do { + case "white": {"ACE_FlashlightProxy_White"}; + case "red": {"ACE_FlashlightProxy_Red"}; + case "green": {"ACE_FlashlightProxy_Green"}; + case "blue": {"ACE_FlashlightProxy_Blue"}; + case "yellow": {"ACE_FlashlightProxy_Yellow"}; + }; + + _light = _class createVehicle [0,0,0]; + _light attachTo [ACE_player, [0,0.5,-0.1], "head"]; +} else { + _light = objNull; +}; + +GVAR(glow) = _light; \ No newline at end of file diff --git a/addons/map/functions/fnc_getUnitFlashlights.sqf b/addons/map/functions/fnc_getUnitFlashlights.sqf new file mode 100644 index 0000000000..b7c4aa2e91 --- /dev/null +++ b/addons/map/functions/fnc_getUnitFlashlights.sqf @@ -0,0 +1,29 @@ +/* + * Author: voiper + * Check a unit for any flashlights that can be used on map. + * + * Arguments: + * 0: Unit to check + * + * Return value: + * Flashlight classnames (empty for none) + * + * Example: + * [unit] call ace_map_fnc_getUnitFlashlights; + * + * Public: No + */ + +#include "script_component.hpp" + +params ["_unit"]; + +_flashlights = []; + +{ + if ((isText (configFile >> "CfgWeapons" >> _x >> "ItemInfo" >> "FlashLight" >> "ACE_Flashlight_Colour")) && !(_x in _flashlights)) then { + _flashlights pushBack _x; + }; +} forEach (items _unit); + +_flashlights \ No newline at end of file diff --git a/addons/map/functions/fnc_moduleMap.sqf b/addons/map/functions/fnc_moduleMap.sqf index 514d2af034..b763db7eea 100644 --- a/addons/map/functions/fnc_moduleMap.sqf +++ b/addons/map/functions/fnc_moduleMap.sqf @@ -8,15 +8,17 @@ * Return Value: * None */ + #include "script_component.hpp" if !(isServer) exitWith {}; -PARAMS_3(_logic,_units,_activated); +params ["_logic", "_units", "_activated"]; if !(_activated) exitWith {}; [_logic, QGVAR(mapIllumination), "MapIllumination" ] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(mapGlow), "MapGlow" ] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(mapShake), "MapShake" ] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(mapLimitZoom), "MapLimitZoom" ] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(mapShowCursorCoordinates), "MapShowCursorCoordinates"] call EFUNC(common,readSettingFromModule); diff --git a/addons/map/functions/fnc_simulateMapLight.sqf b/addons/map/functions/fnc_simulateMapLight.sqf new file mode 100644 index 0000000000..b4c64e6239 --- /dev/null +++ b/addons/map/functions/fnc_simulateMapLight.sqf @@ -0,0 +1,136 @@ +/* +* Author: voiper +* Draw sexy flashlight beams and NVG on main map. +* +* Arguments: +* 0: Map control (Control) +* 1: Map zoom level (Number) +* 2: Current map centre (Array) +* 3: Light level from ace_map_fnc_determineMapLight (Array) +* +* Return Value: +* None +* +* Public: No +*/ + +#include "script_component.hpp" + +params ["_mapCtrl", "_mapScale", "_mapCentre", "_lightLevel"]; + +_hmd = hmd ACE_player; +_nvgOn = (((getText (configFile >> 'CfgWeapons' >> _hmd >> 'simulation')) == 'NVGoggles') && (currentVisionMode ACE_player == 1)); +_aceNVG = GVAR(aceNVG); +_flashlight = GVAR(flashlightInUse); + +//map width (on screen) in pixels +_screenSize = 640 * safeZoneW; + +//resolution params (every frame in case resolution change) +getResolution params ["_resX", "_resY", "_viewPortX", "_viewPortY", "", "_uiScale"]; + +//engine rounds the viewport ratios, when they should be fractions; this can cause problems +_realViewPortY = _resY * _uiScale; +_realViewPortX = _realViewPortY * 4/3; + +//textures +_blackTex = "#(rgb,8,8,3)color(0,0,0,1)"; +_whiteTex = "#(rgb,8,8,3)color(1,1,1,1)"; + +//colour/alpha +_lightLevel params ["_r", "_g", "_b", "_a"]; +_colourAlpha = (_r + _g + _b) min _a; +_shadeAlpha = _a; + +if (_nvgOn) then { + _flashlightAdd = if (_flashlight != "") then {0.75} else {0}; + _shadeAlpha = 0.8 - _a + _flashlightAdd; + _fillTex = _whiteTex; + + if (_aceNVG) then { + _nvgAlpha = ACE_player getVariable [QEGVAR(nightvision,NVGBrightness), 0]; + + if (_nvgAlpha >= 0) then { + _shadeAlpha = _shadeAlpha + _nvgAlpha / 2; + } else { + //if flashlight off + if (_flashlight == "") then { + //if there's nearby light + if (_shadeAlpha > 0) then { + _shadeAlpha = _shadeAlpha + _nvgAlpha / 2; + } else { + _fillTex = _blackTex; + _shadeAlpha = -_nvgAlpha / 1.5; + }; + } else { + _shadeAlpha = _shadeAlpha + _nvgAlpha; + }; + }; + + _grainConfig = (configFile >> "CfgWeapons" >> _hmd >> "ACE_NightVision_grain"); + _grain = if (isNumber _grainConfig) then { + (getNumber _grainConfig) / 2 + } else { + 0 + }; + + if (_grain > 0) then { + _posX = (_mapCentre select 0) + (_mapScale * random 500); + _posY = (_mapCentre select 1) + (_mapScale * random 500); + _mapCtrl drawIcon [format["#(ai,2048,2048,1)perlinNoise(%1,%2,0,1)", _resX, _resX], [0.25,0.25,0.25,_grain], [_posX, _posY], _screenSize * 2.5, _screenSize * 2.5, 0, "", 0]; //noise + }; + }; + + _mapCtrl drawIcon ["#(rgb,8,8,3)color(0,0.5,0,1)", [1,1,1,0.5], _mapCentre, _screenSize, _screenSize, 0, "", 0]; //nvg green + _mapCtrl drawIcon [_fillTex, [1,1,1,_shadeAlpha], _mapCentre, _screenSize, _screenSize, 0, "", 0]; //alpha fill +} else { + _fillTex = _blackTex; + + _colourList = [_r, _g, _b]; + _colourList sort false; + _maxColour = _colourList select 0; + + //ambient colour fill + _mapCtrl drawIcon [format["#(rgb,8,8,3)color(%1,%2,%3,1)", _r / _maxColour, _g / _maxColour, _b / _maxColour], [1,1,1,_colourAlpha], _mapCentre, _screenSize, _screenSize, 0, "", 0]; + + if (_flashlight == "") then { + //ambient shade fill + _mapCtrl drawIcon [_fillTex, [1,1,1,_shadeAlpha], _mapCentre, _screenSize, _screenSize, 0, "", 0]; + } else { + //mouse pos + _mousePos = GVAR(mousePos); + + //flashlight settings + _colour = getText (configFile >> "CfgWeapons" >> _flashlight >> "ItemInfo" >> "FlashLight" >> "ACE_Flashlight_Colour"); + _size = getNumber (configFile >> "CfgWeapons" >> _flashlight >> "ItemInfo" >> "FlashLight" >> "ACE_Flashlight_Size"); + _flashTex = format[QUOTE(PATHTOF_SYS(ace,flashlights,UI\Flashlight_Beam_%1_ca.paa)), _colour]; + _beamSize = _screenSize / _size; + + //after 5x zoom, it's simulated to be fixed (it actually gets bigger relative to zoom) + if (_mapScale < 0.2) then {_beamSize = _beamSize / (_mapScale * (1 / 0.2))}; + + //assign corrective ratio to fix sub-pixel gaps/overlaps (symptom of viewport * X/Y resolution rounding) + _viewPortRatioFixY = if (_realViewPortY != _viewPortY) then { + _realViewPortX / (_realViewPortY / _viewPortY * _viewPortX) + } else { + if (_realViewPortX != _viewPortX) then { + _realViewPortX / _viewPortX + } else { + 1 + }; + }; + + //offset the elements + _offsetX = _mapScale * GVAR(worldSize) * (_screenSize * 2 + _beamSize); + _offsetYDown = _mapScale * GVAR(worldSize) * (_screenSize + _beamSize) * _viewPortRatioFixY; + //up is bigger because of a potential exploit + _offsetYUp = _mapScale * GVAR(worldSize) * (_screenSize * 4 + _beamSize) * _viewPortRatioFixY; + + //draw the matrix /whoa + _mapCtrl drawIcon [_flashTex, [1,1,1,_shadeAlpha], _mousePos, _beamSize, _beamSize, 0, "", 0]; //centre beam + _mapCtrl drawIcon [_fillTex, [1,1,1,_shadeAlpha], [(_mousePos select 0) - _offsetX, (_mousePos select 1)], _screenSize * 2, _beamSize, 0, "", 0]; //left + _mapCtrl drawIcon [_fillTex, [1,1,1,_shadeAlpha], [(_mousePos select 0) + _offsetX, (_mousePos select 1)], _screenSize * 2, _beamSize, 0, "", 0]; //right + _mapCtrl drawIcon [_fillTex, [1,1,1,_shadeAlpha], [(_mousePos select 0), (_mousePos select 1) - _offsetYDown], _screenSize * 4, _screenSize, 0, "", 0]; //down + _mapCtrl drawIcon [_fillTex, [1,1,1,_shadeAlpha], [(_mousePos select 0), (_mousePos select 1) + _offsetYUp], _screenSize * 4, _screenSize * 4, 0, "", 0]; //up + }; +}; \ No newline at end of file diff --git a/addons/map/functions/fnc_switchFlashlight.sqf b/addons/map/functions/fnc_switchFlashlight.sqf new file mode 100644 index 0000000000..e177f886fa --- /dev/null +++ b/addons/map/functions/fnc_switchFlashlight.sqf @@ -0,0 +1,25 @@ +/* + * Author: voioper + * Switch flashlight. + * + * Arguments: + * 0: Flashlight classname ("" for off) + * + * Return value: + * None + * + * Example: + * ["ACE_Flashlight_MX991"] call ace_map_fnc_switchFlashlight; + * + * Public: No + */ + +#include "script_component.hpp" + +params ["_flashlight"]; + +GVAR(flashlightInUse) = _flashlight; +if (GVAR(mapGlow)) then { + [GVAR(flashlightInUse)] call FUNC(flashlightGlow); +}; +playSound "ACE_map_flashlightClick"; \ No newline at end of file diff --git a/addons/map/functions/fnc_updateMapEffects.sqf b/addons/map/functions/fnc_updateMapEffects.sqf index 3550df517c..72f5d0cec1 100644 --- a/addons/map/functions/fnc_updateMapEffects.sqf +++ b/addons/map/functions/fnc_updateMapEffects.sqf @@ -10,23 +10,21 @@ * * Public: No */ + #include "script_component.hpp" -private ["_mapCtrl","_mapScale"]; - -_mapCtrl = ((findDisplay 12) displayCtrl 51); +_mapCtrl = findDisplay 12 displayCtrl 51; _mapScale = ctrlMapScale _mapCtrl; +_mapCentre = _mapCtrl ctrlMapScreenToWorld [0.5, 0.5]; if (GVAR(mapIllumination)) then { - private ["_data","_darkenFill"]; + //get nearby lighting + _light = [[ACE_player], FUNC(determineMapLight), missionNamespace, QGVAR(mapLight), 0.1] call EFUNC(common,cachedCall); - // Calculate map illumination - _data = [[ACE_player], FUNC(determineMapLight), missionNamespace, QGVAR(mapLight), 0.1] call EFUNC(common,cachedCall); + _light params ["_applyLighting", "_lightLevel"]; - EXPLODE_2_PVT(_data,_darkenMap,_darkenColor); - if (_darkenMap) then { - _darkenFill = format["#(rgb,1,1,1)color(%1,%2,%3,%4)",_darkenColor select 0, _darkenColor select 1, _darkenColor select 2, _darkenColor select 3]; - _mapCtrl drawRectangle [(getArray(configFile >> 'CfgWorlds' >> worldName >> 'centerPosition')),80000,80000,0,_darkenColor,_darkenFill]; + if (_applyLighting) then { + [_mapCtrl, _mapScale, _mapCentre, _lightLevel] call FUNC(simulateMapLight); }; }; @@ -63,7 +61,7 @@ if (GVAR(mapShake)) then { GVAR(isShaking) = false; } else { // The map is still, store state - GVAR(lastStillPosition) = _mapCtrl ctrlMapScreenToWorld [0.5, 0.5]; + GVAR(lastStillPosition) = _mapCentre; GVAR(lastStillTime) = ACE_time; }; }; @@ -72,7 +70,7 @@ if (GVAR(mapShake)) then { if (GVAR(mapLimitZoom)) then { if (GVAR(minMapSize) >= _mapScale) then { ctrlMapAnimClear _mapCtrl; - _mapCtrl ctrlMapAnimAdd [0, GVAR(minMapSize) + 0.001, (_mapCtrl ctrlMapScreenToWorld [0.5, 0.5])]; + _mapCtrl ctrlMapAnimAdd [0, GVAR(minMapSize) + 0.001, _mapCentre]; ctrlMapAnimCommit _mapCtrl; }; -}; +}; \ No newline at end of file diff --git a/addons/map/stringtable.xml b/addons/map/stringtable.xml index 3f2d312fae..24cfa5fc7d 100644 --- a/addons/map/stringtable.xml +++ b/addons/map/stringtable.xml @@ -18,12 +18,13 @@ Iluminação do mapa? - Calculate dynamic map illumination based on light conditions? - Oblicza dynamiczne oświetlenie mapy bazujące na warunkach oświetleniowych - Calcula la iluminación dinámica del mapa basandose en las condiciones de luz - Berechne die Kartenauslichtung anhand des Umgebungslichts? - Vypočítat dynamické osvětlení mapy na základně světelných podmínek? - Calcular a iluminação dinâmica do mapa de acordo com as condições de luz? + Simulate map lighting based on ambient lighting and player's items? + + + Map flashlight glow? + + + Add external glow to players who use flashlight on map? Map shake? @@ -74,7 +75,7 @@ Mostrar as coordenadas de grade no ponteiro do mouse? - This module allows you to customize the map screen. + Moduł ten pozwala dostosować opcje widoku ekranu mapy. Dieses Modul erweitert die Kartenfunktionen. Tento modul umožňuje přizpůsobit mapu s obrazem. @@ -83,7 +84,7 @@ Blue Force Tracking Blue Force Tracking - Blue Force Tracking + Seguimiento de fuerzas amigas Blue Force Tracking Blue Force Tracking Rastreio de forças azuis @@ -93,14 +94,12 @@ RFA ativo Aktywuj BFT Povolit BFT - Activar BFT Enable Blue Force Tracking. Default: No Ativa Rastreio de Forças Azuis. Padrão: Não Aktywuj Blue Force Tracking. Domyślnie: Nie Povolit Blue Force Tracking. Výchozí: Ne - Activar Blue Force Tracking. Por defecto: No Interval @@ -135,11 +134,35 @@ Esconder marcadores que pertencem ao grupo de IA? - This module allows the tracking of allied units with BFT map markers. + Pozwala śledzić na mapie pozycje sojuszniczych jednostek za pomocą markerów BFT. Dieses Modul ermöglicht es verbündete Einheiten mit dem BFT auf der Karte zu verfolgen. Umožňuje sledovat přátelské jednokty na mapě v rámci BFT. Permite que você acompanhe as posições no mapa das unidades aliadas com marcadores RFA. + + Flashlights + Latarki + + + NVG + Noktowizja + + + On + Włącz + + + Off + Wyłącz + + + Increase Brightness + Zwiększ czułość + + + Decrease Brightness + Zmniejsz czułość + \ No newline at end of file From e0ed81dc67cf27a24046ba42099de4aa06223016 Mon Sep 17 00:00:00 2001 From: voiper Date: Tue, 11 Aug 2015 10:59:21 -0700 Subject: [PATCH 069/371] Git fix #2. --- addons/map/stringtable.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/map/stringtable.xml b/addons/map/stringtable.xml index 24cfa5fc7d..4666a2647c 100644 --- a/addons/map/stringtable.xml +++ b/addons/map/stringtable.xml @@ -75,7 +75,7 @@ Mostrar as coordenadas de grade no ponteiro do mouse? - + This module allows you to customize the map screen. Moduł ten pozwala dostosować opcje widoku ekranu mapy. Dieses Modul erweitert die Kartenfunktionen. Tento modul umožňuje přizpůsobit mapu s obrazem. From 2d101d064e1625e424d0e504def878fe15ed31c2 Mon Sep 17 00:00:00 2001 From: voiper Date: Tue, 11 Aug 2015 10:59:50 -0700 Subject: [PATCH 070/371] Git fix #3. --- addons/flashlights/$PBOPREFIX$ | 1 + addons/flashlights/CfgEventHandlers.hpp | 5 + addons/flashlights/CfgSounds.hpp | 7 ++ addons/flashlights/CfgVehicles.hpp | 89 ++++++++++++++++++ addons/flashlights/CfgWeapons.hpp | 61 ++++++++++++ addons/flashlights/README.md | 11 +++ .../UI/Flashlight_Beam_blue_ca.paa | Bin 0 -> 131489 bytes .../UI/Flashlight_Beam_green_ca.paa | Bin 0 -> 143504 bytes .../flashlights/UI/Flashlight_Beam_red_ca.paa | Bin 0 -> 133266 bytes .../UI/Flashlight_Beam_white_ca.paa | Bin 0 -> 123643 bytes .../UI/Flashlight_Beam_yellow_ca.paa | Bin 0 -> 143639 bytes addons/flashlights/UI/KSF1_ca.paa | Bin 0 -> 34359 bytes addons/flashlights/UI/mx991_ca.paa | Bin 0 -> 32340 bytes addons/flashlights/UI/xl50_ca.paa | Bin 0 -> 29497 bytes addons/flashlights/XEH_postInitClient.sqf | 8 ++ addons/flashlights/config.cpp | 18 ++++ addons/flashlights/data/KSF_1.p3d | Bin 0 -> 48588 bytes addons/flashlights/data/KSF_1.rvmat | 79 ++++++++++++++++ addons/flashlights/data/KSF_1_co.paa | Bin 0 -> 28405 bytes addons/flashlights/data/KSF_1_nohq.paa | Bin 0 -> 51285 bytes addons/flashlights/data/KSF_1_smdi.paa | Bin 0 -> 21947 bytes addons/flashlights/data/MX_991.p3d | Bin 0 -> 33648 bytes addons/flashlights/data/MX_991.rvmat | 79 ++++++++++++++++ addons/flashlights/data/MX_991_co.paa | Bin 0 -> 30434 bytes addons/flashlights/data/MX_991_nohq.paa | Bin 0 -> 77567 bytes addons/flashlights/data/Maglight.p3d | Bin 0 -> 29928 bytes addons/flashlights/data/Maglite.rvmat | 79 ++++++++++++++++ addons/flashlights/data/Maglite_co.paa | Bin 0 -> 11080 bytes addons/flashlights/data/Maglite_nohq.paa | Bin 0 -> 22016 bytes addons/flashlights/data/Maglite_smdi.paa | Bin 0 -> 11096 bytes addons/flashlights/script_component.hpp | 12 +++ addons/flashlights/stringtable.xml | 29 ++++++ 32 files changed, 478 insertions(+) create mode 100644 addons/flashlights/$PBOPREFIX$ create mode 100644 addons/flashlights/CfgEventHandlers.hpp create mode 100644 addons/flashlights/CfgSounds.hpp create mode 100644 addons/flashlights/CfgVehicles.hpp create mode 100644 addons/flashlights/CfgWeapons.hpp create mode 100644 addons/flashlights/README.md create mode 100644 addons/flashlights/UI/Flashlight_Beam_blue_ca.paa create mode 100644 addons/flashlights/UI/Flashlight_Beam_green_ca.paa create mode 100644 addons/flashlights/UI/Flashlight_Beam_red_ca.paa create mode 100644 addons/flashlights/UI/Flashlight_Beam_white_ca.paa create mode 100644 addons/flashlights/UI/Flashlight_Beam_yellow_ca.paa create mode 100644 addons/flashlights/UI/KSF1_ca.paa create mode 100644 addons/flashlights/UI/mx991_ca.paa create mode 100644 addons/flashlights/UI/xl50_ca.paa create mode 100644 addons/flashlights/XEH_postInitClient.sqf create mode 100644 addons/flashlights/config.cpp create mode 100644 addons/flashlights/data/KSF_1.p3d create mode 100644 addons/flashlights/data/KSF_1.rvmat create mode 100644 addons/flashlights/data/KSF_1_co.paa create mode 100644 addons/flashlights/data/KSF_1_nohq.paa create mode 100644 addons/flashlights/data/KSF_1_smdi.paa create mode 100644 addons/flashlights/data/MX_991.p3d create mode 100644 addons/flashlights/data/MX_991.rvmat create mode 100644 addons/flashlights/data/MX_991_co.paa create mode 100644 addons/flashlights/data/MX_991_nohq.paa create mode 100644 addons/flashlights/data/Maglight.p3d create mode 100644 addons/flashlights/data/Maglite.rvmat create mode 100644 addons/flashlights/data/Maglite_co.paa create mode 100644 addons/flashlights/data/Maglite_nohq.paa create mode 100644 addons/flashlights/data/Maglite_smdi.paa create mode 100644 addons/flashlights/script_component.hpp create mode 100644 addons/flashlights/stringtable.xml diff --git a/addons/flashlights/$PBOPREFIX$ b/addons/flashlights/$PBOPREFIX$ new file mode 100644 index 0000000000..674d0d255c --- /dev/null +++ b/addons/flashlights/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\flashlights \ No newline at end of file diff --git a/addons/flashlights/CfgEventHandlers.hpp b/addons/flashlights/CfgEventHandlers.hpp new file mode 100644 index 0000000000..d5f49bd5c3 --- /dev/null +++ b/addons/flashlights/CfgEventHandlers.hpp @@ -0,0 +1,5 @@ +class Extended_PostInit_EventHandlers { + class ADDON { + clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient) ); + }; +}; diff --git a/addons/flashlights/CfgSounds.hpp b/addons/flashlights/CfgSounds.hpp new file mode 100644 index 0000000000..f0fabe3a39 --- /dev/null +++ b/addons/flashlights/CfgSounds.hpp @@ -0,0 +1,7 @@ +class CfgSounds { + class ACE_flashlights_flashlightClick { + name = "ACE_flashlights_flashlightClick"; + sound[] = {"\a3\sounds_f\weapons\Other\dry4.wss", 0.2, 2}; + titles[] = {}; + }; +}; \ No newline at end of file diff --git a/addons/flashlights/CfgVehicles.hpp b/addons/flashlights/CfgVehicles.hpp new file mode 100644 index 0000000000..fa766ad87b --- /dev/null +++ b/addons/flashlights/CfgVehicles.hpp @@ -0,0 +1,89 @@ +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_SelfActions { + //todo: add flashlight attach actions + }; + }; + + class Item_Base_F; + + class ACE_Flashlight_MX991Item: Item_Base_F { + scope = 2; + scopeCurator = 2; + displayName = CSTRING(MX991_DisplayName); + author = ECSTRING(common,ACETeam); + vehicleClass = "WeaponAccessories"; + class TransportItems { + class ACE_Flashlight_MX991 { + name = "ACE_Flashlight_MX991"; + count = 1; + }; + }; + }; + + class ACE_Flashlight_KSF1Item: Item_Base_F { + scope = 2; + scopeCurator = 2; + displayName = CSTRING(KSF1_DisplayName); + author = ECSTRING(common,ACETeam); + vehicleClass = "WeaponAccessories"; + class TransportItems { + class ACE_Flashlight_KSF1 { + name = "ACE_Flashlight_KSF1"; + count = 1; + }; + }; + }; + + class ACE_Flashlight_XL50Item: Item_Base_F { + scope = 2; + scopeCurator = 2; + displayName = CSTRING(XL50_DisplayName); + author = ECSTRING(common,ACETeam); + vehicleClass = "WeaponAccessories"; + class TransportItems { + class ACE_Flashlight_XL50 { + name = "ACE_Flashlight_XL50"; + count = 1; + }; + }; + }; + + class NATO_Box_Base; + class EAST_Box_Base; + class IND_Box_Base; + class FIA_Box_Base_F; + + class Box_NATO_Support_F: NATO_Box_Base { + class TransportItems { + MACRO_ADDITEM(ACE_Flashlight_MX991,12); + }; + }; + + class Box_East_Support_F: EAST_Box_Base { + class TransportItems { + MACRO_ADDITEM(ACE_Flashlight_KSF1,12); + }; + }; + + class Box_IND_Support_F: IND_Box_Base { + class TransportItems { + MACRO_ADDITEM(ACE_Flashlight_XL50,12); + }; + }; + + class Box_FIA_Support_F: FIA_Box_Base_F { + class TransportItems { + MACRO_ADDITEM(ACE_Flashlight_MX991,12); + }; + }; + + class ACE_Box_Misc: Box_NATO_Support_F { + class TransportItems { + MACRO_ADDITEM(ACE_Flashlight_MX991,12); + MACRO_ADDITEM(ACE_Flashlight_KSF1,12); + MACRO_ADDITEM(ACE_Flashlight_XL50,12); + }; + }; +}; \ No newline at end of file diff --git a/addons/flashlights/CfgWeapons.hpp b/addons/flashlights/CfgWeapons.hpp new file mode 100644 index 0000000000..09fe70d764 --- /dev/null +++ b/addons/flashlights/CfgWeapons.hpp @@ -0,0 +1,61 @@ +class CfgWeapons { + + class ItemCore; + class ACE_ItemCore; + class InventoryItem_Base_F; + class InventoryFlashlightItem_Base_F; + + class acc_flashlight: ItemCore { + class ItemInfo: InventoryFlashlightItem_Base_F { + class Flashlight { + ACE_Flashlight_Colour = "white"; + ACE_Flashlight_Size = 2.75; + }; + }; + }; + + class ACE_Flashlight_MX991: ACE_ItemCore { + displayName = CSTRING(MX991_DisplayName); + descriptionShort = CSTRING(MX991_Description); + model = QUOTE(PATHTOF(data\MX_991.p3d)); + picture = PATHTOF(UI\mx991_ca.paa); + scope = 2; + class ItemInfo: InventoryItem_Base_F { + mass = 1; + class FlashLight { + ACE_Flashlight_Colour = "red"; + ACE_Flashlight_Size = 1.75; + }; + }; + }; + + class ACE_Flashlight_KSF1: ACE_ItemCore { + displayName = CSTRING(KSF1_DisplayName); + descriptionShort = CSTRING(KSF1_Description); + model = QUOTE(PATHTOF(data\KSF_1.p3d)); + picture = PATHTOF(UI\ksf1_ca.paa); + scope = 2; + class ItemInfo: InventoryItem_Base_F { + mass = 1; + class FlashLight { + ACE_Flashlight_Colour = "red"; + ACE_Flashlight_Size = 1.5; + }; + }; + }; + + class ACE_Flashlight_XL50: ACE_ItemCore { + displayName = CSTRING(XL50_DisplayName); + descriptionShort = CSTRING(XL50_Description); + model = QUOTE(PATHTOF(data\Maglight.p3d)); + picture = PATHTOF(UI\xl50_ca.paa); + scope = 2; + class ItemInfo: InventoryItem_Base_F { + mass = 1; + class FlashLight { + ACE_Flashlight_Colour = "white"; + ACE_Flashlight_Size = 2.15; + }; + }; + }; +}; \ No newline at end of file diff --git a/addons/flashlights/README.md b/addons/flashlights/README.md new file mode 100644 index 0000000000..6a04b78091 --- /dev/null +++ b/addons/flashlights/README.md @@ -0,0 +1,11 @@ +ace_flashlights +======= + +Flashlights for use on map and to attach to player. + + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [voiper](https://github.com/voiperr) diff --git a/addons/flashlights/UI/Flashlight_Beam_blue_ca.paa b/addons/flashlights/UI/Flashlight_Beam_blue_ca.paa new file mode 100644 index 0000000000000000000000000000000000000000..737780d1c8a7a97a007654621d91fe8ce81d7eed GIT binary patch literal 131489 zcma&Odvp_5mNi~iWyKcQAio+MW2;Iky)A=DAOWhRlIcvx$>f`KG8tg3hfV02FB9Ce zW=(hI(N!hc$uKM3J!>3y8aj<+z;QCPoy3HI6X2F4^GHGn;S~oPTL$CsG8h8Hab#7M ze#hzg{{O*}ED52i@o+l|mxos)f_?`Pj$4RWsvu$|p(8k?BVK{a|BpXygznu{ zs4SNw+yp`W?|-<;{&3U65!xF>-kJ!3qD+lUw7XaW8HvX`YDA)8HA_5gfE(@9QyhUf zLAR76j2@XJ;3rzj>6!n1vHydsBZwy`mzT&R-0Fim4_jHQR&~IAO{+;DO|8L|53xib z|AkA>A!1NPbQ0w>r4XT}k$#VpC3JgQMz%5!bA;;Qh#XbR5^@nLA~)Mvq896FI3gTJ zh|@^I=oB9?a2j1;tWD5)29KBK+bM%!`|~IHqgqYXcwu!ORjQxPu9mCS8Wzc@W2sP` z9-fxR`_pJJFpg6FEsY9^ayeCT%0w=VvP4w9Hi%ImACrx!N15f(sKMbSwlau80fhP{ zm5h|zx-WrxazV6bLFEYJ_7W}I$MSo6+#Hc~utZ$nQ#gMON6fC|&^9+l2#tKT626&O z4sY70EXq}=S+Z#1aado5r4#y`7C@rDC1=%?k)r&Dg#Nj8wJII1e}FJ9m1)CLfnGKD z-FzBV084I&{`m_&!VO{WbFWq&OZ8 z-m%%$%I^y-=vAi09w&QrMD}}!x};A;Glltiuk}wIB?{<>AvZfyl>cskgtgB9uKmXy z-7R)q0o92z-v#quEXqftWDxaB27keh;@tP&!H2hV#568Sqh8pn9*Xf1>8<^_qRe-d zE`gBCTijSDF6ve)LRF`K?!=@%JJZ2G(_dwW*B7lX$Ye5vlB-tDTv{ZYZYN*Bj9~MNzRD4&P znB+Bq3;>y{NxZQYkfSxbbT+S+Zyv{|HETmrq6qjjN$6(gP8Y>!!Z%q&uy z68_mfivnR{pJg~lyW9|AWU9z6KOeSZ$}0ceI{Ddlm-mJCJP)SoL_hVz!tN1Gypt={ zol|vU`cXNk-)w;L^(^xmO`{gjK;A#w>8kF=0kP zc9s2h!TgSWu=nzGw|rMi-+wKvrwi)S1KHr&t@Ai6AY<>dWy&WWjfg7Xx7)s19==sYf5%g}$?_x!9H1*e3 znx!=K%@iza4NC+U&4c)iE=v-3r*t7h{3xvBZCdp-KKZFlivWik>B7xtw$QZV8>>-xz|G4j{YNJaa#W z>^bK9Z#!a(n?z0a*|7g1 zOf?rO7LIONnWS>+NQ`ufh3!jm_foaZ_`@EEf{Bs69=B+E+{tdYB!d0c&Rv75kg;>y zr$cY4v*G*~M{HIh_&~4nJ;A(cZdemXeapS3s6&|6KK%Y$I>VdoK5y^LeSANGdV3Nx zQ;b8Y4x)WdmHh@{OD~>G?l?2lzdvx(E?3`<&D03h@|}Y8ji@;Ce9@u;`d_2E+&8z3 zKNbuak-6NRTSUKIAVP-Qw?g@i9dR@$qMONyjRls%(t2X*X1!@-tAisZ85|Mx0SiVK z4Y^zo^*0=`EsbWy@@1~1?)FX6&60`AZT*ryoRjFv(=K1$H@8Y?$^XVs9IXqXDZ(KT zG~uOLvyN(5Sur9!WKNjx-5$L^S_ffXL<>CR(l=7>jUiD#YZYxpR)Jn$Zc{1vb`&Gf z4vi||7gWA6G}`b$&+K&f(;Y39haQ!w60vwldQO{MD*Af^LA%@?ac~0o0bx!0ux&0@&vlD(S)Bou+ZS><~uD^vDFaQ3^vG|dLJKYc$P zy3u&f&IV(dAW6qaA%pXsDi^hR*<7DElM2p^#1OrPpLg#zRF6Quja^M+Hjs&_%1lg^ zPpaW_ss49ea`jDVX2j-Xt1U`IzStK)f*$Ap?fsrx;zR?^uD_z|xpiacD?hVRK;hz^ zn>Uz9>&Ai~cN!*d2urbk19HXCXnqh8bzY*Kfq0)+L|(@R84=VY9MK}9sJPGwFm7Sl zG}>9ThIC^xZQ87$ptaqV%$u4Vv0#53&Dv$UTlP%SENxL+yS2JIw}Sc?+$>E?%@rdy zFMW3^e1GK|L$KHwDSk6skDjr?KVZ9A@!Rm)^+hyx&^g*xKH|nyD4!@u>c9V1M<=NA zk@RzuMIV&KNC&0@WFX(pZOm8_=6?FWS|%+*H!2$5y2;J?4bEJ%O0+v9YF*@qJt-5Y zWnxEL4HtiWX(U8FZgeW%c-D%u7R|e*#U+|D!EB>d^Co-gB#@9-(;2Plk9pJWj*iVE zs~yRu2AMy zyM+zMlhd)8*tA=%ei0HUe2UooWcpNJe7fIXZ3EmuL%<{eHYgXaT#A>Z^~StBv$pZZ z_0b6dg(`1c3ojh%_XJREQ2^omF?9V}>=5vihBl~79aM{Nj&wOVaxNj#m2+fAq#sYv z>vF24-5$xCyiP7vX{e#}?mB^v&)?)^X@_c^6gUf8?^GxeZG&sb6=~}36eBcuqUXXE zLT~N(v8!JYXzoK)_(?u^>MgJrt`JY(nz#D0HBWil){Wq-aM%`>rX1Zhn z`Nkh?+6&nk8%x_*KdGY(w({+^WScr$X;$BQ$sZY;5R6|7N#b$=9&eqk0)#l`}63!)q^GzdE$wk;V=gO_OEUuZ&11 z`(GJLU%Sd^FTY}Bq>b0Ei0AiuSi&I@SFbP%4H)0f_+d{QR&m7F$%>baKVAh?8kiyB z7IowTOGC#af^G*I?r%{Lx_$+2jZC+D1lp-G z*8`>L72(kMkE#z#N(tUHQoA0m*{!r1~+h$z9<2hnC!3ciTV5`{f@NF#PpK-DqY0l3JS%=TB zJ&szXdNcVzb}D z^0oML8giBLyOl1Qwa-O`$Wrlt(K+z~#78NfLOA5&d>&T%>gdCa(%wG;Z-8C^?C0qR{E}UcV~jk4^t_ zTAJzijGkYQg!2~VlFM67@T&m*rmXg4)z?G)IGsROzP52(_X=R_$%*HUuM|F{JJ^%E zG7&bM=x^zSRv?L>X`z-v+E(R+g>ls3NTRQyY;n5YAhaurPCDKWkVHc2x>TC*h!(=B z(CFHg$~`Wu4=lB?yhETvb;q}kt%&4et6T~HHB$6!a>|s^#{I>4hwR@JdyN0yBl@F( zrz}cRL{KIDq2l9P?b62EH*qfa+?|^pG1%#s$#15}(+gg(N`5E;LbqAq)6KnwCjwck zKn3UTeh6U4U>5(f&mvG}iT?c`9Aa}>&`{wPnh{EG{e?qlW)zD(!7C}D!lq0-gj<(N z69q;i?Bg#8Yv>=T0@yrM$NAbka(u5N5uZ)biO|87b~bBH;I0;n5T_4>fOBFS>$3?V zfrKlw5))LL@H$YK-iIWUhwD=GOQrYzcm>cx2eHiAro5!b=ZMT z4E~iz3|aC~&b}i?S+yWH2@(-1Xp!M{#xhJYU0AQll5wmycc%7A7XXp7_Ob zT?ezt_+|{aVdui16^x>E<}DdrR_-Lw#O2ugzzLlRVq!c5yXIpFVTP(?2~I>UZb^sQ zoqsOFqm_0{)UkOM{3{JznHat6lEB7pusdhWw82G83rOdupZr&Jy8;$ziHzyt9E1E@dg>x<2_t|i_mG#Ha z`n$jf0CXX*_;0-erT^~k>!+XjdF3Iy(42Sw^{1csdBumYHFS>ZF8duYN9Fqk3!iwO z5xUHpU(L{hIY1^_wVM{M>o~)8t+R7o?RK`yXh2q^<4{Kp=I0WzT4^#C@PA8teg3vJ zoR6_<@xf^~E87yGp@UXV>NDrCqodowO0+V99Ith+wIxTAGxrwe@7)x%duONb(g|_j zgoS%H8Ozda1PB;F?ipKBoTnqw+0`B{WP=B+W4n^Q%dr=$@&9pIWG^94Jl|=!aaGcf ztc0fZ$*~WgQv(?>zkij&VbaB!D3`c;0+aC*lcO^(@xjYV)+JQ0;i~rtrRf{<3Q3#F zztTxwz7#W%Ot*1UK@KBG83CESYsW7I4B<81i(d)ZbGbNbSTon2fKJd()q3F@Q}aN^ zxO{13k6JNlm&vUTnH;ytzE>P_UV~lEiw4oMWeK{y#Us+2oUos+!~<6*%2KBIsy;@c zVt0dRlGdoJUt@A*&VTL72$08hP*X#t?VDY~%T~OxGc$SJ%2HN|p1gr?I5c}X8l4nyV9=2f|>nR@lcxjMN*sCLUsE{KBt3)eiFBgZdR zx)mZ|k4-!((xjcEXX7hIV)tDfjcUD*831hSi=5v2D-(EHd}BrSMt zDd&622@keA_HK5tJ{pHaat++5$>DEqMIjIwjLkwkbmzr$c8tkelc_D9Cn=rcT_c+I z+P!7hu3%DlSEv-SF69j=Ll7?3q!`3Qvz;00@wwXz9juAw=o&jmTq<;&8fl|7ZPkxheB6 zSyg_L7Q32$#OovZcW;xlcz7G59EPf_|MpJz)6YQtg{{on{oTE?rYGuL^5GJT(&|X^ zZ#O*y#Z^b4x67V&DVK#h2j(3R1(DXA*04-#^0!0bJ;YMQM?T6cC@~fjYzf&2y?|2< zJs=!&LjU!^JB=SWeQBfff<9|^Nz!Xwib{*p-J<;dfI7G7KFa(QWbi0NMBZ6BR{-Sj zCQwFJa)|Mipjy?D-T+{)f3MXknzq>4IA4&?dW7F?n90SmP9?TfG<}W7m0iMH!i+;S z4LM}*ES>aTCZd48+Dg8oM(_so>HWIE0gFJ}mB4b&)CiqU)P=eD$;aJFHI!!5i_fcM zZw%I%=#5R65j!8@sz>ky^ppWKS`3nn^w{W#6BAFM(F>i6m}5n2jAr5a0P4*Dc(I6{ zTgDN?g{6UkQH0do$S}ihlu?c<;XW=b>sL}%MVQGeKvI$lXAn)X*F|wAe$Hk9e3g5SB8z;tXBL9l=Q+(IX`75pB z#9I%uFWXta8}eH@_K-*oOXTwfzq)qg8WfVRp)NC+vIxyqrPZ!X=%yyqr(Y^3^y}}J z4CI}5vCZZL|GW3gQ=ln@A+-%4x?rBc17!mYP_R~7rVhpai}oI!{Z1l*Nn;+B@bl^z z`Lbq}FBduSWp}P=T{vPi5I?5>X_ot=f$2qUYe4)Xfm8*MKW{pyp0$cf64ZuVJnz*mhZ3jNY=NM+Cq^gR z&0=`9m6cH6tsAMOa)`0x5OV2mTvzThifEBW_zpKPF*W>hI(sdIJWqO5FAsHMOD!w9 zK;g&`28YKjd!KX(L7W5r6;oGnrv6&iR3me#8jc%b*#D5vxB} z*d=vrl|}ef429;848@klkmSBFq})hUT^M3=KY45M$DL?+XmnUb=VJ?l=&FM74Qe$< zAQ!0mPz6{*sZfw^WN75{OIFDo$<=Xr!@=Be+Pcmx)0M!y)(LKL;bz$r4m^bK#_M)6 zQ0*aOd+K##qrf0k3Ry*Z)}i`0*>nCe!dMG!&wa@H(ISV}-wx$tBg00`GNnly#z|MC zx%cbKHo^CZNEvHY9=R1BgJ#`qVJDp2*KoJhA+`4GUbyzwjkLIQpM!0tef*8BzpzFo zChy#WYBZf zUv7N2@sJ&xilZI62i{r#fz72T!hLvvyk~Uo-Sm`G3DF5}*Hca`(-04Wn*QfWMwHGu zBT{P1yEd;c*;~iT!SY6{9G_=qeGK+Fa43eX7+b{n7D4Y&M4Yi};zY_Jg(fvM>ruAH zvyVgBu(~29YePqkEbz5*upioSj}UZ;-XtS>`&~*v%xnh0_o&eDD0}Ckg62n`8u6sa5g&(4|MMFbhF#TDOQGX{AZZFW+w0nr2DRZeqLWe{WWmfc;0j#ik6nxmG^rcCtUB*;Xha ztgve-HqrNf&9|)*I*sUMc5qr%RIAXLpS+`dZ}eQ)_q<(Ei=&OY2R0Aw1%*mN#wWje z2Y%At&b(J0YRE-vp@K6WEp)cqrG(JX!IdozLGp0Ed18d|u)a|=`l>|@S)D>WHe;7V z6E-1iPK-=ywTdWafv|@ziS$9YEPC9Ex0Ve7b&>y+3}(03v6p`^kg==Pa~cjKu%PPL z6~ZiRtWg8gu?*n*z+f;tWD$4S917>bTph4Qp%_HZMo^uF`LMSPuGg-8^`$_nH+ltB z3P3f-F$T{`=lZP+$g4&Hsz?-H0i7(azZNKuqqBke7S4RF6McEshRxIpFEMzwbih0} zZV-wCr|g{WoRS5VU(DZ>LtlMKf=;ZU*d4n@p8qmFzu$#vkZ^Jui0}<_V+9ju81ehwt!rci*C=%g_(9t-7)%Lw}ju*ZS7#wg|{c8b~U6jxzNG=FFLi*b;2o0^K}2)Xjt7|-;*5> zH2?xW5!J+hGfT_y%O!2>UXL>;ZfO~^tKvK%8$4%qaPc9J5URnU8W42c&`{)C)Zma^ z_Uf#l>gY@A`O)D(KFwZ=@1Kqxu&`@852$l(V)0fNOfp)Wc&^+)vp86ax>h;?nH*Ae zt}iqgZE>m9=K>szwjPG~xfW56QP(;RU!EyTjce%K8IYItP-9M)w#6U*7y_as6(u{E zx2gPM37tJvHjuiOEF#XFlJ8#&6oUu^VF67^$EZGy8aOX;e6Ie~aA=t;G574~4q3mu zkQ5dL?_UMM_H+$P2Cf8-JJ>u78a8njs~Q?SE0Np!T{4Y;wmQXn&8$+Dqx$%Y$-pCG z`DPak-D+iO*pZ+v3^8O-ccBaxScKyQ1QKxMzg|yk5ebfW&+?=oyH&sL*b>mJ5Girfs`qr$5 zPFfS`WFIYcy8CG*?Mj-?bggwNGR_BJlTZt2d6I7Zq5c=oEh65qVmYR+R|Be*4Fd&k zJY-Qv2TN0{pPsIjWWKFNlp1kHn*a4Uqj()j(~*9wlN~iDpowuOLORAJj*QWD{tY(o zFOz*zwh$%~UUMWyJ>F*Zu5h`etmg!ydR=1nLRl){P`#&roJ~H~7s#L^{l9$C={22QY?f0t>@R`i@cSu(J8WCv1{&@=@f zd8#PCAb{4-M}4P0hpu;J65Z+fqL3_!t_hJ>7Yn5k1jsk0@0lloGXeq&NOmj}M;dUY zG>K{?f*>3s5sekuB{bVpXpyG2?-Lf9rAJSl6!SaO^2yMmJwK0Ee$rWb`irt?l~^hA zg#lCO#`f+weX(#pg!0H~2S-Pt_p7wB=D0Ij)JTekeVXUXGl9D_t2kt;lGfhb)~&7h z>ReIjF9W1Y^EaO`D^!4^U*^saF19K@o9I8{PHr4NU+MPwFAR-%)aDU~NJXql^W(Rq z=hpp;B|=3}B_mQhA9vEew)V{p4*UcyQp<||u^+lHGlnVM#>kCJV~YXX9ZG9pk<orAhmv^;W*=Cp8wArCF z6~C-&*|yKlwcZTpy33wr*j6(Ol{oBXFVo7njlEn-T58L;CEl8yw0Nl-Td4;*kfRBW z-Bl|jmL@uf0K80ryR{I*#n^<5&a>S$2?$%4&}kN$G_|kSrpQhxpn??2sJU8fvZ^7^ zBWmbtn-B-EoVBouOAU=n`M}-;2|~-k%JM?c(|j=mSEC4kba4zhg%Au+EkekmdJjQF z2TTu%rbZXwBuiMiM^d#)uvYeNfo)F;879eJUHm_4ChB2L4C_-frx+nPN5f}I(b&rP z;9y=EI(?Fe=FoJmFE(953<%@vQDCBs7{KGGcitB#;2mHbyrA^tXL7znz6tSH8oh)H zXefZCpC7j*c$)+Lw!*Bm0)Hp3Q+b6_>51ck6@e-E0H1mUf?7UTG!N#`=f_F6K%`5% zW99T=_T*<}(TmEWKxK&Bwof$8!b4x2!1+7q$(=;ulVwEGmY`34j*Bod3k=Q|JrO!5 zp828@z9b05voOHuPON~Z{&N{$1<^(VXOHDulhk`(owF&>Vo^1$A8C_AgHThS8vY6+ z?WY&c!+!<^8|vV;eVxH@&L%c*vI)(!+S)H5hs=*acd9u!crd|_UmQg>;>0FL@-W$6 z6q~jQt&9-%s7)%(&S9;B9{?PysM6-Vhewy`!Q&Cm@iA|Xdz`)nrz~(Cje7> zEgV(1!bfSdlPg62=i>WXEpFmVmb1GkA`Q5zs*l%ze<<~UogHh|W`&!YnoHJdQf4}s z>2g9S&BG>Ph88=2Z3CW_OZN3H!|A7saTfYLPmOGPK$wPt2<*zmb?$Ytonofnt%W>| z4lOi(321~%i&KyWhbySZLC{Ns8ENhnLIB=$0dJMCIucj++7+=*jcsvZZ!Y`R;%l8i zYrsgc5=JNIEF8BI#wMYu7tdMozoW_bzC2yoYFeYoXHSjhpo(Q2te5{jexgxED*wGz z=4^>mP@`smhT$0uwg!(}Js7(pX2C?X(Z*e2){p{nCwU=M8I|F)fN*(`r z$w0UP!mNlqR!rC`z?N1(H&irM<~}_(cGuC+Y54SLLAbc}$eNgbZQiFxqYp;Cp?pJy z*?Z)ZqgXEj*)IX5_S2&sylR+@BSJ(&c8ok;-SJ~3yrP!(1`z$P$BLskQ8C$5xTg5! z3g(TYa#c?e`AIyxFHQF_33^*M2n5|lr4EaaIr$kG%f>uwN542x3CX8WFq_NG?k@c2 z*i;C8yf|_OBGDoHBWCQ!cVQ3)rARCS`sE)y6R0TWIqfH3os%-#_dyd0um7k(h2~Ff zg*$ah7YKz;wRKbMXKTMskC02*W}9*t5LQ8fDhobr#-N*kHVs#1Heyr$PiZST3{iL7 zk=S+h>(Pu|X+o7Sva4ZR-O4}-@%A!dmy^8=Tr!fqbF<9OQi7h+vy=ljm7ulHl&4;{ ztI;$A3Q`7TOQL3*Fo4#D=M)A1QNl=kMd$?8nCB1rJ=i2(+u~4E4?70+%q(}l6PU8$ zPFj;{h6B0PY}k=7O{>&GY$_#w_4v0Cby)AlQcS->4P90YcDB=kqgrJAqF{0e3c55# zJm6MFmx@x#*{xPALJ(RN9%gtk1I&3E zT_82V81He=9JWpU|_|0Lwey8tnN6Lbm=S#r)GL%84DZIPM!F) zESkGG*!S7TOHvWLQY}sIn@V4t6z-Q2m+f5jktG9uXEHPU@sWg~fzHcoEbTdVSi9q* zrJKhNn|=Nc<_Uq+_4N=(2W0YzA`1=11aPiF<`6_dDZ{OOqHvLrFQ8F9h*C+=AZH(y ziS8UaI#B6U5#ix>VAHk}K)~%iW^k_+C%4@^4 z4F=^B4WE>cVh`%sec}^rxL7y&`KM;-k6?v>&NJtKVSBgD``8yJfHVR5+h$WX(wHhs z1;xk0^<`(jC~dvCT|gxX_1tN!hv6%68U?bz__jF(3g_%l?zp3y98xpcUZb?)o1jRK z4x7C{-qsEJB#K1R7Z@cXw3rncw60Cdg;wdxr7=cGLoLHl6L(dXrARY-csbtn2-G~b zwU(oXjk@|x*Aev~OD)GuI;N>)Ww}F(e*3yeHp=hM(j4_8H-wown?7xq$F-&Mc*I!f zH^c1VgXo)!3y6=520myc+c-4~YJyWyQNfumi-n8y(fk@3LQYjYPVX4yt`QQhM5oKO zOp%;iIGI;QElrrdp1>8*a{^&jLtEg|E2*jehm?>V%XmI4L_GpgrxeQL1qSB?a)S!0 zwNF}f;ru8$x(y_Ylv5rV3=9X(X*<6965x34y}`37>AvkMh>$E7%sOfmFO*lsD`vap z>@;+tm=q86#pFFF5n^!hfY6PT~n@Q3rDa z3C7#>5441GfU=2e&KDy^Jt=uK3&k`}HWZSfo4E*tBGjVil9-VjC7INBgvB3Oq$LWJ{ivrLGT?LsBDc6 z#hsJ7ypIpdr~$(=Sg}4`*Jl>%4MGkkAZFDc31v=vQpS&^xmmO5FA{PN$-f6#<>p!b z7WhAy1f@-yCF*pMO>5RBeJ~wX_+o!>JCktr9<)f!Q2oT_!8!3rX@xETrYT)6Wdf?4 zbYt{_Fjdayg@)53c&41RM#s{4T0m0v(ipzuWDl37LT!x)EeMs zYV_?IC2G`1%^3)z(AvOD6{UXj_}>3u8(rJBA8gD*=D;n3!Gb zj3nA?&KPykDu_y|7*Lo6vIjaz|3iSoiY(;2)e!H23(RF=hQxo)(^&+GW`ErIo55-5 zdtYSK>@?%`ZE30T`oPqaaRB*ac`K-`$-b}7mXYSGi{BQDTxK>-b3WUnbDHa#a~5xC zP%T^tV|dVoxKOW{-CrY^MADW!aN?7wOAhwY-oMRjDCQZP6#Vq)60$kp`9$oPn0a+9 zqXG>q<0q7i6&ybz+ea&0U?w;R%!|%{h|KRv9Fk{V43O&=KF}i{B$jOsjyw#Q8$%4&`eI>eC&CAWo4WIF|Hk>3 zBKkGh8JOP|&3DoV#9kR~SHPd#ucE;?sk4RPuPmtYFGJRPy6z-mVylS53y~*c}I^m+;kAkyZBEWm%m|}V|1w+n z{E}!CF9p}q(SdlT8y*913iewuRd0kso7xWeER7sLwj>&k`NI&#ufv>zQSF+A^$RmF z#4~ek4u+$87>U}p&w-oc6TB zdfnE2PPPlrKo|#dP%tgB{};?0a8nM&M?VTKo2GWa?sll00L)`(VjLS>Y^$Jmveam{ zbl{afY7snFje3d?zq#!ffYN3B^MKH1FLnP;2-W@GfyeXiZEbqi@cTa)5uu}f&2{C! ztJdkk_&ond(R%t{X_}=16=S(bZn?VCZ=BD+NfAHKbrNmVqe|zqH%In*m_%Y)Em<4f zocc8*g_C#8N@skAP}Tc1d_?Rsi!UT;m?|BvI@84nK4GHb@Os0UGE`kaACQTFY7uyc zcWmh3VlwsUa@<*?NDs*-D>WZjsXP{ZFaJ=0Dt&UU9J_U+kS*j~`Ah6H^)8wEN3Ut13gg)SRK|OxT zDtMujK9U6ISK`E=EM$UJjGTdPTr3^2V@{aCcZ0)80Vq*eO!wjOT3qecst$bwHoQip zJM>|E;hGqty_SO?Chzn*H;2hw&w(N`YUW;fH?9YM+Rte8JI=g9I>Q2~jOjlx~Y zBMKk&Gs@*SQsZb3bUwLGL=Xy!<=1j(F=#+iX~WjB;>n&rPo(EcGB{b~s_nTd0v})i zq*Yogdh!6HgseV#cj6%Q8lrR33hq2|v*4*;kitt+p>*9e5Y50fyW*#@--5%5RpD8f zONYjf9R^J@fargtc7l{hE6t^RoZBOPZRI9LqoK};)r#@HIz?)>U&vo*% zRIFG;?&5myiBB1U7gXBU+56eC;`%o?1;GQ8wDx{_v@Ckr%swJaN!hdepo_Obn9HAL>{j?w=?Cu#e< zklZo9|ASO4dlB{Q|3KBh7uWBX^iOuA$zBZe*=N6~i_L$8B`}1%lSQcigAuTwp+xca z?lCmkFD@E(By}I|BNJ-f$xZ}s2yIN|Uqg<7Nd&x!lh(NoD`AaHGG4fG(K&hOBaEO} zPeu!$uWSts>B--U^ZU$-->igenm>7n29pZKu+6qbQO)b;2SlBRhh#*LRx1 z{3N#;%=l9}NI9jaCbc4mITf8 z^+kR&Jl|{Ap%$FU?#Bf~-cdUrxPxZf>9KgV{`cN0(Ayq(~aRzpCTLreG&G=!qz9HYef1u)Ht zWg6>}Uz~u9qLU%r=f^?$v?oHJeO#7W%ZMxb0@;$bBTucdvHudxG6Dh%*wIuJ&OnH! zWPCmYlB&$W_(U`vf~1KJ&}~%WAg$~KiYFceW61&W?l}v$dYT7Ej5lx&`p(2TwJ&hq zjCaO|2l-pUnSL-Jd=Mk;iR%4(EmCUbNf9N3H}^955~x(A``(XbgXFuNcRqN(jG#ew zh@tfKyPf(E_Arv~i@H1}yolJl2j|eqy7!zyRRHannOgOpxDd#8Ab$;55j>a(=HL3E zC3H&YgFW$FKMaZ9hgu>P=O%@UvM8Ze>f+XD=S44C*^kTXEgz4V9sK*dw2 zxeRfGK>*TK-&waV2SXxz!jC@!_WKB(i|ht=ln<@nUnF4_d<^H;Xx49*4p;on=7mg% z%)Bx5qE(`frj`)Zv8QN_J$AU%FYmJm|Cbh`W}&$xC0Nw1Nnt}7&&D={$j?88#J5RZ zUwnpx5#gvI&6w$OC(k_ zV$cYplQ)3;E#iY^1A@mmKUK9MKNnYrpyhOOW0UBX21>^=-06WRFOf|(&IC+@NAvAi zVpzYCT)SjHjLwtN;MpM%L2a^fy42sb2GAfdV^u=o`AN_xku@SMJ^7i4My#9O*z-!>MqtcYW6XoDkNKg;W zUL)Dl_a5IoilpMccjvs!HE>?>&j%)9*@<{j!{|a@i6ON(7b~{2C|Euls|Y~bOFhU3 z1E`W8)v6#@NR5WGzu7i==6!KHgnt+k8(b+qI^ z*uP|;^BsY!FFf=S!|o9Ljrlv}195V@O=-3W6bu3cy@l-tBa_0H`UBhJKV1ib4X`0L z@1&Jhi=5qVmR*t1$>T?tM7<#8qa@IK7@=#BTNd2PBo3cC5l6q<@q#vcsSq3}VWDM? zmxGeQ9X?yy+Pc}A-1Xj9U*a3_f75JwYG=a4N^{5Im>Qb~_Xfo!l{R7p|ZX}jRfq6yxlgkBAWNOob z)d}=2NQa2Iz3Lka>jlf9BuDcj7Epm#w z_snq2#;j4N>I8kDsv`QQfIfg8^uN7_xI=q)ZSNON5ndOt2IZ|uYdCisENBCfFN)SW zAwl+nJy>wU!~!`mg;8t;t>gCZ1rz~}^Wg__?zaKbEIsnkeyo@LVGX$ZoRJhmitMzi z{LaGduxeIc+wLR=+rmBz1`!?Xgs5SAw=+Nr^DV*=SShJ%UDym&Jr%Rc{7wtzi&Lsi z`BTZudGl<)wt?C7=mm#x*sNRz$%X74N5BD2vvc*)W{rOt+hb zT{axm&D?wI>5@XSx}KT+uJG@Jk34JV#xpc)1M2mo!(EyZb1vckgP&JgKQY`76?=jp z{1j27m{1$Vmn<%6J2`5MIQ`E23*?G2(GTQW-sG%oc|jz6rZ` z-oZw6>wmNV#X~MgCpKK(7Q8-}=(b#Eo3#=Cv6Rm~t~uFA3|gRwkvv>Ar%kFg-m$T? zLo@aD)___GX6OWby1;ZoomQ964WxZveHqFh+Ok?Uf#bz=62pNrDW;YXT~Hj6d)~?8 zWl;+Z{$8`Gp`@?uwaSFmf&)okDl&W}b6s)eBY^k-;6A#d|hK z^s5%Sc1-oG|Bx2_`!w`Uk2Jlv#m*7EOL&6@2Snf4L^)aFxqa=y`QM0lHB7>}tZ!B= zaAL4R5Y#dlKQ9cFO8M{f;`iNN-3idvbv>yNoVc8B&ko|%G zfkSEQ!23hCSY?YAaAGUi@p`P@dP6&Q^S48Fd%$AjumAS_zEXaTTl6CVAZO$5ha_rF zc%=5lz@f$;*e~TOMxbw)HA`=vE^>*@2k?DHYwhhT>Kz$Hpdr?OmXeE6yuk&~0h*l5 z|9jyP;1MiE&Q9)(esV;buGntPJ=ycwvC`J`Hb%Rw!MWw8a);V<;z7QNQ3hyvR}^?m zAPq7P3*cb~n;y`khXCFaO;a#zrfPhsb-CIT@Z&ovJ zITO*2ysFfH0^dc)+c&{yiDG>z@pADN(~ax)A7I5qd}<-6>@>7f3d@5S3jpC={6OoH zAsQbnZ>^p#9#AsjWQk{a6?x&#?04df$0dd5pM|7h*ksk(MmWO@nvqQmt8^qh^y?K? zAriP)6A8Oq^NjiYDC3Q^fuXCDR>G@TIJJ~(~}7$Z!&1ux7fL4Z(HH#^2_L3N8= zNbuSm`BJ4XrQt&>sfxJ+JDl*F#>~9WKc!hI0H-@m(#%?WLhW@yQ&mpv zd6<^>(TNDOgSpra-QfOrQ#h_)eeun3;$V>M0=*yF_+-d^5c*)Vu=2sSypQ%R;dcqy z@Etc`iIRgeMQ}DO1r0`@nr-nwlfq6UvcQQ>!Gw5yelU|tXTA{6%nJ-+I1?Bd#F-L4 zBo2fBY)R^6hp>cE{-H*$24`bcgJdu+2a_1uG4;)=+EEg#D%m5e1Z2aX{($V5z(~r} zE(fmwkq58s0SUghr=gvx!#d~OZ^2;6*o=oW6Asq0B)S720h$@X*?1uLUav(}_DP^> z0z^0ke=G;KQLS~)dyJq$d+;l5@_hh6jr(8^Rs}!3DjuzssQ$fWsVoqu5c+VRMdZK? z)Hu8o+KU|c#w1!e0?dhPzD|P$nT^`zR&0^QU)ZES9Zr-I!d(4-l!9yFzD+v(@!>fJ zr8I>W0-5EPSn)0z)X6AoW?Rf`(_Dz_8R_!uBvlLoCT=q0^fEO{;;f6^Wx>s6Zdb&O z$LUp}s8t>>GLnQ2;=??L1LGA|c4ukpo4adqv=UhjOO>5YscE>~NTw#-LQ}nRYqDrj zp_LsFip^rv&#l6E8By;MnsoQxZhErL&5iQ{NKUD$g{B+ro0p_4W-T?c)h_RhRQpN7 zt)$!nMP1673Uo{jyF;hTDa^3s&SXrjOd)7ZWc358LN*;Mi@q$V>&s&* zxXTjK(G=FlRkxsGQrJ!oPRo5sZ1#CSu>FQ+|Jtl@G?(3CR=`km=tF2f8dcqa{jpL8 z#`xgJWjETSmHYSNjQBy45n`phS@^J|&9}D?jw*_w_prKBGQIasC-T5=EeQ4DQzicA ztq!G;(s@mMhdR;+UPw4oS?z&XF8mXeZOcEswlH8wBEExwBQ;O!f&CcfZe1)guD(r` z`-ndgIyQ+K2v}DFeyd6__c)w84(^J=^xSBV5WPL97IcvmSTy{TR+-APVP?5ZAwhKt z8$nK{BR27T1Z{d3=PZhiW;-En0f}I~EWlK=$|^SRF4~^9E3MKebG$ETO**xY_Q!5A z-ezewwBhw8@H3jdm*!9}1WtQeXoW&%Rd%7-fkc&X#;!HNYG#EO=zsOm991S{EnKTq zZ-miYe&8Hf8Y4NX#7CV?w+rLIQiN%S-32}ASFtIy=|2`X$TO^mnPC?|BVln%M6 zr~aFZX>d}AXtq3B?@C0$SAm;casJB~mGei;LOmliIU?gX zZwwnB7@(`n9RHFF2>*f?UW4P2O%mDul3i@NPisE9*r}vI(u2_V)489dxBk2;YN36+ z!I)Q#j;;Gqls4YuQ7!f@V|N(IR#`1=s~&2z2oXavdFLh^dM~ggX$^sij;5GAClx`-2xk_ZtrxQIs?04^(|sM7}GKs`{l_WDbIQE6kamaA%yh z$*SC`p6LRCbUp+U)bOzI-;J5xqp7kem_TJTPdAW&WA%Yd zYOR3ag_Gp8cw^3qG88POt$2YlMCLl6%}Ktm`1`|>mZaF`^S-@aulMVt9Zq)B(CS^I zlQ+}!#Kvs$EvNuIzT1Vk+m_euxkM4bA)nx1Y5}pUZo(oOU+7?c{_LUG%<^hS?x