mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #1916 from acemod/master
Start release branch for 3.2
This commit is contained in:
commit
1d918ecd1f
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@ texHeaders.bin
|
||||
*.swp
|
||||
*.swo
|
||||
*.biprivatekey
|
||||
Thumbs.db
|
||||
|
@ -18,6 +18,7 @@ Kieran
|
||||
NouberNou
|
||||
PabstMirror <pabstmirror@gmail.com>
|
||||
Ruthberg <ulteq@web.de>
|
||||
SilentSpike <SilentSpike100@gmail.com>
|
||||
tpM
|
||||
ViperMaul
|
||||
VKing <kauestad@gmail.com>
|
||||
@ -36,8 +37,9 @@ Aleksey EpMAK Yermakov <epmak777@gmail.com>
|
||||
Alganthe <alganthe@live.fr>
|
||||
Anthariel <Contact@storm-simulation.com>
|
||||
Asgar Serran <piechottaf@web.de>
|
||||
Bamse <bamsis@gmail.com>
|
||||
Bla1337
|
||||
BlackPixxel
|
||||
BlackPixxel <blackpixxel96@gmail.com>
|
||||
BlackQwar
|
||||
Brakoviejo
|
||||
Brisse <brisse@outlook.com>
|
||||
@ -50,6 +52,7 @@ Dharma Bellamkonda <dharma.bellamkonda@gmail.com>
|
||||
Dimaslg <dimaslg@telecable.es>
|
||||
eRazeri
|
||||
evromalarkey <evromalarkey@gmail.com>
|
||||
F3 Project <alanr@ferstaberinde.com>
|
||||
Falke75
|
||||
Ferenczi
|
||||
Ferenzi
|
||||
@ -65,8 +68,10 @@ Hamburger SV
|
||||
Harakhti <shadowdragonphd@gmail.com>
|
||||
havena <silveredenis@gmail.com>
|
||||
Hawkins
|
||||
Head
|
||||
jokoho482 <jokoho482@gmail.com>`
|
||||
Jonpas <jonpas33@gmail.com>
|
||||
Karneck <dschultz26@hotmail.com>
|
||||
Kavinsky <nmunozfernandez@gmail.com>
|
||||
Kllrt <kllrtik@gmail.com>
|
||||
legman <juicemelon@msn.com>
|
||||
@ -81,6 +86,7 @@ nikolauska <nikolauska1@gmail.com>
|
||||
nomisum <nomisum@gmail.com>
|
||||
OnkelDisMaster <onkeldismaster@gmail.com>
|
||||
oscarmolinadev
|
||||
PaxJaromeMalues <seemax1991@gmail.com>
|
||||
pokertour
|
||||
Professor <lukas.trneny@wo.cz>
|
||||
rakowozz
|
||||
@ -89,7 +95,6 @@ Raspu86
|
||||
Riccardo Petricca <petriccarcc@gmail.com>
|
||||
Robert Boklahánics <bokirobi@gmail.com>
|
||||
ruPaladin <happyworm24@rambler.ru>
|
||||
SilentSpike <SilentSpike100@gmail.com>
|
||||
simon84 <badguy360th@gmail.com>
|
||||
Sniperwolf572 <tenga6@gmail.com>
|
||||
SzwedzikPL <szwedzikpl@gmail.com>
|
||||
|
@ -8,7 +8,7 @@
|
||||
alt="ACE version">
|
||||
</a>
|
||||
<a href="https://github.com/acemod/ACE3/releases/download/v3.1.1/ace3_3.1.1.zip">
|
||||
<img src="http://img.shields.io/badge/Download-52.2_MB-green.svg"
|
||||
<img src="http://img.shields.io/badge/Download-51.7_MB-green.svg"
|
||||
alt="ACE download">
|
||||
</a>
|
||||
<a href="https://github.com/acemod/ACE3/issues">
|
||||
|
BIN
ace_parse_imagepath.dll
Normal file
BIN
ace_parse_imagepath.dll
Normal file
Binary file not shown.
@ -114,7 +114,7 @@ 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(weather,Latitude), EGVAR(weather,currentTemperature), EGVAR(weather,Altitude), EGVAR(weather,currentHumidity), overcast, floor(ACE_time), ACE_time - 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), _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)];
|
||||
|
||||
[{
|
||||
private ["_args", "_index", "_bullet", "_caliber", "_bulletTraceVisible", "_bulletVelocity", "_bulletPosition"];
|
||||
|
@ -31,6 +31,7 @@
|
||||
<Spanish>Balística avanzada</Spanish>
|
||||
<German>Erweiterte Ballistik</German>
|
||||
<Czech>Pokročilá balistika</Czech>
|
||||
<Portuguese>Balística avançada</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_enabled_DisplayName">
|
||||
<English>Advanced Ballistics</English>
|
||||
@ -38,6 +39,7 @@
|
||||
<Spanish>Balística avanzada</Spanish>
|
||||
<German>Erweiterte Ballistik</German>
|
||||
<Czech>Pokročilá balistika</Czech>
|
||||
<Portuguese>Balística avançada</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_enabled_Description">
|
||||
<English>Enables advanced ballistics</English>
|
||||
@ -45,6 +47,7 @@
|
||||
<Spanish>Activa la balística avanzada</Spanish>
|
||||
<German>Aktiviert die erweiterte Ballistik</German>
|
||||
<Czech>Aktivuje pokročilou balistiku</Czech>
|
||||
<Portuguese>Ativa balística avançada</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForSnipers_DisplayName">
|
||||
<English>Enabled For Snipers</English>
|
||||
@ -52,6 +55,7 @@
|
||||
<Polish>Akt. dla snajperów</Polish>
|
||||
<German>Für Scharfschützen aktiviert</German>
|
||||
<Czech>Povoleno pro odstřelovače</Czech>
|
||||
<Portuguese>Ativar para caçadores</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForSnipers_Description">
|
||||
<English>Enables advanced ballistics for non local snipers (when using high power optics)</English>
|
||||
@ -59,6 +63,7 @@
|
||||
<Polish>Aktywuje zaawansowaną balistykę dla nielokalnych snajperów (kiedy używają optyki)</Polish>
|
||||
<German>Aktiviert die erweiterte Ballistik für nicht lokale Scharfschützen (bei Benutzung von Optiken mit starker Vergrößerung)</German>
|
||||
<Czech>Aktivuje pokročilou balistiku pro nelokální odstřelovače (když používá výkonnou optiku)</Czech>
|
||||
<Portuguese>Ativa balística avançada para caçadores não locais (quando usando miras telescópicas)</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForGroupMembers_DisplayName">
|
||||
<English>Enabled For Group Members</English>
|
||||
@ -66,6 +71,7 @@
|
||||
<Polish>Akt. dla czł. grupy</Polish>
|
||||
<German>Für Gruppenmitglieder aktiviert</German>
|
||||
<Czech>Povoleno pro členy skupiny</Czech>
|
||||
<Portuguese>Ativada para membros do grupo</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForGroupMembers_Description">
|
||||
<English>Enables advanced ballistics for non local group members</English>
|
||||
@ -73,6 +79,7 @@
|
||||
<Polish>Aktywuje zaawansowaną balistykę dla nielokalnych członków grupy</Polish>
|
||||
<German>Aktiviert die erweiterte Ballistik für nicht lokale Gruppenmitglieder</German>
|
||||
<Czech>Aktivuje pokročilou balistiku pro nelokální členy skupiny</Czech>
|
||||
<Portuguese>Ativa balística avançada para membros de grupo não locais</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForEveryone_DisplayName">
|
||||
<English>Enabled For Everyone</English>
|
||||
@ -80,6 +87,7 @@
|
||||
<Polish>Akt. dla wszystkich</Polish>
|
||||
<German>Für jeden aktiviert</German>
|
||||
<Czech>Povoleno pro všechny</Czech>
|
||||
<Portuguese>Ativada para todos</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForEveryone_Description">
|
||||
<English>Enables advanced ballistics for all non local players (enabling this may degrade performance during heavy firefights in multiplayer)</English>
|
||||
@ -87,6 +95,7 @@
|
||||
<Polish>Aktywuje zaawansowaną balistykę dla wszystkich nielokalnych graczy (aktywacja tej opcji może spodowować spory spadek wydajności podczas ciężkiej wymiany ognia)</Polish>
|
||||
<German>Aktiviert die erweiterte Ballistik für alle nicht lokalen Spieler (das Aktivieren dieser Funktion kann zur Beeinträchtigung des Spielerlebnisses im Multiplayer führen)</German>
|
||||
<Czech>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)</Czech>
|
||||
<Portuguese>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)</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_alwaysSimulateForGroupMembers_DisplayName">
|
||||
<English>Always Enabled For Group Members</English>
|
||||
@ -94,6 +103,7 @@
|
||||
<Spanish>Siempre activada para miembros de grupo</Spanish>
|
||||
<German>Für Gruppenmitglieder immer aktiviert</German>
|
||||
<Czech>Vždy povoleno pro členy skupiny</Czech>
|
||||
<Portuguese>Sempre ativada para membros do grupo</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_alwaysSimulateForGroupMembers_Description">
|
||||
<English>Always enables advanced ballistics when a group member fires</English>
|
||||
@ -101,6 +111,7 @@
|
||||
<Spanish>Activada la balística avanzada siempre cuando miembros de grupo disparan</Spanish>
|
||||
<German>Aktiviert die erweiterte Ballistik immer, wenn ein Gruppenmitglied schießt</German>
|
||||
<Czech>Aktivuje pokročilou balistiku pro členy skupiny</Czech>
|
||||
<Portuguese>Sempre ative balística avançada quando um membro do grupo disparar</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_disabledInFullAutoMod_DisplayName">
|
||||
<English>Disabled In FullAuto Mode</English>
|
||||
@ -108,6 +119,7 @@
|
||||
<Spanish>Desactivada en modo automático</Spanish>
|
||||
<German>Beim vollautomatischen Feuern deaktiviert</German>
|
||||
<Czech>Zakázáno v automatickém režimu střelby</Czech>
|
||||
<Portuguese>Desabilitar no modo automático</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_disabledInFullAutoMod_Description">
|
||||
<English>Disables the advanced ballistics during full auto fire</English>
|
||||
@ -115,6 +127,7 @@
|
||||
<Spanish>Desactivada la balística avanzada durante el fuego automático</Spanish>
|
||||
<German>Deaktiviert die erweiterte Ballistik beim vollautomatischen Feuern</German>
|
||||
<Czech>Zákáže pokročilou balistiku během střelby v režimu automat</Czech>
|
||||
<Portuguese>Desabilitar a balística avançada durante fogo automático</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_ammoTemperatureEnabled_DisplayName">
|
||||
<English>Enable Ammo Temperature Simulation</English>
|
||||
@ -122,6 +135,7 @@
|
||||
<Spanish>Activar simulación de temperatura de munición</Spanish>
|
||||
<German>Simulation der Munitionstemperatur aktivieren</German>
|
||||
<Czech>Povolit simulaci teploty munice</Czech>
|
||||
<Portuguese>Ativar simulação de temperatura de munição</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_ammoTemperatureEnabled_Description">
|
||||
<English>Muzzle velocity varies with ammo temperature</English>
|
||||
@ -129,6 +143,7 @@
|
||||
<Spanish>La velocidad de salida varía con la temperatura de la munición</Spanish>
|
||||
<German>Munitionstemperatur hat Einfluss auf die Mündungsgeschwindigkeit</German>
|
||||
<Czech>Úsťová rychlost je závislá na teplotě munice</Czech>
|
||||
<Portuguese>A velocidade de saída varia com a temperatura da munição</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_barrelLengthInfluenceEnabled_DisplayName">
|
||||
<English>Enable Barrel Length Simulation</English>
|
||||
@ -136,6 +151,7 @@
|
||||
<Spanish>Habilitar la simulación de longitud del cañón</Spanish>
|
||||
<German>Simulation der Lauflänge aktivieren</German>
|
||||
<Czech>Povolit simulaci délky hlavně</Czech>
|
||||
<Portuguese>Ativar a simulação de comprimento do cano</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_barrelLengthInfluenceEnabled_Description">
|
||||
<English>Muzzle velocity varies with barrel length</English>
|
||||
@ -143,6 +159,7 @@
|
||||
<Spanish>La velocidad de salidal varía con la longitud del cañón</Spanish>
|
||||
<German>Lauflänge beeinflusst Mündungsgeschwindigkeit</German>
|
||||
<Czech>Úsťová rychlost je závislá na délce hlavně</Czech>
|
||||
<Portuguese>A velocidade de saída caria com o comprimento do cano</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_bulletTraceEnabled_DisplayName">
|
||||
<English>Enable Bullet Trace Effect</English>
|
||||
@ -150,6 +167,7 @@
|
||||
<Spanish>Activar el efecto trazador de la bala</Spanish>
|
||||
<German>Geschossspureffekt aktivieren</German>
|
||||
<Czech>Povolit efekt trasírek</Czech>
|
||||
<Portuguese>Ativa efeito traçante de projétil</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_bulletTraceEnabled_Description">
|
||||
<English>Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics)</English>
|
||||
@ -157,6 +175,7 @@
|
||||
<Spanish>Activa el efecto trazador de la balas de gran calibre (solo visible cuando se mira a través de una mira telescópica)</Spanish>
|
||||
<German>Aktiviere Geschossspureffekt für hohe Kaliber (bei Benutzung von Optiken mit starker Vergrößerung)</German>
|
||||
<Czech>Aktivuje efekt trasírek z vysokokaliberních zbraní (viditelné pouze skrze výkonnou optiku)</Czech>
|
||||
<Portuguese>Ativa o efeito traçante de projétil para projéteis de alto calibre (somente visível quando observado por miras telescópicas)</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulationInterval_DisplayName">
|
||||
<English>Simulation Interval</English>
|
||||
@ -164,6 +183,7 @@
|
||||
<Spanish>Intervalo de simulación</Spanish>
|
||||
<German>Simulationsintervall</German>
|
||||
<Czech>Interval simulace</Czech>
|
||||
<Portuguese>Intervalo da simulação</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulationInterval_Description">
|
||||
<English>Defines the interval between every calculation step</English>
|
||||
@ -171,6 +191,7 @@
|
||||
<Spanish>Define el intervalo entre cada cálculo</Spanish>
|
||||
<German>Legt das Intervall zwischen den Berechnungsschritten fest</German>
|
||||
<Czech>Určuje interval mezi každým výpočtem</Czech>
|
||||
<Portuguese>Define o intervalo entre cada cálculo</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulationRadius_DisplayName">
|
||||
<English>Simulation Radius</English>
|
||||
@ -178,6 +199,7 @@
|
||||
<Spanish>Radio de simulación</Spanish>
|
||||
<German>Simulationsradius</German>
|
||||
<Czech>Rozsah simulace</Czech>
|
||||
<Portuguese>Raio de simulação</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulationRadius_Description">
|
||||
<English>Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles</English>
|
||||
@ -185,11 +207,12 @@
|
||||
<Spanish>Define el radio alrededor del jugador (en metros) en el cual se aplica la balística avanzada a los proyectiles</Spanish>
|
||||
<German>Gibt den Radius (in Metern) um den Spieler an, bei dem die erweiterte Ballistik auf Geschosse angewendet wird</German>
|
||||
<Czech>Určuje oblast kolem hráče (v metrech), kde je pokročilá balistika použita na projektil</Czech>
|
||||
<Portuguese>Define o raio ao redor do jogador (em metros) onde a balística avançada será aplicada aos projéteis</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_Description">
|
||||
<English></English>
|
||||
<Polish>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.</Polish>
|
||||
<Czech>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.</Czech>
|
||||
<Portuguese>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.</Portuguese>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -20,7 +20,7 @@ class CfgWeapons {
|
||||
reloadTime = 0.01;
|
||||
magazineReloadTime = 0.1;
|
||||
};
|
||||
|
||||
|
||||
// Manual Switching Of Flare Mode
|
||||
class SmokeLauncher;
|
||||
class CMFlareLauncher: SmokeLauncher {
|
||||
@ -106,12 +106,14 @@ class CfgWeapons {
|
||||
|
||||
class M134_minigun: MGunCore {
|
||||
class LowROF: Mode_FullAuto {
|
||||
reloadTime = 0.015; //0.03; same as above @todo
|
||||
dispersion = 0.006; //0.0023;
|
||||
reloadTime = 0.03; //0.03; same as above @todo
|
||||
dispersion = 0.0064; //0.0023;
|
||||
multiplier = 1;
|
||||
};
|
||||
class HighROF: LowROF {
|
||||
reloadTime = 0.015; //0.03;
|
||||
dispersion = 0.006; //0.0023;
|
||||
reloadTime = 0.02; //0.03;
|
||||
dispersion = 0.0064; //0.0023;
|
||||
multiplier = 1;
|
||||
};
|
||||
class close: HighROF {};
|
||||
class short: close {};
|
||||
|
@ -10,7 +10,7 @@ class CfgVehicles {
|
||||
showDisabled = 0;
|
||||
priority = 2;
|
||||
icon = PATHTOF(UI\ATRAG_Icon.paa);
|
||||
exceptions[] = {"notOnMap", "isNotInside"};
|
||||
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -24,10 +24,7 @@ class CfgVehicles {
|
||||
displayName = "ATragMX";
|
||||
vehicleClass = "Items";
|
||||
class TransportItems {
|
||||
class ACE_ATragMX {
|
||||
name = "ACE_ATragMX";
|
||||
count = 1;
|
||||
};
|
||||
MACRO_ADDITEM(ACE_ATragMX,1);
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
["ACE3 Equipment", QGVAR(ATragMXDialogKey), localize LSTRING(ATragMXDialogKey),
|
||||
{
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if (GVAR(active)) exitWith {
|
||||
closeDialog 0;
|
||||
false
|
||||
@ -21,7 +21,7 @@ _conditonCode = {
|
||||
};
|
||||
_toggleCode = {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {};
|
||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {};
|
||||
if (GVAR(active)) exitWith {
|
||||
closeDialog 0;
|
||||
};
|
||||
|
@ -3,14 +3,17 @@ class CfgMagazines {
|
||||
class CA_Magazine;
|
||||
class B_IR_Grenade: CA_Magazine {
|
||||
ACE_Attachable = "B_IRStrobe";
|
||||
model = QUOTE(PATHTOF(data\ace_IRStrobe.p3d));
|
||||
};
|
||||
|
||||
class O_IR_Grenade: B_IR_Grenade {
|
||||
ACE_Attachable = "O_IRStrobe";
|
||||
model = QUOTE(PATHTOF(data\ace_IRStrobe.p3d));
|
||||
};
|
||||
|
||||
class I_IR_Grenade: B_IR_Grenade {
|
||||
ACE_Attachable = "I_IRStrobe";
|
||||
model = QUOTE(PATHTOF(data\ace_IRStrobe.p3d));
|
||||
};
|
||||
|
||||
class SmokeShell;
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
class CfgWeapons {
|
||||
class ACE_ItemCore;
|
||||
class InventoryItem_Base_F;
|
||||
@ -9,11 +8,11 @@ class CfgWeapons {
|
||||
scope = 2;
|
||||
displayName = CSTRING(IrStrobe_Name);
|
||||
descriptionShort = CSTRING(IrStrobe_Description);
|
||||
model = "\A3\weapons_F\ammo\mag_univ.p3d";
|
||||
model = QUOTE(PATHTOF(data\ace_IRStrobe.p3d));
|
||||
picture = PATHTOF(UI\irstrobe_item.paa);
|
||||
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
30
addons/attach/GUI_VirtualAmmo.hpp
Normal file
30
addons/attach/GUI_VirtualAmmo.hpp
Normal file
@ -0,0 +1,30 @@
|
||||
class RscTitles {
|
||||
class GVAR(virtualAmmo) {
|
||||
idd = -1;
|
||||
movingEnable = 1;
|
||||
duration = 9999999;
|
||||
fadein = 0;
|
||||
fadeout = 0;
|
||||
onLoad = "uiNamespace setVariable ['ACE_attach_virtualAmmoDisplay', (_this select 0)];";
|
||||
class controls {};
|
||||
class objects {
|
||||
class TheObject {
|
||||
idc = 800851;
|
||||
type = 82;
|
||||
model = "\a3\weapons_f\Ammo\Handgrenade.p3d";
|
||||
scale = 1;
|
||||
direction[] = {0, 0, 1};
|
||||
up[] = {0, 1, 0};
|
||||
x = 0.5;
|
||||
y = 0.5;
|
||||
z = 1;
|
||||
xBack = 0.5;
|
||||
yBack = 0.5;
|
||||
zBack = 0.5;
|
||||
inBack = 0;
|
||||
enableZoom = 0;
|
||||
zoomDuration = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -16,3 +16,4 @@ class CfgPatches {
|
||||
#include "CfgMagazines.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
#include "GUI_VirtualAmmo.hpp"
|
||||
|
BIN
addons/attach/data/ace_IRStrobe.p3d
Normal file
BIN
addons/attach/data/ace_IRStrobe.p3d
Normal file
Binary file not shown.
90
addons/attach/data/ace_IRStrobe.rvmat
Normal file
90
addons/attach/data/ace_IRStrobe.rvmat
Normal file
@ -0,0 +1,90 @@
|
||||
class StageTI
|
||||
{
|
||||
texture = "a3\data_f\default_glass_ti_ca.paa";
|
||||
};
|
||||
ambient[] = {1,1,1,1};
|
||||
diffuse[] = {1,1,1,1};
|
||||
forcedDiffuse[] = {0,0,0,1};
|
||||
emmisive[] = {0,0,0,1};
|
||||
specular[] = {0.99999976,0.99999976,0.99999976,1};
|
||||
specularPower = 128;
|
||||
PixelShaderID = "Super";
|
||||
VertexShaderID = "Super";
|
||||
class Stage1
|
||||
{
|
||||
texture = "z\ace\addons\attach\data\ace_IRStrobe_nohq.paa";
|
||||
uvSource = "tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[] = {1,0,0};
|
||||
up[] = {0,1,0};
|
||||
dir[] = {0,0,0};
|
||||
pos[] = {0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage2
|
||||
{
|
||||
texture = "#(argb,8,8,3)color(0.5,0.5,0.5,0.5,DT)";
|
||||
uvSource = "tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[] = {1,0,0};
|
||||
up[] = {0,1,0};
|
||||
dir[] = {0,0,0};
|
||||
pos[] = {0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage3
|
||||
{
|
||||
texture = "#(argb,8,8,3)color(0,0,0,0,MC)";
|
||||
uvSource = "tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[] = {1,0,0};
|
||||
up[] = {0,1,0};
|
||||
dir[] = {0,0,0};
|
||||
pos[] = {0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage4
|
||||
{
|
||||
texture = "#(argb,8,8,3)color(1,1,1,1,AS)";
|
||||
uvSource = "tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[] = {1,0,0};
|
||||
up[] = {0,1,0};
|
||||
dir[] = {0,0,0};
|
||||
pos[] = {0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage5
|
||||
{
|
||||
texture = "#(argb,8,8,3)color(0,0.1,0.1,0.1,SMDI)";
|
||||
uvSource = "tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[] = {1,0,0};
|
||||
up[] = {0,1,0};
|
||||
dir[] = {0,0,0};
|
||||
pos[] = {0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage6
|
||||
{
|
||||
texture = "#(ai,32,128,1)fresnel(0.71,0.74)";
|
||||
uvSource = "none";
|
||||
};
|
||||
class Stage7
|
||||
{
|
||||
texture = "a3\data_f\env_land_co.paa";
|
||||
useWorldEnvMap = "true";
|
||||
uvSource = "tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[] = {1.0,0.0,0.0};
|
||||
up[] = {0.0,1.0,0.0};
|
||||
dir[] = {0.0,0.0,0.0};
|
||||
pos[] = {0.0,0.0,0.0};
|
||||
};
|
||||
};
|
BIN
addons/attach/data/ace_IRStrobe_co.paa
Normal file
BIN
addons/attach/data/ace_IRStrobe_co.paa
Normal file
Binary file not shown.
BIN
addons/attach/data/ace_IRStrobe_nohq.paa
Normal file
BIN
addons/attach/data/ace_IRStrobe_nohq.paa
Normal file
Binary file not shown.
@ -17,7 +17,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_itemClassname", "_itemVehClass", "_onAtachText", "_selfAttachPosition", "_attachedItem", "_tempObject", "_actionID"];
|
||||
private ["_itemClassname", "_itemVehClass", "_onAtachText", "_selfAttachPosition", "_attachedItem", "_tempObject", "_actionID", "_model"];
|
||||
|
||||
PARAMS_3(_attachToVehicle,_unit,_args);
|
||||
_itemClassname = [_args, 0, ""] call CBA_fnc_defaultParam;
|
||||
@ -47,26 +47,43 @@ if (_unit == _attachToVehicle) then { //Self Attachment
|
||||
_attachToVehicle setVariable [QGVAR(Objects), [_attachedItem], true];
|
||||
_attachToVehicle setVariable [QGVAR(ItemNames), [_itemClassname], true];
|
||||
} else {
|
||||
GVAR(placeAction) = -1;
|
||||
|
||||
_tempObject = _itemVehClass createVehicleLocal [0,0,-10000];
|
||||
_tempObject enableSimulationGlobal false;
|
||||
GVAR(placeAction) = PLACE_WAITING;
|
||||
|
||||
[_unit, QGVAR(vehAttach), true] call EFUNC(common,setForceWalkStatus);
|
||||
|
||||
//MenuBack isn't working for now (localize "STR_ACE_Attach_CancelAction")
|
||||
[{[localize LSTRING(PlaceAction), ""] call EFUNC(interaction,showMouseHint)}, []] call EFUNC(common,execNextFrame);
|
||||
_unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR(placeAction) = 1;}] call EFUNC(common,AddActionEventHandler)];
|
||||
// _unit setVariable [QGVAR(cancelActionEH), [_unit, "MenuBack", {true}, {GVAR(placeAction) = 0;}] call EFUNC(common,AddActionEventHandler)];
|
||||
_unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR(placeAction) = PLACE_APPROVE;}] call EFUNC(common,AddActionEventHandler)];
|
||||
|
||||
_actionID = _unit addAction [format ["<t color='#FF0000'>%1</t>", localize LSTRING(CancelAction)], {GVAR(placeAction) = 0}];
|
||||
_actionID = _unit addAction [format ["<t color='#FF0000'>%1</t>", localize LSTRING(CancelAction)], {GVAR(placeAction) = PLACE_CANCEL}];
|
||||
|
||||
//Display to show virtual object:
|
||||
private [];
|
||||
_model = getText (configFile >> "CfgAmmo" >> _itemVehClass >> "model");
|
||||
if (_model == "") then {
|
||||
_model = getText (configFile >> "CfgVehicles" >> _itemVehClass >> "model");
|
||||
};
|
||||
//"\A3\Weapons_F\empty.p3d" is fine, but ctrlSetModel ""; - will crash game!
|
||||
if (_model == "") exitWith {ERROR("No Model");};
|
||||
(QGVAR(virtualAmmo) call BIS_fnc_rscLayer) cutRsc [QGVAR(virtualAmmo), "PLAIN", 0, false];
|
||||
((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlSetModel _model;
|
||||
|
||||
[{
|
||||
private "_startingPosition";
|
||||
PARAMS_2(_args,_pfID);
|
||||
EXPLODE_7_PVT(_args,_unit,_attachToVehicle,_itemClassname,_itemVehClass,_tempObject,_onAtachText,_actionID);
|
||||
private["_angle", "_dir", "_screenPos", "_realDistance", "_up", "_virtualPos", "_virtualPosASL", "_lineInterection"];
|
||||
|
||||
if ((GVAR(placeAction) != -1) ||
|
||||
PARAMS_2(_args,_pfID);
|
||||
EXPLODE_6_PVT(_args,_unit,_attachToVehicle,_itemClassname,_itemVehClass,_onAtachText,_actionID);
|
||||
|
||||
_virtualPosASL = (eyePos _unit) vectorAdd (positionCameraToWorld [0,0,0.6]) vectorDiff (positionCameraToWorld [0,0,0]);
|
||||
if (cameraView == "EXTERNAL") then {
|
||||
_virtualPosASL = _virtualPosASL vectorAdd ((positionCameraToWorld [0.3,0,0]) vectorDiff (positionCameraToWorld [0,0,0]));
|
||||
};
|
||||
_virtualPos = _virtualPosASL call EFUNC(common,ASLToPosition);
|
||||
_lineInterection = lineIntersects [eyePos ACE_player, _virtualPosASL, ACE_player];
|
||||
|
||||
//Don't allow placing in a bad position:
|
||||
if (_lineInterection && {GVAR(placeAction) == PLACE_APPROVE}) then {GVAR(placeAction) = PLACE_WAITING;};
|
||||
|
||||
if ((GVAR(placeAction) != PLACE_WAITING) ||
|
||||
{_unit != ACE_player} ||
|
||||
{!([_unit, _attachToVehicle, []] call EFUNC(common,canInteractWith))} ||
|
||||
{!([_attachToVehicle, _unit, _itemClassname] call FUNC(canAttach))}) then {
|
||||
@ -75,16 +92,31 @@ if (_unit == _attachToVehicle) then { //Self Attachment
|
||||
[_unit, QGVAR(vehAttach), false] call EFUNC(common,setForceWalkStatus);
|
||||
[] call EFUNC(interaction,hideMouseHint);
|
||||
[_unit, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler);
|
||||
//[_unit, "MenuBack", (_unit getVariable [QGVAR(cancelActionEH), -1])] call EFUNC(common,removeActionEventHandler);
|
||||
_unit removeAction _actionID;
|
||||
|
||||
if (GVAR(placeAction) == 1) then {
|
||||
_startingPosition = _tempObject modelToWorldVisual [0,0,0];
|
||||
[_unit, _attachToVehicle, _itemClassname, _itemVehClass, _onAtachText, _startingPosition] call FUNC(placeApprove);
|
||||
(QGVAR(virtualAmmo) call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
|
||||
|
||||
if (GVAR(placeAction) == PLACE_APPROVE) then {
|
||||
[_unit, _attachToVehicle, _itemClassname, _itemVehClass, _onAtachText, _virtualPos] call FUNC(placeApprove);
|
||||
};
|
||||
deleteVehicle _tempObject;
|
||||
} else {
|
||||
_tempObject setPosATL ((ASLtoATL eyePos _unit) vectorAdd (positionCameraToWorld [0,0,1] vectorDiff positionCameraToWorld [0,0,0]));;
|
||||
//Show the virtual object:
|
||||
if (_lineInterection) then {
|
||||
((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlShow false;
|
||||
} else {
|
||||
((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlShow true;
|
||||
_screenPos = worldToScreen _virtualPos;
|
||||
if (_screenPos isEqualTo []) exitWith {
|
||||
((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlShow false;
|
||||
};
|
||||
_realDistance = (_virtualPos distance (positionCameraToWorld [0,0,0])) / ((call CBA_fnc_getFov) select 1);
|
||||
_screenPos = [(_screenPos select 0), _realDistance, (_screenPos select 1)];
|
||||
((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlSetPosition _screenPos;
|
||||
_dir = (positionCameraToWorld [0,0,1]) vectorFromTo (positionCameraToWorld [0,0,0]);
|
||||
_angle = asin (_dir select 2);
|
||||
_up = [0, cos _angle, sin _angle];
|
||||
((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlSetModelDirAndUp [[1,0,0], _up];
|
||||
};
|
||||
};
|
||||
}, 0, [_unit, _attachToVehicle, _itemClassname, _itemVehClass, _tempObject, _onAtachText, _actionID]] call CBA_fnc_addPerFrameHandler;
|
||||
}, 0, [_unit, _attachToVehicle, _itemClassname, _itemVehClass, _onAtachText, _actionID]] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
|
@ -25,7 +25,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_startingOffset", "_startDistanceFromCenter", "_closeInUnitVector", "_closeInMax", "_closeInMin", "_setupObject", "_closeInDistance", "_endPosTestOffset", "_endPosTest", "_doesIntersect", "_startingPosShifted", "_startASL", "_endPosShifted", "_endASL", "_attachedObject", "_currentObjects", "_currentItemNames"];
|
||||
private ["_startingOffset", "_startDistanceFromCenter", "_closeInUnitVector", "_closeInMax", "_closeInMin", "_closeInDistance", "_endPosTestOffset", "_endPosTest", "_doesIntersect", "_startingPosShifted", "_startASL", "_endPosShifted", "_endASL", "_attachedObject", "_currentObjects", "_currentItemNames"];
|
||||
|
||||
PARAMS_6(_unit,_attachToVehicle,_itemClassname,_itemVehClass,_onAtachText,_startingPosition);
|
||||
|
||||
@ -37,9 +37,6 @@ _closeInUnitVector = vectorNormalized (_startingOffset vectorFromTo [0,0,0]);
|
||||
_closeInMax = _startDistanceFromCenter;
|
||||
_closeInMin = 0;
|
||||
|
||||
//Delete Local Placement Object
|
||||
deleteVehicle _setupObject;
|
||||
|
||||
while {(_closeInMax - _closeInMin) > 0.01} do {
|
||||
_closeInDistance = (_closeInMax + _closeInMin) / 2;
|
||||
// systemChat format ["Trying %1 from %2 start %3", _closeInDistance, [_closeInMax, _closeInMin], _startDistanceFromCenter];
|
||||
|
@ -9,4 +9,8 @@
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_ATTACH
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
||||
|
||||
#define PLACE_WAITING -1
|
||||
#define PLACE_CANCEL 0
|
||||
#define PLACE_APPROVE 1
|
||||
|
@ -1,8 +1,7 @@
|
||||
ace_lockbackpacks
|
||||
ace_backpacks
|
||||
=================
|
||||
|
||||
Introduces the ability to lock one's backpack.
|
||||
|
||||
Adds indication when someone else opens your backpack (soundeffect / camShake).
|
||||
|
||||
## Maintainers
|
||||
|
||||
|
@ -225,5 +225,27 @@ class CfgVehicles {
|
||||
MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_API_Mag,4);
|
||||
MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_AMAX_Mag,4);
|
||||
};
|
||||
class AnimationSources {
|
||||
class Ammo_source {
|
||||
source = "user";
|
||||
animPeriod = 1;
|
||||
initPhase = 0;
|
||||
};
|
||||
class AmmoOrd_source {
|
||||
source = "user";
|
||||
animPeriod = 1;
|
||||
initPhase = 1;
|
||||
};
|
||||
class Grenades_source {
|
||||
source = "user";
|
||||
animPeriod = 1;
|
||||
initPhase = 1;
|
||||
};
|
||||
class Support_source {
|
||||
source = "user";
|
||||
animPeriod = 1;
|
||||
initPhase = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1598,6 +1598,7 @@
|
||||
<Spanish>[ACE] Caja de suministros de munición</Spanish>
|
||||
<German>[ACE] Munitionskiste</German>
|
||||
<Czech>[ACE] Bedna s municí</Czech>
|
||||
<Portuguese>[ACE] Caixa com suprimentos de munição</Portuguese>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -163,6 +163,7 @@
|
||||
<Spanish>Hacer que la unidad se rinda</Spanish>
|
||||
<German>Einheit kapitulieren lassen</German>
|
||||
<Czech>Vzdávající se jednotka</Czech>
|
||||
<Portuguese>Fazer unidade se render</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSurrender_Description">
|
||||
<English>Sync a unit to make them surrender.<br />Source: ace_captives</English>
|
||||
@ -170,42 +171,55 @@
|
||||
<Spanish>Sincroniza una unidad para hacer que se rinda.<br />Fuente: ace_captives</Spanish>
|
||||
<German>Einheit synchronisieren, um sie kapitulieren zu lassen.<br />Quelle: ace_captives</German>
|
||||
<Czech>Synchronizuj s jednotkou, která se má vzdát.<br />Zdroj: ace_captives</Czech>
|
||||
<Portuguese>Sincroniza uma unidade para fazer com que ela se renda. <br/>Fonte: ace_captives</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSettings_DisplayName">
|
||||
<English>Captives Settings</English>
|
||||
<Polish>Ustawienia więźniów</Polish>
|
||||
<Spanish>Ajustes de prisioneros</Spanish>
|
||||
<Czech>Nastavení zajatce</Czech>
|
||||
<German>Gefangenen-Einstellungen</German>
|
||||
<Portuguese>Ajustes de prisioneiros</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSettings_Description">
|
||||
<English>Controls settings for surrender and cable ties</English>
|
||||
<Polish>Moduł ten kontroluje ustawienia kapitulacji oraz opasek zaciskowych</Polish>
|
||||
<Spanish>Ajustes de control para rendición y precintos</Spanish>
|
||||
<Czech>Toto kontroluje nastavení kapitulace a pout</Czech>
|
||||
<German>Einstellungen zur Kapitulation und Kabelbindern</German>
|
||||
<Portuguese>Controla as configurações de rendição e abraçadeiras</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSettings_handcuffSide_name">
|
||||
<English>Can handcuff own side</English>
|
||||
<Polish>Skuwanie sojuszników</Polish>
|
||||
<Spanish>Se puede esposar el bando propio</Spanish>
|
||||
<Czech>Může spoutat spolubojovníky</Czech>
|
||||
<German>Kann Teamkollegen fesseln</German>
|
||||
<Portuguese>Pode algemar o próprio lado</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSettings_handcuffSide_description">
|
||||
<English>Can players cabletie units on their own side</English>
|
||||
<Polish>Czy gracze mogą skuwać sojuszników?</Polish>
|
||||
<Spanish>Pueden los jugadores esposar unidades en su propio bando</Spanish>
|
||||
<Czech>Mohou hráči spoutat jednotky na své straně</Czech>
|
||||
<German>Können Spieler eigene Einheiten fesseln</German>
|
||||
<Portuguese>Os jogadores podem algemar unidades do seu lado</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSettings_allowSurrender_name">
|
||||
<English>Allow surrendering</English>
|
||||
<Polish>Pozwól kapitulować</Polish>
|
||||
<Spanish>Permitir rendición</Spanish>
|
||||
<Czech>Povolit vzdávání</Czech>
|
||||
<German>Kapitulation erlauben</German>
|
||||
<Portuguese>Permite rendição</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSettings_allowSurrender_description">
|
||||
<English>Players can surrender after holstering their weapon</English>
|
||||
<Polish>Gracze mogą skapitulować po schowaniu swojej broni do kabury</Polish>
|
||||
<Spanish>Los jugadores pueden rendirse después de enfundar su arma</Spanish>
|
||||
<Czech>Hráč se může vzdát poté, co si skryje zbraň</Czech>
|
||||
<German>Spieler können kapitulieren, nachdem sie ihre Waffe geholstert haben</German>
|
||||
<Portuguese>Jogadores podem se render depois de guardar sua arma</Portuguese>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
</Project>
|
||||
|
@ -1,112 +1,109 @@
|
||||
class CfgVehicles {
|
||||
/*class Man;
|
||||
class CAManBase: Man {
|
||||
// @todo
|
||||
class UserActions {
|
||||
class ACE_Fire {
|
||||
displayName = "";
|
||||
priority = -99;
|
||||
available = 1;
|
||||
radius = 2.5;
|
||||
radiusView = 0;
|
||||
position = "";
|
||||
showWindow = 0;
|
||||
showIn3D = 0;
|
||||
onlyForPlayer = 1;
|
||||
shortcut = "DefaultAction";
|
||||
condition = QUOTE(call GVAR(UserActionFireCondition));
|
||||
statement = QUOTE(call GVAR(UserActionFire));
|
||||
userActionID = 100;
|
||||
};
|
||||
};
|
||||
};*/
|
||||
/*class Man;
|
||||
class CAManBase: Man {
|
||||
// @todo
|
||||
class UserActions {
|
||||
class ACE_Fire {
|
||||
displayName = "";
|
||||
priority = -99;
|
||||
available = 1;
|
||||
radius = 2.5;
|
||||
radiusView = 0;
|
||||
position = "";
|
||||
showWindow = 0;
|
||||
showIn3D = 0;
|
||||
onlyForPlayer = 1;
|
||||
shortcut = "DefaultAction";
|
||||
condition = QUOTE(call GVAR(UserActionFireCondition));
|
||||
statement = QUOTE(call GVAR(UserActionFire));
|
||||
userActionID = 100;
|
||||
};
|
||||
};
|
||||
};*/
|
||||
|
||||
// += needs a non inherited entry in that class, otherwise it simply overwrites
|
||||
//#include <DefaultItems.hpp>
|
||||
// += needs a non inherited entry in that class, otherwise it simply overwrites
|
||||
//#include <DefaultItems.hpp>
|
||||
class Logic;
|
||||
class Module_F: Logic {
|
||||
class ModuleDescription;
|
||||
};
|
||||
class ACE_Module: Module_F {};
|
||||
class ACE_ModuleCheckPBOs: ACE_Module {
|
||||
author = CSTRING(ACETeam);
|
||||
category = "ACE";
|
||||
displayName = CSTRING(CheckPBO_DisplayName);
|
||||
function = QFUNC(moduleCheckPBOs);
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_CheckPBO_ca.paa));
|
||||
class Arguments {
|
||||
class Action {
|
||||
displayName = CSTRING(CheckPBO_Action_DisplayName);
|
||||
description = CSTRING(CheckPBO_Action_Description);
|
||||
typeName = "NUMBER";
|
||||
class values {
|
||||
class WarnOnce {
|
||||
default = 1;
|
||||
name = CSTRING(CheckPBO_Action_WarnOnce);
|
||||
value = 0;
|
||||
};
|
||||
class Warn {
|
||||
name = CSTRING(CheckPBO_Action_WarnPerm);
|
||||
value = 1;
|
||||
};
|
||||
class Kick {
|
||||
name = CSTRING(CheckPBO_Action_Kick);
|
||||
value = 2;
|
||||
};
|
||||
author = CSTRING(ACETeam);
|
||||
category = "ACE";
|
||||
displayName = CSTRING(CheckPBO_DisplayName);
|
||||
function = QFUNC(moduleCheckPBOs);
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_CheckPBO_ca.paa));
|
||||
class Arguments {
|
||||
class Action {
|
||||
displayName = CSTRING(CheckPBO_Action_DisplayName);
|
||||
description = CSTRING(CheckPBO_Action_Description);
|
||||
typeName = "NUMBER";
|
||||
class values {
|
||||
class WarnOnce {
|
||||
default = 1;
|
||||
name = CSTRING(CheckPBO_Action_WarnOnce);
|
||||
value = 0;
|
||||
};
|
||||
class Warn {
|
||||
name = CSTRING(CheckPBO_Action_WarnPerm);
|
||||
value = 1;
|
||||
};
|
||||
class Kick {
|
||||
name = CSTRING(CheckPBO_Action_Kick);
|
||||
value = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
class CheckAll {
|
||||
displayName = CSTRING(CheckPBO_CheckAll_DisplayName);
|
||||
description = CSTRING(CheckPBO_CheckAll_Description);
|
||||
typeName = "BOOL";
|
||||
defaultValue = 0;
|
||||
};
|
||||
class Whitelist {
|
||||
displayName = CSTRING(CheckPBO_Whitelist_DisplayName);
|
||||
description = CSTRING(CheckPBO_Whitelist_Description);
|
||||
typeName = "STRING";
|
||||
defaultValue = "[]";
|
||||
};
|
||||
};
|
||||
};
|
||||
class CheckAll {
|
||||
displayName = CSTRING(CheckPBO_CheckAll_DisplayName);
|
||||
description = CSTRING(CheckPBO_CheckAll_Description);
|
||||
typeName = "BOOL";
|
||||
defaultValue = 0;
|
||||
};
|
||||
class Whitelist {
|
||||
displayName = CSTRING(CheckPBO_Whitelist_DisplayName);
|
||||
description = CSTRING(CheckPBO_Whitelist_Description);
|
||||
typeName = "STRING";
|
||||
class values {
|
||||
default = "[]";
|
||||
class ModuleDescription: ModuleDescription {
|
||||
description = CSTRING(CheckPBO_Description);
|
||||
};
|
||||
};
|
||||
};
|
||||
class ModuleDescription: ModuleDescription {
|
||||
description = CSTRING(CheckPBO_Description);
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_ModuleLSDVehicles: ACE_Module {
|
||||
author = CSTRING(ACETeam);
|
||||
category = "ACE";
|
||||
displayName = CSTRING(LSDVehicles_DisplayName);
|
||||
function = "ACE_Common_fnc_moduleLSDVehicles";
|
||||
scope = 2;
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_LSD_ca.paa));
|
||||
isGlobal = 1;
|
||||
class Arguments {
|
||||
class ACE_ModuleLSDVehicles: ACE_Module {
|
||||
author = CSTRING(ACETeam);
|
||||
category = "ACE";
|
||||
displayName = CSTRING(LSDVehicles_DisplayName);
|
||||
function = "ACE_Common_fnc_moduleLSDVehicles";
|
||||
scope = 2;
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_LSD_ca.paa));
|
||||
isGlobal = 1;
|
||||
class Arguments {};
|
||||
class ModuleDescription: ModuleDescription {
|
||||
description = CSTRING(LSDVehicles_Description);
|
||||
sync[] = {"AnyVehicle"};
|
||||
};
|
||||
};
|
||||
class ModuleDescription: ModuleDescription {
|
||||
description = CSTRING(LSDVehicles_Description);
|
||||
sync[] = {"AnyVehicle"};
|
||||
|
||||
class Box_NATO_Support_F;
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
author = CSTRING(ACETeam);
|
||||
displayName = CSTRING(MiscItems);
|
||||
transportMaxWeapons = 9001;
|
||||
transportMaxMagazines = 9001;
|
||||
transportMaxItems = 9001;
|
||||
maximumload = 9001;
|
||||
|
||||
class TransportWeapons {};
|
||||
class TransportMagazines {};
|
||||
class TransportItems {};
|
||||
class TransportBackpacks {};
|
||||
};
|
||||
};
|
||||
|
||||
class Box_NATO_Support_F;
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
author = CSTRING(ACETeam);
|
||||
displayName = CSTRING(MiscItems);
|
||||
transportMaxWeapons = 9001;
|
||||
transportMaxMagazines = 9001;
|
||||
transportMaxItems = 9001;
|
||||
maximumload = 9001;
|
||||
|
||||
class TransportWeapons {};
|
||||
class TransportMagazines {};
|
||||
class TransportItems {};
|
||||
class TransportBackpacks {};
|
||||
};
|
||||
|
||||
class Item_Base_F;
|
||||
class ACE_bananaItem: Item_Base_F {
|
||||
@ -115,13 +112,8 @@ class CfgVehicles {
|
||||
displayName = CSTRING(bananaDisplayName);
|
||||
author = CSTRING(ACETeam);
|
||||
vehicleClass = "Items";
|
||||
class TransportItems
|
||||
{
|
||||
class ACE_banana
|
||||
{
|
||||
name = "ACE_banana";
|
||||
count = 1;
|
||||
};
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_banana,1);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -6,7 +6,7 @@
|
||||
//Singe PFEH to handle execNextFrame and waitAndExec:
|
||||
[{
|
||||
private ["_entry"];
|
||||
|
||||
|
||||
//Handle the waitAndExec array:
|
||||
while {((count GVAR(waitAndExecArray)) > 0) && {((GVAR(waitAndExecArray) select 0) select 0) <= ACE_Time}} do {
|
||||
_entry = GVAR(waitAndExecArray) deleteAt 0;
|
||||
@ -37,6 +37,14 @@
|
||||
};
|
||||
}] call FUNC(addEventhandler);
|
||||
|
||||
//~~~~~Get Map Data~~~~~
|
||||
//Find MGRS zone and 100km grid for current map
|
||||
[] call FUNC(getMGRSdata);
|
||||
//Prepare variables for FUNC(getMapGridFromPos)/FUNC(getMapPosFromGrid)
|
||||
[] call FUNC(getMapGridData);
|
||||
|
||||
|
||||
|
||||
["fixCollision", DFUNC(fixCollision)] call FUNC(addEventhandler);
|
||||
["fixFloating", DFUNC(fixFloating)] call FUNC(addEventhandler);
|
||||
["fixPosition", DFUNC(fixPosition)] call FUNC(addEventhandler);
|
||||
@ -56,6 +64,10 @@
|
||||
["setFuel", {(_this select 0) setFuel (_this select 1)}] call FUNC(addEventhandler);
|
||||
["setSpeaker", {(_this select 0) setSpeaker (_this select 1)}] call FUNC(addEventhandler);
|
||||
|
||||
if (isServer) then {
|
||||
["hideObjectGlobal", {(_this select 0) hideObjectGlobal (_this select 1)}] call FUNC(addEventHandler);
|
||||
};
|
||||
|
||||
// hack to get PFH to work in briefing
|
||||
[QGVAR(onBriefingPFH), "onEachFrame", {
|
||||
if (ACE_time > 0) exitWith {
|
||||
|
@ -69,7 +69,11 @@ PREP(getFirstTerrainIntersection);
|
||||
PREP(getForceWalkStatus);
|
||||
PREP(getGunner);
|
||||
PREP(getInPosition);
|
||||
PREP(getMapGridData);
|
||||
PREP(getMapGridFromPos);
|
||||
PREP(getMapPosFromGrid);
|
||||
PREP(getMarkerType);
|
||||
PREP(getMGRSdata);
|
||||
PREP(getName);
|
||||
PREP(getNumberFromMissionSQM);
|
||||
PREP(getNumberMagazinesIn);
|
||||
@ -102,6 +106,7 @@ PREP(goKneeling);
|
||||
PREP(hadamardProduct);
|
||||
PREP(hasItem);
|
||||
PREP(hasMagazine);
|
||||
PREP(hideUnit);
|
||||
PREP(inheritsFrom);
|
||||
PREP(insertionSort);
|
||||
PREP(interpolateFromArray);
|
||||
@ -179,6 +184,7 @@ PREP(toBin);
|
||||
PREP(toBitmask);
|
||||
PREP(toHex);
|
||||
PREP(toNumber);
|
||||
PREP(unhideUnit);
|
||||
PREP(uniqueElementsOnly);
|
||||
PREP(unloadPerson);
|
||||
PREP(unloadPersonLocal);
|
||||
|
@ -56,20 +56,23 @@ _addons = [_addons, {_this find "ace_" == 0}] call FUNC(filter);
|
||||
} forEach getArray (configFile >> "ACE_Extensions" >> "extensions");
|
||||
|
||||
///////////////
|
||||
// check server version
|
||||
// check server version/addons
|
||||
///////////////
|
||||
if (isMultiplayer) then {
|
||||
if (isServer) then {
|
||||
// send servers version of ACE to all clients
|
||||
GVAR(ServerVersion) = _version;
|
||||
GVAR(ServerAddons) = _addons;
|
||||
publicVariable QGVAR(ServerVersion);
|
||||
publicVariable QGVAR(ServerAddons);
|
||||
} else {
|
||||
// clients have to wait for the variable
|
||||
// clients have to wait for the variables
|
||||
[{
|
||||
if (isNil QGVAR(ServerVersion)) exitWith {};
|
||||
if (isNil QGVAR(ServerVersion) || isNil QGVAR(ServerAddons)) exitWith {};
|
||||
|
||||
private "_version";
|
||||
_version = _this select 0;
|
||||
private ["_version","_addons"];
|
||||
_version = (_this select 0) select 0;
|
||||
_addons = (_this select 0) select 1;
|
||||
|
||||
if (_version != GVAR(ServerVersion)) then {
|
||||
private "_errorMsg";
|
||||
@ -82,7 +85,18 @@ if (isMultiplayer) then {
|
||||
};
|
||||
};
|
||||
|
||||
_addons = _addons - GVAR(ServerAddons);
|
||||
if !(_addons isEqualTo []) then {
|
||||
_errorMsg = format ["Client/Server Addon Mismatch. Client has extra addons: %1.",_addons];
|
||||
|
||||
diag_log text format ["[ACE] ERROR: %1", _errorMsg];
|
||||
|
||||
if (hasInterface) then {diag_log str "1";
|
||||
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
|
||||
};
|
||||
};
|
||||
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
}, 1, _version] call CBA_fnc_addPerFrameHandler;
|
||||
}, 1, [_version,_addons]] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
};
|
||||
|
@ -8,8 +8,8 @@
|
||||
* 0: Warn once
|
||||
* 1: Warn permanently
|
||||
* 2: Kick
|
||||
* 1: Check all PBOs? <BOOL> (Optional - default: "[]")
|
||||
* 2: Whitelist <STRING> (Optinal - default: false)
|
||||
* 1: Check all PBOs? <BOOL> (Optional - default: false)
|
||||
* 2: Whitelist <STRING> (Optinal - default: "[]")
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
|
165
addons/common/functions/fnc_getMGRSdata.sqf
Normal file
165
addons/common/functions/fnc_getMGRSdata.sqf
Normal file
@ -0,0 +1,165 @@
|
||||
/*
|
||||
* Author: VKing
|
||||
* Gets the current map's MGRS grid zone designator and 100km square.
|
||||
* Also gets longitude, latitude and altitude offset for the map
|
||||
*
|
||||
* Argument:
|
||||
* 0: Optional: Map name, if undefined the current map is used (String)
|
||||
*
|
||||
* Return value:
|
||||
* 0: Grid zone designator (String)
|
||||
* 1: 100km square (String)
|
||||
* 2: GZD + 100km sq. as a single string (String)
|
||||
* Writes return values to GVAR(MGRS_data) if run on the current map
|
||||
*/
|
||||
|
||||
// #define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_zone","_band","_GZD","_long","_lat","_UTM","_easting","_northing", "_altitude"];
|
||||
|
||||
DEFAULT_PARAM(0,_map,worldName);
|
||||
|
||||
_long = getNumber (ConfigFile >> "CfgWorlds" >> _map >> "longitude");
|
||||
_lat = getNumber (ConfigFile >> "CfgWorlds" >> _map >> "latitude");
|
||||
_altitude = getNumber (ConfigFile >> "CfgWorlds" >> _map >> "elevationOffset");
|
||||
|
||||
if (_map in ["Chernarus", "Bootcamp_ACR", "Woodland_ACR", "utes"]) then { _lat = 50; _altitude = 0; };
|
||||
if (_map in ["Altis", "Stratis"]) then { _lat = 40; _altitude = 0; };
|
||||
if (_map in ["Takistan", "Zargabad", "Mountains_ACR"]) then { _lat = 35; _altitude = 2000; };
|
||||
if (_map in ["Shapur_BAF", "ProvingGrounds_PMC"]) then { _lat = 35; _altitude = 100; };
|
||||
if (_map in ["fallujah"]) then { _lat = 33; _altitude = 0; };
|
||||
if (_map in ["fata", "Abbottabad"]) then { _lat = 30; _altitude = 1000; };
|
||||
if (_map in ["sfp_wamako"]) then { _lat = 14; _altitude = 0; };
|
||||
if (_map in ["sfp_sturko"]) then { _lat = 56; _altitude = 0; };
|
||||
if (_map in ["Bornholm"]) then { _lat = 55; _altitude = 0; };
|
||||
if (_map in ["Imrali"]) then { _lat = 40; _altitude = 0; };
|
||||
if (_map in ["Caribou"]) then { _lat = 68; _altitude = 0; };
|
||||
if (_map in ["Namalsk"]) then { _lat = 65; _altitude = 0; };
|
||||
if (_map in ["MCN_Aliabad"]) then { _lat = 36; _altitude = 0; };
|
||||
if (_map in ["Clafghan"]) then { _lat = 34; _altitude = 640; };
|
||||
if (_map in ["Sangin", "hellskitchen"]) then { _lat = 32; _altitude = 0; };
|
||||
if (_map in ["Sara"]) then { _lat = 40; _altitude = 0; };
|
||||
if (_map in ["reshmaan"]) then { _lat = 35; _altitude = 2000; };
|
||||
if (_map in ["Thirsk"]) then { _lat = 65; _altitude = 0; };
|
||||
if (_map in ["lingor"]) then { _lat = -4; _altitude = 0; };
|
||||
if (_map in ["Panthera3"]) then { _lat = 46; _altitude = 0; };
|
||||
if (_map in ["Kunduz"]) then { _lat = 37; _altitude = 400; };
|
||||
|
||||
|
||||
_UTM = [_long,_lat] call BIS_fnc_posDegToUTM;
|
||||
_easting = _UTM select 0;
|
||||
_northing = _UTM select 1;
|
||||
// _zone = _UTM select 2;
|
||||
TRACE_4("",_UTM,_easting,_northing,_zone);
|
||||
|
||||
/*
|
||||
_band = switch (true) do {
|
||||
case (_lat<-72): {"C"};
|
||||
case (_lat<-64): {"D"};
|
||||
case (_lat<-56): {"E"};
|
||||
case (_lat<-48): {"F"};
|
||||
case (_lat<-40): {"G"};
|
||||
case (_lat<-32): {"H"};
|
||||
case (_lat<-24): {"J"};
|
||||
case (_lat<-16): {"K"};
|
||||
case (_lat<-8): {"L"};
|
||||
case (_lat<0): {"M"};
|
||||
case (_lat>72): {"X"};
|
||||
case (_lat>64): {"W"};
|
||||
case (_lat>56): {"V"};
|
||||
case (_lat>48): {"U"};
|
||||
case (_lat>40): {"T"};
|
||||
case (_lat>32): {"S"};
|
||||
case (_lat>24): {"R"};
|
||||
case (_lat>16): {"Q"};
|
||||
case (_lat>8): {"P"};
|
||||
case (_lat>=0): {"N"};
|
||||
};
|
||||
*/
|
||||
_zone = 1 + (floor ((_long + 180) / 6));
|
||||
_band = "Z";
|
||||
if (_lat <= -80) then {
|
||||
_band = "A";
|
||||
} else {
|
||||
if (_lat < 84) then {
|
||||
_band = "CDEFGHJKLMNPQRSTUVWXX" select [(floor ((_lat / 8) + 10)), 1];
|
||||
};
|
||||
};
|
||||
if (_map == "VR") then {_zone = 0; _band = "RV";};
|
||||
|
||||
_GZD = format ["%1%2",_zone,_band];
|
||||
TRACE_3("",_zone,_band,_GZD);
|
||||
|
||||
|
||||
private ["_set1","_set2","_set3","_set4","_set5","_set6","_metaE","_metaN","_letterE","_letterN","_grid100km"];
|
||||
|
||||
_set1 = [1,7,13,19,25,31,37,43,49,55];
|
||||
_set2 = [2,8,14,20,26,32,38,44,50,56];
|
||||
_set3 = [3,9,15,21,27,33,39,45,51,57];
|
||||
_set4 = [4,10,16,22,28,34,40,46,52,58];
|
||||
_set5 = [5,11,17,23,29,35,41,47,53,59];
|
||||
_set6 = [6,12,18,24,30,36,42,48,54,60];
|
||||
|
||||
switch (true) do {
|
||||
case (_zone in _set1): {_metaE = 1; _metaN = 1;};
|
||||
case (_zone in _set2): {_metaE = 2; _metaN = 2;};
|
||||
case (_zone in _set3): {_metaE = 3; _metaN = 1;};
|
||||
case (_zone in _set4): {_metaE = 1; _metaN = 2;};
|
||||
case (_zone in _set5): {_metaE = 2; _metaN = 1;};
|
||||
case (_zone in _set6): {_metaE = 3; _metaN = 2;};
|
||||
};
|
||||
TRACE_2("",_metaE,_metaN);
|
||||
|
||||
switch (true) do {
|
||||
case (_zone == 0): {_letterE = "E"};
|
||||
case (_easting > 800000): {LOG("E8"); switch (_metaE) do {case 1: {_letterE="H"}; case 2: {_letterE="R"}; case 3: {_letterE="Z"}; }; };
|
||||
case (_easting > 700000): {LOG("E7"); switch (_metaE) do {case 1: {_letterE="G"}; case 2: {_letterE="Q"}; case 3: {_letterE="Y"}; }; };
|
||||
case (_easting > 600000): {LOG("E6"); switch (_metaE) do {case 1: {_letterE="F"}; case 2: {_letterE="P"}; case 3: {_letterE="X"}; }; };
|
||||
case (_easting > 500000): {LOG("E5"); switch (_metaE) do {case 1: {_letterE="E"}; case 2: {_letterE="N"}; case 3: {_letterE="W"}; }; };
|
||||
case (_easting > 400000): {LOG("E4"); switch (_metaE) do {case 1: {_letterE="D"}; case 2: {_letterE="M"}; case 3: {_letterE="V"}; }; };
|
||||
case (_easting > 300000): {LOG("E3"); switch (_metaE) do {case 1: {_letterE="C"}; case 2: {_letterE="L"}; case 3: {_letterE="U"}; }; };
|
||||
case (_easting > 200000): {LOG("E2"); switch (_metaE) do {case 1: {_letterE="B"}; case 2: {_letterE="K"}; case 3: {_letterE="T"}; }; };
|
||||
case (_easting > 100000): {LOG("E1"); switch (_metaE) do {case 1: {_letterE="A"}; case 2: {_letterE="J"}; case 3: {_letterE="S"}; }; };
|
||||
default {_letterE="@"};
|
||||
};
|
||||
TRACE_1("",_letterE);
|
||||
|
||||
_northing = _northing mod 2000000;
|
||||
TRACE_1("",_northing);
|
||||
|
||||
switch (true) do {
|
||||
case (_zone == 0): {_letterN = "N"};
|
||||
case (_northing > 1900000): {LOG("N19"); switch (_metaN) do {case 1: {_letterN = "V"}; case 2: {_letterN = "E"}; }; };
|
||||
case (_northing > 1800000): {LOG("N18"); switch (_metaN) do {case 1: {_letterN = "U"}; case 2: {_letterN = "D"}; }; };
|
||||
case (_northing > 1700000): {LOG("N17"); switch (_metaN) do {case 1: {_letterN = "T"}; case 2: {_letterN = "C"}; }; };
|
||||
case (_northing > 1600000): {LOG("N16"); switch (_metaN) do {case 1: {_letterN = "S"}; case 2: {_letterN = "B"}; }; };
|
||||
case (_northing > 1500000): {LOG("N15"); switch (_metaN) do {case 1: {_letterN = "R"}; case 2: {_letterN = "A"}; }; };
|
||||
case (_northing > 1400000): {LOG("N14"); switch (_metaN) do {case 1: {_letterN = "Q"}; case 2: {_letterN = "V"}; }; };
|
||||
case (_northing > 1300000): {LOG("N13"); switch (_metaN) do {case 1: {_letterN = "P"}; case 2: {_letterN = "U"}; }; };
|
||||
case (_northing > 1200000): {LOG("N12"); switch (_metaN) do {case 1: {_letterN = "N"}; case 2: {_letterN = "T"}; }; };
|
||||
case (_northing > 1100000): {LOG("N11"); switch (_metaN) do {case 1: {_letterN = "M"}; case 2: {_letterN = "S"}; }; };
|
||||
case (_northing > 1000000): {LOG("N10"); switch (_metaN) do {case 1: {_letterN = "L"}; case 2: {_letterN = "R"}; }; };
|
||||
case (_northing > 900000): {LOG("N09"); switch (_metaN) do {case 1: {_letterN = "K"}; case 2: {_letterN = "Q"}; }; };
|
||||
case (_northing > 800000): {LOG("N08"); switch (_metaN) do {case 1: {_letterN = "J"}; case 2: {_letterN = "P"}; }; };
|
||||
case (_northing > 700000): {LOG("N07"); switch (_metaN) do {case 1: {_letterN = "H"}; case 2: {_letterN = "N"}; }; };
|
||||
case (_northing > 600000): {LOG("N06"); switch (_metaN) do {case 1: {_letterN = "G"}; case 2: {_letterN = "M"}; }; };
|
||||
case (_northing > 500000): {LOG("N05"); switch (_metaN) do {case 1: {_letterN = "F"}; case 2: {_letterN = "L"}; }; };
|
||||
case (_northing > 400000): {LOG("N04"); switch (_metaN) do {case 1: {_letterN = "E"}; case 2: {_letterN = "K"}; }; };
|
||||
case (_northing > 300000): {LOG("N03"); switch (_metaN) do {case 1: {_letterN = "D"}; case 2: {_letterN = "J"}; }; };
|
||||
case (_northing > 200000): {LOG("N02"); switch (_metaN) do {case 1: {_letterN = "C"}; case 2: {_letterN = "H"}; }; };
|
||||
case (_northing > 100000): {LOG("N01"); switch (_metaN) do {case 1: {_letterN = "B"}; case 2: {_letterN = "G"}; }; };
|
||||
case (_northing > 0): {LOG("N00"); switch (_metaN) do {case 1: {_letterN = "A"}; case 2: {_letterN = "F"}; }; };
|
||||
};
|
||||
TRACE_1("",_letterN);
|
||||
|
||||
_grid100km = _letterE+_letterN;
|
||||
TRACE_1("",_grid100km);
|
||||
|
||||
if (_map == worldName) then {
|
||||
GVAR(MGRS_data) = [_GZD,_grid100km,_GZD+_grid100km];
|
||||
GVAR(mapAltitude) = _altitude;
|
||||
GVAR(mapLatitude) = _lat;
|
||||
GVAR(mapLongitude) = _long;
|
||||
};
|
||||
[_GZD,_grid100km,_GZD+_grid100km]
|
76
addons/common/functions/fnc_getMapGridData.sqf
Normal file
76
addons/common/functions/fnc_getMapGridData.sqf
Normal file
@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Author: PabstMirror (ideas from Nou's mapGridToPos and BIS_fnc_gridToPos)
|
||||
* Finds real x/y offset and map step for a 10 digit grid
|
||||
* Save time by preparing data one time at startup
|
||||
*
|
||||
* Argument:
|
||||
* None
|
||||
*
|
||||
* Return values:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [] call ace_map_fnc_getMapGridData
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private["_cfgGrid", "_formatX", "_formatY", "_heightOffset", "_offsetX", "_offsetY", "_originGrid", "_realOffsetY", "_startGrid", "_stepX", "_stepY", "_zoom", "_zoomMax", "_letterGrid"];
|
||||
|
||||
GVAR(mapGridData) = [];
|
||||
|
||||
//--- Extract grid values from world config (Borrowed from BIS_fnc_gridToPos)
|
||||
_cfgGrid = configFile >> "CfgWorlds" >> worldName >> "Grid";
|
||||
_offsetX = getNumber (_cfgGrid >> "offsetX");
|
||||
_offsetY = getNumber (_cfgGrid >> "offsetY");
|
||||
_zoomMax = 1e99;
|
||||
_formatX = "";
|
||||
_formatY = "";
|
||||
_stepX = 1e10;
|
||||
_stepY = 1e10;
|
||||
{
|
||||
_zoom = getnumber (_x >> "zoomMax");
|
||||
if (_zoom < _zoomMax) then {
|
||||
_zoomMax = _zoom;
|
||||
_formatX = getText (_x >> "formatX");
|
||||
_formatY = getText (_x >> "formatY");
|
||||
_stepX = getNumber (_x >> "stepX");
|
||||
_stepY = getNumber (_x >> "stepY");
|
||||
};
|
||||
} foreach configProperties [_cfgGrid, "isClass _x", false];
|
||||
|
||||
_letterGrid = false;
|
||||
if (((toLower _formatX) find "a") != -1) then {_letterGrid = true};
|
||||
if (((toLower _formatY) find "a") != -1) then {_letterGrid = true};
|
||||
if (_letterGrid) exitWith {
|
||||
diag_log text format ["[ACE] Map Grid Warning (%1) - Map uses letter grids [%2,%3]", worldName, _formatX, _formatY];
|
||||
};
|
||||
|
||||
//Start at [0, 500] and move north until we get a change in grid
|
||||
_heightOffset = 500;
|
||||
_startGrid = mapGridPosition [0, _heightOffset];
|
||||
_originGrid = _startGrid;
|
||||
while {_startGrid == _originGrid} do {
|
||||
_heightOffset = _heightOffset + 1;
|
||||
_originGrid = mapGridPosition [0, _heightOffset];
|
||||
};
|
||||
|
||||
//Calculate the real y offset
|
||||
_realOffsetY = parseNumber (_originGrid select [(count _formatX), (count _formatY)]) * _stepY + _heightOffset - 1;
|
||||
|
||||
//Calculate MGRS 10digit step - they should both be 1 meter:
|
||||
_stepXat5 = _stepX * 10 ^ ((count _formatX) - 5);
|
||||
_stepYat5 = -1 * _stepY * 10 ^ ((count _formatY) - 5);
|
||||
|
||||
if (_stepYat5 < 0) then {
|
||||
diag_log text format ["[ACE] Map Grid Warning (%1) - Northing is reversed", worldName];
|
||||
};
|
||||
if (_stepXat5 != 1) then {
|
||||
diag_log text format ["[ACE] Map Grid Warning (%1) - MGRS 10 digit grid does not equal 1 meter: (%2) for x", worldName, _stepXat5];
|
||||
};
|
||||
if ((_stepYat5 != 1) && {_stepYat5 != -1}) then {
|
||||
diag_log text format ["[ACE] Map Grid Warning (%1) - MGRS 10 digit grid does not equal 1 meter: (%2) for y", worldName, _stepXat5];
|
||||
};
|
||||
|
||||
GVAR(mapGridData) = [_offsetX, _realOffsetY, _stepXat5, _stepYat5];
|
63
addons/common/functions/fnc_getMapGridFromPos.sqf
Normal file
63
addons/common/functions/fnc_getMapGridFromPos.sqf
Normal file
@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Author: VKing, PabstMirror
|
||||
* Gets a 10-digit map grid for the given world position
|
||||
*
|
||||
* Argument:
|
||||
* 0: Position (2D Position) <ARRAY>
|
||||
* 1: Return type; false for array of easting and northing, true for single string <Bool>
|
||||
*
|
||||
* Return values:
|
||||
* 0: Easting <String>
|
||||
* 1: Northing <String>
|
||||
*
|
||||
* Example:
|
||||
* [(getPos player)] call ace_common_fnc_getMapGridFromPos;
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
// #define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_pos);
|
||||
DEFAULT_PARAM(1,_returnSingleString,false);
|
||||
|
||||
private["_count", "_easting", "_nativeGrid", "_northing"];
|
||||
|
||||
//Fallback, when map data is weird (letters)
|
||||
if ((count GVAR(mapGridData)) == 0) exitWith {
|
||||
_nativeGrid = mapGridPosition _pos;
|
||||
if (_returnSingleString) then {
|
||||
_nativeGrid
|
||||
} else {
|
||||
_count = floor ((count _nativeGrid) / 2);
|
||||
[(_nativeGrid select [0, _count]), (_nativeGrid select [_count, _count])]
|
||||
};
|
||||
};
|
||||
|
||||
EXPLODE_4_PVT(GVAR(mapGridData),_offsetX,_realOffsetY,_stepXat5,_stepYat5);
|
||||
_easting = floor (((_pos select 0) - _offsetX) / _stepXat5);
|
||||
_northing = floor (((_pos select 1) - _realOffsetY) / _stepYat5);
|
||||
|
||||
//Attempt to handle negative east/north (e.g.: moving west of map bounds)
|
||||
if (_easting > 0) then {
|
||||
_easting = str _easting;
|
||||
while {count _easting < 5} do {_easting = "0" + _easting;};
|
||||
} else {
|
||||
_easting = str abs _easting;
|
||||
while {count _easting < 4} do {_easting = "0" + _easting;};
|
||||
_easting = "-" + _easting;
|
||||
};
|
||||
if (_northing > 0) then {
|
||||
_northing = str _northing;
|
||||
while {count _northing < 5} do {_northing = "0" + _northing;};
|
||||
} else {
|
||||
_northing = str abs _northing;
|
||||
while {count _northing < 4} do {_northing = "0" + _northing;};
|
||||
_northing = "-" + _northing;
|
||||
};
|
||||
|
||||
if (_returnSingleString) then {
|
||||
_easting + _northing
|
||||
} else {
|
||||
[_easting, _northing]
|
||||
};
|
46
addons/common/functions/fnc_getMapPosFromGrid.sqf
Normal file
46
addons/common/functions/fnc_getMapPosFromGrid.sqf
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Gets position from grid cords
|
||||
*
|
||||
* Argument:
|
||||
* 0: Grid Cords <STRING>
|
||||
* 1: Get Center or bottom right <BOOL><OPTIONAL>
|
||||
*
|
||||
* Return values:
|
||||
* Position <ARRAY>
|
||||
*
|
||||
* Example:
|
||||
* ["6900080085"] call ace_common_fnc_getMapPosFromGrid
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_inputString);
|
||||
DEFAULT_PARAM(1,_getCenterOfGrid,true);
|
||||
|
||||
private["_countInput", "_countInputHalf", "_xPart", "_xPos", "_yPart", "_yPos"];
|
||||
|
||||
if ((count GVAR(mapGridData)) == 0) exitWith {
|
||||
ERROR("Map has bad data, falling back to BIS_fnc_gridToPos");
|
||||
(_this call BIS_fnc_gridToPos) select 0
|
||||
};
|
||||
|
||||
EXPLODE_4_PVT(GVAR(mapGridData),_offsetX,_realOffsetY,_stepXat5,_stepYat5);
|
||||
|
||||
_countInput = count _inputString;
|
||||
_countInputHalf = floor (_countInput / 2);
|
||||
|
||||
//Split string, ignoring middle
|
||||
_xPart = _inputString select [0, _countInputHalf];
|
||||
_yPart = _inputString select [(ceil (_countInput / 2)), _countInputHalf];
|
||||
|
||||
_xPos = ((parseNumber _xPart) * _stepXat5 * 10 ^ (5 - _countInputHalf)) + _offsetX;
|
||||
_yPos = ((parseNumber _yPart) * _stepYat5 * 10 ^ (5 - _countInputHalf)) + _realOffsetY;
|
||||
|
||||
if (_getCenterOfGrid) then {
|
||||
_xPos = _xPos + 0.5 * _stepXat5 * 10 ^ (5 - _countInputHalf);
|
||||
_yPos = _yPos + 0.5 * _stepYat5 * 10 ^ (5 - _countInputHalf);
|
||||
};
|
||||
|
||||
[_xPos, _yPos, 0];
|
34
addons/common/functions/fnc_hideUnit.sqf
Normal file
34
addons/common/functions/fnc_hideUnit.sqf
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Author: SilentSpike (based on muteUnit)
|
||||
* Globally hides a unit. This allows the handling of more than one reason to hide an object globally.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: Reason to hide the unit <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* nil
|
||||
*
|
||||
* Example:
|
||||
* [ACE_Player, "SpectatorMode"] call ace_common_fnc_hideUnit
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_reason);
|
||||
|
||||
if (isNull _unit) exitWith {};
|
||||
|
||||
private "_setHiddenReasons";
|
||||
_setHiddenReasons = _unit getVariable [QGVAR(setHiddenReasons), []];
|
||||
|
||||
if !(_reason in _setHiddenReasons) then {
|
||||
_setHiddenReasons pushBack _reason;
|
||||
_unit setVariable [QGVAR(setHiddenReasons), _setHiddenReasons, true];
|
||||
};
|
||||
|
||||
//if !(isObjectHidden _unit) then { (Uncomment when isObjectHidden hits stable branch)
|
||||
["hideObjectGlobal",[_unit,true]] call FUNC(serverEvent);
|
||||
//};
|
@ -3,7 +3,9 @@
|
||||
* Initializes the check-PBOs module.
|
||||
*
|
||||
* Arguments:
|
||||
* Whatever the module provides. (I dunno.)
|
||||
* 0: The module logic <LOGIC>
|
||||
* 1: units <ARRAY>
|
||||
* 2: activated <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
|
@ -41,11 +41,11 @@ if ((typeName _value) != (_settingData select 1)) then {
|
||||
_failed = true;
|
||||
if ((_settingData select 1) == "BOOL" and (typeName _value) == "SCALAR") then {
|
||||
// If value is not 0 or 1 consider it invalid and don't set anything
|
||||
if (_value == 0) then {
|
||||
if (_value isEqualTo 0) then {
|
||||
_value = false;
|
||||
_failed = false;
|
||||
};
|
||||
if (_value == 1) then {
|
||||
if (_value isEqualTo 1) then {
|
||||
_value = true;
|
||||
_failed = false;
|
||||
};
|
||||
|
34
addons/common/functions/fnc_unhideUnit.sqf
Normal file
34
addons/common/functions/fnc_unhideUnit.sqf
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Author: SilentSpike (based on unmuteUnit)
|
||||
* Globally unhides a unit. Only unhides if the last reason was removed.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: Reason to unhide the unit <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* nil
|
||||
*
|
||||
* Example:
|
||||
* [ACE_Player, "SpectatorMode"] call ace_common_fnc_unhideUnit
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_reason);
|
||||
|
||||
if (isNull _unit) exitWith {};
|
||||
|
||||
private "_setHiddenReasons";
|
||||
_setHiddenReasons = _unit getVariable [QGVAR(setHiddenReasons), []];
|
||||
|
||||
if (_reason in _setHiddenReasons) then {
|
||||
_setHiddenReasons deleteAt (_setHiddenReasons find _reason);
|
||||
_unit setVariable [QGVAR(setHiddenReasons), _setHiddenReasons, true];
|
||||
};
|
||||
|
||||
if (_setHiddenReasons isEqualTo []) then {
|
||||
["hideObjectGlobal",[_unit,false]] call FUNC(serverEvent);
|
||||
};
|
@ -10,21 +10,39 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
//#define DEBUG_MODE_FULL
|
||||
#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson))
|
||||
|
||||
private ["_loaded", "_emptyPos"];
|
||||
private ["_loaded", "_emptyPos","_validVehiclestate"];
|
||||
PARAMS_2(_unit,_vehicle);
|
||||
_validVehiclestate = true;
|
||||
|
||||
if (driver _vehicle == _unit) exitwith {TRACE_1("Exiting on Failed Driver Check", driver _vehicle == _unit); false;};
|
||||
TRACE_1("Vehicle Check", driver _vehicle == _unit);
|
||||
if !(speed _vehicle <1 && (((getPos _vehicle) select 2) < 2)) exitwith {TRACE_1("Exiting on Failed speed check", getPosASL _vehicle == _unit); false;};
|
||||
TRACE_1("getPosASL Vehicle Check", getPos _vehicle);
|
||||
if (_vehicle isKindOf "Ship" ) then {
|
||||
if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false};
|
||||
TRACE_1("SHIP Ground Check", getPosATL _vehicle );
|
||||
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 13, typeof _unit]); // TODO: if spot is underwater pick another spot.
|
||||
} else {
|
||||
if (_vehicle isKindOf "Air" ) then {
|
||||
if !(speed _vehicle <1 && {isTouchingGround _vehicle}) then {_validVehiclestate = false};
|
||||
TRACE_1("Vehicle Ground Check", isTouchingGround _vehicle);
|
||||
_emptyPos = (getPosASL _vehicle) call EFUNC(common,ASLtoPosition);
|
||||
_emptyPos = [(_emptyPos select 0) + random(5), (_emptyPos select 1) + random(5), _emptyPos select 2 ];
|
||||
} else {
|
||||
if !(speed _vehicle <1 && {isTouchingGround _vehicle}) then {_validVehiclestate = false};
|
||||
TRACE_1("Vehicle Ground Check", isTouchingGround _vehicle);
|
||||
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 13, typeof _unit]);
|
||||
};
|
||||
};
|
||||
|
||||
TRACE_1("getPosASL Vehicle Check", getPosASL _vehicle);
|
||||
if (!_validVehiclestate) exitwith { diag_log format["Unable to unload patient because invalid vehicle state. Either moving or Not close enough on the ground. %1", getPos _vehicle]; false };
|
||||
|
||||
diag_log str _emptyPos;
|
||||
|
||||
if (count _emptyPos == 0) exitwith {diag_log format["No safe empty spots to unload patient. %1", _emptyPos]; false}; //consider displaying text saying there are no safe places to exit the vehicle
|
||||
|
||||
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 13, typeof _unit]);
|
||||
if (count _emptyPos == 0) exitwith {false}; //consider displaying text saying there are no safe places to exit the vehicle
|
||||
|
||||
unassignVehicle _unit;
|
||||
[_unit] orderGetIn false;
|
||||
|
@ -476,6 +476,7 @@
|
||||
<Spanish>Comprobar PBOs</Spanish>
|
||||
<German>Überprüfe PBOs</German>
|
||||
<Czech>Zkontrolovat PBO</Czech>
|
||||
<Portuguese>Verificar PBOs</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_Description">
|
||||
<English></English>
|
||||
@ -483,6 +484,7 @@
|
||||
<Spanish>Este módulo verifica la integridad de los addons con los que iniciamos el simulador</Spanish>
|
||||
<German>Dieses Modul überprüft ob jeder Spieler die richtigen PBO-Dateien hat.</German>
|
||||
<Czech>Zjistit addon který je v souladu se serverem</Czech>
|
||||
<Portuguese>Este módulo verifica a integridade dos addons quando iniciamos a simulação</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_Action_DisplayName">
|
||||
<English>Action</English>
|
||||
@ -490,6 +492,7 @@
|
||||
<Spanish>Acción</Spanish>
|
||||
<German>Aktion</German>
|
||||
<Czech>Akce</Czech>
|
||||
<Portuguese>Ação</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_Action_Description">
|
||||
<English>What to do with people who do not have the right PBOs?</English>
|
||||
@ -497,6 +500,7 @@
|
||||
<Spanish>¿Qué hacer con la gente que no tiene correctamente los PBOs?</Spanish>
|
||||
<German>Was soll mit Leuten passieren, die nicht die richtigen PBOs haben?</German>
|
||||
<Czech>Co udělat s lidmi, co nemají správné addony?</Czech>
|
||||
<Portuguese>O que fazer com pessoas que não tem os PBOs corretos?</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_Action_WarnOnce">
|
||||
<English>Warn once</English>
|
||||
@ -504,6 +508,7 @@
|
||||
<Spanish>Avisar una vez</Spanish>
|
||||
<German>Einmal verwarnen</German>
|
||||
<Czech>Upozornit jednou</Czech>
|
||||
<Portuguese>Avisar uma vez</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_Action_WarnPerm">
|
||||
<English>Warn (permanent)</English>
|
||||
@ -511,6 +516,7 @@
|
||||
<Spanish>Avisar (permanente)</Spanish>
|
||||
<German>Immer verwarnen</German>
|
||||
<Czech>Upozornit (permanentně)</Czech>
|
||||
<Portuguese>Avisar (permanente)</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_Action_Kick">
|
||||
<English>Kick</English>
|
||||
@ -518,6 +524,7 @@
|
||||
<Spanish>Expulsar</Spanish>
|
||||
<German>Kicken</German>
|
||||
<Czech>Vyhodit</Czech>
|
||||
<Portuguese>Chutar</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_CheckAll_DisplayName">
|
||||
<English>Check all addons</English>
|
||||
@ -525,6 +532,7 @@
|
||||
<Spanish>Comprobar todos los addons</Spanish>
|
||||
<German>Alle Addons überprüfen</German>
|
||||
<Czech>Zkontrolovat všechny addony</Czech>
|
||||
<Portuguese>Verificar todos addons</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_CheckAll_Description">
|
||||
<English>Check all addons instead of only those of ACE?</English>
|
||||
@ -532,6 +540,7 @@
|
||||
<Spanish>Comprobar todos los addons en vez de solo los del ACE</Spanish>
|
||||
<German>Alle Addons anstatt nur ACE überprüfen?</German>
|
||||
<Czech>Zkontrolovat všechny addony namísto jen těch od ACE?</Czech>
|
||||
<Portuguese>Verificar todos addons invés de só os do ACE?</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_Whitelist_DisplayName">
|
||||
<English>Whitelist</English>
|
||||
@ -539,6 +548,7 @@
|
||||
<Spanish>Lista blanca</Spanish>
|
||||
<German>Whitelist</German>
|
||||
<Czech>Seznam povolených</Czech>
|
||||
<Portuguese>Lista branca</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_Whitelist_Description">
|
||||
<English>What addons are allowed regardless?</English>
|
||||
@ -546,6 +556,7 @@
|
||||
<Spanish>Qué addons están permitidos igualmente</Spanish>
|
||||
<German>Welche Addons werden dennoch erlaubt?</German>
|
||||
<Czech>Jaké addony jsou povoleny?</Czech>
|
||||
<Portuguese>Quais addons são permitidos de qualquer maneira?</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_LSDVehicles_DisplayName">
|
||||
<English>LSD Vehicles</English>
|
||||
@ -553,6 +564,7 @@
|
||||
<Spanish>Vehículos LSD</Spanish>
|
||||
<German>LSD-Fahrzeuge</German>
|
||||
<Czech>LSD vozidla</Czech>
|
||||
<Portuguese>Veículos LSD</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_LSDVehicles_Description">
|
||||
<English>Adds LSD effect to synchronized vehicle</English>
|
||||
@ -560,15 +572,31 @@
|
||||
<Spanish>Añade el efecto LSD al vehículo sincronizado</Spanish>
|
||||
<German>Fügt einen LSD-Effekt zum synchronisierten Fahrzeug hinzu</German>
|
||||
<Czech>Přidá LSD efekt pro synchronizované vozidla</Czech>
|
||||
<Portuguese>Adiciona efeito LSD ao veículo sincronizado</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_toggleHandheldDevice">
|
||||
<English>Toggle Handheld Device</English>
|
||||
<Spanish>Seleccionar dispositivo de mano</Spanish>
|
||||
<German>Handheld aufrufen</German>
|
||||
<Portuguese>Ativa dispositivo de mão</Portuguese>
|
||||
<Polish>Przełącz urządzenie podręczne</Polish>
|
||||
<Czech>Přepnout ruční zařízení</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_closeHandheldDevice">
|
||||
<English>Close Handheld Device</English>
|
||||
<Spanish>Cerrar dispositivo de mano</Spanish>
|
||||
<German>Handheld schließen</German>
|
||||
<Portuguese>Fecha dispositivo de mão</Portuguese>
|
||||
<Polish>Zamknij urządzenie podręczne</Polish>
|
||||
<Czech>Zavřít ruční zařízení</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_cycleHandheldDevices">
|
||||
<English>Cycle Handheld Devices</English>
|
||||
<Spanish>Cambiar dispositivos de mano</Spanish>
|
||||
<German>Handheld wechseln</German>
|
||||
<Portuguese>Troca dispositivos de mão</Portuguese>
|
||||
<Polish>Następne urządzenie podręczne</Polish>
|
||||
<Czech>Procházet ruční zařízení</Czech>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
@ -9,3 +9,5 @@ GVAR(deployPFH) = -1;
|
||||
GVAR(placer) setVariable [QGVAR(wireDeployed), true];
|
||||
};
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
||||
[QGVAR(vehicleDamage), {_this call FUNC(vehicleDamage)}] call EFUNC(common,addEventHandler);
|
||||
|
@ -7,5 +7,6 @@ PREP(dismount);
|
||||
PREP(dismountSuccess);
|
||||
PREP(handleDamage);
|
||||
PREP(handleKilled);
|
||||
PREP(vehicleDamage);
|
||||
|
||||
ADDON = true;
|
||||
|
@ -17,7 +17,9 @@
|
||||
|
||||
PARAMS_2(_wire,_killer);
|
||||
|
||||
if (isNull _killer) then {
|
||||
private ["_distance", "_vehicle"];
|
||||
|
||||
if (isNull _killer) then {
|
||||
_killer = _wire getVariable ["ace_concertina_wire_lastDamager", objNull];
|
||||
if (isNull _killer) then {
|
||||
_killer = nearestObject [_wire, "car"];
|
||||
@ -25,111 +27,9 @@ if (isNull _killer) then {
|
||||
};
|
||||
if (isNull _killer || {_killer == _wire} || {_killer == gunner (vehicle _killer)}) exitWith {};
|
||||
|
||||
private ["_type", "_mode", "_distance", "_anim", "_parts", "_selectionPart", "_selection", "_pos_w", "_dir_w", "_vehicle"];
|
||||
_type = typeOf _wire;
|
||||
_mode = switch (_type) do {
|
||||
case "ACE_ConcertinaWire": { 0 };
|
||||
case "Land_Razorwire_F": { 1 };
|
||||
default { -1 };
|
||||
};
|
||||
|
||||
if (_mode == -1) exitWith {};
|
||||
|
||||
// _mode = 0 = Single Coil
|
||||
// _mode = 1 = Triple Coil
|
||||
|
||||
// --------------------------------
|
||||
// L M R
|
||||
// 4.54929 (4)
|
||||
// 6.13564 (6)
|
||||
//9.78744 (10)
|
||||
|
||||
_distance = _wire distance _killer;
|
||||
if (_distance > 14 || {_distance < 2}) exitWith {}; // Fix if shooting wire
|
||||
|
||||
_type = typeOf _wire;
|
||||
_anim = _wire animationPhase "wire_2";
|
||||
_pos_w = getPos _wire;
|
||||
_dir_w = getDir _wire;
|
||||
_vehicle = vehicle _killer;
|
||||
|
||||
if (_mode == 0) then {
|
||||
private ["_x", "_y", "_found", "_wireCheckPosAr", "_no"];
|
||||
_x = _pos_w select 0;
|
||||
_y = _pos_w select 1;
|
||||
// Check if two Single coils are placed next to each other (i.e playes have built a big wire obstacle)
|
||||
_wireCheckPosAr = [
|
||||
[_x + (sin (_dir_w+90) * 1.5),_y + (cos (_dir_w+90) * 1.5)],
|
||||
[(_x-(sin _dir_w)) + (sin (_dir_w+90) * 1.5),(_y-(cos _dir_w)) + (cos (_dir_w+90) * 1.5)],
|
||||
[_x + (sin (_dir_w-90) * 1.5),_y + (cos (_dir_w-90) * 1.5)],
|
||||
[(_x-(sin _dir_w)) + (sin (_dir_w-90) * 1.5),(_y-(cos _dir_w)) + (cos (_dir_w-90) * 1.5)]
|
||||
];
|
||||
{
|
||||
_found = false;
|
||||
_no = nearestObjects [_x, [typeOf _wire], 3]; //diag_log _no; diag_log ".....";
|
||||
_no = _no - [_wire]; //diag_log _no;
|
||||
if (count _no > 0) exitWith {
|
||||
_found = true; //diag_log "found";
|
||||
};
|
||||
} foreach _wireCheckPosAr;
|
||||
// Double coil found!
|
||||
if (_found) then {
|
||||
_mode = 1;
|
||||
} else {
|
||||
// Randomly make a single coil also catch tanks, if speed is high
|
||||
if (_vehicle isKindOf "Tank" && {20 > random 100} && {speed _vehicle > 30}) then {
|
||||
_mode = 1;
|
||||
} else {
|
||||
if !(_vehicle isKindOf "Tank") then {
|
||||
_mode = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (_mode == 1) then {
|
||||
switch (true) do {
|
||||
case (_vehicle isKindOf "Tank"): {
|
||||
_parts = ["ltrack","rtrack"];
|
||||
};
|
||||
case (_vehicle isKindOf "Wheeled_APC" || {_vehicle isKindOf "Car"}): {
|
||||
_parts = ["lfwheel","lf2wheel","lmwheel","lbwheel","rfwheel","rf2wheel","rmwheel","rbwheel"];
|
||||
};
|
||||
};
|
||||
} else {
|
||||
switch (true) do {
|
||||
case (_vehicle isKindOf "Wheeled_APC" || {_vehicle isKindOf "Car"}): {
|
||||
_parts = ["lfwheel","lf2wheel","lmwheel","lbwheel","rfwheel","rf2wheel","rmwheel","rbwheel"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (canMove _vehicle) then {
|
||||
{
|
||||
_selectionPart = "hit" + _x;
|
||||
if (isText(configFile >> "CfgVehicles" >> typeOf _vehicle >> "hitpoints" >> _selectionPart >> "name")) then {
|
||||
_selection = getText(configFile >> "CfgVehicles" >> typeOf _vehicle >> "hitpoints" >> _selectionPart >> "name");
|
||||
// TODO: Only the tires that have touched the wire should burst.
|
||||
_vehicle setHit [_selection, 1];
|
||||
};
|
||||
} forEach _parts;
|
||||
};
|
||||
|
||||
if (_mode == 1) then {
|
||||
if (_vehicle isKindOf "StaticWeapon") exitWith {};
|
||||
[{
|
||||
PARAMS_2(_vehicle,_wire);
|
||||
|
||||
_vehicle setVelocity ((velocity _vehicle) vectorMultiply 0.75);
|
||||
|
||||
private ["_vPos", "_vDir"];
|
||||
// Set vehicle back in front of wire, since the wire will make the vehicle jump, and a wire with no geometry lod is undestructible and not recognizeable
|
||||
_vPos = getPosASL _vehicle;
|
||||
_vDir = getDir _vehicle;
|
||||
_vehicle setPosASL (_vPos vectorAdd [-0.35 * sin(_vDir), -0.35 * cos(_vDir), 0]);
|
||||
// TODO: Needs to be placed in safe distance to wire, so we do not constantly re-spawn new wires
|
||||
}, [_vehicle, _wire], 0.1, 0] call EFUNC(common,waitAndExecute);
|
||||
};
|
||||
|
||||
//TODO: Create broken geoless wire (two version)
|
||||
//TODO: Make wire remains stop vehicles
|
||||
[QGVAR(vehicleDamage), [_vehicle], [_wire, _vehicle]] call EFUNC(common,targetEvent);
|
||||
|
123
addons/concertina_wire/functions/fnc_vehicleDamage.sqf
Normal file
123
addons/concertina_wire/functions/fnc_vehicleDamage.sqf
Normal file
@ -0,0 +1,123 @@
|
||||
/*
|
||||
* Author: Rocko
|
||||
* Handles vehicle damage from hitting wire
|
||||
*
|
||||
* Arguments:
|
||||
* 0: wire <OBJECT>
|
||||
* 1: vehicle <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_wire,_vehicle);
|
||||
|
||||
private ["_type", "_mode", "_anim", "_parts", "_selectionPart", "_selection", "_pos_w", "_dir_w"];
|
||||
|
||||
_type = typeOf _wire;
|
||||
_mode = switch (_type) do {
|
||||
case "ACE_ConcertinaWire": { 0 };
|
||||
case "Land_Razorwire_F": { 1 };
|
||||
default { -1 };
|
||||
};
|
||||
|
||||
if (_mode == -1) exitWith {};
|
||||
|
||||
// _mode = 0 = Single Coil
|
||||
// _mode = 1 = Triple Coil
|
||||
|
||||
// --------------------------------
|
||||
// L M R
|
||||
// 4.54929 (4)
|
||||
// 6.13564 (6)
|
||||
//9.78744 (10)
|
||||
|
||||
_type = typeOf _wire;
|
||||
_anim = _wire animationPhase "wire_2";
|
||||
_pos_w = getPos _wire;
|
||||
_dir_w = getDir _wire;
|
||||
|
||||
if (_mode == 0) then {
|
||||
private ["_x", "_y", "_found", "_wireCheckPosAr", "_no"];
|
||||
_x = _pos_w select 0;
|
||||
_y = _pos_w select 1;
|
||||
// Check if two Single coils are placed next to each other (i.e playes have built a big wire obstacle)
|
||||
_wireCheckPosAr = [
|
||||
[_x + (sin (_dir_w+90) * 1.5),_y + (cos (_dir_w+90) * 1.5)],
|
||||
[(_x-(sin _dir_w)) + (sin (_dir_w+90) * 1.5),(_y-(cos _dir_w)) + (cos (_dir_w+90) * 1.5)],
|
||||
[_x + (sin (_dir_w-90) * 1.5),_y + (cos (_dir_w-90) * 1.5)],
|
||||
[(_x-(sin _dir_w)) + (sin (_dir_w-90) * 1.5),(_y-(cos _dir_w)) + (cos (_dir_w-90) * 1.5)]
|
||||
];
|
||||
{
|
||||
_found = false;
|
||||
_no = nearestObjects [_x, [typeOf _wire], 3]; //diag_log _no; diag_log ".....";
|
||||
_no = _no - [_wire]; //diag_log _no;
|
||||
if (count _no > 0) exitWith {
|
||||
_found = true; //diag_log "found";
|
||||
};
|
||||
} foreach _wireCheckPosAr;
|
||||
// Double coil found!
|
||||
if (_found) then {
|
||||
_mode = 1;
|
||||
} else {
|
||||
// Randomly make a single coil also catch tanks, if speed is high
|
||||
if (_vehicle isKindOf "Tank" && {20 > random 100} && {speed _vehicle > 30}) then {
|
||||
_mode = 1;
|
||||
} else {
|
||||
if !(_vehicle isKindOf "Tank") then {
|
||||
_mode = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (_mode == 1) then {
|
||||
switch (true) do {
|
||||
case (_vehicle isKindOf "Tank"): {
|
||||
_parts = ["ltrack","rtrack"];
|
||||
};
|
||||
case (_vehicle isKindOf "Wheeled_APC" || {_vehicle isKindOf "Car"}): {
|
||||
_parts = ["lfwheel","lf2wheel","lmwheel","lbwheel","rfwheel","rf2wheel","rmwheel","rbwheel"];
|
||||
};
|
||||
};
|
||||
} else {
|
||||
switch (true) do {
|
||||
case (_vehicle isKindOf "Wheeled_APC" || {_vehicle isKindOf "Car"}): {
|
||||
_parts = ["lfwheel","lf2wheel","lmwheel","lbwheel","rfwheel","rf2wheel","rmwheel","rbwheel"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (canMove _vehicle) then {
|
||||
{
|
||||
_selectionPart = "hit" + _x;
|
||||
if (isText(configFile >> "CfgVehicles" >> typeOf _vehicle >> "hitpoints" >> _selectionPart >> "name")) then {
|
||||
_selection = getText(configFile >> "CfgVehicles" >> typeOf _vehicle >> "hitpoints" >> _selectionPart >> "name");
|
||||
// TODO: Only the tires that have touched the wire should burst.
|
||||
_vehicle setHit [_selection, 1];
|
||||
};
|
||||
} forEach _parts;
|
||||
};
|
||||
|
||||
if (_mode == 1) then {
|
||||
if (_vehicle isKindOf "StaticWeapon") exitWith {};
|
||||
[{
|
||||
PARAMS_2(_vehicle,_wire);
|
||||
|
||||
_vehicle setVelocity ((velocity _vehicle) vectorMultiply 0.75);
|
||||
|
||||
private ["_vPos", "_vDir"];
|
||||
// Set vehicle back in front of wire, since the wire will make the vehicle jump, and a wire with no geometry lod is undestructible and not recognizeable
|
||||
_vPos = getPosASL _vehicle;
|
||||
_vDir = getDir _vehicle;
|
||||
_vehicle setPosASL (_vPos vectorAdd [-0.35 * sin(_vDir), -0.35 * cos(_vDir), 0]);
|
||||
// TODO: Needs to be placed in safe distance to wire, so we do not constantly re-spawn new wires
|
||||
}, [_vehicle, _wire], 0.1] call EFUNC(common,waitAndExecute);
|
||||
};
|
||||
|
||||
//TODO: Create broken geoless wire (two version)
|
||||
//TODO: Make wire remains stop vehicles
|
@ -1,6 +1,8 @@
|
||||
#define COMPONENT concertina_wire
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
// #define DEBUG_MODE_FULL
|
||||
|
||||
#ifdef DEBUG_ENABLED_CONCERTINA_WIRE
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
@ -6,44 +6,48 @@
|
||||
<German>NATO-Draht</German>
|
||||
<Russian>Проволочная спираль</Russian>
|
||||
<Polish>Drut kolczasty</Polish>
|
||||
<Spanish>Concertina wire</Spanish>
|
||||
<Spanish>Alambre de espino</Spanish>
|
||||
<French>Concertina wire</French>
|
||||
<Czech>Ostnatý drát</Czech>
|
||||
<Italian>Concertina wire</Italian>
|
||||
<Hungarian>Concertina wire</Hungarian>
|
||||
<Portuguese>Arame farpado</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_CONCERTINA_WIRECOIL">
|
||||
<English>Concertina Wire Coil</English>
|
||||
<German>NATO-Draht Rolle</German>
|
||||
<Russian>Проволочная спираль (моток)</Russian>
|
||||
<Polish>Zwój drutu kolczastego</Polish>
|
||||
<Spanish>Concertina wire coil</Spanish>
|
||||
<Spanish>Bobina de alambre de espino</Spanish>
|
||||
<French>Concertina wire coil</French>
|
||||
<Czech>Smyčka ostnatého drátu</Czech>
|
||||
<Italian>Concertina wire coil</Italian>
|
||||
<Hungarian>Concertina wire coil</Hungarian>
|
||||
<Portuguese>Bobina de arame farpado</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_UNROLLWIRE">
|
||||
<English>Dismount Concertina Wire</English>
|
||||
<German>NATO-Draht abbauen</German>
|
||||
<Russian>Демонтировать проволочную спираль</Russian>
|
||||
<Polish>Zwiń drut kolczasty</Polish>
|
||||
<Spanish>Dismount Concertina wire</Spanish>
|
||||
<Spanish>Desmontar alambre de espino</Spanish>
|
||||
<French>Dismount Concertina wire</French>
|
||||
<Czech>Svinout ostnatý drát</Czech>
|
||||
<Italian>Dismount Concertina wire</Italian>
|
||||
<Hungarian>Dismount Concertina wire</Hungarian>
|
||||
<Portuguese>Desmontar arame farpado</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_ROLLWIRE">
|
||||
<English>Deploy Concertina Wire</English>
|
||||
<German>NATO-Draht verlegen</German>
|
||||
<Russian>Монтировать проволочную спираль</Russian>
|
||||
<Polish>Rozwiń drut kolczasty</Polish>
|
||||
<Spanish>Deploy Concertina wire</Spanish>
|
||||
<Spanish>Desplegar alambre de espino</Spanish>
|
||||
<French>Deploy Concertina wire</French>
|
||||
<Czech>Rozvinout ostnatý drát</Czech>
|
||||
<Italian>Deploy Concertina wire</Italian>
|
||||
<Hungarian>Deploy Concertina wire</Hungarian>
|
||||
<Portuguese>Colocar arame farpado</Portuguese>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -10,7 +10,7 @@ class CfgVehicles {
|
||||
showDisabled = 0;
|
||||
priority = 0.1;
|
||||
icon = QUOTE(PATHTOF(UI\DAGR_Icon.paa));
|
||||
exceptions[] = {"isNotInside"};
|
||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||
class GVAR(toggle) {
|
||||
displayName = "Toggle DAGR";
|
||||
condition = QUOTE([ARR_2(_player,'ACE_DAGR')] call EFUNC(common,hasItem));
|
||||
@ -18,7 +18,7 @@ class CfgVehicles {
|
||||
showDisabled = 0;
|
||||
priority = 0.2;
|
||||
icon = QUOTE(PATHTOF(UI\DAGR_Icon.paa));
|
||||
exceptions[] = {"notOnMap", "isNotInside"};
|
||||
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -33,10 +33,7 @@ class CfgVehicles {
|
||||
displayName = "DAGR";
|
||||
vehicleClass = "Items";
|
||||
class TransportItems {
|
||||
class ACE_DAGR {
|
||||
name = "ACE_DAGR";
|
||||
count = 1;
|
||||
};
|
||||
MACRO_ADDITEM(ACE_DAGR,1);
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -7,11 +7,11 @@ class CfgWeapons {
|
||||
author[] = {$STR_ACE_Common_ACETeam, "Ruthberg"};
|
||||
scope = 2;
|
||||
displayName = "DAGR";
|
||||
model = QUOTE(PATHTOF(data\DAGR.p3d));
|
||||
descriptionShort = "";
|
||||
picture = PATHTOF(UI\DAGR_Icon.paa);
|
||||
icon = "iconObject_circle";
|
||||
mapSize = 0.034;
|
||||
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 10;
|
||||
};
|
||||
|
BIN
addons/dagr/data/DAGR.p3d
Normal file
BIN
addons/dagr/data/DAGR.p3d
Normal file
Binary file not shown.
82
addons/dagr/data/DAGR.rvmat
Normal file
82
addons/dagr/data/DAGR.rvmat
Normal file
@ -0,0 +1,82 @@
|
||||
class StageTI
|
||||
{
|
||||
texture="a3\data_f\default_ti_ca.paa";
|
||||
};
|
||||
ambient[]={1,1,1,1};
|
||||
diffuse[]={1,1,1,1};
|
||||
forcedDiffuse[]={0,0,0,0};
|
||||
emmisive[]={0,0,0,1};
|
||||
specular[]={0.050000008,0.050000008,0.050000008,1};
|
||||
specularPower=40;
|
||||
PixelShaderID="Super";
|
||||
VertexShaderID="Super";
|
||||
class Stage1
|
||||
{
|
||||
texture="z\ace\addons\dagr\data\DAGR_nohq.paa";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,0};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage2
|
||||
{
|
||||
texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[]={0,9,0};
|
||||
up[]={4.5,0,0};
|
||||
dir[]={0,0,0};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage3
|
||||
{
|
||||
texture="#(argb,8,8,3)color(0,0,0,0)";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,0};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage4
|
||||
{
|
||||
texture="#(argb,8,8,3)color(1,1,1,1,AS)";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,0};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage5
|
||||
{
|
||||
texture="#(argb,8,8,3)color(1,1,1,1,SMDI)";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,0};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage6
|
||||
{
|
||||
texture="#(ai,64,128,1)fresnel(0.4,0.2)";
|
||||
uvSource="none";
|
||||
};
|
||||
class Stage7
|
||||
{
|
||||
texture="a3\data_f\env_land_co.paa";
|
||||
uvSource="none";
|
||||
};
|
BIN
addons/dagr/data/DAGR_CO.paa
Normal file
BIN
addons/dagr/data/DAGR_CO.paa
Normal file
Binary file not shown.
BIN
addons/dagr/data/DAGR_NOHQ.paa
Normal file
BIN
addons/dagr/data/DAGR_NOHQ.paa
Normal file
Binary file not shown.
@ -30,7 +30,7 @@ __background ctrlSetText QUOTE(PATHTOF(UI\dagr_gps.paa));
|
||||
if (GVAR(outputPFH) != -1) exitWith {};
|
||||
|
||||
GVAR(outputPFH) = [{
|
||||
private ["_pos", "_mapSize", "_gridConfig", "_offsetX", "_offsetY", "_stepX", "_stepY", "_xgrid", "_ygrid", "_xcoord", "_ycoord", "_speed", "_dagrHeading", "_dagrGrid", "_dagrElevation", "_dagrSpeed", "_dagrTime", "_elevation"];
|
||||
private["_dagrElevation", "_dagrGrid", "_dagrHeading", "_dagrSpeed", "_dagrTime", "_elevation", "_gridArray", "_speed"];
|
||||
|
||||
// Abort Condition
|
||||
if !(GVAR(run) && [ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {
|
||||
@ -40,54 +40,8 @@ GVAR(outputPFH) = [{
|
||||
};
|
||||
|
||||
// GRID
|
||||
_pos = getPosASL ACE_player;
|
||||
|
||||
_mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize");
|
||||
_gridConfig = (configFile >> "CfgWorlds" >> worldName >> "Grid");
|
||||
_offsetX = getNumber (_gridConfig >> "offsetX");
|
||||
_offsetY = getNumber (_gridConfig >> "offsetY");
|
||||
_stepX = getNumber (_gridConfig >> "Zoom1" >> "stepX");
|
||||
_stepY = getNumber (_gridConfig >> "Zoom1" >> "stepY");
|
||||
|
||||
if (_stepY >= 0) then {
|
||||
_pos set [1, (_mapSize - 100) - (_pos select 1) - _offsetY];
|
||||
};
|
||||
|
||||
// Incase grids go neg due to 99-00 boundry
|
||||
if (_pos select 0 < 0) then {_pos set [0, (_pos select 0) + 99999];};
|
||||
if (_pos select 1 < 0) then {_pos set [1, (_pos select 1) + 99999];};
|
||||
|
||||
_xGrid = toArray Str(round(_pos select 0));
|
||||
while {count _xGrid < 5} do {
|
||||
_xGrid = [48] + _xGrid;
|
||||
};
|
||||
_xGrid resize 4;
|
||||
_xGrid = toString _xGrid;
|
||||
_xGrid = parseNumber _xGrid;
|
||||
|
||||
_yGrid = toArray Str(round(_pos select 1));
|
||||
while {count _yGrid < 5} do {
|
||||
_yGrid = [48] + _yGrid;
|
||||
};
|
||||
_yGrid resize 4;
|
||||
_yGrid = toString _yGrid;
|
||||
_yGrid = parseNumber _yGrid;
|
||||
|
||||
_xCoord = switch true do {
|
||||
case (_xGrid >= 1000): { "" + Str(_xGrid) };
|
||||
case (_xGrid >= 100): { "0" + Str(_xGrid) };
|
||||
case (_xGrid >= 10): { "00" + Str(_xGrid) };
|
||||
default { "000" + Str(_xGrid) };
|
||||
};
|
||||
|
||||
_yCoord = switch true do {
|
||||
case (_yGrid >= 1000): { "" + Str(_yGrid) };
|
||||
case (_yGrid >= 100): { "0" + Str(_yGrid) };
|
||||
case (_yGrid >= 10): { "00" + Str(_yGrid) };
|
||||
default { "000" + Str(_yGrid) };
|
||||
};
|
||||
|
||||
_dagrGrid = _xcoord + " " + _ycoord;
|
||||
_gridArray = [(getPos ACE_player), false] call EFUNC(common,getMapGridFromPos);
|
||||
_dagrGrid = format ["%1 %2", ((_gridArray select 0) select [0,4]), ((_gridArray select 1) select [0,4])];
|
||||
|
||||
// SPEED
|
||||
_speed = speed (vehicle ACE_player);
|
||||
@ -97,7 +51,7 @@ GVAR(outputPFH) = [{
|
||||
|
||||
// Elevation
|
||||
_elevation = getPosASL ACE_player;
|
||||
_elevation = floor ((_elevation select 2) + EGVAR(weather,altitude));
|
||||
_elevation = floor ((_elevation select 2) + EGVAR(common,mapAltitude));
|
||||
_dagrElevation = str _elevation + "m";
|
||||
|
||||
// Heading
|
||||
|
@ -72,7 +72,7 @@ _yCoord = switch true do {
|
||||
_dagrGrid = _xCoord + " " + _yCoord;
|
||||
|
||||
// Find target elevation
|
||||
_elevation = floor ((GVAR(LAZPOS) select 2) + EGVAR(weather,altitude));
|
||||
_elevation = floor ((GVAR(LAZPOS) select 2) + EGVAR(common,mapAltitude));
|
||||
_dagrElevation = str _elevation + "m";
|
||||
|
||||
// Time
|
||||
|
@ -30,7 +30,7 @@ __background ctrlSetText QUOTE(PATHTOF(UI\dagr_wp.paa));
|
||||
if (GVAR(outputPFH) != -1) exitWith {};
|
||||
|
||||
GVAR(outputPFH) = [{
|
||||
private ["_pos", "_mapSize", "_gridConfig", "_offsetX", "_offsetY", "_stepX", "_stepY", "_xGrid", "_yGrid", "_xCoord", "_yCoord", "_dagrHeading", "_dagrGrid", "_bearing", "_MYpos", "_WPpos", "_dagrDistance", "_distance"];
|
||||
private["_MYpos", "_WPpos", "_bearing", "_dagrDistance", "_dagrGrid", "_dagrHeading", "_distance", "_gridArray"];
|
||||
|
||||
// Abort Condition
|
||||
if !(GVAR(run) && [ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {
|
||||
@ -40,54 +40,8 @@ GVAR(outputPFH) = [{
|
||||
};
|
||||
|
||||
// GRID
|
||||
_pos = getPosASL ACE_player;
|
||||
|
||||
_mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize");
|
||||
_gridConfig = (configFile >> "CfgWorlds" >> worldName >> "Grid");
|
||||
_offsetX = getNumber (_gridConfig >> "offsetX");
|
||||
_offsetY = getNumber (_gridConfig >> "offsetY");
|
||||
_stepX = getNumber (_gridConfig >> "Zoom1" >> "stepX");
|
||||
_stepY = getNumber (_gridConfig >> "Zoom1" >> "stepY");
|
||||
|
||||
if (_stepY >= 0) then {
|
||||
_pos set [1, (_mapSize - 100) - (_pos select 1) - _offsetY];
|
||||
};
|
||||
|
||||
// Incase grids go neg due to 99-00 boundry
|
||||
if (_pos select 0 < 0) then {_pos set [0, (_pos select 0) + 99999];};
|
||||
if (_pos select 1 < 0) then {_pos set [1, (_pos select 1) + 99999];};
|
||||
|
||||
_xGrid = toArray Str(round(_pos select 0));
|
||||
while {count _xGrid < 5} do {
|
||||
_xGrid = [48] + _xGrid;
|
||||
};
|
||||
_xGrid resize 4;
|
||||
_xGrid = toString _xGrid;
|
||||
_xGrid = parseNumber _xGrid;
|
||||
|
||||
_yGrid = toArray Str(round(_pos select 1));
|
||||
while {count _yGrid < 5} do {
|
||||
_yGrid = [48] + _yGrid;
|
||||
};
|
||||
_yGrid resize 4;
|
||||
_yGrid = toString _yGrid;
|
||||
_yGrid = parseNumber _yGrid;
|
||||
|
||||
_xCoord = switch true do {
|
||||
case (_xGrid >= 1000): { "" + Str(_xGrid) };
|
||||
case (_xGrid >= 100): { "0" + Str(_xGrid) };
|
||||
case (_xGrid >= 10): { "00" + Str(_xGrid) };
|
||||
default { "000" + Str(_xGrid) };
|
||||
};
|
||||
|
||||
_yCoord = switch true do {
|
||||
case (_yGrid >= 1000): { "" + Str(_yGrid) };
|
||||
case (_yGrid >= 100): { "0" + Str(_yGrid) };
|
||||
case (_yGrid >= 10): { "00" + Str(_yGrid) };
|
||||
default { "000" + Str(_yGrid) };
|
||||
};
|
||||
|
||||
_dagrGrid = _xCoord + " " + _yCoord;
|
||||
_gridArray = [(getPos ACE_player), false] call EFUNC(common,getMapGridFromPos);
|
||||
_dagrGrid = format ["%1 %2", ((_gridArray select 0) select [0,4]), ((_gridArray select 1) select [0,4])];
|
||||
|
||||
// WP Grid
|
||||
_xGrid2 = floor (DAGR_WP_INFO / 10000);
|
||||
@ -110,8 +64,8 @@ GVAR(outputPFH) = [{
|
||||
_dagrGrid2 = _xCoord2 + " " + _yCoord2;
|
||||
|
||||
// Distance
|
||||
_WPpos = [[_xCoord2, _yCoord2], true] call CBA_fnc_mapGridToPos;
|
||||
_MYpos = [[_xCoord, _yCoord], true] call CBA_fnc_mapGridToPos;
|
||||
_WPpos = [_dagrGrid2, true] call EFUNC(common,getMapPosFromGrid);
|
||||
_MYpos = [_dagrGrid, true] call EFUNC(common,getMapPosFromGrid);
|
||||
_distance = _MYpos distance _WPpos;
|
||||
_distance = floor (_distance * 10) / 10;
|
||||
_dagrDistance = str _distance + "m";
|
||||
|
@ -2,7 +2,7 @@
|
||||
["ACE3 Equipment", QGVAR(MenuKey), "Configure DAGR",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if !([ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {false};
|
||||
|
||||
// Statement
|
||||
@ -19,7 +19,7 @@
|
||||
["ACE3 Equipment", QGVAR(ToggleKey), "Toggle DAGR",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if !([ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {false};
|
||||
|
||||
// Statement
|
||||
|
@ -7,4 +7,10 @@ class ACE_Settings {
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
};
|
||||
class GVAR(ExplodeOnDefuse) {
|
||||
displayName = CSTRING(ExplodeOnDefuse_DisplayName);
|
||||
description = CSTRING(ExplodeOnDefuse_Description);
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
};
|
||||
};
|
||||
|
@ -69,25 +69,52 @@ class CfgAmmo {
|
||||
|
||||
/*class DemoCharge_Remote_Ammo_Scripted: DemoCharge_Remote_Ammo;
|
||||
class SatchelCharge_Remote_Ammo_Scripted: SatchelCharge_Remote_Ammo;*/
|
||||
|
||||
|
||||
class IEDUrbanBig_Remote_Ammo: PipeBombBase {
|
||||
mineTrigger = "RangeTrigger";
|
||||
triggerWhenDestroyed = 1;
|
||||
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.562341, 1, 40};
|
||||
ACE_explodeOnDefuse = 0.02;
|
||||
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40};
|
||||
};
|
||||
class IEDLandBig_Remote_Ammo: PipeBombBase {
|
||||
class IEDUrbanBig_Command_Ammo: IEDUrbanBig_Remote_Ammo {
|
||||
mineTrigger = "RemoteTrigger";
|
||||
};
|
||||
class IEDUrbanBig_Range_Ammo: IEDUrbanBig_Remote_Ammo {
|
||||
mineTrigger = "RangeTrigger";
|
||||
triggerWhenDestroyed = 1;
|
||||
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.562341, 1, 40};
|
||||
};
|
||||
|
||||
class IEDUrbanSmall_Remote_Ammo: PipeBombBase {
|
||||
mineTrigger = "RangeTrigger";
|
||||
triggerWhenDestroyed = 1;
|
||||
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.562341, 1, 40};
|
||||
ACE_explodeOnDefuse = 0.02;
|
||||
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40};
|
||||
};
|
||||
class IEDUrbanSmall_Command_Ammo: IEDUrbanSmall_Remote_Ammo {
|
||||
mineTrigger = "RemoteTrigger";
|
||||
};
|
||||
class IEDLandSmall_Remote_Ammo: PipeBombBase {
|
||||
class IEDUrbanSmall_Range_Ammo: IEDUrbanSmall_Remote_Ammo {
|
||||
mineTrigger = "RangeTrigger";
|
||||
};
|
||||
|
||||
class IEDLandBig_Remote_Ammo: PipeBombBase {
|
||||
triggerWhenDestroyed = 1;
|
||||
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.562341, 1, 40};
|
||||
ACE_explodeOnDefuse = 0.02;
|
||||
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40};
|
||||
};
|
||||
class IEDLandBig_Command_Ammo: IEDLandBig_Remote_Ammo {
|
||||
mineTrigger = "RemoteTrigger";
|
||||
};
|
||||
class IEDLandBig_Range_Ammo: IEDLandBig_Remote_Ammo {
|
||||
mineTrigger = "RangeTrigger";
|
||||
};
|
||||
|
||||
class IEDLandSmall_Remote_Ammo: PipeBombBase {
|
||||
triggerWhenDestroyed = 1;
|
||||
ACE_explodeOnDefuse = 0.02;
|
||||
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40};
|
||||
};
|
||||
class IEDLandSmall_Command_Ammo: IEDLandSmall_Remote_Ammo {
|
||||
mineTrigger = "RemoteTrigger";
|
||||
};
|
||||
class IEDLandSmall_Range_Ammo: IEDLandSmall_Remote_Ammo {
|
||||
mineTrigger = "RangeTrigger";
|
||||
};
|
||||
};
|
||||
|
@ -96,45 +96,51 @@ class CfgMagazines {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
class IEDUrbanBig_Remote_Mag: DemoCharge_Remote_Mag {
|
||||
ACE_SetupObject = "ACE_Explosives_Place_IEDUrbanBig";
|
||||
class ACE_Triggers {
|
||||
SupportedTriggers[] = {"Command","DeadmanSwitch", "Cellphone", "PressurePlate"};
|
||||
SupportedTriggers[] = {"Command", "DeadmanSwitch", "Cellphone", "PressurePlate"};
|
||||
class Command {
|
||||
FuseTime = 0.5;
|
||||
ammo = "IEDUrbanBig_Command_Ammo";
|
||||
};
|
||||
class DeadmanSwitch:Command {};
|
||||
class Cellphone:Command {};
|
||||
class PressurePlate {
|
||||
displayName = CSTRING(SLAME_Magnetic);
|
||||
displayName = CSTRING(PressurePlate);
|
||||
digDistance = 0;
|
||||
ammo = "IEDUrbanBig_Remote_Ammo";
|
||||
ammo = "IEDUrbanBig_Range_Ammo";
|
||||
pitch = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class IEDLandBig_Remote_Mag: IEDUrbanBig_Remote_Mag {
|
||||
ACE_SetupObject = "ACE_Explosives_Place_IEDLandBig";
|
||||
class ACE_Triggers: ACE_Triggers {
|
||||
class Command: Command {
|
||||
ammo = "IEDLandBig_Command_Ammo";
|
||||
};
|
||||
class PressurePlate: PressurePlate {
|
||||
ammo = "IEDLandBig_Remote_Ammo";
|
||||
ammo = "IEDLandBig_Range_Ammo";
|
||||
};
|
||||
};
|
||||
};
|
||||
class IEDUrbanSmall_Remote_Mag: DemoCharge_Remote_Mag {
|
||||
ACE_SetupObject = "ACE_Explosives_Place_IEDUrbanSmall";
|
||||
class ACE_Triggers {
|
||||
SupportedTriggers[] = {"Command","DeadmanSwitch", "Cellphone", "PressurePlate"};
|
||||
SupportedTriggers[] = {"Command", "DeadmanSwitch", "Cellphone", "PressurePlate"};
|
||||
class Command {
|
||||
FuseTime = 0.5;
|
||||
ammo = "IEDUrbanSmall_Command_Ammo";
|
||||
};
|
||||
class DeadmanSwitch: Command {};
|
||||
class Cellphone: Command {};
|
||||
class PressurePlate {
|
||||
displayName = CSTRING(SLAME_Magnetic);
|
||||
displayName = CSTRING(PressurePlate);
|
||||
digDistance = 0;
|
||||
ammo = "IEDUrbanSmall_Remote_Ammo";
|
||||
ammo = "IEDUrbanSmall_Range_Ammo";
|
||||
pitch = 0;
|
||||
};
|
||||
};
|
||||
@ -142,8 +148,11 @@ class CfgMagazines {
|
||||
class IEDLandSmall_Remote_Mag: IEDUrbanSmall_Remote_Mag {
|
||||
ACE_SetupObject = "ACE_Explosives_Place_IEDLandSmall";
|
||||
class ACE_Triggers: ACE_Triggers {
|
||||
class Command: Command {
|
||||
ammo = "IEDLandSmall_Command_Ammo";
|
||||
};
|
||||
class PressurePlate: PressurePlate {
|
||||
ammo = "IEDLandSmall_Remote_Ammo";
|
||||
ammo = "IEDLandSmall_Range_Ammo";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -20,6 +20,12 @@ class ACE_ModuleExplosive: ACE_Module {
|
||||
typeName = "BOOL";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class ExplodeOnDefuse {
|
||||
displayName = "$STR_ACE_Explosive_ExplodeOnDefuse_DisplayName";
|
||||
description = "$STR_ACE_Explosive_ExplodeOnDefuse_Description";
|
||||
typeName = "BOOL";
|
||||
defaultValue = 1;
|
||||
};
|
||||
};
|
||||
class ModuleDescription {
|
||||
description = CSTRING(Module_Description);
|
||||
|
@ -6,7 +6,7 @@ class CfgVehicles {
|
||||
displayName = CSTRING(Menu);
|
||||
condition = QUOTE(!(_player getVariable [ARR_2('ace_explosives_PlantingExplosive',false)]));
|
||||
statement = "";
|
||||
exceptions[] = {"isNotSwimming", "isNotInside"};
|
||||
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"};
|
||||
showDisabled = 1;
|
||||
priority = 4;
|
||||
icon = PATHTOF(UI\Explosives_Menu_ca.paa);
|
||||
@ -17,7 +17,7 @@ class CfgVehicles {
|
||||
condition = QUOTE([_player] call FUNC(canDetonate));
|
||||
statement = "";
|
||||
insertChildren = QUOTE([_player] call FUNC(addTransmitterActions););
|
||||
exceptions[] = {"isNotSwimming", "isNotInside"};
|
||||
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"};
|
||||
showDisabled = 1;
|
||||
icon = PATHTOF(UI\Explosives_Menu_ca.paa);
|
||||
priority = 2;
|
||||
@ -38,7 +38,7 @@ class CfgVehicles {
|
||||
displayName = CSTRING(cellphone_displayName);
|
||||
condition = "('ACE_Cellphone' in (items ace_player))";
|
||||
statement = "closeDialog 0;createDialog 'Rsc_ACE_PhoneInterface';";
|
||||
exceptions[] = {"isNotSwimming", "isNotInside"};
|
||||
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"};
|
||||
showDisabled = 0;
|
||||
icon = PATHTOF(Data\UI\Cellphone_UI.paa);
|
||||
priority = 0.8;
|
||||
@ -103,7 +103,7 @@ class CfgVehicles {
|
||||
statement = "";
|
||||
insertChildren = QUOTE([ARR_3(_target getVariable QUOTE(QGVAR(class)),_target,_player)] call FUNC(addTriggerActions););
|
||||
showDisabled = 0;
|
||||
exceptions[] = {};
|
||||
exceptions[] = {"isNotSwimming"};
|
||||
priority = 5;
|
||||
icon = QUOTE(PATHTOF(UI\Explosives_Menu_ca.paa));
|
||||
};
|
||||
@ -114,7 +114,7 @@ class CfgVehicles {
|
||||
condition = "true";
|
||||
statement = QUOTE([ARR_2(_player,_target getVariable QUOTE(QGVAR(class)))] call EFUNC(common,addToInventory);deleteVehicle _target;);
|
||||
showDisabled = 0;
|
||||
exceptions[] = {};
|
||||
exceptions[] = {"isNotSwimming"};
|
||||
priority = 5;
|
||||
icon = "\A3\ui_f\data\IGUI\Cfg\Actions\Obsolete\ui_action_takemine_ca.paa";
|
||||
};
|
||||
|
@ -12,7 +12,7 @@ class CfgWeapons {
|
||||
displayName = CSTRING(clacker_displayName);
|
||||
descriptionShort = CSTRING(clacker_description);
|
||||
picture = PATHTOF(Data\UI\Clacker.paa);
|
||||
model = "\A3\weapons_F\ammo\mag_univ.p3d";
|
||||
model = QUOTE(PATHTOF(data\ace_m57.p3d));
|
||||
ACE_Range = 250;
|
||||
ACE_Detonator = 1;
|
||||
|
||||
|
BIN
addons/explosives/Data/ace_m57.p3d
Normal file
BIN
addons/explosives/Data/ace_m57.p3d
Normal file
Binary file not shown.
82
addons/explosives/Data/ace_m57.rvmat
Normal file
82
addons/explosives/Data/ace_m57.rvmat
Normal file
@ -0,0 +1,82 @@
|
||||
class StageTI {
|
||||
texture = "a3\data_f\default_glass_ti_ca.paa";
|
||||
};
|
||||
ambient[] = {1,1,1,1};
|
||||
diffuse[] = {1,1,1,1};
|
||||
forcedDiffuse[] = {0,0,0,0};
|
||||
emmisive[] = {0,0,0,1};
|
||||
specular[] = {0.3,0.3,0.3,1};
|
||||
specularPower = 3b0;
|
||||
PixelShaderID = "Super";
|
||||
VertexShaderID = "Super";
|
||||
class Stage1 {
|
||||
texture="#(rgb,1,1,1)color(0.5,0.5,1,1)";
|
||||
uvSource = "tex";
|
||||
class uvTransform {
|
||||
aside[] = {1,0,0};
|
||||
up[] = {0,1,0};
|
||||
dir[] = {0,0,1};
|
||||
pos[] = {0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage2 {
|
||||
texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)";
|
||||
uvSource = "tex";
|
||||
class uvTransform {
|
||||
aside[] = {1,0,0};
|
||||
up[] = {0,1,0};
|
||||
dir[] = {0,0,1};
|
||||
pos[] = {0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage3 {
|
||||
texture = "#(argb,8,8,3)color(0,0,0,0,MC)";
|
||||
uvSource = "tex";
|
||||
class uvTransform {
|
||||
aside[] = {1,0,0};
|
||||
up[] = {0,1,0};
|
||||
dir[] = {0,0,1};
|
||||
pos[] = {0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage4 {
|
||||
texture = "#(argb,8,8,3)color(1,1,1,1,AS)";
|
||||
uvSource = "tex";
|
||||
class uvTransform {
|
||||
aside[] = {1,0,0};
|
||||
up[] = {0,1,0};
|
||||
dir[] = {0,0,1};
|
||||
pos[] = {0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage5 {
|
||||
texture = "#(argb,8,8,3)color(0,0.6,1,1,SMDI)";
|
||||
uvSource = "tex";
|
||||
class uvTransform {
|
||||
aside[] = {1,0,0};
|
||||
up[] = {0,1,0};
|
||||
dir[] = {0,0,1};
|
||||
pos[] = {0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage6 {
|
||||
texture = "#(ai,32,128,1)fresnel(0.85,0.36)";
|
||||
uvSource = "tex";
|
||||
class uvTransform {
|
||||
aside[] = {1,0,0};
|
||||
up[] = {0,1,0};
|
||||
dir[] = {0,0,1};
|
||||
pos[] = {0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage7 {
|
||||
useWorldEnvMap = "true";
|
||||
texture = "a3\data_f\env_interier_car_ca.paa";
|
||||
uvSource = "tex";
|
||||
class uvTransform {
|
||||
aside[] = {1,0,0};
|
||||
up[] = {0,1,0};
|
||||
dir[] = {0,0,1};
|
||||
pos[] = {0,0,0};
|
||||
};
|
||||
};
|
BIN
addons/explosives/Data/ace_m57_co.paa
Normal file
BIN
addons/explosives/Data/ace_m57_co.paa
Normal file
Binary file not shown.
@ -17,7 +17,7 @@
|
||||
#include "script_component.hpp"
|
||||
EXPLODE_2_PVT(_this,_unit,_explosive);
|
||||
|
||||
if (getNumber (ConfigFile >> "CfgAmmo" >> typeof _explosive >> "ACE_explodeOnDefuse") == 1) exitWith {
|
||||
if (GVAR(ExplodeOnDefuse) && (random 1.0) < getNumber(ConfigFile >> "CfgAmmo" >> typeOf _explosive >> "ACE_explodeOnDefuse")) exitWith {
|
||||
[_unit, -1, [_explosive, 1], true] call FUNC(detonateExplosive);
|
||||
};
|
||||
|
||||
|
@ -27,5 +27,7 @@ if !(_activated) exitWith {};
|
||||
call EFUNC(Common,readSettingFromModule);
|
||||
[_logic, QGVAR(PunishNonSpecialists),"PunishNonSpecialists"]
|
||||
call EFUNC(Common,readSettingFromModule);
|
||||
[_logic, QGVAR(ExplodeOnDefuse),"ExplodeOnDefuse"]
|
||||
call EFUNC(Common,readSettingFromModule);
|
||||
|
||||
diag_log text "[ACE]: Explosive Module Initialized.";
|
||||
|
@ -511,6 +511,7 @@
|
||||
<Spanish>Sistema de explosivos</Spanish>
|
||||
<German>Sprengstoffsystem</German>
|
||||
<Czech>Systém výbušnin</Czech>
|
||||
<Portuguese>Sistema de explosivos</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Explosives_RequireSpecialist_DisplayName">
|
||||
<English>Require specialists?</English>
|
||||
@ -518,6 +519,7 @@
|
||||
<Spanish>¿Requiere especialista?</Spanish>
|
||||
<German>Benötigt Sprengstoffexperten?</German>
|
||||
<Czech>Vyžadovat specialistu?</Czech>
|
||||
<Portuguese>Requer especialista?</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Explosives_RequireSpecialist_Description">
|
||||
<English>Require explosive specialists to disable explosives? Default: No</English>
|
||||
@ -525,6 +527,7 @@
|
||||
<Spanish>Requiere especialista en explosivos para desactivar explosivos?. Por defecto: No</Spanish>
|
||||
<German>Benötige Sprengstoffexperte um Sprengladungen zu entschärfen? Standard: Nein</German>
|
||||
<Czech>Vyžadovat specialistu na zneškodnění výbušniny? Výchozí: Ne</Czech>
|
||||
<Portuguese>Requer especialista em explosivos para desativar explosivos? Padrão: Não</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Explosives_PunishNonSpecialists_DisplayName">
|
||||
<English>Punish non-specialists?</English>
|
||||
@ -532,6 +535,7 @@
|
||||
<Spanish>¿Penalizar a los no especialistas?</Spanish>
|
||||
<German>Bestrafe Nicht-Sprengstoffexperten?</German>
|
||||
<Czech>Potrestat, pokud není specialista?</Czech>
|
||||
<Portuguese>Punir não especialistas?</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Explosives_PunishNonSpecialists_Description">
|
||||
<English>Increase the time it takes to complete actions for non-specialists? Default: Yes</English>
|
||||
@ -539,12 +543,27 @@
|
||||
<Spanish>Aumenta el tiempo que lleva completar acciones para los no especialstas?. Por defecto: Si</Spanish>
|
||||
<German>Entschärfungszeit für Nicht-Sprengstoffexperten erhöhen? Standard: Ja</German>
|
||||
<Czech>Zvýšit čas potřebný k dokončení akce pokud není specialista? Výchozí: Ano</Czech>
|
||||
<Portuguese>Aumentar o tempo necessário para completar ações por não especialistas? Padrão: Sim</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Explosives_ExplodeOnDefuse_DisplayName">
|
||||
<English>Explode on defusal?</English>
|
||||
<Portuguese>Explosão no desarmamento?</Portuguese>
|
||||
<Polish>Eksplozja przy rozbrajaniu?</Polish>
|
||||
<Czech>Explodovat při zneškodňování?</Czech>
|
||||
<Spanish>Explotar al desactivar?</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Explosives_ExplodeOnDefuse_Description">
|
||||
<English>Enable certain explosives to explode on defusal? Default: Yes</English>
|
||||
<Portuguese>Ativa certos explosivos para detonar no desarmamento? Padrão: Sim</Portuguese>
|
||||
<Polish>Spraw, aby niektóre ładunki wybuchowe eksplodowały przy próbie ich rozbrojenia? Domyślnie:Tak</Polish>
|
||||
<Czech>Umožnit u některých výbušnin explozi při pokusu je zneškodnit? Výchozí: Ano</Czech>
|
||||
<Spanish>¿Habilitar ciertos explosivos para estallar al desactivar? Por defecto: Sí</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Explosives_Module_Description">
|
||||
<English></English>
|
||||
<Polish>Moduł ten pozwala dostosować opcje związane z ładunkami wybuchowymi, ich podkładaniem oraz rozbrajaniem.</Polish>
|
||||
<German>Dieses Modul erlaubt die Einstellungen für Sprengstoffe zu verändern.</German>
|
||||
<Czech>Tento modul umoňuje přizpůsobit nastavení týkajících se výbušnin.</Czech>
|
||||
<Portuguese>Este módulo permite personalizar as definições relacionadas a explosivos.</Portuguese>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -4,13 +4,13 @@ class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {
|
||||
"ACE_muzzle_mzls_H",
|
||||
"ACE_muzzle_mzls_B",
|
||||
"ACE_muzzle_mzls_L",
|
||||
"ACE_muzzle_mzls_smg_01",
|
||||
"ACE_muzzle_mzls_smg_02",
|
||||
"ACE_muzzle_mzls_338",
|
||||
"ACE_muzzle_mzls_93mmg"
|
||||
"ACE_muzzle_mzls_H",
|
||||
"ACE_muzzle_mzls_B",
|
||||
"ACE_muzzle_mzls_L",
|
||||
"ACE_muzzle_mzls_smg_01",
|
||||
"ACE_muzzle_mzls_smg_02",
|
||||
"ACE_muzzle_mzls_338",
|
||||
"ACE_muzzle_mzls_93mmg"
|
||||
};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
|
@ -6,7 +6,7 @@ if(GVAR(EnableDebugTrace) && !isMultiplayer) then {
|
||||
};
|
||||
|
||||
if(isServer) then {
|
||||
[QGVAR(frag_eh), { _this call FUNC(frago); }] call ace_common_fnc_addEventHandler;
|
||||
[QGVAR(frag_eh), { _this call FUNC(frago); }] call EFUNC(common,addEventHandler);
|
||||
};
|
||||
|
||||
[FUNC(masterPFH), 0, []] call CBA_fnc_addPerFrameHandler;
|
@ -1,4 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
private ["_round"];
|
||||
_round = _this select 0;
|
||||
GVAR(blackList) set[(count GVAR(blackList)), _round];
|
||||
GVAR(blackList) set [(count GVAR(blackList)), _round];
|
||||
|
@ -1,8 +1,9 @@
|
||||
//#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_enabled","_doFragTrack", "_doSpall", "_spallTrack", "_spallTrackID"];
|
||||
private ["_enabled", "_doSpall", "_spallTrack", "_spallTrackID"];
|
||||
PARAMS_3(_gun,_type,_round);
|
||||
DEFAULT_PARAM(3,_doFragTrack,false);
|
||||
|
||||
if (!GVAR(enabled)) exitWith {};
|
||||
|
||||
@ -16,7 +17,6 @@ if(_round in GVAR(blackList)) exitWith {
|
||||
// Exit on max track
|
||||
if( (count GVAR(objects)) > GVAR(MaxTrack)) exitWith { };
|
||||
|
||||
_doFragTrack = false;
|
||||
if(_gun == ACE_player) then {
|
||||
_doFragTrack = true;
|
||||
} else {
|
||||
@ -28,14 +28,16 @@ if(_gun == ACE_player) then {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_doSpall = false;
|
||||
if(GVAR(SpallEnabled)) then {
|
||||
if(GVAR(spallIsTrackingCount) <= 0) then {
|
||||
GVAR(spallHPData) = [];
|
||||
};
|
||||
if(GVAR(spallIsTrackingCount) > 5) then {
|
||||
// ACE_player sideChat "LIMT!";
|
||||
_doSpall = false;
|
||||
} else {
|
||||
_doSpall = true;
|
||||
GVAR(spallIsTrackingCount) = GVAR(spallIsTrackingCount) + 1;
|
||||
};
|
||||
};
|
||||
@ -46,30 +48,27 @@ if(GVAR(autoTrace)) then {
|
||||
};
|
||||
|
||||
// We only do the single track object check here.
|
||||
// We should do an {!(_round in GVAR(objects))}
|
||||
// We should do an {!(_round in GVAR(objects))}
|
||||
// But we leave that out here for optimization. So this cannot be a framework function
|
||||
// Otherwise, it should only be added once and from the FiredEH
|
||||
if(_doFragTrack && alive _round) then {
|
||||
_spallTrack = [];
|
||||
_spallTrackID = [];
|
||||
|
||||
|
||||
private["_args"];
|
||||
_args = [_round, (getPosASL _round), (velocity _round), _type, diag_frameno, _gun, _doSpall, _spallTrack, _spallTrackID,
|
||||
(getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(skip))),
|
||||
(getNumber (configFile >> "CfgAmmo" >> _type >> "explosive")),
|
||||
(getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange")),
|
||||
(getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(force))),
|
||||
(getNumber(configFile >> "CfgAmmo" >> _type >> "indirecthit")*(sqrt((getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange")))))
|
||||
];
|
||||
(getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(skip))),
|
||||
(getNumber (configFile >> "CfgAmmo" >> _type >> "explosive")),
|
||||
(getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange")),
|
||||
(getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(force))),
|
||||
(getNumber(configFile >> "CfgAmmo" >> _type >> "indirecthit")*(sqrt((getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange")))))
|
||||
];
|
||||
TRACE_1("Initializing track", _round);
|
||||
GVAR(objects) pushBack _round;
|
||||
GVAR(arguments) pushBack _args;
|
||||
|
||||
|
||||
if(_doSpall) then {
|
||||
[_round, 1, _spallTrack, _spallTrackID] call FUNC(spallTrack);
|
||||
};
|
||||
// ACE_player sideChat "WTF2";
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
@ -2,12 +2,11 @@
|
||||
#include "script_component.hpp"
|
||||
// ACE_player sideChat "WAAAAAAAAAAAAAAAAAAAAA";
|
||||
|
||||
private ["_params", "_hitData", "_initialData", "_hpData", "_object", "_foundObjects", "_index", "_foundObjecsts", "_roundType", "_round", "_caliber", "_explosive", "_idh", "_alive", "_exit", "_vm", "_velocity", "_oldVelocity", "_curVelocity", "_diff", "_polar", "_unitDir", "_spallPos", "_pos1", "_i", "_pos2", "_blah", "_data", "_spallPolar", "_warn", "_c", "_m", "_k", "_gC", "_fragPower", "_fragTypes", "_spread", "_spallCount", "_elev", "_dir", "_vel", "_spallFragVect", "_fragType", "_fragment", "_pos"];
|
||||
private ["_hitData", "_initialData", "_hpData", "_object", "_foundObjects", "_index", "_foundObjecsts", "_roundType", "_round", "_caliber", "_explosive", "_idh", "_alive", "_exit", "_vm", "_velocity", "_oldVelocity", "_curVelocity", "_diff", "_polar", "_unitDir", "_spallPos", "_pos1", "_i", "_pos2", "_blah", "_data", "_spallPolar", "_warn", "_c", "_m", "_k", "_gC", "_fragPower", "_fragTypes", "_spread", "_spallCount", "_elev", "_dir", "_vel", "_spallFragVect", "_fragType", "_fragment", "_pos"];
|
||||
|
||||
_params = _this select 0;
|
||||
_hitData = _params select 0;
|
||||
_hitData = _this select 0;
|
||||
_initialData = GVAR(spallHPData) select (_hitData select 0);
|
||||
_hpData = (_hitData select 1) select (_params select 1);
|
||||
_hpData = (_hitData select 1) select (_this select 1);
|
||||
|
||||
|
||||
_object = _hpData select 0;
|
||||
@ -149,4 +148,4 @@ if(_alive || {_caliber >= 2.5} || {(_explosive > 0 && {_idh >= 1})}) then {
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,11 +1,7 @@
|
||||
//fnc_findReflections.sqf
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_split", "_radi", "_params", "_pos", "_explosiveInfo", "_los", "_nlos", "_zIndex", "_depth", "_indirectHitRange",
|
||||
"_indirectHit", "_distanceCount", "_lastPos", "_test", "_vec", "_testPos", "_buckets", "_excludes", "_bucketIndex", "_bucketPos",
|
||||
"_bucketList", "_c", "_index", "_blist", "_avgX", "_avgY", "_avgZ", "_bpos", "_distance", "_hitFactor", "_hit", "_range", "_refExp",
|
||||
"_rand", "_i", "_x", "_res", "_forEachIndex", "_explosions", "_can", "_dirvec"];
|
||||
|
||||
private ["_split", "_radi", "_params", "_pos", "_explosiveInfo", "_los", "_nlos", "_zIndex", "_depth", "_indirectHitRange", "_indirectHit", "_distanceCount", "_lastPos", "_test", "_vec", "_testPos", "_buckets", "_excludes", "_bucketIndex", "_bucketPos", "_bucketList", "_c", "_index", "_blist", "_avgX", "_avgY", "_avgZ", "_bpos", "_distance", "_hitFactor", "_hit", "_range", "_refExp", "_rand", "_i", "_x", "_res", "_forEachIndex", "_explosions", "_can", "_dirvec", "_zAng"];
|
||||
|
||||
_params = _this select 0;
|
||||
_pos = _params select 0;
|
||||
@ -46,7 +42,7 @@ if(_zIndex < 5) then {
|
||||
// } forEach _res;
|
||||
// drop ["\a3\data_f\Cl_basic","","Billboard",1,15,ASLtoATL _testPos,[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,1]],[0],0.0,2.0,"","",""];
|
||||
// TEST_PAIRS pushBack [_pos, _lastPos, [1,0,0,1]];
|
||||
|
||||
|
||||
};
|
||||
// if(terrainIntersectASL [_pos, _testPos]) exitWith {};
|
||||
_lastPos = _testPos;
|
||||
@ -91,7 +87,7 @@ if(_zIndex < 5) then {
|
||||
_avgX = 0;
|
||||
_avgY = 0;
|
||||
_avgZ = 0;
|
||||
|
||||
|
||||
{
|
||||
_avgX = _avgX + (_x select 0);
|
||||
_avgY = _avgY + (_x select 1);
|
||||
@ -99,7 +95,7 @@ if(_zIndex < 5) then {
|
||||
} forEach _blist;
|
||||
_c = count _blist;
|
||||
_bpos = [_avgX/_c, _avgY/_c, _avgZ/_c];
|
||||
|
||||
|
||||
_distance = _pos vectorDistance _bpos;
|
||||
_hitFactor = 1-(((_distance/(_indirectHitRange*4)) min 1) max 0);
|
||||
// _hitFactor = 1/(_distance^2);
|
||||
@ -108,16 +104,16 @@ if(_zIndex < 5) then {
|
||||
_hit = _hit - (_hit%10);
|
||||
_range = (floor (_indirectHitRange-(_distance/4))) min 100;
|
||||
_range = _range - (_range%2);
|
||||
|
||||
|
||||
if(_hit >= 10 && _range > 0) then {
|
||||
// TEST_ICONS pushBack [_bpos, format["h: %1, r: %2, hf: %3 d: %4 ihr: %5", _hit, _range, _hitFactor, _distance, _indirectHitRange*4]];
|
||||
// TEST_PAIRS pushBack [_pos, _bpos, [1,0,0,1]];
|
||||
_refExp = format["ace_explosion_reflection_%1_%2", _range, _hit];
|
||||
// _refExp createVehicle (ASLtoATL _bpos);
|
||||
// drop ["\a3\data_f\Cl_basic","","Billboard",1,15,ASLtoATL _bpos,[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,1]],[0],0.0,2.0,"","",""];
|
||||
|
||||
|
||||
_explosions pushBack [_refExp, _bpos, _hit, _distance, _indirectHitRange/4, _depth];
|
||||
|
||||
|
||||
};
|
||||
if(count _explosions > (_radi*2)/_depth) exitWith {};
|
||||
} forEach _buckets;
|
||||
|
@ -1,58 +1,8 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_enabled", "_gun", "_type", "_round", "_doFragTrack", "_doSpall", "_spallTrack", "_spallTrackID"];
|
||||
|
||||
if (!GVAR(enabled)) exitWith {};
|
||||
private["_gun", "_type", "_round"];
|
||||
|
||||
_gun = _this select 0;
|
||||
_type = _this select 4;
|
||||
_round = _this select 6;
|
||||
|
||||
_enabled = getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(enabled));
|
||||
if(_enabled < 1) exitWith {};
|
||||
|
||||
if(_round in GVAR(blackList)) exitWith {
|
||||
GVAR(blackList) = GVAR(blackList) - [_round];
|
||||
};
|
||||
|
||||
|
||||
_doFragTrack = false;
|
||||
if(_gun == ACE_player) then {
|
||||
_doFragTrack = true;
|
||||
} else {
|
||||
if((gunner _gun) == ACE_player) then {
|
||||
_doFragTrack = true;
|
||||
} else {
|
||||
if(local _gun && {!(isPlayer (gunner _gun))} && {!(isPlayer _gun)}) then {
|
||||
_doFragTrack = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
_doSpall = false;
|
||||
if(_doSpall) then {
|
||||
if(GVAR(spallIsTrackingCount) <= 0) then {
|
||||
GVAR(spallHPData) = [];
|
||||
};
|
||||
if(GVAR(spallIsTrackingCount) > 5) then {
|
||||
// ACE_player sideChat "LIMT!";
|
||||
_doSpall = false;
|
||||
} else {
|
||||
GVAR(spallIsTrackingCount) = GVAR(spallIsTrackingCount) + 1;
|
||||
};
|
||||
};
|
||||
// ACE_player sideChat format["c: %1", GVAR(spallIsTrackingCount)];
|
||||
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
[ACE_player, _round, [1,0,0,1]] call FUNC(addTrack);
|
||||
#endif
|
||||
|
||||
if(_doFragTrack && alive _round) then {
|
||||
GVAR(trackedObjects) pushBack _round;
|
||||
_spallTrack = [];
|
||||
_spallTrackID = [];
|
||||
[DFUNC(trackFragRound), 0, [_round, (getPosASL _round), (velocity _round), _type, ACE_time, _gun, _doSpall, _spallTrack, _spallTrackID]] call cba_fnc_addPerFrameHandler;
|
||||
if(_doSpall) then {
|
||||
[_round, 2, _spallTrack, _spallTrackID] call FUNC(spallTrack);
|
||||
};
|
||||
// ACE_player sideChat "WTF2";
|
||||
};
|
||||
[_gun, _type, _round] call FUNC(addPfhRound);
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Master single PFH abstraction for all rounds being tracked by frag/spall
|
||||
*
|
||||
* Arguments:
|
||||
*
|
||||
*
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
@ -15,30 +15,22 @@
|
||||
|
||||
if (!GVAR(enabled)) exitWith {};
|
||||
|
||||
private["_gcIndex"];
|
||||
private["_gcIndex", "_iter"];
|
||||
_gcIndex = [];
|
||||
|
||||
_iter = 0;
|
||||
while { (count GVAR(objects)) > 0 && { _iter < GVAR(MaxTrackPerFrame) } } do {
|
||||
while { (count GVAR(objects)) > 0 && { _iter < (GVAR(MaxTrackPerFrame) min (count GVAR(objects))) } } do {
|
||||
private["_object", "_args"];
|
||||
if(GVAR(lastIterationIndex) >= (count GVAR(objects))) then {
|
||||
GVAR(lastIterationIndex) = 0;
|
||||
};
|
||||
_object = GVAR(objects) select GVAR(lastIterationIndex);
|
||||
|
||||
|
||||
if(!isNil "_object") then {
|
||||
if(isNull _object) then {
|
||||
_gcIndex pushBack GVAR(lastIterationIndex);
|
||||
} else {
|
||||
_args = GVAR(arguments) select GVAR(lastIterationIndex);
|
||||
|
||||
if(!(_args call FUNC(pfhRound))) then {
|
||||
_gcIndex pushBack GVAR(lastIterationIndex); // Add it to the GC if it returns false
|
||||
};
|
||||
// If its not alive anymore, remove it from the queue, it already ran once on dead
|
||||
if(!alive _object) then {
|
||||
_gcIndex pushBack GVAR(lastIterationIndex);
|
||||
};
|
||||
_args = GVAR(arguments) select GVAR(lastIterationIndex);
|
||||
|
||||
if(!(_args call FUNC(pfhRound))) then {
|
||||
_gcIndex pushBack GVAR(lastIterationIndex); // Add it to the GC if it returns false
|
||||
};
|
||||
};
|
||||
_iter = _iter + 1;
|
||||
@ -53,6 +45,6 @@ _deletionCount = 0;
|
||||
_deleteIndex = _x - _deletionCount;
|
||||
GVAR(objects) deleteAt _deleteIndex;
|
||||
GVAR(arguments) deleteAt _deleteIndex;
|
||||
|
||||
|
||||
_deletionCount = _deletionCount + 1;
|
||||
} forEach _gcIndex;
|
||||
} forEach _gcIndex;
|
||||
|
@ -14,15 +14,15 @@ _indirectRange = _this select 11;
|
||||
_force = _this select 12;
|
||||
_fragPower = _this select 13;
|
||||
|
||||
if(_round in GVAR(blackList)) exitWith {
|
||||
if(_round in GVAR(blackList)) exitWith {
|
||||
false
|
||||
};
|
||||
|
||||
if (!alive _round) then {
|
||||
if((diag_frameno - _firedFrame) > 1) then {
|
||||
if (!alive _round) exitWith {
|
||||
if((diag_frameno - _firedFrame) > 1) then { //skip if deleted within a single frame
|
||||
if(_skip == 0) then {
|
||||
if((_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}) || {_force == 1} ) then {
|
||||
[QGVAR(frag_eh), _this] call ace_common_fnc_serverEvent;
|
||||
[QGVAR(frag_eh), _this] call EFUNC(common,serverEvent);
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -35,15 +35,16 @@ if (!alive _round) then {
|
||||
};
|
||||
} forEach _spallTrack;
|
||||
};
|
||||
} else {
|
||||
|
||||
_params set[1, (getPosASL _round)];
|
||||
_params set[2, (velocity _round)];
|
||||
if(_doSpall) then {
|
||||
private["_scale"];
|
||||
_scale = ( (count GVAR(objects)) / GVAR(MaxTrackPerFrame) ) max 0.1;
|
||||
[_round, _scale, _spallTrack, _foundObjectHPIds] call FUNC(spallTrack);
|
||||
};
|
||||
false
|
||||
};
|
||||
|
||||
true
|
||||
_this set[1, (getPosASL _round)];
|
||||
_this set[2, (velocity _round)];
|
||||
|
||||
if(_doSpall) then {
|
||||
private["_scale"];
|
||||
_scale = ( (count GVAR(objects)) / GVAR(MaxTrackPerFrame) ) max 0.1;
|
||||
[_round, _scale, _spallTrack, _foundObjectHPIds] call FUNC(spallTrack);
|
||||
};
|
||||
|
||||
true
|
||||
|
@ -2,8 +2,10 @@
|
||||
|
||||
// THIS FUNCTION SHOULD NOT BE USED BECAUSE IT CAUSES AN SEARCH AND REBUILD
|
||||
|
||||
PARAMS_1(_round);
|
||||
|
||||
if(_round in GVAR(blackList)) then {
|
||||
GVAR(blackList) = GVAR(blackList) - [_round];
|
||||
};
|
||||
|
||||
GVAR(objects) = GVAR(objects) - [_round];
|
||||
GVAR(objects) = GVAR(objects) - [_round];
|
||||
|
@ -11,4 +11,4 @@ if(IS_ARRAY((_this select 0))) then {
|
||||
_ret = false;
|
||||
};
|
||||
};
|
||||
_ret
|
||||
_ret
|
||||
|
@ -21,7 +21,7 @@ if ((_this select 0) <= (count GVAR(spallHPData))) then {
|
||||
// diag_log text format["%1: %2", _forEachIndex, _x];
|
||||
// } forEach _hp;
|
||||
// } forEach (_this select 1);
|
||||
[DFUNC(doSpall), 0, [_this, _forEachIndex]] call cba_fnc_addPerFrameHandler;
|
||||
[DFUNC(doSpall), [_this, _forEachIndex]] call EFUNC(common,execNextFrame);
|
||||
// player sideChat "WEEE";
|
||||
} forEach (_this select 1);
|
||||
};
|
||||
|
@ -2,4 +2,4 @@
|
||||
if(!GVAR(tracesStarted)) then {
|
||||
GVAR(tracesStarted) = true;
|
||||
GVAR(traceID) = [FUNC(drawTraces), 0, []] call cba_fnc_addPerFrameHandler;
|
||||
};
|
||||
};
|
||||
|
@ -2,4 +2,4 @@
|
||||
if(GVAR(tracesStarted)) then {
|
||||
GVAR(tracesStarted) = false;
|
||||
[GVAR(traceID)] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
};
|
||||
|
@ -1,52 +0,0 @@
|
||||
//fnc_trackFragRound.sqf
|
||||
#include "script_component.hpp"
|
||||
private ["_params", "_round", "_lastPos", "_lastVel", "_type", "_time", "_doSpall", "_spallTrack", "_foundObjectHPIds", "_skip", "_explosive", "_indirectRange", "_force", "_fragPower"];
|
||||
_params = _this select 0;
|
||||
_round = _params select 0;
|
||||
_lastPos = _params select 1;
|
||||
_lastVel = _params select 2;
|
||||
_type = _params select 3;
|
||||
_time = _params select 4;
|
||||
_doSpall = _params select 6;
|
||||
_spallTrack = _params select 7;
|
||||
_foundObjectHPIds = _params select 8;
|
||||
|
||||
if (!alive _round) then {
|
||||
[_this select 1] call cba_fnc_removePerFrameHandler;
|
||||
if(_time != ACE_time && {_round in GVAR(trackedObjects)} && {!(_round in GVAR(blackList))}) then {
|
||||
GVAR(trackedObjects) = GVAR(trackedObjects) - [_round];
|
||||
_skip = getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(skip));
|
||||
if(_skip == 0) then {
|
||||
_explosive = getNumber (configFile >> "CfgAmmo" >> _type >> "explosive");
|
||||
_indirectRange = getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange");
|
||||
_force = getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(force));
|
||||
_fragPower = getNumber(configFile >> "CfgAmmo" >> _type >> "indirecthit")*(sqrt(_indirectRange));
|
||||
if((_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}) || {_force == 1} ) then {
|
||||
[QGVAR(frag_eh), _params] call ace_common_fnc_serverEvent;
|
||||
GVAR(trackedObjects) = GVAR(trackedObjects) - [_round];
|
||||
};
|
||||
};
|
||||
};
|
||||
if(_doSpall) then {
|
||||
GVAR(spallIsTrackingCount) = GVAR(spallIsTrackingCount) - 1;
|
||||
// diag_log text format["F: %1", _foundObjectHPIds];
|
||||
{
|
||||
if(!isNil "_x") then {
|
||||
_x removeEventHandler ["hitPart", _foundObjectHPIds select _forEachIndex];
|
||||
};
|
||||
} forEach _spallTrack;
|
||||
};
|
||||
} else {
|
||||
if(!(_round in GVAR(trackedObjects)) || {_round in GVAR(blackList)}) then {
|
||||
[_this select 1] call cba_fnc_removePerFrameHandler;
|
||||
if(_round in GVAR(blackList)) then {
|
||||
GVAR(blackList) = GVAR(blackList) - [_round];
|
||||
};
|
||||
};
|
||||
|
||||
_params set[1, (getPosASL _round)];
|
||||
_params set[2, (velocity _round)];
|
||||
if(_doSpall) then {
|
||||
[_round, 1, _spallTrack, _foundObjectHPIds] call FUNC(spallTrack);
|
||||
};
|
||||
};
|
@ -8,7 +8,7 @@ _index = _params select 1;
|
||||
if (alive _tracerObj && (count GVAR(traces)) > 0) then {
|
||||
_data = GVAR(traces) select _index;
|
||||
_positions = _data select 4;
|
||||
_positions set[(count _positions), [(getPos _tracerObj), vectorMagnitude (velocity _tracerObj)]];
|
||||
_positions set [(count _positions), [(getPos _tracerObj), vectorMagnitude (velocity _tracerObj)]];
|
||||
} else {
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
@ -7,6 +7,7 @@
|
||||
<Spanish>Simulación de fragmentación</Spanish>
|
||||
<German>Splittersimulation</German>
|
||||
<Czech>Simulace fragmentace</Czech>
|
||||
<Portuguese>Simulação de fragmentação</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Frag_EnableFrag_Desc">
|
||||
<English>Enable the ACE Fragmentation Simulation</English>
|
||||
@ -14,6 +15,7 @@
|
||||
<Polish>Aktywuje symulację fragmentacji ACE</Polish>
|
||||
<German>Aktiviere die ACE-Splittersimulation</German>
|
||||
<Czech>Povolit ACE simulaci fragmentace</Czech>
|
||||
<Portuguese>Ativa a simulação de fragmentação do ACE</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Frag_EnableSpall">
|
||||
<English>Spalling Simulation</English>
|
||||
@ -21,6 +23,7 @@
|
||||
<Polish>Symulacja odprysków</Polish>
|
||||
<German>Explosionssimulation</German>
|
||||
<Czech>Simulace úlomků</Czech>
|
||||
<Portuguese>Simulação de estilhaços</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Frag_EnableSpall_Desc">
|
||||
<English>Enable the ACE Spalling Simulation</English>
|
||||
@ -28,6 +31,7 @@
|
||||
<Polish>Aktywuje symulację odprysków ACE</Polish>
|
||||
<German>Aktiviere ACE-Explosionssimulation</German>
|
||||
<Czech>Povolit ACE simulaci úlomků</Czech>
|
||||
<Portuguese>Ativa a simulação de estilhaços do ACE</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Frag_MaxTrack">
|
||||
<English>Maximum Projectiles Tracked</English>
|
||||
@ -35,6 +39,7 @@
|
||||
<Polish>Maks. liczba śledzonych pocisków</Polish>
|
||||
<German>Maximalzahl der verfolgten Projektile</German>
|
||||
<Czech>Maximální počet sledovaných projektilů</Czech>
|
||||
<Portuguese>Máximo de projéteis rastreados</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Frag_MaxTrack_Desc">
|
||||
<English>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)</English>
|
||||
@ -42,6 +47,7 @@
|
||||
<Polish>To ustawienie kontroluje maksymalną ilość pocisków, jakie fragmentacja i odpryski symulują w danym momencie. Jeżeli więcej pocisków będzie wystrzelonych, wtedy nie będą one śledzone. Zmniejsz tą opcję jeżeli nie chcesz odczuwać spadków FPS podczas ciężkiej wymiany ognia (więcej niż 200 pocisków w powietrzu na raz).</Polish>
|
||||
<German>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)</German>
|
||||
<Czech>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)</Czech>
|
||||
<Portuguese>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)</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Frag_MaxTrackPerFrame">
|
||||
<English>Maximum Projectiles Per Frame</English>
|
||||
@ -49,6 +55,7 @@
|
||||
<German>Maximale Anzahl an Projektilen pro Frame</German>
|
||||
<Polish>Maks. liczba pocisków na klatkę</Polish>
|
||||
<Czech>Maximální počet projektilů ze jeden snímek</Czech>
|
||||
<Portuguese>Projéteis máximos por quadro</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Frag_MaxTrackPerFrame_Desc">
|
||||
<English>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.</English>
|
||||
@ -56,12 +63,15 @@
|
||||
<German>Gibt die Anzahl der Explosionverfolgungsberechnungen an, die gleichzeitig ausgeführt werden. Das kann dabei helfen den FPS-Einfluss abzuschwächen, wenn Teile über mehrere Frames hinweg verfolgt werden.</German>
|
||||
<Spanish>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.</Spanish>
|
||||
<Czech>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.</Czech>
|
||||
<Portuguese>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.</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Frag_EnableDebugTrace">
|
||||
<English>(SP Only) Frag/Spall Debug Tracing</English>
|
||||
<Spanish>(Solo SP) Seguimiento de depuración de Fragmentación/Astillamiento </Spanish>
|
||||
<Polish>(Tylko SP) Wizualny debug odł./odpr.</Polish>
|
||||
<Czech>(Pouze SP) Debug sledování Frag/Úlomků</Czech>
|
||||
<German>(nur SP) Splitter-/Explosions-Debug-Verfolgung</German>
|
||||
<Portuguese>(Somente SP) Depuração de fragmentação e estilhaços traçantes</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Frag_EnableDebugTrace_Desc">
|
||||
<English>(SP Only) Requires a mission/editor restart. Enables visual tracing of fragmentation and spalling rounds in SP game mode only.</English>
|
||||
@ -69,6 +79,7 @@
|
||||
<Polish>(Tylko SP) Wymaga restartu misji/edytora. Aktywuje wizualne śledzenie odłamków oraz odprysków w trybie gry Single Player.</Polish>
|
||||
<German>(nur SP) Splitter-/Explosions-Debugging</German>
|
||||
<Czech>(Pouze SP) Vyžaduje restart mise/editoru. Aktivuje vizuální stopování fragmentace a úlomů pouze v režimu jednoho hráče.</Czech>
|
||||
<Portuguese>(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.</Portuguese>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
</Project>
|
||||
|
@ -2,15 +2,15 @@
|
||||
|
||||
#define COLOUR 8.0
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
author[] = {"Garth 'L-H' de Wet"};
|
||||
authorUrl = "http://garth.snakebiteink.co.za/";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
author[] = {"Garth 'L-H' de Wet"};
|
||||
authorUrl = "http://garth.snakebiteink.co.za/";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
@ -165,10 +165,6 @@ class CfgGlasses {
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
|
||||
class AV_ESS_blk:None{
|
||||
COMBAT_GOGGLES
|
||||
};
|
||||
|
||||
class G_Balaclava_blk;
|
||||
|
||||
class G_Balaclava_combat:G_Balaclava_blk {
|
||||
|
@ -40,7 +40,7 @@ _affected = _grenade nearEntities ["CAManBase", 20];
|
||||
[_unit, false] call EFUNC(common,disableAI);
|
||||
};
|
||||
_unit setSkill (skill _unit * 50);
|
||||
}, [_x], (7 * _strength), 0.1] call EFUNC(common,waitAndExecute); //0.1 precision is fine for AI
|
||||
}, [_x], (7 * _strength)] call EFUNC(common,waitAndExecute);
|
||||
} else {
|
||||
//Do effects for player
|
||||
// is there line of sight to the grenade?
|
||||
@ -62,7 +62,7 @@ _affected = _grenade nearEntities ["CAManBase", 20];
|
||||
|
||||
//Add ace_hearing ear ringing sound effect
|
||||
if ((isClass (configFile >> "CfgPatches" >> "ACE_Hearing")) && {_strength > 0}) then {
|
||||
[_x, 0.5 + (_strength / 2)] call EFUNC(hearing,earRinging);
|
||||
[_x, (20 * _strength)] call EFUNC(hearing,earRinging);
|
||||
};
|
||||
|
||||
// account for people looking away by slightly
|
||||
@ -95,7 +95,7 @@ _affected = _grenade nearEntities ["CAManBase", 20];
|
||||
[{
|
||||
PARAMS_1(_light);
|
||||
deleteVehicle _light;
|
||||
}, [_light], 0.1, 0] call EFUNC(common,waitAndExecute);
|
||||
}, [_light], 0.1] call EFUNC(common,waitAndExecute);
|
||||
|
||||
// blind player
|
||||
if (_strength > 0.1) then {
|
||||
@ -113,7 +113,7 @@ _affected = _grenade nearEntities ["CAManBase", 20];
|
||||
//FULLRECOVERY - end effect
|
||||
[{
|
||||
GVAR(flashbangPPEffectCC) ppEffectEnable false;
|
||||
}, [], (17 * _strength), 0] call EFUNC(common,waitAndExecute);
|
||||
}, [], (17 * _strength)] call EFUNC(common,waitAndExecute);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -6,7 +6,7 @@ class CfgVehicles {
|
||||
class ACE_PutInEarplugs {
|
||||
displayName = CSTRING(EarPlugs_On);
|
||||
condition = QUOTE( !([_player] call FUNC(hasEarPlugsIn)) && {'ACE_EarPlugs' in items _player} );
|
||||
exceptions[] = {"isNotInside"};
|
||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||
statement = QUOTE( [_player] call FUNC(putInEarPlugs) );
|
||||
showDisabled = 0;
|
||||
priority = 2.5;
|
||||
@ -16,7 +16,7 @@ class CfgVehicles {
|
||||
class ACE_RemoveEarplugs {
|
||||
displayName = CSTRING(EarPlugs_Off);
|
||||
condition = QUOTE( [_player] call FUNC(hasEarPlugsIn) );
|
||||
exceptions[] = {"isNotInside"};
|
||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||
statement = QUOTE( [_player] call FUNC(removeEarPlugs) );
|
||||
showDisabled = 0;
|
||||
priority = 2.5;
|
||||
|
@ -5,11 +5,47 @@ class CfgWeapons {
|
||||
class ACE_EarPlugs: ACE_ItemCore {
|
||||
displayName = CSTRING(EarPlugs_Name);
|
||||
descriptionShort = CSTRING(EarPlugs_Description);
|
||||
model = PATHTOF(ACE_earplugs.p3d);
|
||||
model = QUOTE(PATHTOF(data\ace_earplugs.p3d));
|
||||
picture = PATHTOF(UI\ACE_earplugs_x_ca.paa);
|
||||
scope = 2;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 1;
|
||||
};
|
||||
};
|
||||
|
||||
class H_HelmetB;
|
||||
class H_HelmetCrew_B: H_HelmetB {
|
||||
GVAR(protection) = 1;
|
||||
GVAR(lowerVolume) = 0.80;
|
||||
};
|
||||
class H_HelmetCrew_0: H_HelmetCrew_B {};
|
||||
class H_HelmetCrew_I: H_HelmetCrew_B {};
|
||||
|
||||
class H_CrewHelmetHeli_B: H_HelmetB {
|
||||
GVAR(protection) = 0.85;
|
||||
GVAR(lowerVolume) = 0.75;
|
||||
};
|
||||
class H_CrewHelmetHeli_O: H_CrewHelmetHeli_B {};
|
||||
class H_CrewHelmetHeli_I: H_CrewHelmetHeli_B {};
|
||||
|
||||
class H_PilotHelmetHeli_B: H_HelmetB {
|
||||
GVAR(protection) = 0.85;
|
||||
GVAR(lowerVolume) = 0.75;
|
||||
};
|
||||
class H_PilotHelmetHeli_O: H_PilotHelmetHeli_B {};
|
||||
class H_PilotHelmetHeli_I: H_PilotHelmetHeli_B {};
|
||||
|
||||
class H_PilotHelmetFighter_B: H_HelmetB {
|
||||
GVAR(protection) = 1;
|
||||
GVAR(lowerVolume) = 0.80;
|
||||
};
|
||||
class H_PilotHelmetFighter_O: H_PilotHelmetFighter_B {};
|
||||
class H_PilotHelmetFighter_I: H_PilotHelmetFighter_B {};
|
||||
|
||||
class H_Cap_headphones: H_HelmetB {
|
||||
GVAR(protection) = 0.5;
|
||||
GVAR(lowerVolume) = 0.60;
|
||||
};
|
||||
class H_Cap_marshal: H_Cap_headphones {};
|
||||
};
|
||||
|
||||
|
Binary file not shown.
@ -2,8 +2,9 @@
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
GVAR(currentDeafness) = 0;
|
||||
GVAR(newStrength) = 0;
|
||||
GVAR(deafnessDV) = 0;
|
||||
GVAR(deafnessPrior) = 0;
|
||||
GVAR(volume) = 1;
|
||||
GVAR(playerVehAttenuation) = 1;
|
||||
|
||||
GVAR(beep) = false;
|
||||
@ -11,10 +12,11 @@ GVAR(beep2) = false;
|
||||
GVAR(time2) = 0;
|
||||
GVAR(time3) = 0;
|
||||
GVAR(time4) = 0;
|
||||
GVAR(earRingingPFH) = -1;
|
||||
|
||||
// Spawn volume updating process
|
||||
[FUNC(updateVolume), 0.1, [] ] call CBA_fnc_addPerFrameHandler;
|
||||
["SettingsInitialized", {
|
||||
// Spawn volume updating process
|
||||
[FUNC(updateVolume), 1, [false] ] call CBA_fnc_addPerFrameHandler;
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
||||
//Update veh attunation when player veh changes
|
||||
["playerVehicleChanged", {_this call FUNC(updatePlayerVehAttenuation);}] call EFUNC(common,addEventHandler);
|
||||
@ -22,14 +24,13 @@ GVAR(earRingingPFH) = -1;
|
||||
|
||||
//Reset deafness on respawn (or remote control player switch)
|
||||
["playerChanged", {
|
||||
ACE_player setVariable [QGVAR(dv), 0];
|
||||
ACE_player setVariable [QGVAR(prior), 0];
|
||||
GVAR(deafnessDV) = 0;
|
||||
GVAR(deafnessPrior) = 0;
|
||||
ACE_player setvariable [QGVAR(deaf), false];
|
||||
|
||||
GVAR(beep) = false;
|
||||
GVAR(beep2) = false;
|
||||
GVAR(time2) = 0;
|
||||
GVAR(time3) = 0;
|
||||
GVAR(time4) = 0;
|
||||
GVAR(currentDeafness) = 0;
|
||||
GVAR(newStrength) = 0;
|
||||
}] call EFUNC(common,addEventhandler);
|
||||
|
Binary file not shown.
@ -5,7 +5,7 @@ class CfgPatches {
|
||||
units[] = {};
|
||||
weapons[] = {"ACE_EarPlugs"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_interaction"};
|
||||
requiredAddons[] = {"ace_interaction", "A3_Characters_F", "A3_Characters_F_Kart"};
|
||||
author[] = {"KoffeinFlummi", "esteldunedain", "HopeJ", "commy2", "Rocko", "Rommel", "Ruthberg"};
|
||||
authorUrl = "https://github.com/KoffeinFlummi/";
|
||||
VERSION_CONFIG;
|
||||
|
BIN
addons/hearing/data/ace_earplugs.p3d
Normal file
BIN
addons/hearing/data/ace_earplugs.p3d
Normal file
Binary file not shown.
BIN
addons/hearing/data/ace_earplugs_co.paa
Normal file
BIN
addons/hearing/data/ace_earplugs_co.paa
Normal file
Binary file not shown.
@ -15,9 +15,12 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_launcher"];
|
||||
PARAMS_1(_unit);
|
||||
|
||||
_unit = _this select 0;
|
||||
// Exit if hearing is disabled or soldier has earplugs already in (persistence scenarios)
|
||||
if (!GVAR(enableCombatDeafness) || {[_unit] call FUNC(hasEarPlugsIn)}) exitWith {};
|
||||
|
||||
private ["_launcher"];
|
||||
|
||||
// add earplugs if the soldier has a rocket launcher
|
||||
_launcher = secondaryWeapon _unit;
|
||||
|
@ -16,77 +16,23 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (GVAR(DisableEarRinging)) exitWith {};
|
||||
|
||||
PARAMS_2(_unit,_strength);
|
||||
|
||||
if (isNull _unit) exitWith {};
|
||||
if (_unit != ACE_player) exitWith {};
|
||||
if (_strength < 0.05) exitWith {};
|
||||
if (!isNull curatorCamera) exitWith {};
|
||||
|
||||
if (_unit getVariable ["ACE_hasEarPlugsin", false]) then {
|
||||
_strength = _strength / 4;
|
||||
};
|
||||
|
||||
_unit setVariable [QGVAR(dv), (_unit getVariable [QGVAR(dv), 0]) + _strength];
|
||||
//headgear hearing protection
|
||||
if(headgear _unit != "") then {
|
||||
private ["_protection"];
|
||||
_protection = (getNumber (configFile >> "CfgWeapons" >> (headgear _unit) >> QGVAR(protection))) min 1;
|
||||
if(_protection > 0) then {
|
||||
_strength = _strength * (1 - _protection);
|
||||
};
|
||||
};
|
||||
|
||||
if (GVAR(earRingingPFH) != -1) exitWith {};
|
||||
|
||||
GVAR(earRingingPFH) = [{
|
||||
EXPLODE_1_PVT(_this select 0,_unit);
|
||||
private ["_prior"];
|
||||
_prior = (_unit getvariable [QGVAR(dv), 0]) min 20;
|
||||
|
||||
if (!alive _unit || _prior <= 0) exitWith {
|
||||
_unit setVariable [QGVAR(dv), 0];
|
||||
_unit setVariable [QGVAR(prior), 0];
|
||||
GVAR(beep) = false;
|
||||
GVAR(beep2) = false;
|
||||
GVAR(time2) = 0;
|
||||
GVAR(time3) = 0;
|
||||
GVAR(time4) = 0;
|
||||
GVAR(earRingingPFH) = -1;
|
||||
[_this select 1] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
if (((_unit getvariable [QGVAR(dv), 0]) - (_unit getvariable [QGVAR(prior), 0])) > 2) then {
|
||||
if (ACE_time > GVAR(time3)) then {
|
||||
GVAR(beep2) = false;
|
||||
};
|
||||
if (!GVAR(beep2)) then {
|
||||
playSound "ACE_Combat_Deafness";
|
||||
GVAR(beep2) = true;
|
||||
GVAR(time3) = ACE_time + 5;
|
||||
};
|
||||
};
|
||||
|
||||
_unit setvariable [QGVAR(prior), _prior];
|
||||
GVAR(volume) = (1 - (_prior / 20)) max 0;
|
||||
|
||||
if (_prior > 19.75) then {
|
||||
_unit setvariable [QGVAR(deaf), true];
|
||||
} else {
|
||||
_unit setvariable [QGVAR(deaf), false];
|
||||
};
|
||||
|
||||
if ((_unit getvariable [QGVAR(deaf), false]) && {ACE_time > GVAR(time4)}) then {
|
||||
playSound "ACE_Combat_Deafness";
|
||||
GVAR(beep2) = true;
|
||||
GVAR(time3) = ACE_time + 10;
|
||||
GVAR(time4) = ACE_time + 30;
|
||||
};
|
||||
|
||||
// Hearing takes longer to return to normal after it hits rock bottom
|
||||
_unit setvariable [QGVAR(dv), _prior - (0.5 * (GVAR(volume) max 0.1))];
|
||||
|
||||
if (_prior > 10) then {
|
||||
//check if the ringing is already being played
|
||||
if (ACE_time > GVAR(time2)) then {
|
||||
GVAR(beep) = false;
|
||||
};
|
||||
if (!GVAR(beep)) then {
|
||||
playSound "ACE_Ring_Backblast";
|
||||
GVAR(time2) = ACE_time + 22;
|
||||
GVAR(beep) = true;
|
||||
};
|
||||
};
|
||||
}, 1, [_unit]] call CBA_fnc_addPerFrameHandler;
|
||||
GVAR(deafnessDV) = GVAR(deafnessDV) + _strength;
|
||||
|
@ -16,6 +16,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
//Only run if deafness or ear ringing is enabled:
|
||||
if ((!GVAR(enableCombatDeafness)) && GVAR(DisableEarRinging)) exitWith {};
|
||||
|
||||
PARAMS_2(_unit,_damage);
|
||||
|
||||
private ["_strength"];
|
||||
|
@ -21,17 +21,18 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_silencer", "_audibleFireCoef", "_loudness", "_strength", "_vehAttenuation", "_magazine", "_muzzles", "_weaponMagazines", "_muzzleMagazines", "_ammoType", "_initSpeed", "_ammoConfig", "_caliber", "_parentClasses"];
|
||||
//Only run if deafness or ear ringing is enabled:
|
||||
if ((!GVAR(enableCombatDeafness)) && GVAR(DisableEarRinging)) exitWith {};
|
||||
|
||||
PARAMS_7(_object,_firer,_distance,_weapon,_muzzle,_mode,_ammo);
|
||||
|
||||
//Only run if combatDeafness enabled:
|
||||
if (!GVAR(enableCombatDeafness)) exitWith {};
|
||||
//Only run if firedNear object is player or player's vehicle:
|
||||
if ((ACE_player != _object) && {(vehicle ACE_player) != _object}) exitWith {};
|
||||
if (_weapon in ["Throw", "Put"]) exitWith {};
|
||||
if (_distance > 50) exitWith {};
|
||||
|
||||
private ["_silencer", "_audibleFireCoef", "_loudness", "_strength", "_vehAttenuation", "_magazine", "_muzzles", "_weaponMagazines", "_muzzleMagazines", "_ammoType", "_initSpeed", "_ammoConfig", "_caliber", "_parentClasses"];
|
||||
|
||||
_vehAttenuation = if ((ACE_player == (vehicle ACE_player)) || {isTurnedOut ACE_player}) then {1} else {GVAR(playerVehAttenuation)};
|
||||
|
||||
_distance = 1 max _distance;
|
||||
@ -58,14 +59,18 @@ if (count _weaponMagazines == 0) then {
|
||||
_weaponMagazines append _muzzleMagazines;
|
||||
};
|
||||
} forEach _muzzles;
|
||||
{
|
||||
_ammoType = getText(configFile >> "CfgMagazines" >> _x >> "ammo");
|
||||
_weaponMagazines set [_forEachIndex, [_x, _ammoType]];
|
||||
} forEach _weaponMagazines;
|
||||
missionNamespace setVariable [format[QEGVAR(common,weaponMagazines_%1),_weapon], _weaponMagazines];
|
||||
};
|
||||
|
||||
_magazine = "";
|
||||
{
|
||||
_ammoType = getText(configFile >> "CfgMagazines" >> _x >> "ammo");
|
||||
EXPLODE_2_PVT(_x,_magazineType,_ammoType);
|
||||
if (_ammoType == _ammo) exitWith {
|
||||
_magazine = _x;
|
||||
_magazine = _magazineType;
|
||||
};
|
||||
} forEach _weaponMagazines;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Author: esteldunedain
|
||||
* Initializes the Map module.
|
||||
* Initializes the Hearing module.
|
||||
*
|
||||
* Arguments:
|
||||
* Whatever the module provides. (I dunno.)
|
||||
@ -16,4 +16,4 @@ if !(_activated) exitWith {};
|
||||
|
||||
[_logic, QGVAR(enableCombatDeafness), "EnableCombatDeafness"] call EFUNC(common,readSettingFromModule);
|
||||
|
||||
diag_log text "[ACE]: Interaction Module Initialized.";
|
||||
diag_log text "[ACE]: Hearing Module Initialized.";
|
||||
|
@ -24,5 +24,8 @@ _player setVariable ["ACE_hasEarPlugsIn", true, true];
|
||||
|
||||
[localize LSTRING(EarPlugs_Are_On)] call EFUNC(common,displayTextStructured);
|
||||
|
||||
//Force an immediate fast volume update:
|
||||
[[true]] call FUNC(updateVolume);
|
||||
|
||||
/*// No Earplugs in inventory, telling user
|
||||
[localize LSTRING(NoPlugs)] call EFUNC(common,displayTextStructured);*/
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user