mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into trenches
Conflicts: AUTHORS.txt
This commit is contained in:
commit
800b254004
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@ texHeaders.bin
|
|||||||
*.swp
|
*.swp
|
||||||
*.swo
|
*.swo
|
||||||
*.biprivatekey
|
*.biprivatekey
|
||||||
|
Thumbs.db
|
||||||
|
13
AUTHORS.txt
13
AUTHORS.txt
@ -18,6 +18,7 @@ Kieran
|
|||||||
NouberNou
|
NouberNou
|
||||||
PabstMirror <pabstmirror@gmail.com>
|
PabstMirror <pabstmirror@gmail.com>
|
||||||
Ruthberg <ulteq@web.de>
|
Ruthberg <ulteq@web.de>
|
||||||
|
SilentSpike <SilentSpike100@gmail.com>
|
||||||
tpM
|
tpM
|
||||||
ViperMaul
|
ViperMaul
|
||||||
VKing <kauestad@gmail.com>
|
VKing <kauestad@gmail.com>
|
||||||
@ -36,8 +37,9 @@ Aleksey EpMAK Yermakov <epmak777@gmail.com>
|
|||||||
Alganthe <alganthe@live.fr>
|
Alganthe <alganthe@live.fr>
|
||||||
Anthariel <Contact@storm-simulation.com>
|
Anthariel <Contact@storm-simulation.com>
|
||||||
Asgar Serran <piechottaf@web.de>
|
Asgar Serran <piechottaf@web.de>
|
||||||
|
Bamse <bamsis@gmail.com>
|
||||||
Bla1337
|
Bla1337
|
||||||
BlackPixxel
|
BlackPixxel <blackpixxel96@gmail.com>
|
||||||
BlackQwar
|
BlackQwar
|
||||||
Brakoviejo
|
Brakoviejo
|
||||||
Brisse <brisse@outlook.com>
|
Brisse <brisse@outlook.com>
|
||||||
@ -50,6 +52,7 @@ Dharma Bellamkonda <dharma.bellamkonda@gmail.com>
|
|||||||
Dimaslg <dimaslg@telecable.es>
|
Dimaslg <dimaslg@telecable.es>
|
||||||
eRazeri
|
eRazeri
|
||||||
evromalarkey <evromalarkey@gmail.com>
|
evromalarkey <evromalarkey@gmail.com>
|
||||||
|
F3 Project <alanr@ferstaberinde.com>
|
||||||
Falke75
|
Falke75
|
||||||
Ferenczi
|
Ferenczi
|
||||||
Ferenzi
|
Ferenzi
|
||||||
@ -65,8 +68,10 @@ Hamburger SV
|
|||||||
Harakhti <shadowdragonphd@gmail.com>
|
Harakhti <shadowdragonphd@gmail.com>
|
||||||
havena <silveredenis@gmail.com>
|
havena <silveredenis@gmail.com>
|
||||||
Hawkins
|
Hawkins
|
||||||
|
Head
|
||||||
jokoho482 <jokoho482@gmail.com>`
|
jokoho482 <jokoho482@gmail.com>`
|
||||||
Jonpas <jonpas33@gmail.com>
|
Jonpas <jonpas33@gmail.com>
|
||||||
|
Karneck <dschultz26@hotmail.com>
|
||||||
Kavinsky <nmunozfernandez@gmail.com>
|
Kavinsky <nmunozfernandez@gmail.com>
|
||||||
Kllrt <kllrtik@gmail.com>
|
Kllrt <kllrtik@gmail.com>
|
||||||
legman <juicemelon@msn.com>
|
legman <juicemelon@msn.com>
|
||||||
@ -81,6 +86,7 @@ nikolauska <nikolauska1@gmail.com>
|
|||||||
nomisum <nomisum@gmail.com>
|
nomisum <nomisum@gmail.com>
|
||||||
OnkelDisMaster <onkeldismaster@gmail.com>
|
OnkelDisMaster <onkeldismaster@gmail.com>
|
||||||
oscarmolinadev
|
oscarmolinadev
|
||||||
|
PaxJaromeMalues <seemax1991@gmail.com>
|
||||||
pokertour
|
pokertour
|
||||||
Professor <lukas.trneny@wo.cz>
|
Professor <lukas.trneny@wo.cz>
|
||||||
rakowozz
|
rakowozz
|
||||||
@ -89,7 +95,6 @@ Raspu86
|
|||||||
Riccardo Petricca <petriccarcc@gmail.com>
|
Riccardo Petricca <petriccarcc@gmail.com>
|
||||||
Robert Boklahánics <bokirobi@gmail.com>
|
Robert Boklahánics <bokirobi@gmail.com>
|
||||||
ruPaladin <happyworm24@rambler.ru>
|
ruPaladin <happyworm24@rambler.ru>
|
||||||
SilentSpike <SilentSpike100@gmail.com>
|
|
||||||
simon84 <badguy360th@gmail.com>
|
simon84 <badguy360th@gmail.com>
|
||||||
Sniperwolf572 <tenga6@gmail.com>
|
Sniperwolf572 <tenga6@gmail.com>
|
||||||
SzwedzikPL <szwedzikpl@gmail.com>
|
SzwedzikPL <szwedzikpl@gmail.com>
|
||||||
@ -101,4 +106,6 @@ Valentin Torikian <valentin.torikian@gmail.com>
|
|||||||
VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>
|
VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>
|
||||||
Winter <simon@agius-muscat.net>
|
Winter <simon@agius-muscat.net>
|
||||||
zGuba
|
zGuba
|
||||||
Grey-Soldierman <gungamer101@hotmail.com>
|
Grey-Soldierman <gungamer101@hotmail.com>
|
||||||
|
Drill <drill87@gmail.com>
|
||||||
|
MikeMatrix <m.braun92@gmail.com>
|
||||||
|
BIN
Arma3_workshop_addon.jpg
Normal file
BIN
Arma3_workshop_addon.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 133 KiB |
20
README.md
20
README.md
@ -1,27 +1,21 @@
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="https://github.com/acemod/ACE3/blob/master/extras/assets/logo/black/ACE3-Logo.jpg"
|
<img src="https://github.com/acemod/ACE3/blob/master/extras/assets/logo/black/ACE3-Logo.jpg" width="480">
|
||||||
height="112">
|
|
||||||
</p>
|
</p>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/acemod/ACE3/releases">
|
<a href="https://github.com/acemod/ACE3/releases">
|
||||||
<img src="https://img.shields.io/badge/Version-3.0.1-blue.svg"
|
<img src="https://img.shields.io/badge/Version-3.2.1-blue.svg" alt="ACE3 version">
|
||||||
alt="ACE version">
|
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/acemod/ACE3/releases/download/v3.0.1/ace3_3.0.1.zip">
|
<a href="https://github.com/acemod/ACE3/releases/download/v3.2.1/ace3_3.2.1.zip">
|
||||||
<img src="http://img.shields.io/badge/Download-40.9_MB-green.svg"
|
<img src="http://img.shields.io/badge/Download-56.5_MB-green.svg" alt="ACE3 download">
|
||||||
alt="ACE download">
|
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/acemod/ACE3/issues">
|
<a href="https://github.com/acemod/ACE3/issues">
|
||||||
<img src="http://img.shields.io/github/issues-raw/acemod/ACE3.svg?label=Issues"
|
<img src="http://img.shields.io/github/issues-raw/acemod/ACE3.svg?label=Issues" alt="ACE3 issues">
|
||||||
alt="ACE issues">
|
|
||||||
</a>
|
</a>
|
||||||
<a href="http://forums.bistudio.com/showthread.php?191716-ACE3-A-collaborative-merger-between-AGM-CSE-and-ACE&p=2935435&viewfull=1#post2935435">
|
<a href="http://forums.bistudio.com/showthread.php?191716-ACE3-A-collaborative-merger-between-AGM-CSE-and-ACE&p=2935435&viewfull=1#post2935435">
|
||||||
<img src="https://img.shields.io/badge/BIF-Thread-lightgrey.svg"
|
<img src="https://img.shields.io/badge/BIF-Thread-lightgrey.svg" alt="BIF thread">
|
||||||
alt="BIF thread">
|
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/acemod/ACE3/blob/master/LICENSE">
|
<a href="https://github.com/acemod/ACE3/blob/master/LICENSE">
|
||||||
<img src="http://img.shields.io/badge/License-GPLv2-red.svg"
|
<img src="http://img.shields.io/badge/License-GPLv2-red.svg" alt="ACE3 license">
|
||||||
alt="ACE license">
|
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
<p align="center"><sup><strong>Requires the latest version of <a href="http://www.armaholic.com/page.php?id=18767">CBA A3</a>. Visit us on <a href="https://www.facebook.com/ACE3Mod">Facebook</a> | <a href="https://www.youtube.com/c/ACE3Mod">YouTube</a> | <a href="https://twitter.com/ACE3Mod">Twitter</a> | <a href="http://www.reddit.com/r/arma/search?q=ACE&restrict_sr=on&sort=new&t=all">Reddit</a></strong></sup></p>
|
<p align="center"><sup><strong>Requires the latest version of <a href="http://www.armaholic.com/page.php?id=18767">CBA A3</a>. Visit us on <a href="https://www.facebook.com/ACE3Mod">Facebook</a> | <a href="https://www.youtube.com/c/ACE3Mod">YouTube</a> | <a href="https://twitter.com/ACE3Mod">Twitter</a> | <a href="http://www.reddit.com/r/arma/search?q=ACE&restrict_sr=on&sort=new&t=all">Reddit</a></strong></sup></p>
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
ace_fcs.dll
BIN
ace_fcs.dll
Binary file not shown.
BIN
ace_medical.dll
BIN
ace_medical.dll
Binary file not shown.
BIN
ace_parse_imagepath.dll
Normal file
BIN
ace_parse_imagepath.dll
Normal file
Binary file not shown.
@ -1,31 +1,31 @@
|
|||||||
class ACE_Settings {
|
class ACE_Settings {
|
||||||
class GVAR(enabled) {
|
class GVAR(enabled) {
|
||||||
displayName = "Advanced Ballistics";
|
displayName = CSTRING(enabled_DisplayName);
|
||||||
description = "Enables advanced ballistics";
|
description = CSTRING(enabled_Description);
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
value = 0;
|
value = 0;
|
||||||
};
|
};
|
||||||
class GVAR(simulateForSnipers) {
|
class GVAR(simulateForSnipers) {
|
||||||
displayName = "Enabled For Snipers";
|
displayName = CSTRING(simulateForSnipers_DisplayName);
|
||||||
description = "Enables advanced ballistics for non local snipers (when using high power optics)";
|
description = CSTRING(simulateForSnipers_Description);
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
value = 1;
|
value = 1;
|
||||||
};
|
};
|
||||||
class GVAR(simulateForGroupMembers) {
|
class GVAR(simulateForGroupMembers) {
|
||||||
displayName = "Enabled For Group Members";
|
displayName = CSTRING(simulateForGroupMembers_DisplayName);
|
||||||
description = "Enables advanced ballistics for non local group members";
|
description = CSTRING(simulateForGroupMembers_Description);
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
value = 0;
|
value = 0;
|
||||||
};
|
};
|
||||||
class GVAR(simulateForEveryone) {
|
class GVAR(simulateForEveryone) {
|
||||||
displayName = "Enabled For Everyone";
|
displayName = CSTRING(simulateForEveryone_DisplayName);
|
||||||
description = "Enables advanced ballistics for all non local players (enabling this may degrade performance during heavy firefights in multiplayer)";
|
description = CSTRING(simulateForEveryone_Description);
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
value = 0;
|
value = 0;
|
||||||
};
|
};
|
||||||
class GVAR(disabledInFullAutoMode) {
|
class GVAR(disabledInFullAutoMode) {
|
||||||
displayName = "Disabled In FullAuto Mode";
|
displayName = CSTRING(disabledInFullAutoMod_DisplayName);
|
||||||
description = "Disables advanced ballistics during full auto fire";
|
description = CSTRING(disabledInFullAutoMod_Description);
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
value = 0;
|
value = 0;
|
||||||
};
|
};
|
||||||
@ -38,32 +38,32 @@ class ACE_Settings {
|
|||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
class GVAR(ammoTemperatureEnabled) {
|
class GVAR(ammoTemperatureEnabled) {
|
||||||
displayName = "Enable Ammo Temperature Simulation";
|
displayName = CSTRING(ammoTemperatureEnabled_DisplayName);
|
||||||
description = "Muzzle velocity varies with ammo temperature";
|
description = CSTRING(ammoTemperatureEnabled_Description);
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
value = 1;
|
value = 1;
|
||||||
};
|
};
|
||||||
class GVAR(barrelLengthInfluenceEnabled) {
|
class GVAR(barrelLengthInfluenceEnabled) {
|
||||||
displayName = "Enable Barrel Length Simulation";
|
displayName = CSTRING(barrelLengthInfluenceEnabled_DisplayName);
|
||||||
description = "Muzzle velocity varies with barrel length";
|
description = CSTRING(barrelLengthInfluenceEnabled_Description);
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
value = 1;
|
value = 1;
|
||||||
};
|
};
|
||||||
class GVAR(bulletTraceEnabled) {
|
class GVAR(bulletTraceEnabled) {
|
||||||
displayName = "Enable Bullet Trace Effect";
|
displayName = CSTRING(bulletTraceEnabled_DisplayName);
|
||||||
description = "Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics)";
|
description = CSTRING(bulletTraceEnabled_Description);
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
value = 1;
|
value = 1;
|
||||||
};
|
};
|
||||||
class GVAR(simulationInterval) {
|
class GVAR(simulationInterval) {
|
||||||
displayName = "Simulation Interval";
|
displayName = CSTRING(simulationInterval_DisplayName);
|
||||||
description = "Defines the interval between every calculation step";
|
description = CSTRING(simulationInterval_Description);
|
||||||
typeName = "SCALAR";
|
typeName = "SCALAR";
|
||||||
value = 0.0;
|
value = 0.0;
|
||||||
};
|
};
|
||||||
class GVAR(simulationRadius) {
|
class GVAR(simulationRadius) {
|
||||||
displayName = "Simulation Radius";
|
displayName = CSTRING(simulationRadius_DisplayName);
|
||||||
description = "Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles";
|
description = CSTRING(simulationRadius_Description);
|
||||||
typeName = "SCALAR";
|
typeName = "SCALAR";
|
||||||
value = 3000;
|
value = 3000;
|
||||||
};
|
};
|
||||||
|
@ -53,7 +53,9 @@ if (!GVAR(simulateForEveryone) && !(local _unit)) then {
|
|||||||
if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "CfgWeapons" >> _weapon >> _mode >> "autoFire") == 1) then { _abort = true; };
|
if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "CfgWeapons" >> _weapon >> _mode >> "autoFire") == 1) then { _abort = true; };
|
||||||
|
|
||||||
if (_abort || !(GVAR(extensionAvailable))) exitWith {
|
if (_abort || !(GVAR(extensionAvailable))) exitWith {
|
||||||
[_bullet, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")] call EFUNC(winddeflection,updateTrajectoryPFH);
|
if (missionNamespace getVariable [QEGVAR(windDeflection,enabled), false]) then {
|
||||||
|
EGVAR(windDeflection,trackedBullets) pushBack [_bullet, getNumber(configFile >> "cfgAmmo" >> _ammo >> "airFriction")];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
_AmmoCacheEntry = uiNamespace getVariable format[QGVAR(%1), _ammo];
|
_AmmoCacheEntry = uiNamespace getVariable format[QGVAR(%1), _ammo];
|
||||||
@ -114,7 +116,7 @@ if (_caliber > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) th
|
|||||||
|
|
||||||
GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000;
|
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"];
|
private ["_args", "_index", "_bullet", "_caliber", "_bulletTraceVisible", "_bulletVelocity", "_bulletPosition"];
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
<Spanish>Balística avanzada</Spanish>
|
<Spanish>Balística avanzada</Spanish>
|
||||||
<German>Erweiterte Ballistik</German>
|
<German>Erweiterte Ballistik</German>
|
||||||
<Czech>Pokročilá balistika</Czech>
|
<Czech>Pokročilá balistika</Czech>
|
||||||
|
<Portuguese>Balística avançada</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_enabled_DisplayName">
|
<Key ID="STR_ACE_Advanced_Ballistics_enabled_DisplayName">
|
||||||
<English>Advanced Ballistics</English>
|
<English>Advanced Ballistics</English>
|
||||||
@ -38,6 +39,7 @@
|
|||||||
<Spanish>Balística avanzada</Spanish>
|
<Spanish>Balística avanzada</Spanish>
|
||||||
<German>Erweiterte Ballistik</German>
|
<German>Erweiterte Ballistik</German>
|
||||||
<Czech>Pokročilá balistika</Czech>
|
<Czech>Pokročilá balistika</Czech>
|
||||||
|
<Portuguese>Balística avançada</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_enabled_Description">
|
<Key ID="STR_ACE_Advanced_Ballistics_enabled_Description">
|
||||||
<English>Enables advanced ballistics</English>
|
<English>Enables advanced ballistics</English>
|
||||||
@ -45,6 +47,7 @@
|
|||||||
<Spanish>Activa la balística avanzada</Spanish>
|
<Spanish>Activa la balística avanzada</Spanish>
|
||||||
<German>Aktiviert die erweiterte Ballistik</German>
|
<German>Aktiviert die erweiterte Ballistik</German>
|
||||||
<Czech>Aktivuje pokročilou balistiku</Czech>
|
<Czech>Aktivuje pokročilou balistiku</Czech>
|
||||||
|
<Portuguese>Ativa balística avançada</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForSnipers_DisplayName">
|
<Key ID="STR_ACE_Advanced_Ballistics_simulateForSnipers_DisplayName">
|
||||||
<English>Enabled For Snipers</English>
|
<English>Enabled For Snipers</English>
|
||||||
@ -52,6 +55,7 @@
|
|||||||
<Polish>Akt. dla snajperów</Polish>
|
<Polish>Akt. dla snajperów</Polish>
|
||||||
<German>Für Scharfschützen aktiviert</German>
|
<German>Für Scharfschützen aktiviert</German>
|
||||||
<Czech>Povoleno pro odstřelovače</Czech>
|
<Czech>Povoleno pro odstřelovače</Czech>
|
||||||
|
<Portuguese>Ativar para caçadores</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForSnipers_Description">
|
<Key ID="STR_ACE_Advanced_Ballistics_simulateForSnipers_Description">
|
||||||
<English>Enables advanced ballistics for non local snipers (when using high power optics)</English>
|
<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>
|
<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>
|
<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>
|
<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>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForGroupMembers_DisplayName">
|
<Key ID="STR_ACE_Advanced_Ballistics_simulateForGroupMembers_DisplayName">
|
||||||
<English>Enabled For Group Members</English>
|
<English>Enabled For Group Members</English>
|
||||||
@ -66,6 +71,7 @@
|
|||||||
<Polish>Akt. dla czł. grupy</Polish>
|
<Polish>Akt. dla czł. grupy</Polish>
|
||||||
<German>Für Gruppenmitglieder aktiviert</German>
|
<German>Für Gruppenmitglieder aktiviert</German>
|
||||||
<Czech>Povoleno pro členy skupiny</Czech>
|
<Czech>Povoleno pro členy skupiny</Czech>
|
||||||
|
<Portuguese>Ativada para membros do grupo</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForGroupMembers_Description">
|
<Key ID="STR_ACE_Advanced_Ballistics_simulateForGroupMembers_Description">
|
||||||
<English>Enables advanced ballistics for non local group members</English>
|
<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>
|
<Polish>Aktywuje zaawansowaną balistykę dla nielokalnych członków grupy</Polish>
|
||||||
<German>Aktiviert die erweiterte Ballistik für nicht lokale Gruppenmitglieder</German>
|
<German>Aktiviert die erweiterte Ballistik für nicht lokale Gruppenmitglieder</German>
|
||||||
<Czech>Aktivuje pokročilou balistiku pro nelokální členy skupiny</Czech>
|
<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>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForEveryone_DisplayName">
|
<Key ID="STR_ACE_Advanced_Ballistics_simulateForEveryone_DisplayName">
|
||||||
<English>Enabled For Everyone</English>
|
<English>Enabled For Everyone</English>
|
||||||
@ -80,6 +87,7 @@
|
|||||||
<Polish>Akt. dla wszystkich</Polish>
|
<Polish>Akt. dla wszystkich</Polish>
|
||||||
<German>Für jeden aktiviert</German>
|
<German>Für jeden aktiviert</German>
|
||||||
<Czech>Povoleno pro všechny</Czech>
|
<Czech>Povoleno pro všechny</Czech>
|
||||||
|
<Portuguese>Ativada para todos</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForEveryone_Description">
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_alwaysSimulateForGroupMembers_DisplayName">
|
<Key ID="STR_ACE_Advanced_Ballistics_alwaysSimulateForGroupMembers_DisplayName">
|
||||||
<English>Always Enabled For Group Members</English>
|
<English>Always Enabled For Group Members</English>
|
||||||
@ -94,6 +103,7 @@
|
|||||||
<Spanish>Siempre activada para miembros de grupo</Spanish>
|
<Spanish>Siempre activada para miembros de grupo</Spanish>
|
||||||
<German>Für Gruppenmitglieder immer aktiviert</German>
|
<German>Für Gruppenmitglieder immer aktiviert</German>
|
||||||
<Czech>Vždy povoleno pro členy skupiny</Czech>
|
<Czech>Vždy povoleno pro členy skupiny</Czech>
|
||||||
|
<Portuguese>Sempre ativada para membros do grupo</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_alwaysSimulateForGroupMembers_Description">
|
<Key ID="STR_ACE_Advanced_Ballistics_alwaysSimulateForGroupMembers_Description">
|
||||||
<English>Always enables advanced ballistics when a group member fires</English>
|
<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>
|
<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>
|
<German>Aktiviert die erweiterte Ballistik immer, wenn ein Gruppenmitglied schießt</German>
|
||||||
<Czech>Aktivuje pokročilou balistiku pro členy skupiny</Czech>
|
<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>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_disabledInFullAutoMod_DisplayName">
|
<Key ID="STR_ACE_Advanced_Ballistics_disabledInFullAutoMod_DisplayName">
|
||||||
<English>Disabled In FullAuto Mode</English>
|
<English>Disabled In FullAuto Mode</English>
|
||||||
@ -108,6 +119,7 @@
|
|||||||
<Spanish>Desactivada en modo automático</Spanish>
|
<Spanish>Desactivada en modo automático</Spanish>
|
||||||
<German>Beim vollautomatischen Feuern deaktiviert</German>
|
<German>Beim vollautomatischen Feuern deaktiviert</German>
|
||||||
<Czech>Zakázáno v automatickém režimu střelby</Czech>
|
<Czech>Zakázáno v automatickém režimu střelby</Czech>
|
||||||
|
<Portuguese>Desabilitar no modo automático</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_disabledInFullAutoMod_Description">
|
<Key ID="STR_ACE_Advanced_Ballistics_disabledInFullAutoMod_Description">
|
||||||
<English>Disables the advanced ballistics during full auto fire</English>
|
<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>
|
<Spanish>Desactivada la balística avanzada durante el fuego automático</Spanish>
|
||||||
<German>Deaktiviert die erweiterte Ballistik beim vollautomatischen Feuern</German>
|
<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>
|
<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>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_ammoTemperatureEnabled_DisplayName">
|
<Key ID="STR_ACE_Advanced_Ballistics_ammoTemperatureEnabled_DisplayName">
|
||||||
<English>Enable Ammo Temperature Simulation</English>
|
<English>Enable Ammo Temperature Simulation</English>
|
||||||
@ -122,6 +135,7 @@
|
|||||||
<Spanish>Activar simulación de temperatura de munición</Spanish>
|
<Spanish>Activar simulación de temperatura de munición</Spanish>
|
||||||
<German>Simulation der Munitionstemperatur aktivieren</German>
|
<German>Simulation der Munitionstemperatur aktivieren</German>
|
||||||
<Czech>Povolit simulaci teploty munice</Czech>
|
<Czech>Povolit simulaci teploty munice</Czech>
|
||||||
|
<Portuguese>Ativar simulação de temperatura de munição</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_ammoTemperatureEnabled_Description">
|
<Key ID="STR_ACE_Advanced_Ballistics_ammoTemperatureEnabled_Description">
|
||||||
<English>Muzzle velocity varies with ammo temperature</English>
|
<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>
|
<Spanish>La velocidad de salida varía con la temperatura de la munición</Spanish>
|
||||||
<German>Munitionstemperatur hat Einfluss auf die Mündungsgeschwindigkeit</German>
|
<German>Munitionstemperatur hat Einfluss auf die Mündungsgeschwindigkeit</German>
|
||||||
<Czech>Úsťová rychlost je závislá na teplotě munice</Czech>
|
<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>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_barrelLengthInfluenceEnabled_DisplayName">
|
<Key ID="STR_ACE_Advanced_Ballistics_barrelLengthInfluenceEnabled_DisplayName">
|
||||||
<English>Enable Barrel Length Simulation</English>
|
<English>Enable Barrel Length Simulation</English>
|
||||||
@ -136,6 +151,7 @@
|
|||||||
<Spanish>Habilitar la simulación de longitud del cañón</Spanish>
|
<Spanish>Habilitar la simulación de longitud del cañón</Spanish>
|
||||||
<German>Simulation der Lauflänge aktivieren</German>
|
<German>Simulation der Lauflänge aktivieren</German>
|
||||||
<Czech>Povolit simulaci délky hlavně</Czech>
|
<Czech>Povolit simulaci délky hlavně</Czech>
|
||||||
|
<Portuguese>Ativar a simulação de comprimento do cano</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_barrelLengthInfluenceEnabled_Description">
|
<Key ID="STR_ACE_Advanced_Ballistics_barrelLengthInfluenceEnabled_Description">
|
||||||
<English>Muzzle velocity varies with barrel length</English>
|
<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>
|
<Spanish>La velocidad de salidal varía con la longitud del cañón</Spanish>
|
||||||
<German>Lauflänge beeinflusst Mündungsgeschwindigkeit</German>
|
<German>Lauflänge beeinflusst Mündungsgeschwindigkeit</German>
|
||||||
<Czech>Úsťová rychlost je závislá na délce hlavně</Czech>
|
<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>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_bulletTraceEnabled_DisplayName">
|
<Key ID="STR_ACE_Advanced_Ballistics_bulletTraceEnabled_DisplayName">
|
||||||
<English>Enable Bullet Trace Effect</English>
|
<English>Enable Bullet Trace Effect</English>
|
||||||
@ -150,6 +167,7 @@
|
|||||||
<Spanish>Activar el efecto trazador de la bala</Spanish>
|
<Spanish>Activar el efecto trazador de la bala</Spanish>
|
||||||
<German>Geschossspureffekt aktivieren</German>
|
<German>Geschossspureffekt aktivieren</German>
|
||||||
<Czech>Povolit efekt trasírek</Czech>
|
<Czech>Povolit efekt trasírek</Czech>
|
||||||
|
<Portuguese>Ativa efeito traçante de projétil</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_bulletTraceEnabled_Description">
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_simulationInterval_DisplayName">
|
<Key ID="STR_ACE_Advanced_Ballistics_simulationInterval_DisplayName">
|
||||||
<English>Simulation Interval</English>
|
<English>Simulation Interval</English>
|
||||||
@ -164,6 +183,7 @@
|
|||||||
<Spanish>Intervalo de simulación</Spanish>
|
<Spanish>Intervalo de simulación</Spanish>
|
||||||
<German>Simulationsintervall</German>
|
<German>Simulationsintervall</German>
|
||||||
<Czech>Interval simulace</Czech>
|
<Czech>Interval simulace</Czech>
|
||||||
|
<Portuguese>Intervalo da simulação</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_simulationInterval_Description">
|
<Key ID="STR_ACE_Advanced_Ballistics_simulationInterval_Description">
|
||||||
<English>Defines the interval between every calculation step</English>
|
<English>Defines the interval between every calculation step</English>
|
||||||
@ -171,6 +191,7 @@
|
|||||||
<Spanish>Define el intervalo entre cada cálculo</Spanish>
|
<Spanish>Define el intervalo entre cada cálculo</Spanish>
|
||||||
<German>Legt das Intervall zwischen den Berechnungsschritten fest</German>
|
<German>Legt das Intervall zwischen den Berechnungsschritten fest</German>
|
||||||
<Czech>Určuje interval mezi každým výpočtem</Czech>
|
<Czech>Určuje interval mezi každým výpočtem</Czech>
|
||||||
|
<Portuguese>Define o intervalo entre cada cálculo</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_simulationRadius_DisplayName">
|
<Key ID="STR_ACE_Advanced_Ballistics_simulationRadius_DisplayName">
|
||||||
<English>Simulation Radius</English>
|
<English>Simulation Radius</English>
|
||||||
@ -178,6 +199,7 @@
|
|||||||
<Spanish>Radio de simulación</Spanish>
|
<Spanish>Radio de simulación</Spanish>
|
||||||
<German>Simulationsradius</German>
|
<German>Simulationsradius</German>
|
||||||
<Czech>Rozsah simulace</Czech>
|
<Czech>Rozsah simulace</Czech>
|
||||||
|
<Portuguese>Raio de simulação</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_simulationRadius_Description">
|
<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>
|
<English>Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles</English>
|
||||||
@ -185,11 +207,13 @@
|
|||||||
<Spanish>Define el radio alrededor del jugador (en metros) en el cual se aplica la balística avanzada a los proyectiles</Spanish>
|
<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>
|
<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>
|
<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>
|
||||||
<Key ID="STR_ACE_Advanced_Ballistics_Description">
|
<Key ID="STR_ACE_Advanced_Ballistics_Description">
|
||||||
<English></English>
|
<English>This module enables advanced ballistics simulation - meaning the trajectory of projectiles is influenced by variables like air temperature, atmospheric pressure, humidity, gravity, the type of ammunition and the weapon from which it was fired.</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>
|
<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>
|
<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>
|
</Key>
|
||||||
</Package>
|
</Package>
|
||||||
</Project>
|
</Project>
|
@ -20,7 +20,7 @@ class CfgWeapons {
|
|||||||
reloadTime = 0.01;
|
reloadTime = 0.01;
|
||||||
magazineReloadTime = 0.1;
|
magazineReloadTime = 0.1;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Manual Switching Of Flare Mode
|
// Manual Switching Of Flare Mode
|
||||||
class SmokeLauncher;
|
class SmokeLauncher;
|
||||||
class CMFlareLauncher: SmokeLauncher {
|
class CMFlareLauncher: SmokeLauncher {
|
||||||
@ -106,12 +106,14 @@ class CfgWeapons {
|
|||||||
|
|
||||||
class M134_minigun: MGunCore {
|
class M134_minigun: MGunCore {
|
||||||
class LowROF: Mode_FullAuto {
|
class LowROF: Mode_FullAuto {
|
||||||
reloadTime = 0.015; //0.03; same as above @todo
|
reloadTime = 0.03; //0.03; same as above @todo
|
||||||
dispersion = 0.006; //0.0023;
|
dispersion = 0.0064; //0.0023;
|
||||||
|
multiplier = 1;
|
||||||
};
|
};
|
||||||
class HighROF: LowROF {
|
class HighROF: LowROF {
|
||||||
reloadTime = 0.015; //0.03;
|
reloadTime = 0.02; //0.03;
|
||||||
dispersion = 0.006; //0.0023;
|
dispersion = 0.0064; //0.0023;
|
||||||
|
multiplier = 1;
|
||||||
};
|
};
|
||||||
class close: HighROF {};
|
class close: HighROF {};
|
||||||
class short: close {};
|
class short: close {};
|
||||||
|
@ -10,7 +10,7 @@ class CfgVehicles {
|
|||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 2;
|
priority = 2;
|
||||||
icon = PATHTOF(UI\ATRAG_Icon.paa);
|
icon = PATHTOF(UI\ATRAG_Icon.paa);
|
||||||
exceptions[] = {"notOnMap", "isNotInside"};
|
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -21,13 +21,10 @@ class CfgVehicles {
|
|||||||
author = "Ruthberg";
|
author = "Ruthberg";
|
||||||
scope = 2;
|
scope = 2;
|
||||||
scopeCurator = 2;
|
scopeCurator = 2;
|
||||||
displayName = "ATragMX";
|
displayName = CSTRING(Name);
|
||||||
vehicleClass = "Items";
|
vehicleClass = "Items";
|
||||||
class TransportItems {
|
class TransportItems {
|
||||||
class ACE_ATragMX {
|
MACRO_ADDITEM(ACE_ATragMX,1);
|
||||||
name = "ACE_ATragMX";
|
|
||||||
count = 1;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -57,6 +57,6 @@ GVAR(DialogPFH) = [{
|
|||||||
[_this select 1] call cba_fnc_removePerFrameHandler;
|
[_this select 1] call cba_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
__ctrlBackground ctrlSetText format [QUOTE(PATHTOF(UI\ATRAG_%1.paa)), ["N", "D"] select (call EFUNC(common,ambientBrightness))];
|
__ctrlBackground ctrlSetText format [QUOTE(PATHTOF(UI\ATRAG_%1.paa)), ["N", "D"] select (call EFUNC(common,ambientBrightness))];
|
||||||
}, 60, []] call cba_fnc_addPerFrameHandler;
|
}, 60, []] call CBA_fnc_addPerFrameHandler;
|
||||||
|
|
||||||
true
|
true
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
["ACE3 Equipment", QGVAR(ATragMXDialogKey), localize LSTRING(ATragMXDialogKey),
|
["ACE3 Equipment", QGVAR(ATragMXDialogKey), localize LSTRING(ATragMXDialogKey),
|
||||||
{
|
{
|
||||||
// Conditions: canInteract
|
// 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 {
|
if (GVAR(active)) exitWith {
|
||||||
closeDialog 0;
|
closeDialog 0;
|
||||||
false
|
false
|
||||||
@ -21,7 +21,7 @@ _conditonCode = {
|
|||||||
};
|
};
|
||||||
_toggleCode = {
|
_toggleCode = {
|
||||||
// Conditions: canInteract
|
// 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 {
|
if (GVAR(active)) exitWith {
|
||||||
closeDialog 0;
|
closeDialog 0;
|
||||||
};
|
};
|
||||||
|
@ -3,14 +3,17 @@ class CfgMagazines {
|
|||||||
class CA_Magazine;
|
class CA_Magazine;
|
||||||
class B_IR_Grenade: CA_Magazine {
|
class B_IR_Grenade: CA_Magazine {
|
||||||
ACE_Attachable = "B_IRStrobe";
|
ACE_Attachable = "B_IRStrobe";
|
||||||
|
model = QUOTE(PATHTOF(data\ace_IRStrobe.p3d));
|
||||||
};
|
};
|
||||||
|
|
||||||
class O_IR_Grenade: B_IR_Grenade {
|
class O_IR_Grenade: B_IR_Grenade {
|
||||||
ACE_Attachable = "O_IRStrobe";
|
ACE_Attachable = "O_IRStrobe";
|
||||||
|
model = QUOTE(PATHTOF(data\ace_IRStrobe.p3d));
|
||||||
};
|
};
|
||||||
|
|
||||||
class I_IR_Grenade: B_IR_Grenade {
|
class I_IR_Grenade: B_IR_Grenade {
|
||||||
ACE_Attachable = "I_IRStrobe";
|
ACE_Attachable = "I_IRStrobe";
|
||||||
|
model = QUOTE(PATHTOF(data\ace_IRStrobe.p3d));
|
||||||
};
|
};
|
||||||
|
|
||||||
class SmokeShell;
|
class SmokeShell;
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
class CfgWeapons {
|
class CfgWeapons {
|
||||||
class ACE_ItemCore;
|
class ACE_ItemCore;
|
||||||
class InventoryItem_Base_F;
|
class InventoryItem_Base_F;
|
||||||
@ -9,11 +8,11 @@ class CfgWeapons {
|
|||||||
scope = 2;
|
scope = 2;
|
||||||
displayName = CSTRING(IrStrobe_Name);
|
displayName = CSTRING(IrStrobe_Name);
|
||||||
descriptionShort = CSTRING(IrStrobe_Description);
|
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);
|
picture = PATHTOF(UI\irstrobe_item.paa);
|
||||||
|
|
||||||
class ItemInfo: InventoryItem_Base_F {
|
class ItemInfo: InventoryItem_Base_F {
|
||||||
mass = 1;
|
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 "CfgMagazines.hpp"
|
||||||
#include "CfgVehicles.hpp"
|
#include "CfgVehicles.hpp"
|
||||||
#include "CfgWeapons.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,10 +17,10 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_itemClassname", "_itemVehClass", "_onAtachText", "_selfAttachPosition", "_attachedItem", "_tempObject", "_actionID"];
|
private ["_itemVehClass", "_onAtachText", "_selfAttachPosition", "_attachedItem", "_tempObject", "_actionID", "_model"];
|
||||||
|
params ["_attachToVehicle","_unit","_args"];
|
||||||
PARAMS_3(_attachToVehicle,_unit,_args);
|
_args params [["_itemClassname","", [""]]];
|
||||||
_itemClassname = [_args, 0, ""] call CBA_fnc_defaultParam;
|
TRACE_3("params",_attachToVehicle,_unit,_itemClassname);
|
||||||
|
|
||||||
//Sanity Check (_unit has item in inventory, not over attach limit)
|
//Sanity Check (_unit has item in inventory, not over attach limit)
|
||||||
if ((_itemClassname == "") || {!(_this call FUNC(canAttach))}) exitWith {ERROR("Tried to attach, but check failed");};
|
if ((_itemClassname == "") || {!(_this call FUNC(canAttach))}) exitWith {ERROR("Tried to attach, but check failed");};
|
||||||
@ -47,44 +47,75 @@ if (_unit == _attachToVehicle) then { //Self Attachment
|
|||||||
_attachToVehicle setVariable [QGVAR(Objects), [_attachedItem], true];
|
_attachToVehicle setVariable [QGVAR(Objects), [_attachedItem], true];
|
||||||
_attachToVehicle setVariable [QGVAR(ItemNames), [_itemClassname], true];
|
_attachToVehicle setVariable [QGVAR(ItemNames), [_itemClassname], true];
|
||||||
} else {
|
} else {
|
||||||
GVAR(placeAction) = -1;
|
GVAR(placeAction) = PLACE_WAITING;
|
||||||
|
|
||||||
_tempObject = _itemVehClass createVehicleLocal [0,0,-10000];
|
|
||||||
_tempObject enableSimulationGlobal false;
|
|
||||||
|
|
||||||
[_unit, QGVAR(vehAttach), true] call EFUNC(common,setForceWalkStatus);
|
[_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);
|
[{[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(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR(placeAction) = PLACE_APPROVE;}] call EFUNC(common,AddActionEventHandler)];
|
||||||
// _unit setVariable [QGVAR(cancelActionEH), [_unit, "MenuBack", {true}, {GVAR(placeAction) = 0;}] 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";
|
private["_angle", "_dir", "_screenPos", "_realDistance", "_up", "_virtualPos", "_virtualPosASL", "_lineInterection"];
|
||||||
PARAMS_2(_args,_pfID);
|
params ["_args","_idPFH"];
|
||||||
EXPLODE_7_PVT(_args,_unit,_attachToVehicle,_itemClassname,_itemVehClass,_tempObject,_onAtachText,_actionID);
|
_args params ["_unit","_attachToVehicle","_itemClassname","_itemVehClass","_onAtachText","_actionID"];
|
||||||
|
|
||||||
if ((GVAR(placeAction) != -1) ||
|
_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 != ACE_player} ||
|
||||||
{!([_unit, _attachToVehicle, []] call EFUNC(common,canInteractWith))} ||
|
{!([_unit, _attachToVehicle, []] call EFUNC(common,canInteractWith))} ||
|
||||||
{!([_attachToVehicle, _unit, _itemClassname] call FUNC(canAttach))}) then {
|
{!([_attachToVehicle, _unit, _itemClassname] call FUNC(canAttach))}) then {
|
||||||
|
|
||||||
[_pfID] call CBA_fnc_removePerFrameHandler;
|
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||||
[_unit, QGVAR(vehAttach), false] call EFUNC(common,setForceWalkStatus);
|
[_unit, QGVAR(vehAttach), false] call EFUNC(common,setForceWalkStatus);
|
||||||
[] call EFUNC(interaction,hideMouseHint);
|
[] call EFUNC(interaction,hideMouseHint);
|
||||||
[_unit, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler);
|
[_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;
|
_unit removeAction _actionID;
|
||||||
|
|
||||||
if (GVAR(placeAction) == 1) then {
|
(QGVAR(virtualAmmo) call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
|
||||||
_startingPosition = _tempObject modelToWorldVisual [0,0,0];
|
|
||||||
[_unit, _attachToVehicle, _itemClassname, _itemVehClass, _onAtachText, _startingPosition] call FUNC(placeApprove);
|
if (GVAR(placeAction) == PLACE_APPROVE) then {
|
||||||
|
[_unit, _attachToVehicle, _itemClassname, _itemVehClass, _onAtachText, _virtualPos] call FUNC(placeApprove);
|
||||||
};
|
};
|
||||||
deleteVehicle _tempObject;
|
|
||||||
} else {
|
} 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;
|
||||||
};
|
};
|
||||||
|
@ -17,14 +17,14 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_3(_attachToVehicle,_player,_args);
|
private ["_attachLimit", "_attachedObjects","_playerPos"];
|
||||||
|
params ["_attachToVehicle","_player","_args"];
|
||||||
|
_args params [["_itemClassname","", [""]]];
|
||||||
|
TRACE_3("params",_attachToVehicle,_unit,_itemClassname);
|
||||||
|
|
||||||
private ["_itemName", "_attachLimit", "_attachedObjects","_playerPos"];
|
|
||||||
|
|
||||||
_itemName = [_args, 0, ""] call CBA_fnc_defaultParam;
|
|
||||||
_attachLimit = [6, 1] select (_player == _attachToVehicle);
|
_attachLimit = [6, 1] select (_player == _attachToVehicle);
|
||||||
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
|
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
|
||||||
|
|
||||||
_playerPos = (ACE_player modelToWorldVisual (ACE_player selectionPosition "pilot"));
|
_playerPos = (ACE_player modelToWorldVisual (ACE_player selectionPosition "pilot"));
|
||||||
|
|
||||||
(canStand _player) && {(_attachToVehicle distance _player) < 7} && {alive _attachToVehicle} && {(count _attachedObjects) < _attachLimit} && {_itemName in ((itemsWithMagazines _player) + [""])};
|
(canStand _player) && {(_attachToVehicle distance _player) < 7} && {alive _attachToVehicle} && {(count _attachedObjects) < _attachLimit} && {_itemClassname in ((itemsWithMagazines _player) + [""])};
|
||||||
|
@ -16,9 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_2(_attachToVehicle,_unit);
|
|
||||||
|
|
||||||
private ["_attachedObjects", "_inRange"];
|
private ["_attachedObjects", "_inRange"];
|
||||||
|
params ["_attachToVehicle", "_unit"];
|
||||||
|
TRACE_2("params",_attachToVehicle,_unit);
|
||||||
|
|
||||||
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
|
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
|
||||||
|
|
||||||
|
@ -16,15 +16,16 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_2(_attachToVehicle,_unit);
|
private ["_attachedObjects", "_attachedItems", "_itemDisplayName",
|
||||||
|
"_attachedObject", "_attachedIndex", "_itemName", "_minDistance",
|
||||||
private ["_attachedObjects", "_attachedItems", "_itemDisplayName"];
|
"_unitPos", "_objectPos"
|
||||||
|
];
|
||||||
|
params ["_attachToVehicle","_unit"],
|
||||||
|
TRACE_2("params",_attachToVehicle,_unit);
|
||||||
|
|
||||||
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
|
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
|
||||||
_attachedItems = _attachToVehicle getVariable [QGVAR(ItemNames), []];
|
_attachedItems = _attachToVehicle getVariable [QGVAR(ItemNames), []];
|
||||||
|
|
||||||
private ["_attachedObject", "_attachedIndex", "_itemName", "_minDistance", "_unitPos", "_objectPos"];
|
|
||||||
|
|
||||||
_attachedObject = objNull;
|
_attachedObject = objNull;
|
||||||
_attachedIndex = -1;
|
_attachedIndex = -1;
|
||||||
_itemName = "";
|
_itemName = "";
|
||||||
|
@ -18,7 +18,8 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_listed", "_actions", "_item", "_displayName", "_picture", "_action"];
|
private ["_listed", "_actions", "_item", "_displayName", "_picture", "_action"];
|
||||||
PARAMS_2(_target,_player);
|
params ["_target","_player"];
|
||||||
|
TRACE_2("params",_target,_player);
|
||||||
|
|
||||||
_listed = [];
|
_listed = [];
|
||||||
_actions = [];
|
_actions = [];
|
||||||
@ -30,7 +31,7 @@ _actions = [];
|
|||||||
if (getText (_item >> "ACE_Attachable") != "") then {
|
if (getText (_item >> "ACE_Attachable") != "") then {
|
||||||
_displayName = getText(_item >> "displayName");
|
_displayName = getText(_item >> "displayName");
|
||||||
_picture = getText(_item >> "picture");
|
_picture = getText(_item >> "picture");
|
||||||
_action = [_x, _displayName, _picture, {_this call FUNC(attach)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
|
_action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call EFUNC(common,execNextFrame)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
|
||||||
_actions pushBack [_action, [], _target];
|
_actions pushBack [_action, [], _target];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -43,7 +44,7 @@ _actions = [];
|
|||||||
if (getText (_item >> "ACE_Attachable") != "") then {
|
if (getText (_item >> "ACE_Attachable") != "") then {
|
||||||
_displayName = getText(_item >> "displayName");
|
_displayName = getText(_item >> "displayName");
|
||||||
_picture = getText(_item >> "picture");
|
_picture = getText(_item >> "picture");
|
||||||
_action = [_x, _displayName, _picture, {_this call FUNC(attach)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
|
_action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call EFUNC(common,execNextFrame)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
|
||||||
_actions pushBack [_action, [], _target];
|
_actions pushBack [_action, [], _target];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -25,9 +25,10 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#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);
|
params ["_unit", "_attachToVehicle", "_itemClassname", "_itemVehClass", "_onAtachText", "_startingPosition"];
|
||||||
|
TRACE_6("params",_unit,_attachToVehicle,_itemClassname,_itemVehClass,_onAtachText,_startingPosition);
|
||||||
|
|
||||||
_startingOffset = _attachToVehicle worldToModel _startingPosition;
|
_startingOffset = _attachToVehicle worldToModel _startingPosition;
|
||||||
|
|
||||||
@ -37,9 +38,6 @@ _closeInUnitVector = vectorNormalized (_startingOffset vectorFromTo [0,0,0]);
|
|||||||
_closeInMax = _startDistanceFromCenter;
|
_closeInMax = _startDistanceFromCenter;
|
||||||
_closeInMin = 0;
|
_closeInMin = 0;
|
||||||
|
|
||||||
//Delete Local Placement Object
|
|
||||||
deleteVehicle _setupObject;
|
|
||||||
|
|
||||||
while {(_closeInMax - _closeInMin) > 0.01} do {
|
while {(_closeInMax - _closeInMin) > 0.01} do {
|
||||||
_closeInDistance = (_closeInMax + _closeInMin) / 2;
|
_closeInDistance = (_closeInMax + _closeInMin) / 2;
|
||||||
// systemChat format ["Trying %1 from %2 start %3", _closeInDistance, [_closeInMax, _closeInMin], _startDistanceFromCenter];
|
// systemChat format ["Trying %1 from %2 start %3", _closeInDistance, [_closeInMax, _closeInMin], _startDistanceFromCenter];
|
||||||
|
@ -9,4 +9,8 @@
|
|||||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_ATTACH
|
#define DEBUG_SETTINGS DEBUG_SETTINGS_ATTACH
|
||||||
#endif
|
#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
|
## Maintainers
|
||||||
|
|
||||||
|
@ -225,5 +225,27 @@ class CfgVehicles {
|
|||||||
MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_API_Mag,4);
|
MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_API_Mag,4);
|
||||||
MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_AMAX_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;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
// by commy2
|
// by commy2
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_wall", "_paper"];
|
private "_paper";
|
||||||
|
|
||||||
_wall = _this select 0;
|
params ["_wall"];
|
||||||
|
|
||||||
if (local _wall) then {
|
if (local _wall) then {
|
||||||
_paper = "UserTexture_1x2_F" createVehicle position _wall;
|
_paper = "UserTexture_1x2_F" createVehicle position _wall;
|
||||||
|
@ -1598,6 +1598,7 @@
|
|||||||
<Spanish>[ACE] Caja de suministros de munición</Spanish>
|
<Spanish>[ACE] Caja de suministros de munición</Spanish>
|
||||||
<German>[ACE] Munitionskiste</German>
|
<German>[ACE] Munitionskiste</German>
|
||||||
<Czech>[ACE] Bedna s municí</Czech>
|
<Czech>[ACE] Bedna s municí</Czech>
|
||||||
|
<Portuguese>[ACE] Caixa com suprimentos de munição</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
</Package>
|
</Package>
|
||||||
</Project>
|
</Project>
|
@ -5,6 +5,13 @@ class ACE_Settings {
|
|||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
value = 1;
|
value = 1;
|
||||||
};
|
};
|
||||||
|
class GVAR(requireSurrender) {
|
||||||
|
displayName = CSTRING(ModuleSettings_requireSurrender_name);
|
||||||
|
description = CSTRING(ModuleSettings_requireSurrender_description);
|
||||||
|
typeName = "SCALAR";
|
||||||
|
values[] = {ECSTRING(common,Disabled), CSTRING(SurrenderOnly), CSTRING(SurrenderOrNoWeapon)};
|
||||||
|
value = 1;
|
||||||
|
};
|
||||||
class GVAR(allowSurrender) {
|
class GVAR(allowSurrender) {
|
||||||
displayName = CSTRING(ModuleSettings_allowSurrender_name);
|
displayName = CSTRING(ModuleSettings_allowSurrender_name);
|
||||||
description = CSTRING(ModuleSettings_allowSurrender_description);
|
description = CSTRING(ModuleSettings_allowSurrender_description);
|
||||||
|
@ -189,6 +189,26 @@ class CfgVehicles {
|
|||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
defaultValue = 1;
|
defaultValue = 1;
|
||||||
};
|
};
|
||||||
|
class requireSurrender {
|
||||||
|
displayName = CSTRING(ModuleSettings_allowSurrender_name);
|
||||||
|
description = CSTRING(ModuleSettings_allowSurrender_description);
|
||||||
|
typeName = "NUMBER";
|
||||||
|
class values {
|
||||||
|
class disable {
|
||||||
|
name = ECSTRING(common,No);
|
||||||
|
value = 0;
|
||||||
|
};
|
||||||
|
class Surrender {
|
||||||
|
name = CSTRING(SurrenderOnly);
|
||||||
|
value = 1;
|
||||||
|
default = 1;
|
||||||
|
};
|
||||||
|
class SurrenderOrNoWeapon {
|
||||||
|
name = CSTRING(SurrenderOrNoWeapon);
|
||||||
|
value = 2;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
class ModuleDescription: ModuleDescription {
|
class ModuleDescription: ModuleDescription {
|
||||||
description = CSTRING(ModuleSettings_Description);
|
description = CSTRING(ModuleSettings_Description);
|
||||||
|
@ -16,11 +16,11 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_2(_unit,_target);
|
params ["_unit", "_target"];
|
||||||
|
|
||||||
//Check sides, Player has cableTie, target is alive and not already handcuffed
|
//Check sides, Player has cableTie, target is alive and not already handcuffed
|
||||||
|
|
||||||
(GVAR(allowHandcuffOwnSide) || {(side _unit) != (side _target)}) &&
|
(GVAR(allowHandcuffOwnSide) || {(side _unit) != (side _target)}) &&
|
||||||
("ACE_CableTie" in (items _unit)) &&
|
("ACE_CableTie" in (items _unit)) &&
|
||||||
{alive _target} &&
|
{alive _target} &&
|
||||||
{!(_target getVariable [QGVAR(isHandcuffed), false])}
|
{!(_target getVariable [QGVAR(isHandcuffed), false])} &&
|
||||||
|
(GVAR(requireSurrender) == 0 || ((_target getVariable [QGVAR(isSurrendering), false]) || (currentWeapon _target == "" && GVAR(requireSurrender) == 2)))
|
||||||
|
@ -16,8 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_2(_unit,_target);
|
params ["_unit", "_target"];
|
||||||
|
|
||||||
//Alive, handcuffed, not being escored, and not unconscious
|
//Alive, handcuffed, not being escored, and not unconscious
|
||||||
|
|
||||||
(_target getVariable [QGVAR(isHandcuffed), false]) &&
|
(_target getVariable [QGVAR(isHandcuffed), false]) &&
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_2(_unit,_target);
|
params ["_unit", "_target"];
|
||||||
|
|
||||||
_target getVariable [QGVAR(isHandcuffed), false]
|
_target getVariable [QGVAR(isHandcuffed), false]
|
||||||
|| {_target getVariable [QGVAR(isSurrendering), false]}
|
|| {_target getVariable [QGVAR(isSurrendering), false]}
|
||||||
|
@ -18,8 +18,7 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_objects"];
|
private ["_objects"];
|
||||||
|
params ["_unit", "_target","_vehicle"];
|
||||||
PARAMS_3(_unit,_target,_vehicle);
|
|
||||||
|
|
||||||
if (isNull _target) then {
|
if (isNull _target) then {
|
||||||
_objects = attachedObjects _unit;
|
_objects = attachedObjects _unit;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_2(_unit,_target);
|
params ["_unit", "_target"];
|
||||||
|
|
||||||
//Unit is handcuffed and not currently being escorted
|
//Unit is handcuffed and not currently being escorted
|
||||||
_target getVariable [QGVAR(isHandcuffed), false] &&
|
_target getVariable [QGVAR(isHandcuffed), false] &&
|
||||||
|
@ -16,8 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_1(_unit);
|
params ["_unit", ["_target", objNull]];
|
||||||
DEFAULT_PARAM(1,_target,objNull);
|
|
||||||
|
|
||||||
if (isNull _target) then {
|
if (isNull _target) then {
|
||||||
_target = _unit getVariable [QGVAR(escortedUnit), objNull];
|
_target = _unit getVariable [QGVAR(escortedUnit), objNull];
|
||||||
|
@ -16,12 +16,12 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_2(_unit,_newSurrenderState);
|
|
||||||
|
|
||||||
private "_returnValue";
|
private "_returnValue";
|
||||||
|
|
||||||
|
params ["_unit", "_newSurrenderState"];
|
||||||
|
|
||||||
_returnValue = if (_newSurrenderState) then {
|
_returnValue = if (_newSurrenderState) then {
|
||||||
//no weapon equiped AND not currently surrendering and
|
//no weapon equiped AND not currently surrendering and
|
||||||
GVAR(allowSurrender) && {(currentWeapon _unit) == ""} && {!(_unit getVariable [QGVAR(isSurrendering), false])}
|
GVAR(allowSurrender) && {(currentWeapon _unit) == ""} && {!(_unit getVariable [QGVAR(isSurrendering), false])}
|
||||||
} else {
|
} else {
|
||||||
//is Surrendering
|
//is Surrendering
|
||||||
|
@ -18,6 +18,6 @@
|
|||||||
|
|
||||||
private ["_cargo"];
|
private ["_cargo"];
|
||||||
|
|
||||||
PARAMS_2(_player,_unit);
|
params ["_player", "_unit"];
|
||||||
|
|
||||||
((vehicle _unit) != _unit) && {_unit getVariable [QGVAR(isHandcuffed), false]}
|
((vehicle _unit) != _unit) && {_unit getVariable [QGVAR(isHandcuffed), false]}
|
||||||
|
@ -16,10 +16,11 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_2(_unit,_target);
|
|
||||||
|
|
||||||
_unit removeItem "ACE_CableTie";
|
params ["_unit", "_target"];
|
||||||
|
|
||||||
playSound3D [QUOTE(PATHTO_R(sounds\cable_tie_zipping.ogg)), objNull, false, (getPosASL _target), 1, 1, 10];
|
playSound3D [QUOTE(PATHTO_R(sounds\cable_tie_zipping.ogg)), objNull, false, (getPosASL _target), 1, 1, 10];
|
||||||
|
|
||||||
["SetHandcuffed", [_target], [_target, true]] call EFUNC(common,targetEvent);
|
["SetHandcuffed", [_target], [_target, true]] call EFUNC(common,targetEvent);
|
||||||
|
|
||||||
|
_unit removeItem "ACE_CableTie";
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_3(_unit,_target,_state);
|
params ["_unit", "_target","_state"];
|
||||||
|
|
||||||
if (_state) then {
|
if (_state) then {
|
||||||
if (_unit getVariable [QGVAR(isEscorting), false]) exitWith {};
|
if (_unit getVariable [QGVAR(isEscorting), false]) exitWith {};
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
private ["_weapon", "_listedItemClasses", "_actions", "_allGear"];
|
private ["_weapon", "_listedItemClasses", "_actions", "_allGear"];
|
||||||
|
|
||||||
PARAMS_2(_player,_unit);
|
PARAMS_2(_player,_unit);
|
||||||
|
params ["_player", "_unit"];
|
||||||
|
|
||||||
_weapon = currentWeapon _player;
|
_weapon = currentWeapon _player;
|
||||||
if (_weapon == primaryWeapon _player && {_weapon != ""}) then {
|
if (_weapon == primaryWeapon _player && {_weapon != ""}) then {
|
||||||
|
@ -17,9 +17,10 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_3(_unit,_target,_vehicle);
|
|
||||||
private "_objects";
|
private "_objects";
|
||||||
|
|
||||||
|
params ["_unit", "_target","_vehicle"];
|
||||||
|
|
||||||
if (isNull _target) then {
|
if (isNull _target) then {
|
||||||
_objects = attachedObjects _unit;
|
_objects = attachedObjects _unit;
|
||||||
_objects = [_objects, {_this getVariable [QGVAR(isHandcuffed), false]}] call EFUNC(common,filter);
|
_objects = [_objects, {_this getVariable [QGVAR(isHandcuffed), false]}] call EFUNC(common,filter);
|
||||||
|
@ -15,6 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_2(_unit,_target);
|
params ["_unit", "_target"];
|
||||||
|
|
||||||
["SetHandcuffed", [_target], [_target, false]] call EFUNC(common,targetEvent);
|
["SetHandcuffed", [_target], [_target, false]] call EFUNC(common,targetEvent);
|
||||||
|
@ -16,6 +16,6 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_2(_unit,_target);
|
params ["_unit", "_target"];
|
||||||
|
|
||||||
["MoveOutCaptive", [_target], [_target]] call EFUNC(common,targetEvent);
|
["MoveOutCaptive", [_target], [_target]] call EFUNC(common,targetEvent);
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_3(_vehicle,_dontcare,_unit);
|
params ["_vehicle", "_dontcare","_unit"];
|
||||||
|
|
||||||
if (local _unit) then {
|
if (local _unit) then {
|
||||||
if (_unit getVariable [QGVAR(isEscorting), false]) then {
|
if (_unit getVariable [QGVAR(isEscorting), false]) then {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_3(_vehicle,_dontcare,_unit);
|
params ["_vehicle", "_dontcare","_unit"];
|
||||||
|
|
||||||
if ((local _unit) && {_unit getVariable [QGVAR(isHandcuffed), false]}) then {
|
if ((local _unit) && {_unit getVariable [QGVAR(isHandcuffed), false]}) then {
|
||||||
private ["_cargoIndex"];
|
private ["_cargoIndex"];
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_1(_oldUnit);
|
params ["_oldUnit"];
|
||||||
|
|
||||||
if (!local _oldUnit) exitWith {};
|
if (!local _oldUnit) exitWith {};
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
EXPLODE_2_PVT(_this,_unit,_isUnconc);
|
params ["_unit","_isUnconc"];
|
||||||
|
|
||||||
if (!local _unit) exitWith {};
|
if (!local _unit) exitWith {};
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_2(_newUnit,_oldUnit);
|
params ["_newUnit","_oldUnit"];
|
||||||
|
|
||||||
//set showHUD based on new unit status:
|
//set showHUD based on new unit status:
|
||||||
if ((_newUnit getVariable [QGVAR(isHandcuffed), false]) || {_newUnit getVariable [QGVAR(isSurrendering), false]}) then {
|
if ((_newUnit getVariable [QGVAR(isHandcuffed), false]) || {_newUnit getVariable [QGVAR(isSurrendering), false]}) then {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_2(_unit,_dead);
|
params ["_unit","_dead"];
|
||||||
|
|
||||||
if (!local _unit) exitWith {};
|
if (!local _unit) exitWith {};
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_1(_unit);
|
params ["_unit"];
|
||||||
|
|
||||||
// prevent players from throwing grenades (added to all units)
|
// prevent players from throwing grenades (added to all units)
|
||||||
[_unit, "Throw", {((_this select 1) getVariable [QGVAR(isHandcuffed), false]) || {(_this select 1) getVariable [QGVAR(isSurrendering), false]}}, {}] call EFUNC(common,addActionEventhandler);
|
[_unit, "Throw", {((_this select 1) getVariable [QGVAR(isHandcuffed), false]) || {(_this select 1) getVariable [QGVAR(isSurrendering), false]}}, {}] call EFUNC(common,addActionEventhandler);
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_2(_unit,_zeusIsOpen);
|
params ["_unit","_zeusIsOpen"];
|
||||||
|
|
||||||
//set showHUD based on unit status:
|
//set showHUD based on unit status:
|
||||||
if (!_zeusIsOpen) then {
|
if (!_zeusIsOpen) then {
|
||||||
|
@ -13,7 +13,8 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_1(_logic);
|
params ["_logic"];
|
||||||
|
|
||||||
[_logic, QGVAR(allowHandcuffOwnSide), "allowHandcuffOwnSide"] call EFUNC(common,readSettingFromModule);
|
[_logic, QGVAR(allowHandcuffOwnSide), "allowHandcuffOwnSide"] call EFUNC(common,readSettingFromModule);
|
||||||
[_logic, QGVAR(allowSurrender), "allowSurrender"] call EFUNC(common,readSettingFromModule);
|
[_logic, QGVAR(allowSurrender), "allowSurrender"] call EFUNC(common,readSettingFromModule);
|
||||||
|
[_logic, QGVAR(requireSurrender), "requireSurrender"] call EFUNC(common,readSettingFromModule);
|
||||||
|
@ -17,9 +17,10 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_3(_logic,_units,_activated);
|
|
||||||
private ["_bisMouseOver", "_mouseOverObject"];
|
private ["_bisMouseOver", "_mouseOverObject"];
|
||||||
|
|
||||||
|
params ["_logic", "_units", "_activated"];
|
||||||
|
|
||||||
if (!_activated) exitWith {};
|
if (!_activated) exitWith {};
|
||||||
|
|
||||||
if (local _logic) then {
|
if (local _logic) then {
|
||||||
|
@ -16,8 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_2(_unit,_state);
|
params ["_unit","_state"];
|
||||||
|
|
||||||
|
|
||||||
if (!local _unit) exitwith {
|
if (!local _unit) exitwith {
|
||||||
ERROR("running setHandcuffed on remote unit");
|
ERROR("running setHandcuffed on remote unit");
|
||||||
@ -43,7 +42,7 @@ if (_state) then {
|
|||||||
|
|
||||||
// fix anim on mission start (should work on dedicated servers)
|
// fix anim on mission start (should work on dedicated servers)
|
||||||
[{
|
[{
|
||||||
PARAMS_1(_unit);
|
params ["_unit"];
|
||||||
if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then {
|
if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then {
|
||||||
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
||||||
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);
|
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);
|
||||||
|
@ -16,8 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_2(_unit,_state);
|
params ["_unit","_state"];
|
||||||
|
|
||||||
|
|
||||||
if (!local _unit) exitwith {
|
if (!local _unit) exitwith {
|
||||||
ERROR("running surrender on remote unit");
|
ERROR("running surrender on remote unit");
|
||||||
|
@ -16,10 +16,10 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_2(_target,_vehicle);
|
|
||||||
|
|
||||||
private ["_cargoIndex"];
|
private ["_cargoIndex"];
|
||||||
|
|
||||||
|
params ["_target","_vehicle"];
|
||||||
|
|
||||||
_target moveInCargo _vehicle;
|
_target moveInCargo _vehicle;
|
||||||
_target assignAsCargo _vehicle;
|
_target assignAsCargo _vehicle;
|
||||||
_cargoIndex = _vehicle getCargoIndex _target;
|
_cargoIndex = _vehicle getCargoIndex _target;
|
||||||
|
@ -15,8 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_1(_unit);
|
params ["_unit"];
|
||||||
|
|
||||||
_unit setVariable [QGVAR(CargoIndex), -1, true];
|
_unit setVariable [QGVAR(CargoIndex), -1, true];
|
||||||
|
|
||||||
moveOut _unit;
|
moveOut _unit;
|
||||||
|
@ -163,6 +163,7 @@
|
|||||||
<Spanish>Hacer que la unidad se rinda</Spanish>
|
<Spanish>Hacer que la unidad se rinda</Spanish>
|
||||||
<German>Einheit kapitulieren lassen</German>
|
<German>Einheit kapitulieren lassen</German>
|
||||||
<Czech>Vzdávající se jednotka</Czech>
|
<Czech>Vzdávající se jednotka</Czech>
|
||||||
|
<Portuguese>Fazer unidade se render</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Captives_ModuleSurrender_Description">
|
<Key ID="STR_ACE_Captives_ModuleSurrender_Description">
|
||||||
<English>Sync a unit to make them surrender.<br />Source: ace_captives</English>
|
<English>Sync a unit to make them surrender.<br />Source: ace_captives</English>
|
||||||
@ -170,42 +171,67 @@
|
|||||||
<Spanish>Sincroniza una unidad para hacer que se rinda.<br />Fuente: ace_captives</Spanish>
|
<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>
|
<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>
|
<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>
|
||||||
<Key ID="STR_ACE_Captives_ModuleSettings_DisplayName">
|
<Key ID="STR_ACE_Captives_ModuleSettings_DisplayName">
|
||||||
<English>Captives Settings</English>
|
<English>Captives Settings</English>
|
||||||
<Polish>Ustawienia więźniów</Polish>
|
<Polish>Ustawienia więźniów</Polish>
|
||||||
<Spanish>Ajustes de prisioneros</Spanish>
|
<Spanish>Ajustes de prisioneros</Spanish>
|
||||||
<Czech>Nastavení zajatce</Czech>
|
<Czech>Nastavení zajatce</Czech>
|
||||||
|
<German>Gefangenen-Einstellungen</German>
|
||||||
|
<Portuguese>Ajustes de prisioneiros</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Captives_ModuleSettings_Description">
|
<Key ID="STR_ACE_Captives_ModuleSettings_Description">
|
||||||
<English>Controls settings for surrender and cable ties</English>
|
<English>Controls settings for surrender and cable ties</English>
|
||||||
<Polish>Moduł ten kontroluje ustawienia kapitulacji oraz opasek zaciskowych</Polish>
|
<Polish>Moduł ten kontroluje ustawienia kapitulacji oraz opasek zaciskowych</Polish>
|
||||||
<Spanish>Ajustes de control para rendición y precintos</Spanish>
|
<Spanish>Ajustes de control para rendición y precintos</Spanish>
|
||||||
<Czech>Toto kontroluje nastavení kapitulace a pout</Czech>
|
<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>
|
||||||
<Key ID="STR_ACE_Captives_ModuleSettings_handcuffSide_name">
|
<Key ID="STR_ACE_Captives_ModuleSettings_handcuffSide_name">
|
||||||
<English>Can handcuff own side</English>
|
<English>Can handcuff own side</English>
|
||||||
<Polish>Skuwanie sojuszników</Polish>
|
<Polish>Skuwanie sojuszników</Polish>
|
||||||
<Spanish>Se puede esposar el bando propio</Spanish>
|
<Spanish>Se puede esposar el bando propio</Spanish>
|
||||||
<Czech>Může spoutat spolubojovníky</Czech>
|
<Czech>Může spoutat spolubojovníky</Czech>
|
||||||
|
<German>Kann Teamkollegen fesseln</German>
|
||||||
|
<Portuguese>Pode algemar o próprio lado</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Captives_ModuleSettings_handcuffSide_description">
|
<Key ID="STR_ACE_Captives_ModuleSettings_handcuffSide_description">
|
||||||
<English>Can players cabletie units on their own side</English>
|
<English>Can players cabletie units on their own side</English>
|
||||||
<Polish>Czy gracze mogą skuwać sojuszników?</Polish>
|
<Polish>Czy gracze mogą skuwać sojuszników?</Polish>
|
||||||
<Spanish>Pueden los jugadores esposar unidades en su propio bando</Spanish>
|
<Spanish>Pueden los jugadores esposar unidades en su propio bando</Spanish>
|
||||||
<Czech>Mohou hráči spoutat jednotky na své straně</Czech>
|
<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>
|
||||||
<Key ID="STR_ACE_Captives_ModuleSettings_allowSurrender_name">
|
<Key ID="STR_ACE_Captives_ModuleSettings_allowSurrender_name">
|
||||||
<English>Allow surrendering</English>
|
<English>Allow surrendering</English>
|
||||||
<Polish>Pozwól kapitulować</Polish>
|
<Polish>Pozwól kapitulować</Polish>
|
||||||
<Spanish>Permitir rendición</Spanish>
|
<Spanish>Permitir rendición</Spanish>
|
||||||
<Czech>Povolit vzdávání</Czech>
|
<Czech>Povolit vzdávání</Czech>
|
||||||
|
<German>Kapitulation erlauben</German>
|
||||||
|
<Portuguese>Permite rendição</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Captives_ModuleSettings_allowSurrender_description">
|
<Key ID="STR_ACE_Captives_ModuleSettings_allowSurrender_description">
|
||||||
<English>Players can surrender after holstering their weapon</English>
|
<English>Players can surrender after holstering their weapon</English>
|
||||||
<Polish>Gracze mogą skapitulować po schowaniu swojej broni do kabury</Polish>
|
<Polish>Gracze mogą skapitulować po schowaniu swojej broni do kabury</Polish>
|
||||||
<Spanish>Los jugadores pueden rendirse después de enfundar su arma</Spanish>
|
<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>
|
<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>
|
||||||
|
<Key ID="STR_ACE_Captives_ModuleSettings_requireSurrender_name">
|
||||||
|
<English>Require surrendering</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Captives_ModuleSettings_requireSurrender_description">
|
||||||
|
<English>Require Players to surrender before they can be arrested</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Captives_SurrenderOnly">
|
||||||
|
<English>Surrendering only</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Captives_SurrenderOrNoWeapon">
|
||||||
|
<English>Surrendering or No weapon</English>
|
||||||
</Key>
|
</Key>
|
||||||
</Package>
|
</Package>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -1,112 +1,109 @@
|
|||||||
class CfgVehicles {
|
class CfgVehicles {
|
||||||
/*class Man;
|
/*class Man;
|
||||||
class CAManBase: Man {
|
class CAManBase: Man {
|
||||||
// @todo
|
// @todo
|
||||||
class UserActions {
|
class UserActions {
|
||||||
class ACE_Fire {
|
class ACE_Fire {
|
||||||
displayName = "";
|
displayName = "";
|
||||||
priority = -99;
|
priority = -99;
|
||||||
available = 1;
|
available = 1;
|
||||||
radius = 2.5;
|
radius = 2.5;
|
||||||
radiusView = 0;
|
radiusView = 0;
|
||||||
position = "";
|
position = "";
|
||||||
showWindow = 0;
|
showWindow = 0;
|
||||||
showIn3D = 0;
|
showIn3D = 0;
|
||||||
onlyForPlayer = 1;
|
onlyForPlayer = 1;
|
||||||
shortcut = "DefaultAction";
|
shortcut = "DefaultAction";
|
||||||
condition = QUOTE(call GVAR(UserActionFireCondition));
|
condition = QUOTE(call GVAR(UserActionFireCondition));
|
||||||
statement = QUOTE(call GVAR(UserActionFire));
|
statement = QUOTE(call GVAR(UserActionFire));
|
||||||
userActionID = 100;
|
userActionID = 100;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};*/
|
};*/
|
||||||
|
|
||||||
// += needs a non inherited entry in that class, otherwise it simply overwrites
|
// += needs a non inherited entry in that class, otherwise it simply overwrites
|
||||||
//#include <DefaultItems.hpp>
|
//#include <DefaultItems.hpp>
|
||||||
class Logic;
|
class Logic;
|
||||||
class Module_F: Logic {
|
class Module_F: Logic {
|
||||||
class ModuleDescription;
|
class ModuleDescription;
|
||||||
};
|
};
|
||||||
class ACE_Module: Module_F {};
|
class ACE_Module: Module_F {};
|
||||||
class ACE_ModuleCheckPBOs: ACE_Module {
|
class ACE_ModuleCheckPBOs: ACE_Module {
|
||||||
author = CSTRING(ACETeam);
|
author = CSTRING(ACETeam);
|
||||||
category = "ACE";
|
category = "ACE";
|
||||||
displayName = CSTRING(CheckPBO_DisplayName);
|
displayName = CSTRING(CheckPBO_DisplayName);
|
||||||
function = QFUNC(moduleCheckPBOs);
|
function = QFUNC(moduleCheckPBOs);
|
||||||
scope = 2;
|
scope = 2;
|
||||||
isGlobal = 1;
|
isGlobal = 1;
|
||||||
icon = QUOTE(PATHTOF(UI\Icon_Module_CheckPBO_ca.paa));
|
icon = QUOTE(PATHTOF(UI\Icon_Module_CheckPBO_ca.paa));
|
||||||
class Arguments {
|
class Arguments {
|
||||||
class Action {
|
class Action {
|
||||||
displayName = CSTRING(CheckPBO_Action_DisplayName);
|
displayName = CSTRING(CheckPBO_Action_DisplayName);
|
||||||
description = CSTRING(CheckPBO_Action_Description);
|
description = CSTRING(CheckPBO_Action_Description);
|
||||||
typeName = "NUMBER";
|
typeName = "NUMBER";
|
||||||
class values {
|
class values {
|
||||||
class WarnOnce {
|
class WarnOnce {
|
||||||
default = 1;
|
default = 1;
|
||||||
name = CSTRING(CheckPBO_Action_WarnOnce);
|
name = CSTRING(CheckPBO_Action_WarnOnce);
|
||||||
value = 0;
|
value = 0;
|
||||||
};
|
};
|
||||||
class Warn {
|
class Warn {
|
||||||
name = CSTRING(CheckPBO_Action_WarnPerm);
|
name = CSTRING(CheckPBO_Action_WarnPerm);
|
||||||
value = 1;
|
value = 1;
|
||||||
};
|
};
|
||||||
class Kick {
|
class Kick {
|
||||||
name = CSTRING(CheckPBO_Action_Kick);
|
name = CSTRING(CheckPBO_Action_Kick);
|
||||||
value = 2;
|
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 ModuleDescription: ModuleDescription {
|
||||||
class CheckAll {
|
description = CSTRING(CheckPBO_Description);
|
||||||
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 ACE_ModuleLSDVehicles: ACE_Module {
|
class ACE_ModuleLSDVehicles: ACE_Module {
|
||||||
author = CSTRING(ACETeam);
|
author = CSTRING(ACETeam);
|
||||||
category = "ACE";
|
category = "ACE";
|
||||||
displayName = CSTRING(LSDVehicles_DisplayName);
|
displayName = CSTRING(LSDVehicles_DisplayName);
|
||||||
function = "ACE_Common_fnc_moduleLSDVehicles";
|
function = "ACE_Common_fnc_moduleLSDVehicles";
|
||||||
scope = 2;
|
scope = 2;
|
||||||
icon = QUOTE(PATHTOF(UI\Icon_Module_LSD_ca.paa));
|
icon = QUOTE(PATHTOF(UI\Icon_Module_LSD_ca.paa));
|
||||||
isGlobal = 1;
|
isGlobal = 1;
|
||||||
class Arguments {
|
class Arguments {};
|
||||||
|
class ModuleDescription: ModuleDescription {
|
||||||
|
description = CSTRING(LSDVehicles_Description);
|
||||||
|
sync[] = {"AnyVehicle"};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
class ModuleDescription: ModuleDescription {
|
|
||||||
description = CSTRING(LSDVehicles_Description);
|
class Box_NATO_Support_F;
|
||||||
sync[] = {"AnyVehicle"};
|
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 Item_Base_F;
|
||||||
class ACE_bananaItem: Item_Base_F {
|
class ACE_bananaItem: Item_Base_F {
|
||||||
@ -115,13 +112,32 @@ class CfgVehicles {
|
|||||||
displayName = CSTRING(bananaDisplayName);
|
displayName = CSTRING(bananaDisplayName);
|
||||||
author = CSTRING(ACETeam);
|
author = CSTRING(ACETeam);
|
||||||
vehicleClass = "Items";
|
vehicleClass = "Items";
|
||||||
class TransportItems
|
class TransportItems {
|
||||||
{
|
MACRO_ADDITEM(ACE_banana,1);
|
||||||
class ACE_banana
|
|
||||||
{
|
|
||||||
name = "ACE_banana";
|
|
||||||
count = 1;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class Land_HelipadEmpty_F;
|
||||||
|
class ACE_LogicDummy: Land_HelipadEmpty_F {
|
||||||
|
scope = 1;
|
||||||
|
SLX_XEH_DISABLED = 1;
|
||||||
|
author = CSTRING(ACETeam);
|
||||||
|
class EventHandlers {
|
||||||
|
init = "(_this select 0) enableSimulation false";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class Bicycle;
|
||||||
|
class ACE_Headbug_Fix: Bicycle {
|
||||||
|
scope = 1;
|
||||||
|
side = 3;
|
||||||
|
model = PATHTOF(data\ACE_HeadBanger.p3d);
|
||||||
|
//model = QPATHTO_M(ACE_HeadBanger.p3d);
|
||||||
|
author = CSTRING(ACETeam);
|
||||||
|
displayName = " ";
|
||||||
|
soundEngine[] = {"", 20, 0.875};
|
||||||
|
soundEnviron[] = {"", 25, 0.925};
|
||||||
|
isBicycle = 1;
|
||||||
|
XEH_DISABLED;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
//Singe PFEH to handle execNextFrame and waitAndExec:
|
//Singe PFEH to handle execNextFrame and waitAndExec:
|
||||||
[{
|
[{
|
||||||
private ["_entry"];
|
private ["_entry"];
|
||||||
|
|
||||||
//Handle the waitAndExec array:
|
//Handle the waitAndExec array:
|
||||||
while {((count GVAR(waitAndExecArray)) > 0) && {((GVAR(waitAndExecArray) select 0) select 0) <= ACE_Time}} do {
|
while {((count GVAR(waitAndExecArray)) > 0) && {((GVAR(waitAndExecArray) select 0) select 0) <= ACE_Time}} do {
|
||||||
_entry = GVAR(waitAndExecArray) deleteAt 0;
|
_entry = GVAR(waitAndExecArray) deleteAt 0;
|
||||||
@ -37,6 +37,21 @@
|
|||||||
};
|
};
|
||||||
}] call FUNC(addEventhandler);
|
}] call FUNC(addEventhandler);
|
||||||
|
|
||||||
|
|
||||||
|
["HeadbugFixUsed", {
|
||||||
|
PARAMS_2(_profileName,_animation);
|
||||||
|
diag_log text format ["[ACE] Headbug Used: Name: %1, Animation: %2", _profileName, _animation];
|
||||||
|
}] 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);
|
["fixCollision", DFUNC(fixCollision)] call FUNC(addEventhandler);
|
||||||
["fixFloating", DFUNC(fixFloating)] call FUNC(addEventhandler);
|
["fixFloating", DFUNC(fixFloating)] call FUNC(addEventhandler);
|
||||||
["fixPosition", DFUNC(fixPosition)] call FUNC(addEventhandler);
|
["fixPosition", DFUNC(fixPosition)] call FUNC(addEventhandler);
|
||||||
@ -56,6 +71,10 @@
|
|||||||
["setFuel", {(_this select 0) setFuel (_this select 1)}] call FUNC(addEventhandler);
|
["setFuel", {(_this select 0) setFuel (_this select 1)}] call FUNC(addEventhandler);
|
||||||
["setSpeaker", {(_this select 0) setSpeaker (_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
|
// hack to get PFH to work in briefing
|
||||||
[QGVAR(onBriefingPFH), "onEachFrame", {
|
[QGVAR(onBriefingPFH), "onEachFrame", {
|
||||||
if (ACE_time > 0) exitWith {
|
if (ACE_time > 0) exitWith {
|
||||||
@ -99,8 +118,9 @@ if(!isServer) then {
|
|||||||
};
|
};
|
||||||
["SEH", FUNC(_handleSyncedEvent)] call FUNC(addEventHandler);
|
["SEH", FUNC(_handleSyncedEvent)] call FUNC(addEventHandler);
|
||||||
["SEH_s", FUNC(_handleRequestSyncedEvent)] call FUNC(addEventHandler);
|
["SEH_s", FUNC(_handleRequestSyncedEvent)] call FUNC(addEventHandler);
|
||||||
[FUNC(syncedEventPFH), 0.5, []] call cba_fnc_addPerFrameHandler;
|
if (isServer) then {
|
||||||
|
[FUNC(syncedEventPFH), 0.5, []] call CBA_fnc_addPerFrameHandler;
|
||||||
|
};
|
||||||
call FUNC(checkFiles);
|
call FUNC(checkFiles);
|
||||||
|
|
||||||
|
|
||||||
@ -137,7 +157,16 @@ call FUNC(checkFiles);
|
|||||||
//Event that settings are safe to use:
|
//Event that settings are safe to use:
|
||||||
["SettingsInitialized", []] call FUNC(localEvent);
|
["SettingsInitialized", []] call FUNC(localEvent);
|
||||||
|
|
||||||
}, 0, [false]] call cba_fnc_addPerFrameHandler;
|
}, 0, [false]] call CBA_fnc_addPerFrameHandler;
|
||||||
|
|
||||||
|
|
||||||
|
["SettingsInitialized", {
|
||||||
|
[
|
||||||
|
GVAR(checkPBOsAction),
|
||||||
|
GVAR(checkPBOsCheckAll),
|
||||||
|
call compile GVAR(checkPBOsWhitelist)
|
||||||
|
] call FUNC(checkPBOs)
|
||||||
|
}] call FUNC(addEventHandler);
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@ -252,7 +281,7 @@ GVAR(OldPlayerWeapon) = currentWeapon ACE_player;
|
|||||||
["playerWeaponChanged", [ACE_player, _newPlayerWeapon]] call FUNC(localEvent);
|
["playerWeaponChanged", [ACE_player, _newPlayerWeapon]] call FUNC(localEvent);
|
||||||
};
|
};
|
||||||
|
|
||||||
}, 0, []] call cba_fnc_addPerFrameHandler;
|
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||||
|
|
||||||
|
|
||||||
// PFH to raise camera created event. Only works on these cams by BI.
|
// PFH to raise camera created event. Only works on these cams by BI.
|
||||||
@ -277,7 +306,7 @@ GVAR(OldIsCamera) = false;
|
|||||||
["activeCameraChanged", [ACE_player, _isCamera]] call FUNC(localEvent);
|
["activeCameraChanged", [ACE_player, _isCamera]] call FUNC(localEvent);
|
||||||
};
|
};
|
||||||
|
|
||||||
}, 1, []] call cba_fnc_addPerFrameHandler; // feel free to decrease the sleep ACE_time if you need it.
|
}, 1, []] call CBA_fnc_addPerFrameHandler; // feel free to decrease the sleep ACE_time if you need it.
|
||||||
|
|
||||||
|
|
||||||
[QGVAR(StateArrested),false,true,QUOTE(ADDON)] call FUNC(defineVariable);
|
[QGVAR(StateArrested),false,true,QUOTE(ADDON)] call FUNC(defineVariable);
|
||||||
@ -305,21 +334,21 @@ if(isMultiplayer && { ACE_time > 0 || isNull player } ) then {
|
|||||||
["PlayerJip", [player] ] call FUNC(localEvent);
|
["PlayerJip", [player] ] call FUNC(localEvent);
|
||||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
}, 0, []] call cba_fnc_addPerFrameHandler;
|
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
["SettingsInitialized", {
|
|
||||||
[
|
|
||||||
GVAR(checkPBOsAction),
|
|
||||||
GVAR(checkPBOsCheckAll),
|
|
||||||
call compile GVAR(checkPBOsWhitelist)
|
|
||||||
] call FUNC(checkPBOs)
|
|
||||||
}] call FUNC(addEventHandler);
|
|
||||||
|
|
||||||
//Device Handler:
|
//Device Handler:
|
||||||
GVAR(deviceKeyHandlingArray) = [];
|
GVAR(deviceKeyHandlingArray) = [];
|
||||||
GVAR(deviceKeyCurrentIndex) = -1;
|
GVAR(deviceKeyCurrentIndex) = -1;
|
||||||
|
|
||||||
|
// Register localizations for the Keybinding categories
|
||||||
|
["ACE3 Equipment", localize LSTRING(ACEKeybindCategoryEquipment)] call cba_fnc_registerKeybindModPrettyName;
|
||||||
|
["ACE3 Common", localize LSTRING(ACEKeybindCategoryCommon)] call cba_fnc_registerKeybindModPrettyName;
|
||||||
|
["ACE3 Weapons", localize LSTRING(ACEKeybindCategoryWeapons)] call cba_fnc_registerKeybindModPrettyName;
|
||||||
|
["ACE3 Movement", localize LSTRING(ACEKeybindCategoryMovement)] call cba_fnc_registerKeybindModPrettyName;
|
||||||
|
["ACE3 Scope Adjustment", localize LSTRING(ACEKeybindCategoryScopeAdjustment)] call cba_fnc_registerKeybindModPrettyName;
|
||||||
|
["ACE3 Vehicles", localize LSTRING(ACEKeybindCategoryVehicles)] call cba_fnc_registerKeybindModPrettyName;
|
||||||
|
|
||||||
["ACE3 Equipment", QGVAR(openDevice), (localize "STR_ACE_Common_toggleHandheldDevice"),
|
["ACE3 Equipment", QGVAR(openDevice), (localize "STR_ACE_Common_toggleHandheldDevice"),
|
||||||
{
|
{
|
||||||
[] call FUNC(deviceKeyFindValidIndex);
|
[] call FUNC(deviceKeyFindValidIndex);
|
||||||
|
@ -11,7 +11,6 @@ PREP(addCanInteractWithCondition);
|
|||||||
PREP(addLineToDebugDraw);
|
PREP(addLineToDebugDraw);
|
||||||
PREP(addSetting);
|
PREP(addSetting);
|
||||||
PREP(addToInventory);
|
PREP(addToInventory);
|
||||||
PREP(adminKick);
|
|
||||||
PREP(ambientBrightness);
|
PREP(ambientBrightness);
|
||||||
PREP(applyForceWalkStatus);
|
PREP(applyForceWalkStatus);
|
||||||
PREP(ASLToPosition);
|
PREP(ASLToPosition);
|
||||||
@ -70,7 +69,11 @@ PREP(getFirstTerrainIntersection);
|
|||||||
PREP(getForceWalkStatus);
|
PREP(getForceWalkStatus);
|
||||||
PREP(getGunner);
|
PREP(getGunner);
|
||||||
PREP(getInPosition);
|
PREP(getInPosition);
|
||||||
|
PREP(getMapGridData);
|
||||||
|
PREP(getMapGridFromPos);
|
||||||
|
PREP(getMapPosFromGrid);
|
||||||
PREP(getMarkerType);
|
PREP(getMarkerType);
|
||||||
|
PREP(getMGRSdata);
|
||||||
PREP(getName);
|
PREP(getName);
|
||||||
PREP(getNumberFromMissionSQM);
|
PREP(getNumberFromMissionSQM);
|
||||||
PREP(getNumberMagazinesIn);
|
PREP(getNumberMagazinesIn);
|
||||||
@ -103,6 +106,8 @@ PREP(goKneeling);
|
|||||||
PREP(hadamardProduct);
|
PREP(hadamardProduct);
|
||||||
PREP(hasItem);
|
PREP(hasItem);
|
||||||
PREP(hasMagazine);
|
PREP(hasMagazine);
|
||||||
|
PREP(headBugFix);
|
||||||
|
PREP(hideUnit);
|
||||||
PREP(inheritsFrom);
|
PREP(inheritsFrom);
|
||||||
PREP(insertionSort);
|
PREP(insertionSort);
|
||||||
PREP(interpolateFromArray);
|
PREP(interpolateFromArray);
|
||||||
@ -180,6 +185,7 @@ PREP(toBin);
|
|||||||
PREP(toBitmask);
|
PREP(toBitmask);
|
||||||
PREP(toHex);
|
PREP(toHex);
|
||||||
PREP(toNumber);
|
PREP(toNumber);
|
||||||
|
PREP(unhideUnit);
|
||||||
PREP(uniqueElementsOnly);
|
PREP(uniqueElementsOnly);
|
||||||
PREP(unloadPerson);
|
PREP(unloadPerson);
|
||||||
PREP(unloadPersonLocal);
|
PREP(unloadPersonLocal);
|
||||||
@ -321,7 +327,7 @@ if (hasInterface) then {
|
|||||||
// Raise ACE event
|
// Raise ACE event
|
||||||
["playerChanged", [ACE_player, _oldPlayer]] call FUNC(localEvent);
|
["playerChanged", [ACE_player, _oldPlayer]] call FUNC(localEvent);
|
||||||
};
|
};
|
||||||
}, 0, []] call cba_fnc_addPerFrameHandler;
|
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Time handling
|
// Time handling
|
||||||
@ -334,7 +340,7 @@ ACE_pausedTime = 0;
|
|||||||
ACE_virtualPausedTime = 0;
|
ACE_virtualPausedTime = 0;
|
||||||
|
|
||||||
PREP(timePFH);
|
PREP(timePFH);
|
||||||
[FUNC(timePFH), 0, []] call cba_fnc_addPerFrameHandler;
|
[FUNC(timePFH), 0, []] call CBA_fnc_addPerFrameHandler;
|
||||||
|
|
||||||
// Init toHex
|
// Init toHex
|
||||||
[0] call FUNC(toHex);
|
[0] call FUNC(toHex);
|
||||||
|
BIN
addons/common/data/ace_headbanger.p3d
Normal file
BIN
addons/common/data/ace_headbanger.p3d
Normal file
Binary file not shown.
@ -1,8 +0,0 @@
|
|||||||
// by commy2
|
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
private "_name";
|
|
||||||
|
|
||||||
_name = name (_this select 0);
|
|
||||||
|
|
||||||
[_name, "{if (serverCommandAvailable '#kick') then {serverCommand format['#kick %1', _this]}}"] call FUNC(execRemoteFnc);
|
|
@ -56,20 +56,23 @@ _addons = [_addons, {_this find "ace_" == 0}] call FUNC(filter);
|
|||||||
} forEach getArray (configFile >> "ACE_Extensions" >> "extensions");
|
} forEach getArray (configFile >> "ACE_Extensions" >> "extensions");
|
||||||
|
|
||||||
///////////////
|
///////////////
|
||||||
// check server version
|
// check server version/addons
|
||||||
///////////////
|
///////////////
|
||||||
if (isMultiplayer) then {
|
if (isMultiplayer) then {
|
||||||
if (isServer) then {
|
if (isServer) then {
|
||||||
// send servers version of ACE to all clients
|
// send servers version of ACE to all clients
|
||||||
GVAR(ServerVersion) = _version;
|
GVAR(ServerVersion) = _version;
|
||||||
|
GVAR(ServerAddons) = _addons;
|
||||||
publicVariable QGVAR(ServerVersion);
|
publicVariable QGVAR(ServerVersion);
|
||||||
|
publicVariable QGVAR(ServerAddons);
|
||||||
} else {
|
} 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";
|
private ["_version","_addons"];
|
||||||
_version = _this select 0;
|
_version = (_this select 0) select 0;
|
||||||
|
_addons = (_this select 0) select 1;
|
||||||
|
|
||||||
if (_version != GVAR(ServerVersion)) then {
|
if (_version != GVAR(ServerVersion)) then {
|
||||||
private "_errorMsg";
|
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;
|
[_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
|
* 0: Warn once
|
||||||
* 1: Warn permanently
|
* 1: Warn permanently
|
||||||
* 2: Kick
|
* 2: Kick
|
||||||
* 1: Check all PBOs? <BOOL> (Optional - default: "[]")
|
* 1: Check all PBOs? <BOOL> (Optional - default: false)
|
||||||
* 2: Whitelist <STRING> (Optinal - default: false)
|
* 2: Whitelist <STRING> (Optinal - default: "[]")
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* None
|
* None
|
||||||
@ -67,24 +67,26 @@ if (!isServer) then {
|
|||||||
//[_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
|
//[_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
|
||||||
diag_log text _error;
|
diag_log text _error;
|
||||||
|
|
||||||
_text = composeText [lineBreak, parseText format ["<t align='center'>%1</t>", _text]];
|
if (_mode < 2) then {
|
||||||
|
_text = composeText [lineBreak, parseText format ["<t align='center'>%1</t>", _text]];
|
||||||
|
|
||||||
_rscLayer = "ACE_RscErrorHint" call BIS_fnc_rscLayer;
|
_rscLayer = "ACE_RscErrorHint" call BIS_fnc_rscLayer;
|
||||||
_rscLayer cutRsc ["ACE_RscErrorHint", "PLAIN", 0, true];
|
_rscLayer cutRsc ["ACE_RscErrorHint", "PLAIN", 0, true];
|
||||||
|
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
_ctrlHint = uiNamespace getVariable "ACE_ctrlErrorHint";
|
_ctrlHint = uiNamespace getVariable "ACE_ctrlErrorHint";
|
||||||
_ctrlHint ctrlSetStructuredText _text;
|
_ctrlHint ctrlSetStructuredText _text;
|
||||||
|
|
||||||
if (_mode == 0) then {
|
if (_mode == 0) then {
|
||||||
sleep 10;
|
sleep 10;
|
||||||
_rscLayer cutFadeOut 0.2;
|
_rscLayer cutFadeOut 0.2;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_mode == 2) then {
|
if (_mode == 2) then {
|
||||||
sleep 10;
|
waitUntil {alive player}; // To be able to show list if using checkAll
|
||||||
waitUntil {alive player};
|
_text = composeText [parseText format ["<t align='center'>%1</t>", _text]];
|
||||||
[player] call FUNC(adminKick);
|
["[ACE] ERROR", _text, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -7,9 +7,10 @@ diag_log text format["REGISTERED ACE PFH HANDLERS"];
|
|||||||
diag_log text format["-------------------------------------------"];
|
diag_log text format["-------------------------------------------"];
|
||||||
if (!isNil "ACE_PFH_COUNTER") then {
|
if (!isNil "ACE_PFH_COUNTER") then {
|
||||||
{
|
{
|
||||||
private["_pfh"];
|
private ["_isActive"];
|
||||||
_pfh = _x select 0;
|
_x params ["_pfh", "_parameters"];
|
||||||
diag_log text format["Registered PFH: id=%1, %1:%2", (_pfh select 0), (_pfh select 1), (_pfh select 2) ];
|
_isActive = if (!isNil {cba_common_PFHhandles select (_pfh select 0)}) then {"ACTIVE"} else {"REMOVED"};
|
||||||
|
diag_log text format["Registered PFH: id=%1 [%2, delay %3], %4:%5", (_pfh select 0), (_isActive), (_parameters select 1), (_pfh select 1), (_pfh select 2) ];
|
||||||
} forEach ACE_PFH_COUNTER;
|
} forEach ACE_PFH_COUNTER;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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];
|
42
addons/common/functions/fnc_headBugFix.sqf
Normal file
42
addons/common/functions/fnc_headBugFix.sqf
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
/**
|
||||||
|
* fnc_headbugfix.sqf
|
||||||
|
* @Descr: Fixes animation issues that may get you stuck
|
||||||
|
* @Author: rocko
|
||||||
|
*
|
||||||
|
* @Arguments:
|
||||||
|
* @Return: nil
|
||||||
|
* @PublicAPI: true
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "script_component.hpp"
|
||||||
|
private ["_pos","_dir","_anim"];
|
||||||
|
|
||||||
|
_anim = animationState ACE_player;
|
||||||
|
["HeadbugFixUsed", [profileName, _anim]] call FUNC(serverEvent);
|
||||||
|
["HeadbugFixUsed", [profileName, _anim]] call FUNC(localEvent);
|
||||||
|
|
||||||
|
if (ACE_player != vehicle ACE_player || { !([ACE_player, objNull, ["isNotSitting"]] call FUNC(canInteractWith)) } ) exitWith {false};
|
||||||
|
|
||||||
|
_pos = getposATL ACE_player;
|
||||||
|
_dir = getDir ACE_player;
|
||||||
|
|
||||||
|
titleCut ["", "BLACK"];
|
||||||
|
[ACE_Player, "headBugFix"] call FUNC(hideUnit);
|
||||||
|
|
||||||
|
// create invisible headbug fix vehicle
|
||||||
|
_ACE_HeadbugFix = "ACE_Headbug_Fix" createVehicleLocal _pos;
|
||||||
|
_ACE_HeadbugFix setDir _dir;
|
||||||
|
ACE_player moveInAny _ACE_HeadbugFix;
|
||||||
|
sleep 0.1;
|
||||||
|
|
||||||
|
unassignVehicle ACE_player;
|
||||||
|
ACE_player action ["Eject", vehicle ACE_player];
|
||||||
|
ACE_player setDir _dir;
|
||||||
|
ACE_player setposATL _pos;
|
||||||
|
sleep 1.0;
|
||||||
|
|
||||||
|
deleteVehicle _ACE_HeadbugFix;
|
||||||
|
|
||||||
|
[ACE_Player, "headBugFix"] call FUNC(unhideUnit);
|
||||||
|
titleCut ["", "PLAIN"];
|
||||||
|
true
|
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);
|
||||||
|
//};
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson))
|
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson))
|
||||||
|
|
||||||
private ["_caller", "_unit","_vehicle", "_loadcar", "_loadhelicopter", "_loadtank"];
|
private ["_caller", "_unit","_vehicle", "_loadcar", "_loadhelicopter", "_loadtank","_loadboat"];
|
||||||
_caller = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
_caller = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
||||||
_unit = [_this, 1, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
_unit = [_this, 1, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
||||||
_vehicle = ObjNull;
|
_vehicle = ObjNull;
|
||||||
@ -30,6 +30,11 @@ if (_unit distance _loadcar <= 10) then {
|
|||||||
_loadtank = nearestObject [_unit, "tank"];
|
_loadtank = nearestObject [_unit, "tank"];
|
||||||
if (_unit distance _loadtank <= 10) then {
|
if (_unit distance _loadtank <= 10) then {
|
||||||
_vehicle = _loadtank;
|
_vehicle = _loadtank;
|
||||||
|
} else {
|
||||||
|
_loadboat = nearestObject [_unit, "ship"];
|
||||||
|
if (_unit distance _loadboat <= 10) then {
|
||||||
|
_vehicle = _loadboat;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -10,35 +10,48 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit","_vehicle","_caller","_handle","_loaded"];
|
private ["_unit","_vehicle","_caller","_handle","_loaded","_slotsOpen"];
|
||||||
_unit = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
_unit = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
||||||
_vehicle = [_this, 1, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
_vehicle = [_this, 1, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
||||||
_caller = [_this, 2, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
_caller = [_this, 2, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
||||||
|
_slotsOpen = false;
|
||||||
|
|
||||||
if (!alive _unit) then {
|
if (!alive _unit) then {
|
||||||
_unit = [_unit,_caller] call FUNC(makeCopyOfBody);
|
_unit = [_unit,_caller] call FUNC(makeCopyOfBody);
|
||||||
};
|
};
|
||||||
|
|
||||||
_unit moveInCargo _vehicle;
|
|
||||||
_loaded = _vehicle getvariable [QGVAR(loaded_persons),[]];
|
|
||||||
_loaded pushback _unit;
|
|
||||||
_vehicle setvariable [QGVAR(loaded_persons),_loaded,true];
|
|
||||||
if (!([_unit] call FUNC(isAwake))) then {
|
|
||||||
_handle = [_unit,_vehicle] spawn {
|
|
||||||
private ["_unit","_vehicle"];
|
|
||||||
_unit = _this select 0;
|
|
||||||
_vehicle = _this select 1;
|
|
||||||
waituntil {vehicle _unit == _vehicle};
|
|
||||||
sleep 0.5;
|
|
||||||
|
|
||||||
//Save the "awake" animation before applying the death animation
|
if (_vehicle emptyPositions "cargo" > 0) then {
|
||||||
if (vehicle _unit == _vehicle) then {
|
_unit moveInCargo _vehicle;
|
||||||
_unit setVariable [QEGVAR(medical,vehicleAwakeAnim), [_vehicle, (animationState _unit)]];
|
_slotsOpen = true;
|
||||||
};
|
|
||||||
[_unit,([_unit] call FUNC(getDeathAnim)), 1, true] call FUNC(doAnimation);
|
|
||||||
};
|
|
||||||
} else {
|
} else {
|
||||||
if ([_unit] call FUNC(isArrested)) then {
|
if (_vehicle emptyPositions "gunner" > 0) then {
|
||||||
|
_unit moveInGunner _vehicle;
|
||||||
|
_slotsOpen = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_slotsOpen) then {
|
||||||
|
_loaded = _vehicle getvariable [QGVAR(loaded_persons),[]];
|
||||||
|
_loaded pushback _unit;
|
||||||
|
_vehicle setvariable [QGVAR(loaded_persons),_loaded,true];
|
||||||
|
if (!([_unit] call FUNC(isAwake))) then {
|
||||||
|
_handle = [_unit,_vehicle] spawn {
|
||||||
|
private ["_unit","_vehicle"];
|
||||||
|
_unit = _this select 0;
|
||||||
|
_vehicle = _this select 1;
|
||||||
|
waituntil {vehicle _unit == _vehicle};
|
||||||
|
sleep 0.5;
|
||||||
|
|
||||||
|
//Save the "awake" animation before applying the death animation
|
||||||
|
if (vehicle _unit == _vehicle) then {
|
||||||
|
_unit setVariable [QEGVAR(medical,vehicleAwakeAnim), [_vehicle, (animationState _unit)]];
|
||||||
|
};
|
||||||
|
[_unit,([_unit] call FUNC(getDeathAnim)), 1, true] call FUNC(doAnimation);
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
if ([_unit] call FUNC(isArrested)) then {
|
||||||
|
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
@ -3,7 +3,9 @@
|
|||||||
* Initializes the check-PBOs module.
|
* Initializes the check-PBOs module.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* Whatever the module provides. (I dunno.)
|
* 0: The module logic <LOGIC>
|
||||||
|
* 1: units <ARRAY>
|
||||||
|
* 2: activated <BOOL>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
|
@ -41,11 +41,11 @@ if ((typeName _value) != (_settingData select 1)) then {
|
|||||||
_failed = true;
|
_failed = true;
|
||||||
if ((_settingData select 1) == "BOOL" and (typeName _value) == "SCALAR") then {
|
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 is not 0 or 1 consider it invalid and don't set anything
|
||||||
if (_value == 0) then {
|
if (_value isEqualTo 0) then {
|
||||||
_value = false;
|
_value = false;
|
||||||
_failed = false;
|
_failed = false;
|
||||||
};
|
};
|
||||||
if (_value == 1) then {
|
if (_value isEqualTo 1) then {
|
||||||
_value = true;
|
_value = true;
|
||||||
_failed = false;
|
_failed = false;
|
||||||
};
|
};
|
||||||
|
@ -65,7 +65,8 @@ if (isNil _name) then {
|
|||||||
localizedDescription,
|
localizedDescription,
|
||||||
possibleValues,
|
possibleValues,
|
||||||
isForced,
|
isForced,
|
||||||
defaultValue
|
defaultValue,
|
||||||
|
category
|
||||||
];*/
|
];*/
|
||||||
_settingData = [
|
_settingData = [
|
||||||
_name,
|
_name,
|
||||||
@ -75,7 +76,8 @@ if (isNil _name) then {
|
|||||||
getText (_optionEntry >> "description"),
|
getText (_optionEntry >> "description"),
|
||||||
getArray (_optionEntry >> "values"),
|
getArray (_optionEntry >> "values"),
|
||||||
getNumber (_optionEntry >> "force") > 0,
|
getNumber (_optionEntry >> "force") > 0,
|
||||||
_value
|
_value,
|
||||||
|
getText (_optionEntry >> "category")
|
||||||
];
|
];
|
||||||
|
|
||||||
//Strings in the values array won't be localized from the config, so just do that now:
|
//Strings in the values array won't be localized from the config, so just do that now:
|
||||||
|
@ -36,7 +36,7 @@ if (isNil QGVAR(publishSchedId)) then {
|
|||||||
GVAR(publishVarNames) = [];
|
GVAR(publishVarNames) = [];
|
||||||
GVAR(publishNextTime) = 1e7;
|
GVAR(publishNextTime) = 1e7;
|
||||||
};
|
};
|
||||||
}, 0, []] call cba_fnc_addPerFrameHandler;
|
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
// If the variable is not on the list
|
// If the variable is not on the list
|
||||||
|
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);
|
||||||
|
};
|
@ -15,16 +15,34 @@
|
|||||||
|
|
||||||
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson))
|
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson))
|
||||||
|
|
||||||
private ["_loaded", "_emptyPos"];
|
private ["_loaded", "_emptyPos","_validVehiclestate"];
|
||||||
PARAMS_2(_unit,_vehicle);
|
PARAMS_2(_unit,_vehicle);
|
||||||
|
_validVehiclestate = true;
|
||||||
|
|
||||||
if (driver _vehicle == _unit) exitwith {TRACE_1("Exiting on Failed Driver Check", driver _vehicle == _unit); false;};
|
if (_vehicle isKindOf "Ship" ) then {
|
||||||
TRACE_1("Vehicle Check", driver _vehicle == _unit);
|
if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false};
|
||||||
if !(speed _vehicle <1 && (((getPos _vehicle) select 2) < 2)) exitwith {TRACE_1("Exiting on Failed speed check", getPosASL _vehicle == _unit); false;};
|
TRACE_1("SHIP Ground Check", getPosATL _vehicle );
|
||||||
TRACE_1("getPosASL Vehicle Check", getPos _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 && {(((getPosATL _vehicle) select 2) < 2)}) 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 (%1) vehicle state. Either moving or Not close enough on the ground. position: %2 isTouchingGround: %3 Speed: %4", _vehicle, getPos _vehicle, isTouchingGround _vehicle, speed _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;
|
unassignVehicle _unit;
|
||||||
[_unit] orderGetIn false;
|
[_unit] orderGetIn false;
|
||||||
|
@ -476,6 +476,7 @@
|
|||||||
<Spanish>Comprobar PBOs</Spanish>
|
<Spanish>Comprobar PBOs</Spanish>
|
||||||
<German>Überprüfe PBOs</German>
|
<German>Überprüfe PBOs</German>
|
||||||
<Czech>Zkontrolovat PBO</Czech>
|
<Czech>Zkontrolovat PBO</Czech>
|
||||||
|
<Portuguese>Verificar PBOs</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Common_CheckPBO_Description">
|
<Key ID="STR_ACE_Common_CheckPBO_Description">
|
||||||
<English></English>
|
<English></English>
|
||||||
@ -483,6 +484,7 @@
|
|||||||
<Spanish>Este módulo verifica la integridad de los addons con los que iniciamos el simulador</Spanish>
|
<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>
|
<German>Dieses Modul überprüft ob jeder Spieler die richtigen PBO-Dateien hat.</German>
|
||||||
<Czech>Zjistit addon který je v souladu se serverem</Czech>
|
<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>
|
||||||
<Key ID="STR_ACE_Common_CheckPBO_Action_DisplayName">
|
<Key ID="STR_ACE_Common_CheckPBO_Action_DisplayName">
|
||||||
<English>Action</English>
|
<English>Action</English>
|
||||||
@ -490,6 +492,7 @@
|
|||||||
<Spanish>Acción</Spanish>
|
<Spanish>Acción</Spanish>
|
||||||
<German>Aktion</German>
|
<German>Aktion</German>
|
||||||
<Czech>Akce</Czech>
|
<Czech>Akce</Czech>
|
||||||
|
<Portuguese>Ação</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Common_CheckPBO_Action_Description">
|
<Key ID="STR_ACE_Common_CheckPBO_Action_Description">
|
||||||
<English>What to do with people who do not have the right PBOs?</English>
|
<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>
|
<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>
|
<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>
|
<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>
|
||||||
<Key ID="STR_ACE_Common_CheckPBO_Action_WarnOnce">
|
<Key ID="STR_ACE_Common_CheckPBO_Action_WarnOnce">
|
||||||
<English>Warn once</English>
|
<English>Warn once</English>
|
||||||
@ -504,6 +508,7 @@
|
|||||||
<Spanish>Avisar una vez</Spanish>
|
<Spanish>Avisar una vez</Spanish>
|
||||||
<German>Einmal verwarnen</German>
|
<German>Einmal verwarnen</German>
|
||||||
<Czech>Upozornit jednou</Czech>
|
<Czech>Upozornit jednou</Czech>
|
||||||
|
<Portuguese>Avisar uma vez</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Common_CheckPBO_Action_WarnPerm">
|
<Key ID="STR_ACE_Common_CheckPBO_Action_WarnPerm">
|
||||||
<English>Warn (permanent)</English>
|
<English>Warn (permanent)</English>
|
||||||
@ -511,6 +516,7 @@
|
|||||||
<Spanish>Avisar (permanente)</Spanish>
|
<Spanish>Avisar (permanente)</Spanish>
|
||||||
<German>Immer verwarnen</German>
|
<German>Immer verwarnen</German>
|
||||||
<Czech>Upozornit (permanentně)</Czech>
|
<Czech>Upozornit (permanentně)</Czech>
|
||||||
|
<Portuguese>Avisar (permanente)</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Common_CheckPBO_Action_Kick">
|
<Key ID="STR_ACE_Common_CheckPBO_Action_Kick">
|
||||||
<English>Kick</English>
|
<English>Kick</English>
|
||||||
@ -518,6 +524,7 @@
|
|||||||
<Spanish>Expulsar</Spanish>
|
<Spanish>Expulsar</Spanish>
|
||||||
<German>Kicken</German>
|
<German>Kicken</German>
|
||||||
<Czech>Vyhodit</Czech>
|
<Czech>Vyhodit</Czech>
|
||||||
|
<Portuguese>Chutar</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Common_CheckPBO_CheckAll_DisplayName">
|
<Key ID="STR_ACE_Common_CheckPBO_CheckAll_DisplayName">
|
||||||
<English>Check all addons</English>
|
<English>Check all addons</English>
|
||||||
@ -525,6 +532,7 @@
|
|||||||
<Spanish>Comprobar todos los addons</Spanish>
|
<Spanish>Comprobar todos los addons</Spanish>
|
||||||
<German>Alle Addons überprüfen</German>
|
<German>Alle Addons überprüfen</German>
|
||||||
<Czech>Zkontrolovat všechny addony</Czech>
|
<Czech>Zkontrolovat všechny addony</Czech>
|
||||||
|
<Portuguese>Verificar todos addons</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Common_CheckPBO_CheckAll_Description">
|
<Key ID="STR_ACE_Common_CheckPBO_CheckAll_Description">
|
||||||
<English>Check all addons instead of only those of ACE?</English>
|
<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>
|
<Spanish>Comprobar todos los addons en vez de solo los del ACE</Spanish>
|
||||||
<German>Alle Addons anstatt nur ACE überprüfen?</German>
|
<German>Alle Addons anstatt nur ACE überprüfen?</German>
|
||||||
<Czech>Zkontrolovat všechny addony namísto jen těch od ACE?</Czech>
|
<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>
|
||||||
<Key ID="STR_ACE_Common_CheckPBO_Whitelist_DisplayName">
|
<Key ID="STR_ACE_Common_CheckPBO_Whitelist_DisplayName">
|
||||||
<English>Whitelist</English>
|
<English>Whitelist</English>
|
||||||
@ -539,6 +548,7 @@
|
|||||||
<Spanish>Lista blanca</Spanish>
|
<Spanish>Lista blanca</Spanish>
|
||||||
<German>Whitelist</German>
|
<German>Whitelist</German>
|
||||||
<Czech>Seznam povolených</Czech>
|
<Czech>Seznam povolených</Czech>
|
||||||
|
<Portuguese>Lista branca</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Common_CheckPBO_Whitelist_Description">
|
<Key ID="STR_ACE_Common_CheckPBO_Whitelist_Description">
|
||||||
<English>What addons are allowed regardless?</English>
|
<English>What addons are allowed regardless?</English>
|
||||||
@ -546,6 +556,7 @@
|
|||||||
<Spanish>Qué addons están permitidos igualmente</Spanish>
|
<Spanish>Qué addons están permitidos igualmente</Spanish>
|
||||||
<German>Welche Addons werden dennoch erlaubt?</German>
|
<German>Welche Addons werden dennoch erlaubt?</German>
|
||||||
<Czech>Jaké addony jsou povoleny?</Czech>
|
<Czech>Jaké addony jsou povoleny?</Czech>
|
||||||
|
<Portuguese>Quais addons são permitidos de qualquer maneira?</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Common_LSDVehicles_DisplayName">
|
<Key ID="STR_ACE_Common_LSDVehicles_DisplayName">
|
||||||
<English>LSD Vehicles</English>
|
<English>LSD Vehicles</English>
|
||||||
@ -553,6 +564,7 @@
|
|||||||
<Spanish>Vehículos LSD</Spanish>
|
<Spanish>Vehículos LSD</Spanish>
|
||||||
<German>LSD-Fahrzeuge</German>
|
<German>LSD-Fahrzeuge</German>
|
||||||
<Czech>LSD vozidla</Czech>
|
<Czech>LSD vozidla</Czech>
|
||||||
|
<Portuguese>Veículos LSD</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Common_LSDVehicles_Description">
|
<Key ID="STR_ACE_Common_LSDVehicles_Description">
|
||||||
<English>Adds LSD effect to synchronized vehicle</English>
|
<English>Adds LSD effect to synchronized vehicle</English>
|
||||||
@ -560,18 +572,112 @@
|
|||||||
<Spanish>Añade el efecto LSD al vehículo sincronizado</Spanish>
|
<Spanish>Añade el efecto LSD al vehículo sincronizado</Spanish>
|
||||||
<German>Fügt einen LSD-Effekt zum synchronisierten Fahrzeug hinzu</German>
|
<German>Fügt einen LSD-Effekt zum synchronisierten Fahrzeug hinzu</German>
|
||||||
<Czech>Přidá LSD efekt pro synchronizované vozidla</Czech>
|
<Czech>Přidá LSD efekt pro synchronizované vozidla</Czech>
|
||||||
|
<Portuguese>Adiciona efeito LSD ao veículo sincronizado</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Common_toggleHandheldDevice">
|
<Key ID="STR_ACE_Common_toggleHandheldDevice">
|
||||||
<English>Toggle Handheld Device</English>
|
<English>Toggle Handheld Device</English>
|
||||||
<Spanish>Seleccionar dispositivo de mano</Spanish>
|
<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>
|
||||||
<Key ID="STR_ACE_Common_closeHandheldDevice">
|
<Key ID="STR_ACE_Common_closeHandheldDevice">
|
||||||
<English>Close Handheld Device</English>
|
<English>Close Handheld Device</English>
|
||||||
<Spanish>Cerrar dispositivo de mano</Spanish>
|
<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>
|
||||||
<Key ID="STR_ACE_Common_cycleHandheldDevices">
|
<Key ID="STR_ACE_Common_cycleHandheldDevices">
|
||||||
<English>Cycle Handheld Devices</English>
|
<English>Cycle Handheld Devices</English>
|
||||||
<Spanish>Cambiar dispositivos de mano</Spanish>
|
<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>
|
||||||
|
<Key ID="STR_ACE_Common_Disabled">
|
||||||
|
<English>Disabled</English>
|
||||||
|
<Czech>Zakázáno</Czech>
|
||||||
|
<French>Non</French>
|
||||||
|
<German>Deaktiviert</German>
|
||||||
|
<Italian>Disattivato</Italian>
|
||||||
|
<Polish>Wyłączone</Polish>
|
||||||
|
<Portuguese>Desativado</Portuguese>
|
||||||
|
<Russian>Откл.</Russian>
|
||||||
|
<Spanish>Desactivado</Spanish>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Common_Enabled">
|
||||||
|
<English>Enabled</English>
|
||||||
|
<Czech>Zapnuto</Czech>
|
||||||
|
<French>Oui</French>
|
||||||
|
<German>Aktiviert</German>
|
||||||
|
<Italian>Attivato</Italian>
|
||||||
|
<Polish>Włączone</Polish>
|
||||||
|
<Portuguese>Ativado</Portuguese>
|
||||||
|
<Russian>Вкл.</Russian>
|
||||||
|
<Spanish>Activado</Spanish>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Common_Yes">
|
||||||
|
<English>Yes</English>
|
||||||
|
<German>Ja</German>
|
||||||
|
<Spanish>Si</Spanish>
|
||||||
|
<Polish>Tak</Polish>
|
||||||
|
<Czech>Ano</Czech>
|
||||||
|
<French>Oui</French>
|
||||||
|
<Russian>Да</Russian>
|
||||||
|
<Hungarian>Igen</Hungarian>
|
||||||
|
<Portuguese>Sim</Portuguese>
|
||||||
|
<Italian>Si</Italian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Common_No">
|
||||||
|
<English>No</English>
|
||||||
|
<German>Nein</German>
|
||||||
|
<Spanish>No</Spanish>
|
||||||
|
<Polish>Nie</Polish>
|
||||||
|
<Czech>Ne</Czech>
|
||||||
|
<French>Non</French>
|
||||||
|
<Russian>Нет</Russian>
|
||||||
|
<Hungarian>Nem</Hungarian>
|
||||||
|
<Portuguese>Não</Portuguese>
|
||||||
|
<Italian>No</Italian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Common_VehiclesOnly">
|
||||||
|
<English>Vehicles only</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Common_DoNotForce">
|
||||||
|
<English>Do Not Force</English>
|
||||||
|
<Polish>Nie wymuszaj</Polish>
|
||||||
|
<Spanish>No forzar</Spanish>
|
||||||
|
<German>Nicht erzwingen</German>
|
||||||
|
<Czech>Nevynucovat</Czech>
|
||||||
|
<Portuguese>Não forçar</Portuguese>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Common_ACEKeybindCategoryEquipment">
|
||||||
|
<English>ACE3 Equipment</English>
|
||||||
|
<Polish>ACE3 Wyposażenie</Polish>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Common_ACEKeybindCategoryCommon">
|
||||||
|
<English>ACE3 Common</English>
|
||||||
|
<Polish>ACE3 Ogólne</Polish>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Common_ACEKeybindCategoryWeapons">
|
||||||
|
<English>ACE3 Weapons</English>
|
||||||
|
<Polish>ACE3 Broń</Polish>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Common_ACEKeybindCategoryMovement">
|
||||||
|
<English>ACE3 Movement</English>
|
||||||
|
<Polish>ACE3 Ruch</Polish>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Common_ACEKeybindCategoryScopeAdjustment">
|
||||||
|
<English>ACE3 Scope Adjustment</English>
|
||||||
|
<Polish>ACE3 Regulacja optyki</Polish>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Common_ACEKeybindCategoryVehicles">
|
||||||
|
<English>ACE3 Vehicles</English>
|
||||||
|
<Polish>ACE3 Pojazdy</Polish>
|
||||||
</Key>
|
</Key>
|
||||||
</Package>
|
</Package>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -123,7 +123,8 @@ class CfgVehicles {
|
|||||||
displayName = "$STR_ACE_ROLLWIRE";
|
displayName = "$STR_ACE_ROLLWIRE";
|
||||||
distance = 4;
|
distance = 4;
|
||||||
condition = "true";
|
condition = "true";
|
||||||
statement = QUOTE([ARR_2(_target,_player)] call FUNC(deploy));
|
//wait a frame to handle "Do When releasing action menu key" option:
|
||||||
|
statement = QUOTE([ARR_2({_this call FUNC(deploy)}, [ARR_2(_target,_player)])] call EFUNC(common,execNextFrame));
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
exceptions[] = {};
|
exceptions[] = {};
|
||||||
priority = 5;
|
priority = 5;
|
||||||
|
@ -9,3 +9,5 @@ GVAR(deployPFH) = -1;
|
|||||||
GVAR(placer) setVariable [QGVAR(wireDeployed), true];
|
GVAR(placer) setVariable [QGVAR(wireDeployed), true];
|
||||||
};
|
};
|
||||||
}] call EFUNC(common,addEventHandler);
|
}] call EFUNC(common,addEventHandler);
|
||||||
|
|
||||||
|
[QGVAR(vehicleDamage), {_this call FUNC(vehicleDamage)}] call EFUNC(common,addEventHandler);
|
||||||
|
@ -7,5 +7,6 @@ PREP(dismount);
|
|||||||
PREP(dismountSuccess);
|
PREP(dismountSuccess);
|
||||||
PREP(handleDamage);
|
PREP(handleDamage);
|
||||||
PREP(handleKilled);
|
PREP(handleKilled);
|
||||||
|
PREP(vehicleDamage);
|
||||||
|
|
||||||
ADDON = true;
|
ADDON = true;
|
||||||
|
@ -37,7 +37,7 @@ deleteVehicle _wirecoil;
|
|||||||
_unit setVariable [QGVAR(wireDeployed), false];
|
_unit setVariable [QGVAR(wireDeployed), false];
|
||||||
|
|
||||||
GVAR(deployPFH) = [{
|
GVAR(deployPFH) = [{
|
||||||
EXPLODE_4_PVT(_this select 0,_wireNoGeo,_wireNoGeoPos,_unit,_action);
|
EXPLODE_3_PVT(_this select 0,_wireNoGeo,_wireNoGeoPos,_unit);
|
||||||
|
|
||||||
private ["_range", "_posStart", "_posEnd", "_dirVect", "_dir", "_anim", "_wire"];
|
private ["_range", "_posStart", "_posEnd", "_dirVect", "_dir", "_anim", "_wire"];
|
||||||
_posStart = (_wireNoGeo modelToWorldVisual (_wireNoGeo selectionPosition "start")) call EFUNC(common,positionToASL);
|
_posStart = (_wireNoGeo modelToWorldVisual (_wireNoGeo selectionPosition "start")) call EFUNC(common,positionToASL);
|
||||||
@ -73,7 +73,7 @@ GVAR(deployPFH) = [{
|
|||||||
{
|
{
|
||||||
_wireNoGeo animate [_x, _anim];
|
_wireNoGeo animate [_x, _anim];
|
||||||
} foreach WIRE_FAST;
|
} foreach WIRE_FAST;
|
||||||
}, 0, [_wireNoGeo, _wireNoGeoPos, _unit, _action]] call CBA_fnc_addPerFrameHandler;
|
}, 0, [_wireNoGeo, _wireNoGeoPos, _unit]] call CBA_fnc_addPerFrameHandler;
|
||||||
|
|
||||||
[localize "STR_ACE_ROLLWIRE", "", ""] call EFUNC(interaction,showMouseHint);
|
[localize "STR_ACE_ROLLWIRE", "", ""] call EFUNC(interaction,showMouseHint);
|
||||||
|
|
||||||
|
@ -17,7 +17,9 @@
|
|||||||
|
|
||||||
PARAMS_2(_wire,_killer);
|
PARAMS_2(_wire,_killer);
|
||||||
|
|
||||||
if (isNull _killer) then {
|
private ["_distance", "_vehicle"];
|
||||||
|
|
||||||
|
if (isNull _killer) then {
|
||||||
_killer = _wire getVariable ["ace_concertina_wire_lastDamager", objNull];
|
_killer = _wire getVariable ["ace_concertina_wire_lastDamager", objNull];
|
||||||
if (isNull _killer) then {
|
if (isNull _killer) then {
|
||||||
_killer = nearestObject [_wire, "car"];
|
_killer = nearestObject [_wire, "car"];
|
||||||
@ -25,111 +27,9 @@ if (isNull _killer) then {
|
|||||||
};
|
};
|
||||||
if (isNull _killer || {_killer == _wire} || {_killer == gunner (vehicle _killer)}) exitWith {};
|
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;
|
_distance = _wire distance _killer;
|
||||||
if (_distance > 14 || {_distance < 2}) exitWith {}; // Fix if shooting wire
|
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;
|
_vehicle = vehicle _killer;
|
||||||
|
|
||||||
if (_mode == 0) then {
|
[QGVAR(vehicleDamage), [_vehicle], [_wire, _vehicle]] call EFUNC(common,targetEvent);
|
||||||
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
|
|
||||||
|
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
|
#define COMPONENT concertina_wire
|
||||||
#include "\z\ace\addons\main\script_mod.hpp"
|
#include "\z\ace\addons\main\script_mod.hpp"
|
||||||
|
|
||||||
|
// #define DEBUG_MODE_FULL
|
||||||
|
|
||||||
#ifdef DEBUG_ENABLED_CONCERTINA_WIRE
|
#ifdef DEBUG_ENABLED_CONCERTINA_WIRE
|
||||||
#define DEBUG_MODE_FULL
|
#define DEBUG_MODE_FULL
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,45 +5,49 @@
|
|||||||
<English>Concertina Wire</English>
|
<English>Concertina Wire</English>
|
||||||
<German>NATO-Draht</German>
|
<German>NATO-Draht</German>
|
||||||
<Russian>Проволочная спираль</Russian>
|
<Russian>Проволочная спираль</Russian>
|
||||||
<Polish>Drut kolczasty</Polish>
|
<Polish>Koncentrina</Polish>
|
||||||
<Spanish>Concertina wire</Spanish>
|
<Spanish>Alambre de espino</Spanish>
|
||||||
<French>Concertina wire</French>
|
<French>Concertina wire</French>
|
||||||
<Czech>Ostnatý drát</Czech>
|
<Czech>Ostnatý drát</Czech>
|
||||||
<Italian>Concertina wire</Italian>
|
<Italian>Concertina wire</Italian>
|
||||||
<Hungarian>Concertina wire</Hungarian>
|
<Hungarian>Concertina wire</Hungarian>
|
||||||
|
<Portuguese>Arame farpado</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_CONCERTINA_WIRECOIL">
|
<Key ID="STR_ACE_CONCERTINA_WIRECOIL">
|
||||||
<English>Concertina Wire Coil</English>
|
<English>Concertina Wire Coil</English>
|
||||||
<German>NATO-Draht Rolle</German>
|
<German>NATO-Draht Rolle</German>
|
||||||
<Russian>Проволочная спираль (моток)</Russian>
|
<Russian>Проволочная спираль (моток)</Russian>
|
||||||
<Polish>Zwój drutu kolczastego</Polish>
|
<Polish>Zwój koncentriny</Polish>
|
||||||
<Spanish>Concertina wire coil</Spanish>
|
<Spanish>Bobina de alambre de espino</Spanish>
|
||||||
<French>Concertina wire coil</French>
|
<French>Concertina wire coil</French>
|
||||||
<Czech>Smyčka ostnatého drátu</Czech>
|
<Czech>Smyčka ostnatého drátu</Czech>
|
||||||
<Italian>Concertina wire coil</Italian>
|
<Italian>Concertina wire coil</Italian>
|
||||||
<Hungarian>Concertina wire coil</Hungarian>
|
<Hungarian>Concertina wire coil</Hungarian>
|
||||||
|
<Portuguese>Bobina de arame farpado</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_UNROLLWIRE">
|
<Key ID="STR_ACE_UNROLLWIRE">
|
||||||
<English>Dismount Concertina Wire</English>
|
<English>Dismount Concertina Wire</English>
|
||||||
<German>NATO-Draht abbauen</German>
|
<German>NATO-Draht abbauen</German>
|
||||||
<Russian>Демонтировать проволочную спираль</Russian>
|
<Russian>Демонтировать проволочную спираль</Russian>
|
||||||
<Polish>Zwiń drut kolczasty</Polish>
|
<Polish>Zwiń koncentrinę</Polish>
|
||||||
<Spanish>Dismount Concertina wire</Spanish>
|
<Spanish>Desmontar alambre de espino</Spanish>
|
||||||
<French>Dismount Concertina wire</French>
|
<French>Dismount Concertina wire</French>
|
||||||
<Czech>Svinout ostnatý drát</Czech>
|
<Czech>Svinout ostnatý drát</Czech>
|
||||||
<Italian>Dismount Concertina wire</Italian>
|
<Italian>Dismount Concertina wire</Italian>
|
||||||
<Hungarian>Dismount Concertina wire</Hungarian>
|
<Hungarian>Dismount Concertina wire</Hungarian>
|
||||||
|
<Portuguese>Desmontar arame farpado</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_ROLLWIRE">
|
<Key ID="STR_ACE_ROLLWIRE">
|
||||||
<English>Deploy Concertina Wire</English>
|
<English>Deploy Concertina Wire</English>
|
||||||
<German>NATO-Draht verlegen</German>
|
<German>NATO-Draht verlegen</German>
|
||||||
<Russian>Монтировать проволочную спираль</Russian>
|
<Russian>Монтировать проволочную спираль</Russian>
|
||||||
<Polish>Rozwiń drut kolczasty</Polish>
|
<Polish>Rozwiń koncentrinę</Polish>
|
||||||
<Spanish>Deploy Concertina wire</Spanish>
|
<Spanish>Desplegar alambre de espino</Spanish>
|
||||||
<French>Deploy Concertina wire</French>
|
<French>Deploy Concertina wire</French>
|
||||||
<Czech>Rozvinout ostnatý drát</Czech>
|
<Czech>Rozvinout ostnatý drát</Czech>
|
||||||
<Italian>Deploy Concertina wire</Italian>
|
<Italian>Deploy Concertina wire</Italian>
|
||||||
<Hungarian>Deploy Concertina wire</Hungarian>
|
<Hungarian>Deploy Concertina wire</Hungarian>
|
||||||
|
<Portuguese>Colocar arame farpado</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
</Package>
|
</Package>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -10,7 +10,7 @@ class CfgVehicles {
|
|||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 0.1;
|
priority = 0.1;
|
||||||
icon = QUOTE(PATHTOF(UI\DAGR_Icon.paa));
|
icon = QUOTE(PATHTOF(UI\DAGR_Icon.paa));
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||||
class GVAR(toggle) {
|
class GVAR(toggle) {
|
||||||
displayName = "Toggle DAGR";
|
displayName = "Toggle DAGR";
|
||||||
condition = QUOTE([ARR_2(_player,'ACE_DAGR')] call EFUNC(common,hasItem));
|
condition = QUOTE([ARR_2(_player,'ACE_DAGR')] call EFUNC(common,hasItem));
|
||||||
@ -18,7 +18,7 @@ class CfgVehicles {
|
|||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 0.2;
|
priority = 0.2;
|
||||||
icon = QUOTE(PATHTOF(UI\DAGR_Icon.paa));
|
icon = QUOTE(PATHTOF(UI\DAGR_Icon.paa));
|
||||||
exceptions[] = {"notOnMap", "isNotInside"};
|
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -33,10 +33,7 @@ class CfgVehicles {
|
|||||||
displayName = "DAGR";
|
displayName = "DAGR";
|
||||||
vehicleClass = "Items";
|
vehicleClass = "Items";
|
||||||
class TransportItems {
|
class TransportItems {
|
||||||
class ACE_DAGR {
|
MACRO_ADDITEM(ACE_DAGR,1);
|
||||||
name = "ACE_DAGR";
|
|
||||||
count = 1;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -7,11 +7,11 @@ class CfgWeapons {
|
|||||||
author[] = {$STR_ACE_Common_ACETeam, "Ruthberg"};
|
author[] = {$STR_ACE_Common_ACETeam, "Ruthberg"};
|
||||||
scope = 2;
|
scope = 2;
|
||||||
displayName = "DAGR";
|
displayName = "DAGR";
|
||||||
|
model = QUOTE(PATHTOF(data\DAGR.p3d));
|
||||||
descriptionShort = "";
|
descriptionShort = "";
|
||||||
picture = PATHTOF(UI\DAGR_Icon.paa);
|
picture = PATHTOF(UI\DAGR_Icon.paa);
|
||||||
icon = "iconObject_circle";
|
icon = "iconObject_circle";
|
||||||
mapSize = 0.034;
|
mapSize = 0.034;
|
||||||
|
|
||||||
class ItemInfo: InventoryItem_Base_F {
|
class ItemInfo: InventoryItem_Base_F {
|
||||||
mass = 10;
|
mass = 10;
|
||||||
};
|
};
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user