Merge branch 'master' into nametagsToggle

Conflicts:
	addons/nametags/ACE_Settings.hpp
	addons/nametags/XEH_postInit.sqf
	addons/nametags/functions/fnc_onDraw3d.sqf
	addons/nametags/stringtable.xml
This commit is contained in:
jonpas 2015-05-28 19:51:40 +02:00
commit d597149fc6
515 changed files with 7237 additions and 2137 deletions

View File

@ -24,22 +24,30 @@ VKing <kauestad@gmail.com>
Walter Pearce <jaynus@gmail.com>
# CONTRIBUTORS
11RDP-LoupVert <loupvert@11rdp.fr>
[BIG]Bull
11RDP-LoupVert <loupvert@11rdp.fr>
ACCtomeek <tomeek99@gmail.com>
adam3adam <br.ada@seznam.cz>
Adanteh
aeroson
alef <alefor@gmail.com>
Aggr094 <bastards4glory@gmail.com>
alef <alefor@gmail.com>
Aleksey EpMAK Yermakov <epmak777@gmail.com>
Alganthe <alganthe@live.fr>
Anthariel <Contact@storm-simulation.com>
Asgar Serran <piechottaf@web.de>
Bla1337
BlackPixxel
BlackQwar
Brakoviejo
Brisse <brisse@outlook.com>
BullHorn <bullhorn7@gmail.com>
Clon1998 <ps.patti1998@gmail.com>
Codingboy
Coren <coren4@gmail.com>
Crusty
Dharma Bellamkonda <dharma.bellamkonda@gmail.com>
Dimaslg <dimaslg@telecable.e>
eRazeri
evromalarkey <evromalarkey@gmail.com>
Falke75
@ -49,31 +57,37 @@ Filip Basara <filip.basara93@googlemail.com>
FreeZbe <freeseb@gmail.com>
geraldbolso1899
Ghost
Gianmarco Varriale (TeamNuke) <admin@forhost.org>
GieNkoV <gienkov.grzegorz@gmail.com>
gpgpgpgp
Grzegorz
Gianmarco Varriale (TeamNuke) <admin@forhost.org>
Hamburger SV
Harakhti <shadowdragonphd@gmail.com>
havena <silveredenis@gmail.com>
Hawkins
jokoho48
Jonpas <jonpas33@gmail.com>
Kavinsky <nmunozfernandez@gmail.com>
Kllrt <kllrtik@gmail.com>
legman <juicemelon@msn.com>
Legolasindar "Viper" <legolasindar@gmail.com>
licht-im-Norden87 <lichtimnorden87@gmail.com>
MarcBook
meat <p.humberdroz@gmail.com>
Michail Nikolaev
nic547 <nic547@outlook.com>
nikolauska <nikolauska1@gmail.com>
nomisum <nomisum@gmail.com>
OnkelDisMaster <onkeldismaster@gmail.com>
oscarmolinadev
pokertour
Professor <lukas.trneny@wo.cz>
rakowozz
ramius86 <pasini86@hotmail.com>
Raspu86
Riccardo Petricca <petriccarcc@gmail.com>
Robert Boklahánics <bokirobi@gmail.com>
ramius86 <pasini86@hotmail.com>
ruPaladin <happyworm24@rambler.ru>
SilentSpike <SilentSpike100@gmail.com>
simon84 <badguy360th@gmail.com>
Sniperwolf572 <tenga6@gmail.com>
@ -82,19 +96,6 @@ Toaster <jonathan.pereira@gmail.com>
Tonic
Tourorist <tourorist@gmail.com>
Valentin Torikian <valentin.torikian@gmail.com>
zGuba
Aleksey EpMAK Yermakov <epmak777@gmail.com>
ruPaladin <happyworm24@rambler.ru>
BlackPixxel
Asgar Serran <piechottaf@web.de>
Kavinsky <nmunozfernandez@gmail.com>
Coren <coren4@gmail.com>
OnkelDisMaster <onkeldismaster@gmail.com>
Dimaslg <dimaslg@telecable.e>
VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>
Bla1337
nikolauska <nikolauska1@gmail.com>
adam3adam <br.ada@seznam.cz>
Professor <lukas.trneny@wo.cz>
Winter <simon@agius-muscat.net>
Dharma Bellamkonda <dharma.bellamkonda@gmail.com>
zGuba

View File

@ -3,19 +3,21 @@
height="112">
</p>
<p align="center">
<a href="https://github.com/acemod/ACE3/releases">
<img src="http://img.shields.io/badge/Version-3.0.0-blue.svg?style=flat"
<!--<a href="https://github.com/acemod/ACE3/releases">
v3.0.1
<img src="http://img.shields.io/badge/Version-3.0.1-blue.svg?style=flat"
alt="ACE version">
</a>
<a href="https://github.com/acemod/ACE3/archive/master.zip">
<img src="http://img.shields.io/badge/Download-48.3_MB-green.svg?style=flat"
40.9 Mb
<img src="http://img.shields.io/badge/Download-40.9_MB-green.svg?style=flat"
alt="ACE download">
</a>
<a href="https://github.com/acemod/ACE3/issues">
<img src="http://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat&label=Issues"
alt="ACE issues">
</a>
<a href="http://forums.bistudio.com/showthread.php?190433-ACE3-A-collaborative-merger-between-AGM-CSE-and-ACE&p=2910796&viewfull=1#post2910796">
</a>-->
<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?style=flat"
alt="BIF thread">
</a>

View File

@ -5,23 +5,29 @@ class ACE_Settings {
typeName = "BOOL";
value = 0;
};
class GVAR(alwaysSimulateForSnipers) {
displayName = "Always Enabled For Snipers";
description = "Always enables advanced ballistics when high power optics are used";
class GVAR(simulateForSnipers) {
displayName = "Enabled For Snipers";
description = "Enables advanced ballistics for non local snipers (when using high power optics)";
typeName = "BOOL";
value = 1;
};
class GVAR(disabledInFullAutoMode) {
displayName = "Disabled In FullAuto Mode";
description = "Disables the advanced ballistics during full auto fire";
class GVAR(simulateForGroupMembers) {
displayName = "Enabled For Group Members";
description = "Enables advanced ballistics for non local group members";
typeName = "BOOL";
value = 0;
};
class GVAR(onlyActiveForLocalPlayers) {
displayName = "Disabled For Non Local Players";
description = "Disables the advanced ballistics for bullets coming from other players (enable this if you encounter frame drops during heavy firefights in multiplayer)";
class GVAR(simulateForEveryone) {
displayName = "Enabled For Everyone";
description = "Enables advanced ballistics for all non local players (enabling this may degrade performance during heavy firefights in multiplayer)";
typeName = "BOOL";
value = 1;
value = 0;
};
class GVAR(disabledInFullAutoMode) {
displayName = "Disabled In FullAuto Mode";
description = "Disables advanced ballistics during full auto fire";
typeName = "BOOL";
value = 0;
};
/* // TODO: We currently do not have firedEHs on vehicles
class GVAR(vehicleGunnerEnabled) {

View File

@ -17,24 +17,30 @@ class CfgVehicles {
typeName = "BOOL";
defaultValue = 0;
};
class alwaysSimulateForSnipers {
displayName = "$STR_ACE_AdvancedBallistics_alwaysSimulateForSnipers_DisplayName";
description = "$STR_ACE_AdvancedBallistics_alwaysSimulateForSnipers_Description";
class simulateForSnipers {
displayName = "$STR_ACE_AdvancedBallistics_simulateForSnipers_DisplayName";
description = "$STR_ACE_AdvancedBallistics_simulateForSnipers_Description";
typeName = "BOOL";
defaultValue = 1;
};
class simulateForGroupMembers {
displayName = "$STR_ACE_AdvancedBallistics_simulateForGroupMembers_DisplayName";
description = "$STR_ACE_AdvancedBallistics_simulateForGroupMembers_Description";
typeName = "BOOL";
defaultValue = 0;
};
class simulateForEveryone {
displayName = "$STR_ACE_AdvancedBallistics_simulateForEveryone_DisplayName";
description = "$STR_ACE_AdvancedBallistics_simulateForEveryone_Description";
typeName = "BOOL";
defaultValue = 0;
};
class disabledInFullAutoMode {
displayName = "$STR_ACE_AdvancedBallistics_disabledInFullAutoMod_DisplayName";
description = "$STR_ACE_AdvancedBallistics_disabledInFullAutoMod_Description";
typeName = "BOOL";
defaultValue = 0;
};
class onlyActiveForLocalPlayers {
displayName = "$STR_ACE_AdvancedBallistics_onlyActiveForLocalPlayers_DisplayName";
description = "$STR_ACE_AdvancedBallistics_onlyActiveForLocalPlayers_Description";
typeName = "BOOL";
defaultValue = 1;
};
/* // TODO: We currently do not have firedEHs on vehicles
class vehicleGunnerEnabled {
displayName = "Enabled For Vehicle Gunners";

View File

@ -5,7 +5,7 @@
GVAR(currentbulletID) = -1;
GVAR(Protractor) = false;
GVAR(ProtractorStart) = time;
GVAR(ProtractorStart) = ACE_time;
GVAR(currentGrid) = 0;
GVAR(initMessageEnabled) = false;

View File

@ -35,16 +35,18 @@ if (!([_unit] call EFUNC(common,isPlayer))) exitWith {};
if (underwater _unit) exitWith {};
if (!(_ammo isKindOf "BulletBase")) exitWith {};
if (_unit distance ACE_player > GVAR(simulationRadius)) exitWith {};
if (GVAR(onlyActiveForLocalPlayers) && !(local _unit)) then {
if (GVAR(alwaysSimulateForSnipers)) then {
if (!GVAR(simulateForEveryone) && !(local _unit)) then {
// The shooter is non local
_abort = true;
if (GVAR(simulateForSnipers)) then {
if (currentWeapon _unit == primaryWeapon _unit && count primaryWeaponItems _unit > 2) then {
_opticsName = (primaryWeaponItems _unit) select 2;
_opticType = getNumber(configFile >> "CfgWeapons" >> _opticsName >> "ItemInfo" >> "opticType");
_abort = _opticType != 2; // We only abort if the non local shooter is not a sniper
};
} else {
_abort = true;
};
if (GVAR(simulateForGroupMembers) && _abort) then {
_abort = (group ACE_player) != (group _unit);
};
};
//if (!GVAR(vehicleGunnerEnabled) && !(_unit isKindOf "Man")) then { _abort = true; }; // We currently do not have firedEHs on vehicles
@ -112,7 +114,7 @@ if (_caliber > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) th
GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000;
"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _AmmoCacheEntry select 0, _AmmoCacheEntry select 6, _AmmoCacheEntry select 7, _AmmoCacheEntry select 8, _AmmoCacheEntry select 5, _stabilityFactor, _WeaponCacheEntry select 1, _muzzleVelocity, _AmmoCacheEntry select 4, getPosASL _bullet, EGVAR(weather,Latitude), EGVAR(weather,currentTemperature), EGVAR(weather,Altitude), EGVAR(weather,currentHumidity), overcast, floor(time), time - floor(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(weather,Latitude), EGVAR(weather,currentTemperature), EGVAR(weather,Altitude), EGVAR(weather,currentHumidity), overcast, floor(ACE_time), ACE_time - floor(ACE_time)];
[{
private ["_args", "_index", "_bullet", "_caliber", "_bulletTraceVisible", "_bulletVelocity", "_bulletPosition"];
@ -132,9 +134,9 @@ GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000;
};
if (_bulletTraceVisible && _bulletSpeed > 600) then {
drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.0157480315*_caliber,0.00787401574*_caliber],[[0,0,0,0.6],[0,0,0,0.4]],[1,0],0,0,"","",""];
drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.02*_caliber,0.01*_caliber],[[0,0,0,0.6],[0,0,0,0.4]],[1,0],0,0,"","",""];
};
call compile ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, floor(time), time - floor(time)]);
call compile ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, floor(ACE_time), ACE_time - floor(ACE_time)]);
}, GVAR(simulationInterval), [_bullet, _caliber, _bulletTraceVisible, GVAR(currentbulletID)]] call CBA_fnc_addPerFrameHandler;

View File

@ -26,9 +26,10 @@ if !(_activated) exitWith {};
[_logic, QGVAR(ammoTemperatureEnabled), "ammoTemperatureEnabled"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(barrelLengthInfluenceEnabled), "barrelLengthInfluenceEnabled"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(bulletTraceEnabled), "bulletTraceEnabled"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(onlyActiveForLocalPlayers), "onlyActiveForLocalPlayers"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(simulateForEveryone), "simulateForEveryone"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(disabledInFullAutoMode), "disabledInFullAutoMode"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(alwaysSimulateForSnipers), "alwaysSimulateForSnipers"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(simulateForSnipers), "simulateForSnipers"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(simulateForGroupMembers), "simulateForGroupMembers"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(simulationInterval), "simulationInterval"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(simulationRadius), "simulationRadius"] call EFUNC(common,readSettingFromModule);

View File

@ -18,7 +18,7 @@ if (!GVAR(extensionAvailable)) exitWith {};
private ["_initStartTime", "_mapSize", "_mapGrids", "_gridCells", "_x", "_y", "_gridCenter", "_gridHeight", "_gridNumObjects", "_gridSurfaceIsWater"];
_initStartTime = time;
_initStartTime = ACE_time;
_mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize");
if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith {
@ -41,7 +41,7 @@ GVAR(currentGrid) = 0;
if (GVAR(currentGrid) >= _gridCells) exitWith {
if (GVAR(initMessageEnabled)) then {
systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", ceil(time - _initStartTime)];
systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", ceil(ACE_time - _initStartTime)];
};
[_this select 1] call cba_fnc_removePerFrameHandler;
};

View File

@ -4,7 +4,7 @@
* Reads the weapon class config and updates the config cache
*
* Arguments:
* 0: ammo - classname <string>
* 0: weapon - classname <string>
*
* Return Value:
* 0: [_barrelTwist, _twistDirection, _barrelLength] <ARRAY>

View File

@ -28,78 +28,111 @@
<Key ID="STR_ACE_AdvancedBallistics_DisplayName">
<English>Advanced Ballistics</English>
<Polish>Zaawansowana balistyka</Polish>
<Spanish>Balística avanzada</Spanish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_enabled_DisplayName">
<English>Advanced Ballistics</English>
<Polish>Zaawansowana balistyka</Polish>
<Spanish>Balística avanzada</Spanish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_enabled_Description">
<English>Enables advanced ballistics</English>
<Polish>Aktywuje zaawansowaną balistykę</Polish>
<Spanish>Activa la balística avanzada</Spanish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_alwaysSimulateForSnipers_DisplayName">
<English>Always Enabled For Snipers</English>
<Polish>Zawsze akt. dla snajp.</Polish>
<Key ID="STR_ACE_AdvancedBallistics_simulateForSnipers_DisplayName">
<English>Enabled For Snipers</English>
<Spanish>Activada para francotiradores</Spanish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_alwaysSimulateForSnipers_Description">
<English>Always enables advanced ballistics when high power optics are used</English>
<Polish>Aktywuje zaawansowaną balistykę zawsze, kiedy używana jest optyka</Polish>
<Key ID="STR_ACE_AdvancedBallistics_simulateForSnipers_Description">
<English>Enables advanced ballistics for non local snipers (when using high power optics)</English>
<Spanish>Activa la balística avanzada para francotiradores no locales (cuando se usa una mira telescópica)</Spanish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_simulateForGroupMembers_DisplayName">
<English>Enabled For Group Members</English>
<Spanish>Activada para miembros de grupo</Spanish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_simulateForGroupMembers_Description">
<English>Enables advanced ballistics for non local group members</English>
<Spanish>Activada la balística avanzada para miembros de grupo no locales</Spanish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_simulateForEveryone_DisplayName">
<English>Enabled For Everyone</English>
<Spanish>Activada para todos</Spanish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_simulateForEveryone_Description">
<English>Enables advanced ballistics for all non local players (enabling this may degrade performance during heavy firefights in multiplayer)</English>
<Spanish>Activada la balística avanzada para todos los jugadores no locales (activarlo puede degradar el rendimiento durante grandes tiroteos en multijugador).</Spanish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_alwaysSimulateForGroupMembers_DisplayName">
<English>Always Enabled For Group Members</English>
<Polish>Zawsze akt. dla czł. grupy</Polish>
<Spanish>Siempre activada para miembros de grupo</Spanish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_alwaysSimulateForGroupMembers_Description">
<English>Always enables advanced ballistics when a group member fires</English>
<Polish>Aktywuje zaawansowaną balistykę dla wszystkich członków grupy</Polish>
<Spanish>Activada la balística avanzada siempre cuando miembros de grupo disparan</Spanish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_disabledInFullAutoMod_DisplayName">
<English>Disabled In FullAuto Mode</English>
<Polish>Wył. podczas ognia auto.</Polish>
<Spanish>Desactivada en modo automático</Spanish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_disabledInFullAutoMod_Description">
<English>Disables the advanced ballistics during full auto fire</English>
<Polish>Dezaktywuje zaawansowaną balistykę podczas ognia automatycznego</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_onlyActiveForLocalPlayers_DisplayName">
<English>Disabled For Non Local Players</English>
<Polish>Wyłącz dla nielok. graczy</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_onlyActiveForLocalPlayers_Description">
<English>Disables the advanced ballistics for bullets coming from other players (enable this if you encounter frame drops during heavy firefights in multiplayer)</English>
<Polish>Dezaktywuje zaawansowaną balistykę dla pocisków pochodzących od innych graczy(aktywuj tą opcję jeżeli odczuwasz spadki FPS podczas sporych strzelanin w MP)</Polish>
<Spanish>Desactivada la balística avanzada durante el fuego automático</Spanish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_ammoTemperatureEnabled_DisplayName">
<English>Enable Ammo Temperature Simulation</English>
<Polish>Symulacja temp. amunicji</Polish>
<Spanish>Activar simulación de temperatura de munición</Spanish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_ammoTemperatureEnabled_Description">
<English>Muzzle velocity varies with ammo temperature</English>
<Polish>Prędkość wylotowa pocisku jest zależna od temperatury amunicji</Polish>
<Spanish>La velocidad de salida varía con la temperatura de la munición</Spanish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_barrelLengthInfluenceEnabled_DisplayName">
<English>Enable Barrel Length Simulation</English>
<Polish>Symulacja długości lufy</Polish>
<Spanish>Habilitar la simulación de longitud del cañón</Spanish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_barrelLengthInfluenceEnabled_Description">
<English>Muzzle velocity varies with barrel length</English>
<Polish>Prędkość wylotowa pocisku jest zależna od długości lufy</Polish>
<Spanish>La velocidad de salidal varía con la longitud del cañón</Spanish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_bulletTraceEnabled_DisplayName">
<English>Enable Bullet Trace Effect</English>
<Polish>Efekt smugi pocisku</Polish>
<Spanish>Activar el efecto trazador de la bala</Spanish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_bulletTraceEnabled_Description">
<English>Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics)</English>
<Polish>Aktywuje efekt smugi pocisku dla pocisków wysokokalibrowych (widoczne tylko podczas patrzenia przez optykę)</Polish>
<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>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_simulationInterval_DisplayName">
<English>Simulation Interval</English>
<Polish>Interwał symulacji</Polish>
<Spanish>Intervalo de simulación</Spanish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_simulationInterval_Description">
<English>Defines the interval between every calculation step</English>
<Polish>Określa interwał pomiędzy każdym krokiem kalkulacji</Polish>
<Spanish>Define el intervalo entre cada cálculo</Spanish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_simulationRadius_DisplayName">
<English>Simulation Radius</English>
<Polish>Zasięg symulacji</Polish>
<Spanish>Radio de simulación</Spanish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_simulationRadius_Description">
<English>Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles</English>
<Polish>Określa obszar naokoło gracza (w metrach), na którym zaawansowana balistyka jest aplikowana dla pocisków</Polish>
<Spanish>Define el radio alrededor del jugador (en metros) en el cual se aplica la balística avanzada a los proyectiles</Spanish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_Description">
<English></English>

View File

@ -1,5 +1,5 @@
#define COMPONENT ai
#include "\z\ace\Addons\main\script_mod.hpp"
#include "\z\ace\addons\main\script_mod.hpp"
#ifdef DEBUG_ENABLED_AI
#define DEBUG_MODE_FULL
@ -9,4 +9,4 @@
#define DEBUG_SETTINGS DEBUG_SETTINGS_AI
#endif
#include "\z\ace\Addons\main\script_macros.hpp"
#include "\z\ace\addons\main\script_macros.hpp"

View File

@ -152,7 +152,7 @@ class ATragMX_Display {
type=0;
font="TahomaB";
SizeEX=0.025;
idc=-1;
idc=720000;
style=48;
x=0.55*safezoneW+safezoneX-0.256;
y=0.265*safezoneH+safezoneY-0.1;
@ -160,7 +160,7 @@ class ATragMX_Display {
h=1.024*4/3;
colorBackground[]={1,1,1,1};
colorText[]={1,1,1,1};
text=PATHTOF(UI\atrag.paa);
text=PATHTOF(UI\atrag_d.paa);
};
class POWER: ATragMX_RscButton {
idc=-1;

Binary file not shown.

View File

@ -6,41 +6,41 @@ if ((profileNamespace getVariable ["ACE_ATragMX_profileNamespaceVersion", 0]) ==
GVAR(gunList) = profileNamespace getVariable "ACE_ATragMX_gunList";
} else {
// Profile Name, Muzzle Velocity, Zero Range, Scope Base Angle, AirFriction, Bore Height, Scope Unit, Scope Click Unit, Scope Click Number, Maximum Elevation, Dialed Elevation, Dialed Windage, Mass, Bullet Diameter, Rifle Twist, BC, Drag Model, Atmosphere Model
GVAR(gunList) = [["12.7x108mm" , 820, 100, 0.0657, -0.0006400, 3.81, 0, 2, 10, 120, 0, 0, 48.28, 12.7, 38.10, 0.630, 1, "ASM" ],
GVAR(gunList) = [["12.7x108mm" , 820, 100, 0.0657, -0.0006469, 3.81, 0, 2, 10, 120, 0, 0, 48.28, 12.7, 38.10, 0.630, 1, "ASM" ],
["12.7x99mm AMAX" , 860, 100, 0.0612, -0.0003740, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 38.10, 1.050, 1, "ASM" ],
["12.7x99mm" , 900, 100, 0.0623, -0.0006000, 3.81, 0, 2, 10, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM" ],
["12.7x99mm AMAX" , 860, 100, 0.0612, -0.0003722, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 38.10, 1.050, 1, "ASM" ],
["12.7x99mm" , 900, 100, 0.0623, -0.0005942, 3.81, 0, 2, 10, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM" ],
["12.7x54mm" , 300, 100, 0.3395, -0.0001400, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 24.13, 1.050, 1, "ASM" ],
["12.7x54mm" , 300, 100, 0.3395, -0.0001877, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 24.13, 1.050, 1, "ASM" ],
[".408 Chey Tac" , 910, 100, 0.0571, -0.0003950, 3.81, 0, 2, 10, 120, 0, 0, 27.15, 10.4, 33.02, 0.970, 1, "ASM" ],
[".408 Chey Tac" , 910, 100, 0.0571, -0.0003958, 3.81, 0, 2, 10, 120, 0, 0, 27.15, 10.4, 33.02, 0.970, 1, "ASM" ],
["9.3×64mm" , 870, 100, 0.0619, -0.0010600, 3.81, 0, 2, 10, 120, 0, 0, 14.90, 9.30, 35.56, 0.368, 1, "ASM" ],
["9.3×64mm" , 870, 100, 0.0619, -0.0010921, 3.81, 0, 2, 10, 120, 0, 0, 14.90, 9.30, 35.56, 0.368, 1, "ASM" ],
[".338LM 250gr" , 880, 100, 0.0598, -0.0006060, 3.81, 0, 2, 10, 120, 0, 0, 16.20, 8.58, 25.40, 0.322, 7, "ICAO"],
[".338LM 300gr" , 800, 100, 0.0677, -0.0005350, 3.81, 0, 2, 10, 120, 0, 0, 19.44, 8.58, 25.40, 0.381, 7, "ICAO"],
[".338LM API526" , 895, 100, 0.0601, -0.0006730, 3.81, 0, 2, 10, 120, 0, 0, 16.39, 8.58, 25.40, 0.560, 1, "ASM" ],
[".338LM 250gr" , 880, 100, 0.0598, -0.0006234, 3.81, 0, 2, 10, 120, 0, 0, 16.20, 8.58, 25.40, 0.322, 7, "ICAO"],
[".338LM 300gr" , 800, 100, 0.0677, -0.0005397, 3.81, 0, 2, 10, 120, 0, 0, 19.44, 8.58, 25.40, 0.381, 7, "ICAO"],
[".338LM API526" , 895, 100, 0.0601, -0.0007120, 3.81, 0, 2, 10, 120, 0, 0, 16.39, 8.58, 25.40, 0.560, 1, "ASM" ],
[".300WM Mk248 Mod 0", 900, 100, 0.0584, -0.0008300, 3.81, 0, 2, 10, 120, 0, 0, 13.31, 7.80, 25.40, 0.268, 7, "ICAO"],
[".300WM Mk248 Mod 1", 867, 100, 0.0611, -0.0008150, 3.81, 0, 2, 10, 120, 0, 0, 14.26, 7.80, 25.40, 0.310, 7, "ICAO"],
[".300WM Berger OTM" , 853, 100, 0.0622, -0.0007600, 3.81, 0, 2, 10, 120, 0, 0, 14.90, 7.80, 25.40, 0.368, 7, "ICAO"],
[".300WM Mk248 Mod 0", 900, 100, 0.0584, -0.0007305, 3.81, 0, 2, 10, 120, 0, 0, 13.31, 7.80, 25.40, 0.268, 7, "ICAO"],
[".300WM Mk248 Mod 1", 867, 100, 0.0611, -0.0006326, 3.81, 0, 2, 10, 120, 0, 0, 14.26, 7.80, 25.40, 0.310, 7, "ICAO"],
[".300WM Berger OTM" , 853, 100, 0.0622, -0.0005271, 3.81, 0, 2, 10, 120, 0, 0, 14.90, 7.80, 25.40, 0.368, 7, "ICAO"],
["7.62x54mmR" , 800, 100, 0.0692, -0.0010230, 3.81, 0, 2, 10, 120, 0, 0, 9.849, 7.92, 24.13, 0.400, 1, "ICAO"],
["7.62x54mmR" , 800, 100, 0.0692, -0.0010165, 3.81, 0, 2, 10, 120, 0, 0, 9.849, 7.92, 24.13, 0.400, 1, "ICAO"],
["7.62x51mm M80" , 810, 100, 0.0679, -0.0010350, 3.81, 0, 2, 10, 120, 0, 0, 9.525, 7.82, 25.40, 0.200, 7, "ICAO"],
["7.62x51mm M118LR" , 780, 100, 0.0710, -0.0008525, 3.81, 0, 2, 10, 120, 0, 0, 11.34, 7.82, 25.40, 0.243, 7, "ICAO"],
["7.62x51mm Mk319" , 910, 100, 0.0585, -0.0010300, 3.81, 0, 2, 10, 120, 0, 0, 8.424, 7.82, 25.40, 0.377, 1, "ICAO"],
["7.62x51mm M993" , 930, 100, 0.0585, -0.0010300, 3.81, 0, 2, 10, 120, 0, 0, 8.230, 7.82, 25.40, 0.359, 1, "ICAO"],
["7.62x51mm Subsonic", 320, 100, 0.3060, -0.0004910, 3.81, 0, 2, 10, 120, 0, 0, 12.96, 7.82, 25.40, 0.235, 7, "ICAO"],
["7.62x51mm M80" , 810, 100, 0.0679, -0.0010319, 3.81, 0, 2, 10, 120, 0, 0, 9.525, 7.82, 25.40, 0.200, 7, "ICAO"],
["7.62x51mm M118LR" , 780, 100, 0.0710, -0.0008497, 3.81, 0, 2, 10, 120, 0, 0, 11.34, 7.82, 25.40, 0.243, 7, "ICAO"],
["7.62x51mm Mk319" , 910, 100, 0.0585, -0.0010435, 3.81, 0, 2, 10, 120, 0, 0, 8.424, 7.82, 25.40, 0.377, 1, "ICAO"],
["7.62x51mm M993" , 930, 100, 0.0585, -0.0010914, 3.81, 0, 2, 10, 120, 0, 0, 8.230, 7.82, 25.40, 0.359, 1, "ICAO"],
["7.62x51mm Subsonic", 320, 100, 0.3060, -0.0004145, 3.81, 0, 2, 10, 120, 0, 0, 12.96, 7.82, 25.40, 0.235, 7, "ICAO"],
["6.5x39mm" , 800, 100, 0.0683, -0.0007850, 3.81, 0, 2, 10, 120, 0, 0, 7.970, 6.71, 22.86, 0.263, 7, "ICAO"],
["6.5x47mm Lapua" , 800, 100, 0.0682, -0.0007710, 3.81, 0, 2, 10, 120, 0, 0, 9.007, 6.71, 22.86, 0.290, 7, "ICAO"],
["6.5mm Creedmor" , 840, 100, 0.0637, -0.0006510, 3.81, 0, 2, 10, 120, 0, 0, 9.072, 6.71, 22.86, 0.317, 7, "ICAO"],
["6.5x39mm" , 800, 100, 0.0683, -0.0007728, 3.81, 0, 2, 10, 120, 0, 0, 7.970, 6.71, 22.86, 0.263, 7, "ICAO"],
["6.5x47mm Lapua" , 800, 100, 0.0682, -0.0006977, 3.81, 0, 2, 10, 120, 0, 0, 9.007, 6.71, 22.86, 0.290, 7, "ICAO"],
["6.5mm Creedmor" , 840, 100, 0.0637, -0.0006136, 3.81, 0, 2, 10, 120, 0, 0, 9.072, 6.71, 22.86, 0.317, 7, "ICAO"],
["5.56x45mm M855" , 870, 100, 0.0626, -0.0012650, 3.81, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.151, 7, "ASM" ],
["5.56x45mm Mk262" , 820, 100, 0.0671, -0.0011250, 3.81, 0, 2, 10, 120, 0, 0, 4.990, 5.70, 17.78, 0.361, 1, "ASM" ],
["5.56x45mm Mk318" , 880, 100, 0.0616, -0.0011200, 3.81, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.307, 1, "ASM" ],
["5.56x45mm M995" , 869, 100, 0.0616, -0.0011200, 3.81, 0, 2, 10, 120, 0, 0, 4.536, 5.70, 17.78, 0.310, 1, "ASM" ]];
["5.56x45mm M855" , 870, 100, 0.0626, -0.0013685, 3.81, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.151, 7, "ASM" ],
["5.56x45mm Mk262" , 820, 100, 0.0671, -0.0011287, 3.81, 0, 2, 10, 120, 0, 0, 4.990, 5.70, 17.78, 0.361, 1, "ASM" ],
["5.56x45mm Mk318" , 880, 100, 0.0616, -0.0013064, 3.81, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.307, 1, "ASM" ],
["5.56x45mm M995" , 869, 100, 0.0616, -0.0012972, 3.81, 0, 2, 10, 120, 0, 0, 4.536, 5.70, 17.78, 0.310, 1, "ASM" ]];
[] call FUNC(clear_user_data);
profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(gunList)];

View File

@ -4,7 +4,6 @@ ADDON = false;
PREP(add_new_gun);
PREP(calculate_range_card);
PREP(calculate_scope_base_angle);
PREP(calculate_solution);
PREP(calculate_target_range_assist);
PREP(calculate_target_solution);

View File

@ -1,40 +0,0 @@
/*
* Author: Ruthberg
* Calculates a new scope base angle
*
* Arguments:
* 0: Bullet mass <NUMBER>
* 1: Bore height <NUMBER>
* 2: air friction <NUMBER>
* 3: muzzle velocity <NUMBER>
* 4: zero range <NUMBER>
*
* Return Value:
* scope base angle <NUMBER>
*
* Example:
* call ace_atragmx_calculate_scope_base_angle
*
* Public: No
*/
#include "script_component.hpp"
private ["_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", "_zeroRange"];
_bulletMass = _this select 0;
_boreHeight = _this select 1;
_airFriction = _this select 2;
_muzzleVelocity = _this select 3;
_zeroRange = _this select 4;
private ["_scopeBaseAngle"];
_scopeBaseAngle = 0;
private ["_temperature", "_barometricPressure", "_relativeHumidity"];
_temperature = 15;
_barometricPressure = 1013.25;
_relativeHumidity = 0;
private ["_result"];
_result = [_scopeBaseAngle, _bulletMass, _boreHeight, _airFriction, _muzzleVelocity, _temperature, _barometricPressure, _relativeHumidity, 1000, [0, 0], 0, 0, 0, _zeroRange, _airFriction, 1, "ICAO", false, 1.5, 0, 0, 0] call FUNC(calculate_solution);
_scopeBaseAngle + (_result select 0) / 60

View File

@ -37,7 +37,7 @@
* 8: Spin drift (MOA) <NUMBER>
*
* Example:
* call ace_atragmx_calculate_target_range_assist
* call ace_atragmx_calculate_solution
*
* Public: No
*/

View File

@ -15,6 +15,9 @@
*/
#include "script_component.hpp"
#define __dsp (uiNamespace getVariable "ATragMX_Display")
#define __ctrlBackground (__dsp displayCtrl 720000)
if (GVAR(active)) exitWith { false };
if (underwater ACE_player) exitWith { false };
if (!("ACE_ATragMX" in (uniformItems ACE_player)) && !("ACE_ATragMX" in (vestItems ACE_player))) exitWith { false };
@ -49,4 +52,11 @@ GVAR(showTargetSpeedAssistTimer) call FUNC(show_target_speed_assist_timer);
GVAR(active) = true;
GVAR(DialogPFH) = [{
if (!GVAR(active)) exitWith {
[_this select 1] call cba_fnc_removePerFrameHandler;
};
__ctrlBackground ctrlSetText format [QUOTE(PATHTOF(UI\ATRAG_%1.paa)), ["N", "D"] select (call EFUNC(common,ambientBrightness))];
}, 60, []] call cba_fnc_addPerFrameHandler;
true

View File

@ -2,3 +2,4 @@
uiNamespace setVariable ['ATragMX_Display', nil];
GVAR(active) = false;
[GVAR(DialogPFH)] call cba_fnc_removePerFrameHandler;

View File

@ -59,7 +59,7 @@ if (GVAR(currentUnit) == 1) then {
private ["_boreHeight", "_bulletMass", "_bulletDiameter", "_airFriction", "_rifleTwist", "_muzzleVelocity", "_zeroRange"];
_boreHeight = parseNumber(ctrlText 120000);
_bulletMass = parseNumber(ctrlText 120010);
_bulletDiameter = parseNumber(ctrlText 120020);
_bulletDiameter = parseNumber(ctrlText 120020) * 10;
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
_airFriction = 0.1 max parseNumber(ctrlText 120030) min 2;
} else {
@ -71,7 +71,7 @@ _zeroRange = parseNumber (ctrlText 120060);
if (GVAR(currentUnit) != 2) then {
_boreHeight = _boreHeight * 2.54;
_bulletMass = _bulletMass * 0.06479891;
_bulletDiameter = _bulletDiameter * 10 * 2.54;
_bulletDiameter = _bulletDiameter * 2.54;
_rifleTwist = _rifleTwist * 2.54;
_muzzleVelocity = _muzzleVelocity / 3.2808399;
};

View File

@ -30,7 +30,7 @@ if !(ctrlVisible 9000) then {
if (!(GVAR(speedAssistTimer))) exitWith {
GVAR(speedAssistTimer) = true;
ctrlSetText [8006, Str(Round((time - _startTime) * 10) / 10)];
ctrlSetText [8006, Str(Round((ACE_time - _startTime) * 10) / 10)];
[] call FUNC(calculate_target_speed_assist);
@ -40,7 +40,7 @@ if !(ctrlVisible 9000) then {
[_this select 1] call cba_fnc_removePerFrameHandler;
};
ctrlSetText [9001, Str(Round((time - _startTime) * 10) / 10)];
ctrlSetText [9001, Str(Round((ACE_time - _startTime) * 10) / 10)];
}, 0.1, [time]] call CBA_fnc_addPerFrameHandler;
}, 0.1, [ACE_time]] call CBA_fnc_addPerFrameHandler;
};

View File

@ -30,7 +30,7 @@ if (GVAR(currentUnit) != 2) then {
if (GVAR(currentUnit) != 2) then {
ctrlSetText [120020, Str(Round((GVAR(workingMemory) select 13) / 10 / 2.54 * 1000) / 1000)];
} else {
ctrlSetText [120020, Str(Round((GVAR(workingMemory) select 13) * 1000) / 1000)];
ctrlSetText [120020, Str(Round((GVAR(workingMemory) select 13) / 10 * 1000) / 1000)];
};
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
ctrlSetText [120030, Str(Round((GVAR(workingMemory) select 15) * 1000) / 1000)];

View File

@ -2,7 +2,10 @@
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
if (GVAR(active)) exitWith {false};
if (GVAR(active)) exitWith {
closeDialog 0;
false
};
// Statement
[] call FUNC(create_dialog);
false

View File

@ -11,4 +11,4 @@
#include "\z\ace\addons\main\script_macros.hpp"
#define ATRAGMX_PROFILE_NAMESPACE_VERSION 1.5
#define ATRAGMX_PROFILE_NAMESPACE_VERSION 1.6

View File

@ -1 +1 @@
z\ace\Addons\attach
z\ace\addons\attach

View File

@ -1,5 +1,5 @@
#define COMPONENT attach
#include "\z\ace\Addons\main\script_mod.hpp"
#include "\z\ace\addons\main\script_mod.hpp"
#ifdef DEBUG_ENABLED_ATTACH
#define DEBUG_MODE_FULL
@ -9,4 +9,4 @@
#define DEBUG_SETTINGS DEBUG_SETTINGS_ATTACH
#endif
#include "\z\ace\Addons\main\script_macros.hpp"
#include "\z\ace\addons\main\script_macros.hpp"

View File

@ -20,11 +20,11 @@ class CfgAmmo {
};
class B_556x45_Ball : BulletBase {
airFriction=-0.001265;
airFriction=-0.0013685;
hit=8;
typicalSpeed=750;
tracerStartTime=0.073; // M856 tracer burns out to 800m
tracerEndTime = 1.579; //Time in seconds calculated with ballistics calculator
tracerEndTime=1.57123; // Time in seconds calculated with ballistics calculator
ACE_caliber=5.69;
ACE_bulletLength=23.012;
ACE_bulletMass=4.0176;
@ -37,7 +37,7 @@ class CfgAmmo {
ACE_barrelLengths[]={210.82, 238.76, 269.24, 299.72, 330.2, 360.68, 391.16, 419.1, 449.58, 480.06, 508.0, 609.6};
};
class ACE_556x45_Ball_Mk262 : B_556x45_Ball {
airFriction=-0.001125;
airFriction=-0.0011287;
caliber=0.8;
deflecting=18;
hit=11;
@ -54,7 +54,7 @@ class CfgAmmo {
ACE_barrelLengths[]={190.5, 368.3, 457.2, 508.0};
};
class ACE_556x45_Ball_Mk318 : B_556x45_Ball {
airFriction=-0.001120;
airFriction=-0.0013064;
caliber=0.8;
deflecting=18;
hit=9;
@ -71,7 +71,7 @@ class CfgAmmo {
ACE_barrelLengths[]={254.0, 393.7, 508.0};
};
class ACE_556x45_Ball_M995_AP : B_556x45_Ball {
airFriction=-0.001120;
airFriction=-0.0012972;
caliber=1.6;
deflecting=18;
hit=6;
@ -85,14 +85,14 @@ class CfgAmmo {
ACE_standardAtmosphere="ASM";
ACE_dragModel=1;
ACE_muzzleVelocities[]={820, 865, 880};
ACE_barrelLengths[]={254.0, 393.7, 508.0};
ACE_barrelLengths[]={254.0, 368.3, 508.0};
};
class B_556x45_Ball_Tracer_Red;
class ACE_B_556x45_Ball_Tracer_Dim: B_556x45_Ball_Tracer_Red {
nvgOnly = 1;
};
class ACE_545x39_Ball_7N6M : B_556x45_Ball {
airFriction=-0.001162;
airFriction=-0.001222;
caliber=0.6;
deflecting=18;
hit=7;
@ -110,13 +110,13 @@ class CfgAmmo {
};
class B_556x45_Ball_Tracer_Green;
class ACE_545x39_Ball_7T3M : B_556x45_Ball_Tracer_Green {
airFriction=-0.001162;
airFriction=-0.001222;
caliber=0.6;
deflecting=18;
hit=7;
typicalSpeed=883;
tracerStartTime=0.073; // 7T3M tracer burns out to 850m
tracerEndTime = 1.736; //Time in seconds calculated with ballistics calculator
tracerEndTime=1.70236; // Time in seconds calculated with ballistics calculator
ACE_caliber=5.588;
ACE_bulletLength=21.59;
ACE_bulletMass=3.22704;
@ -129,7 +129,7 @@ class CfgAmmo {
ACE_barrelLengths[]={254.0, 414.02, 508.0};
};
class B_65x39_Caseless : BulletBase {
airFriction=-0.000785;
airFriction=-0.0007728;
typicalSpeed=800;
ACE_caliber=6.706;
ACE_bulletLength=32.893;
@ -151,7 +151,7 @@ class CfgAmmo {
nvgOnly = 1;
};
class ACE_65x47_Ball_Scenar: B_65x39_Caseless {
airFriction=-0.00078;
airFriction=-0.0006977;
typicalSpeed=820 ;
caliber=0.9;
ACE_caliber=6.706;
@ -166,7 +166,7 @@ class CfgAmmo {
ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
};
class ACE_65_Creedmor_Ball: B_65x39_Caseless {
airFriction=-0.000651;
airFriction=-0.0006136;
typicalSpeed=860 ;
caliber=1.1;
ACE_caliber=6.706;
@ -181,11 +181,11 @@ class CfgAmmo {
ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
};
class B_762x51_Ball : BulletBase {
airFriction=-0.001035;
airFriction=-0.0010319;
typicalSpeed=833;
hit=9;
tracerStartTime=0.073; // Based on the British L5A1 which burns out to 1000m
tracerEndTime = 2.058; //Time in seconds calculated with ballistics calculator
tracerEndTime=2.15957; // Time in seconds calculated with ballistics calculator
ACE_caliber=7.823;
ACE_bulletLength=28.956;
ACE_bulletMass=9.4608;
@ -202,7 +202,7 @@ class CfgAmmo {
nvgOnly = 1;
};
class ACE_762x51_Ball_M118LR : B_762x51_Ball {
airFriction=-0.0008525;
airFriction=-0.0008497;
caliber=1.8;
hit=16;
typicalSpeed=790;
@ -218,7 +218,7 @@ class CfgAmmo {
ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4};
};
class ACE_762x51_Ball_Mk316_Mod_0 : B_762x51_Ball {
airFriction=-0.0008525;
airFriction=-0.0008421;
caliber=1.8;
hit=16;
typicalSpeed=790;
@ -234,7 +234,7 @@ class CfgAmmo {
ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4};
};
class ACE_762x51_Ball_Mk319_Mod_0 : B_762x51_Ball {
airFriction=-0.00103;
airFriction=-0.0010435;
caliber=1.5;
hit=14;
typicalSpeed=900;
@ -250,7 +250,7 @@ class CfgAmmo {
ACE_barrelLengths[]={330.2, 406.4, 508.0};
};
class ACE_762x51_Ball_M993_AP : B_762x51_Ball {
airFriction=-0.00103;
airFriction=-0.0010914;
caliber=2.2;
hit=11;
typicalSpeed=910;
@ -266,7 +266,7 @@ class CfgAmmo {
ACE_barrelLengths[]={330.2, 406.4, 508.0};
};
class ACE_762x51_Ball_Subsonic : B_762x51_Ball {
airFriction=-0.000535;
airFriction=-0.0004145;
caliber=1;
hit=6;
typicalSpeed=320;
@ -282,7 +282,7 @@ class CfgAmmo {
ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4};
};
class ACE_30_06_M1_Ball : B_762x51_Ball {
airFriction=-0.0009;
airFriction=-0.0008290;
typicalSpeed=800;
caliber=2.0;
hit=10;
@ -298,7 +298,7 @@ class CfgAmmo {
ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
};
class ACE_7_Remington_Magnum_Ball : B_762x51_Ball {
airFriction=-0.0008;
airFriction=-0.0005809;
typicalSpeed=820;
caliber=2.1;
hit=8;
@ -314,7 +314,7 @@ class CfgAmmo {
ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
};
class ACE_243_Winchester_Ball : B_762x51_Ball {
airFriction=-0.00095;
airFriction=-0.0007010;
typicalSpeed=915;
caliber=2.3;
hit=6;
@ -330,7 +330,7 @@ class CfgAmmo {
ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
};
class ACE_762x67_Ball_Mk248_Mod_0 : B_762x51_Ball {
airFriction=-0.000830;
airFriction=-0.0007305;
caliber=1.8;
hit=17;
typicalSpeed=900;
@ -346,7 +346,7 @@ class CfgAmmo {
ACE_barrelLengths[]={508.0, 609.6, 660.4};
};
class ACE_762x67_Ball_Mk248_Mod_1 : B_762x51_Ball {
airFriction=-0.000815;
airFriction=-0.0006326;
caliber=1.9;
hit=18;
typicalSpeed=867;
@ -362,7 +362,7 @@ class CfgAmmo {
ACE_barrelLengths[]={508.0, 609.6, 660.4};
};
class ACE_762x67_Ball_Berger_Hybrid_OTM : B_762x51_Ball {
airFriction=-0.00076;
airFriction=-0.0005271;
caliber=2.0;
hit=19;
typicalSpeed=853;
@ -378,7 +378,7 @@ class CfgAmmo {
ACE_barrelLengths[]={508.0, 609.6, 660.4};
};
class B_762x54_Ball: B_762x51_Ball {
airFriction=-0.001023;
airFriction=-0.0010165;
typicalSpeed=820;
ACE_caliber=7.925;
ACE_bulletLength=28.956;
@ -392,7 +392,7 @@ class CfgAmmo {
ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4};
};
class ACE_762x54_Ball_7N14 : B_762x51_Ball {
airFriction=-0.001023;
airFriction=-0.0010165;
caliber=1.5;
hit=15;
typicalSpeed=820;
@ -409,7 +409,7 @@ class CfgAmmo {
};
class B_762x54_Tracer_Green;
class ACE_762x54_Ball_7T2 : B_762x54_Tracer_Green {
airFriction=-0.001023;
airFriction=-0.0010369;
caliber=1.5;
hit=15;
typicalSpeed=800;
@ -427,7 +427,7 @@ class CfgAmmo {
ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4};
};
class ACE_762x35_Ball : B_762x51_Ball {
airFriction=-0.000821;
airFriction=-0.0012406;
caliber=1.5;
hit=11;
typicalSpeed=790;
@ -443,7 +443,7 @@ class CfgAmmo {
ACE_barrelLengths[]={228.6, 406.4, 508.0};
};
class ACE_762x39_Ball : B_762x51_Ball {
airFriction=-0.0015168;
airFriction=-0.0014519;
hit=12;
caliber=1.5;
typicalSpeed=716;
@ -477,7 +477,7 @@ class CfgAmmo {
ACE_barrelLengths[]={254.0, 414.02, 508.0};
};
class B_9x21_Ball : BulletBase {
airFriction=-0.00125;
airFriction=-0.0021165;
typicalSpeed=390;
hit=6;
ACE_caliber=9.042;
@ -493,7 +493,7 @@ class CfgAmmo {
};
class ACE_9x18_Ball_57N181S : B_9x21_Ball {
hit=5;
airFriction=-0.001234;
airFriction=-0.0015655;
typicalSpeed=298;
ACE_caliber=9.271;
ACE_bulletLength=15.494;
@ -507,7 +507,7 @@ class CfgAmmo {
ACE_barrelLengths[]={96.52, 127.0, 228.6};
};
class ACE_9x19_Ball : B_9x21_Ball {
airFriction=-0.001234;
airFriction=-0.0015833;
typicalSpeed=370;
hit=6;
ACE_caliber=9.017;
@ -537,7 +537,7 @@ class CfgAmmo {
ACE_barrelLengths[]={101.6, 117.094, 228.6};
};
class ACE_765x17_Ball: B_9x21_Ball {
airFriction=-0.001213;
airFriction=-0.001410;
typicalSpeed=282;
hit=7;
ACE_caliber=7.938;
@ -552,7 +552,7 @@ class CfgAmmo {
ACE_barrelLengths[]={101.6, 127.0, 228.6};
};
class ACE_303_Ball : ACE_762x51_Ball_M118LR {
airFriction=-0.00083;
airFriction=-0.0008410;
typicalSpeed=761;
caliber=2.0;
ACE_caliber=7.899;
@ -567,7 +567,7 @@ class CfgAmmo {
ACE_barrelLengths[]={508.0, 609.6, 660.4};
};
class B_93x64_Ball : BulletBase {
airFriction=-0.00106;
airFriction=-0.0010921;
typicalSpeed=880;
ACE_caliber=9.296;
ACE_bulletLength=34.29;
@ -582,7 +582,7 @@ class CfgAmmo {
};
class B_408_Ball : BulletBase {
timeToLive=10;
airFriction=-0.000395;
airFriction=-0.0003958;
typicalSpeed=910;
ACE_caliber=10.363;
ACE_bulletLength=54.0;
@ -611,7 +611,7 @@ class CfgAmmo {
};
class B_338_Ball : BulletBase {
timeToLive=10;
airFriction=-0.000606;
airFriction=-0.0006234;
typicalSpeed=915;
ACE_caliber=8.585;
ACE_bulletLength=39.573;
@ -625,7 +625,7 @@ class CfgAmmo {
ACE_barrelLengths[]={508.0, 660.4, 711.2};
};
class B_338_NM_Ball : BulletBase {
airFriction=-0.000537;
airFriction=-0.0005434;
typicalSpeed=820;
ACE_caliber=8.585;
ACE_bulletLength=43.18;
@ -640,7 +640,7 @@ class CfgAmmo {
};
class ACE_338_Ball : B_338_Ball {
timeToLive=10;
airFriction=-0.000535;
airFriction=-0.0005397;
typicalSpeed=826;
ACE_caliber=8.585;
ACE_bulletLength=43.18;
@ -655,7 +655,7 @@ class CfgAmmo {
};
class ACE_338_Ball_API526 : B_338_Ball {
timeToLive=10;
airFriction=-0.000673;
airFriction=-0.0007120;
caliber=2.8;
typicalSpeed=895;
ACE_caliber=8.585;
@ -670,7 +670,7 @@ class CfgAmmo {
ACE_barrelLengths[]={508.0, 660.4, 711.2};
};
class B_127x54_Ball : BulletBase {
airFriction=-0.00014;
airFriction=-0.0001877;
typicalSpeed=300;
ACE_caliber=12.954;
ACE_bulletLength=64.516;
@ -685,7 +685,7 @@ class CfgAmmo {
};
class B_127x99_Ball : BulletBase {
timeToLive=10;
airFriction=-0.0006;
airFriction=-0.0005942;
typicalSpeed=900;
ACE_caliber=12.954;
ACE_bulletLength=58.674;
@ -700,7 +700,7 @@ class CfgAmmo {
};
class ACE_127x99_API : BulletBase {
timeToLive=10;
airFriction=-0.0006;
airFriction=-0.0005886;
typicalSpeed=900;
hit=25;
caliber=4.0;
@ -717,7 +717,7 @@ class CfgAmmo {
};
class ACE_127x99_Ball_AMAX : B_127x99_Ball {
timeToLive=10;
airFriction=-0.000374;
airFriction=-0.0003722;
typicalSpeed=860;
caliber=3.0;
ACE_caliber=12.954;
@ -733,7 +733,7 @@ class CfgAmmo {
};
class B_127x108_Ball : BulletBase {
timeToLive=10;
airFriction=-0.00064;
airFriction=-0.0006469;
typicalSpeed=820;
ACE_caliber=12.979;
ACE_bulletLength=64.008;
@ -747,7 +747,7 @@ class CfgAmmo {
ACE_barrelLengths[]={728.98};
};
class B_45ACP_Ball : BulletBase {
airFriction=-0.0007182;
airFriction=-0.0007312;
typicalSpeed=250;
ACE_caliber=11.481;
ACE_bulletLength=17.272;

View File

@ -55,7 +55,7 @@ class CfgMagazines {
displayName = "$STR_ACE_30Rnd_556x45_Stanag_M995_AP_mag_Name";
displayNameShort = "$STR_ACE_30Rnd_556x45_Stanag_M995_AP_mag_NameShort";
descriptionShort = "$STR_ACE_30Rnd_556x45_Stanag_M995_AP_mag_Description";
initSpeed = 1046;
initSpeed = 865;
};
class ACE_30Rnd_556x45_Stanag_Mk262_mag: 30Rnd_556x45_Stanag {
author = "$STR_ACE_Common_ACETeam";

View File

@ -552,7 +552,7 @@ class CfgWeapons {
};
initSpeed = -1.0;
ACE_barrelTwist=381.0;
ACE_barrelLength=929.64;
ACE_barrelLength=730;
};
class srifle_DMR_02_F: DMR_02_base_F {
magazines[] = {

View File

@ -1595,6 +1595,7 @@
<Key ID="STR_ACE_AmmoSupplyCrate_DisplayName">
<English>[ACE] Ammo Supply Crate</English>
<Polish>[ACE] Skrzynka z amunicją</Polish>
<Spanish>[ACE] Caja de suministros de munición</Spanish>
</Key>
</Package>
</Project>

View File

@ -17,8 +17,10 @@
PARAMS_1(_oldUnit);
if (!local _oldUnit) exitWith {};
if (_oldUnit getVariable [QGVAR(isHandcuffed), false]) then {
[_oldUnit, false] call FUNC(setSurrendered);
[_oldUnit, false] call FUNC(setHandcuffed);
};
if (_oldUnit getVariable [QGVAR(isEscorting), false]) then {

View File

@ -89,7 +89,7 @@ if (_state) then {
PARAMS_2(_args,_pfID);
EXPLODE_2_PVT(_args,_unit,_maxTime);
//If waited long enough or they re-surrendered or they are unconscious, exit loop
if ((time > _maxTime) || {_unit getVariable [QGVAR(isSurrendering), false]} || {_unit getVariable ["ACE_isUnconscious", false]}) exitWith {
if ((ACE_time > _maxTime) || {_unit getVariable [QGVAR(isSurrendering), false]} || {_unit getVariable ["ACE_isUnconscious", false]}) exitWith {
[_pfID] call CBA_fnc_removePerFrameHandler;
};
//Only break animation if they are actualy the "hands up" animation (because we are using switchmove there won't be an transition)
@ -98,6 +98,6 @@ if (_state) then {
//Break out of hands up animation loop
[_unit, "ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
};
}, 0, [_unit, (time + 20)]] call CBA_fnc_addPerFrameHandler;
}, 0, [_unit, (ACE_time + 20)]] call CBA_fnc_addPerFrameHandler;
};
};

View File

@ -196,10 +196,12 @@
<Key ID="STR_ACE_Captives_ModuleSurrender_DisplayName">
<English>Make Unit Surrender</English>
<Polish>Poddaj się!</Polish>
<Spanish>Hacer que la unidad se rinda</Spanish>
</Key>
<Key ID="STR_ACE_Captives_ModuleSurrender_Description">
<English>Sync a unit to make them surrender.&lt;br /&gt;Source: ace_captives</English>
<Polish>Zsynchronizuj z jednostką aby sprawić by się poddała&lt;br /&gt;Źródło: ace_captives</Polish>
<Spanish>Sincroniza una unidad para hacer que se rinda.&lt;br /&gt;Fuente: ace_captives</Spanish>
</Key>
</Package>
</Project>

View File

@ -3,12 +3,6 @@
//IGNORE_PRIVATE_WARNING("_handleNetEvent", "_handleRequestAllSyncedEvents", "_handleRequestSyncedEvent", "_handleSyncedEvent");
// Load settings from profile
if (hasInterface) then {
call FUNC(loadSettingsFromProfile);
call FUNC(loadSettingsLocalizedText);
};
// Listens for global "SettingChanged" events, to update the force status locally
["SettingChanged", {
PARAMS_2(_name,_value);
@ -41,7 +35,7 @@ if (hasInterface) then {
// hack to get PFH to work in briefing
[QGVAR(onBriefingPFH), "onEachFrame", {
if (time > 0) exitWith {
if (ACE_time > 0) exitWith {
[QGVAR(onBriefingPFH), "onEachFrame"] call BIS_fnc_removeStackedEventHandler;
};
@ -223,7 +217,7 @@ GVAR(OldIsCamera) = false;
["activeCameraChanged", [ACE_player, _isCamera]] call FUNC(localEvent);
};
}, 1, []] call cba_fnc_addPerFrameHandler; // feel free to decrease the sleep 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);
@ -244,7 +238,7 @@ GVAR(OldIsCamera) = false;
// Lastly, do JIP events
// JIP Detection and event trigger. Run this at the very end, just in case anything uses it
if(isMultiplayer && { time > 0 || isNull player } ) then {
if(isMultiplayer && { ACE_time > 0 || isNull player } ) then {
// We are jipping! Get ready and wait, and throw the event
[{
if(!(isNull player)) then {
@ -253,3 +247,19 @@ if(isMultiplayer && { time > 0 || isNull player } ) then {
};
}, 0, []] call cba_fnc_addPerFrameHandler;
};
GVAR(commonPostInited) = true;
// Create a pfh to wait until all postinits are ready and settings are initialized
[{
// If post inits are not ready then wait
if !(SLX_XEH_MACHINE select 8) exitWith {};
// If settings are not initialized then wait
if !(GVAR(SettingsInitialized)) exitWith {};
[(_this select 1)] call cba_fnc_removePerFrameHandler;
diag_log text format["[ACE] Settings initialized"];
["SettingsInitialized", []] call FUNC(localEvent);
}, 0, []] call cba_fnc_addPerFrameHandler;

View File

@ -180,6 +180,7 @@ PREP(toHex);
PREP(toNumber);
PREP(uniqueElementsOnly);
PREP(unloadPerson);
PREP(unloadPersonLocal);
PREP(unmuteUnit);
PREP(useItem);
PREP(useMagazine);
@ -286,15 +287,30 @@ PREP(_handleRequestSyncedEvent);
PREP(_handleRequestAllSyncedEvents);
GVAR(syncedEvents) = HASH_CREATE;
GVAR(waitAndExecArray) = [];
// @TODO: Generic local-managed global-synced objects (createVehicleLocal)
//Debug
ACE_COUNTERS = [];
// Load settings
// Wait for server settings to arrive
GVAR(SettingsInitialized) = false;
["ServerSettingsReceived", {
diag_log text format["[ACE] Settings received from server"];
// Load user settings from profile
if (hasInterface) then {
call FUNC(loadSettingsFromProfile);
call FUNC(loadSettingsLocalizedText);
};
GVAR(SettingsInitialized) = true;
}] call FUNC(addEventhandler);
// Load settings on the server and broadcast them
if (isServer) then {
call FUNC(loadSettingsOnServer);
// Raise a local event for other modules to listen too
["ServerSettingsReceived", []] call FUNC(localEvent);
};
ACE_player = player;
@ -321,6 +337,8 @@ ACE_realTime = diag_tickTime;
ACE_virtualTime = diag_tickTime;
ACE_diagTime = diag_tickTime;
ACE_gameTime = time;
ACE_pausedTime = 0;
ACE_virtualPausedTime = 0;
PREP(timePFH);
[FUNC(timePFH), 0, []] call cba_fnc_addPerFrameHandler;

View File

@ -28,7 +28,7 @@ if(isServer) then {
if(_ttl > -1) then {
_internalData = HASH_GET(GVAR(syncedEvents),_name);
_eventLog = _internalData select 1;
_eventLog pushback [diag_tickTime, _args, _ttl];
_eventLog pushback [ACE_diagTime, _args, _ttl];
};
};

View File

@ -1,7 +1,7 @@
/*
* Author: commy2
*
* Add an event handler that executes every time the scroll wheel is used. This is needed, because adding a MouseZ display event handler to display 46 will break in save games. Argument will be [Interval] where 'Interval' is a number.
* Add an event handler that executes every ACE_time the scroll wheel is used. This is needed, because adding a MouseZ display event handler to display 46 will break in save games. Argument will be [Interval] where 'Interval' is a number.
*
* Argument:
* 0: Code to execute (Code or String)

View File

@ -1,6 +1,6 @@
/*
* Author: esteldunedain and Jaynus
* Returns the result of the function and caches it up to a given time or event
* Returns the result of the function and caches it up to a given ACE_time or event
*
* Arguments:
* 0: Parameters <ARRAY>
@ -21,8 +21,8 @@ PARAMS_5(_params,_function,_namespace,_uid,_duration);
//IGNORE_PRIVATE_WARNING("_eventName");
if (((_namespace getVariable [_uid, [-99999]]) select 0) < diag_tickTime) then {
_namespace setVariable [_uid, [diag_tickTime + _duration, _params call _function]];
if (((_namespace getVariable [_uid, [-99999]]) select 0) < ACE_diagTime) then {
_namespace setVariable [_uid, [ACE_diagTime + _duration, _params call _function]];
// Does the cache needs to be cleared on an event?
if (count _this > 5) then {

View File

@ -86,11 +86,11 @@ _refresh = {
if (_show) then {
if ({(_x select 0 == _iconId)} count _list == 0) then {
_list pushback [_iconId, _icon, _color, time];
_list pushback [_iconId, _icon, _color, ACE_time];
} else {
{
if (_x select 0 == _iconId) exitwith {
_list set [_foreachIndex, [_iconId, _icon, _color, time]];
_list set [_foreachIndex, [_iconId, _icon, _color, ACE_time]];
};
} forEach _list;
};

View File

@ -36,7 +36,7 @@ if (isNil "_sound") then {_sound = DEFAULT_PLAY_SOUND};
if (isNil "_delay") then {_delay = DEFAULT_DELAY};
if (isNil "_priority") then {_priority = DEFAULT_PRIORITY};
_time = time;
_time = ACE_time;
if (_time > _lastHintTime + _delay || {_priority >= _lastHintPriority}) then {
hintSilent _text;
if (_sound) then {playSound "ACE_Sound_Click"};

View File

@ -1,6 +1,6 @@
/*
* Author: Glowbal, PabstMirror
* Get the death animation for the unit at current time
* Get the death animation for the unit at current ACE_time
*
* Arguments:
* 0: unit <OBJECT>

View File

@ -2,7 +2,7 @@
#include "script_component.hpp"
private ["_val", "_index"];
// diag_log text format["%1 HASH GET: %2", diag_tickTime, _this];
// diag_log text format["%1 HASH GET: %2", ACE_diagTime, _this];
PARAMS_2(_hash,_key);
@ -23,4 +23,6 @@ try {
} catch {
HANDLECATCH;
};
_val
if (isNil "_val") exitWith { nil };
_val;

View File

@ -2,7 +2,7 @@
#include "script_component.hpp"
private ["_val", "_index"];
// diag_log text format["%1 HASH HAS KEY: %2", diag_tickTime, _this];
// diag_log text format["%1 HASH HAS KEY: %2", ACE_diagTime, _this];
PARAMS_2(_hash,_key);

View File

@ -23,4 +23,6 @@ try {
} catch {
HANDLECATCH;
};
if (isNil "_hash") exitWith { nil };
_hash;

View File

@ -2,7 +2,7 @@
#include "script_component.hpp"
private ["_index"];
// diag_log text format["%1 HASH SET: %2", diag_tickTime, _this];
// diag_log text format["%1 HASH SET: %2", ACE_diagTime, _this];
PARAMS_3(_hash,_key,_val);

View File

@ -5,7 +5,7 @@
* Finish/Failure/Conditional are all passed [_args, _elapsedTime, _totalTime, _errorCode]
*
* Argument:
* 0: NUMBER - Total Time (in game "time" seconds)
* 0: NUMBER - Total Time (in game "ACE_time" seconds)
* 1: ARRAY - Arguments, passed to condition, fail and finish
* 2: CODE or STRING - On Finish: Code called or STRING raised as event.
* 3: CODE or STRING - On Failure: Code called or STRING raised as event.
@ -53,7 +53,7 @@ _perFrameFunction = {
EXPLODE_8_PVT(_parameters,_args,_onFinish,_onFail,_condition,_player,_startTime,_totalTime,_exceptions);
private ["_elapsedTime", "_errorCode"];
_elapsedTime = time - _startTime;
_elapsedTime = ACE_time - _startTime;
_errorCode = -1;
// this does not check: target fell unconscious, target died, target moved inside vehicle / left vehicle, target moved outside of players range, target moves at all.
@ -105,4 +105,4 @@ _perFrameFunction = {
};
};
[_perFrameFunction, 0, [_args, _onFinish, _onFail, _condition, _player, time, _totalTime, _exceptions]] call CBA_fnc_addPerFrameHandler;
[_perFrameFunction, 0, [_args, _onFinish, _onFail, _condition, _player, ACE_time, _totalTime, _exceptions]] call CBA_fnc_addPerFrameHandler;

View File

@ -41,7 +41,7 @@ GVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE) = _target addAction ["Decline", compile
GVAR(RECIEVE_REQUEST_ID_KEY_BINDING) = _requestID;
GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT) = [time, _target, _requestID] spawn {
GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT) = [ACE_time, _target, _requestID] spawn {
private["_id", "_t", "_requestID", "_target"];
_t = (_this select 0) + 40;
_target = _this select 1;
@ -50,7 +50,7 @@ GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT) = [time, _target, _requestID] spawn {
waituntil {
_id = _target getvariable _requestID;
(time > _t || isnil "_id")};
(ACE_time > _t || isnil "_id")};
_target setvariable [_requestID, nil];
GVAR(RECIEVE_REQUEST_ID_KEY_BINDING) = nil;
if (!isnil QGVAR(RECIEVE_REQUEST_ADD_ACTION_ACCEPT)) then {

View File

@ -1,13 +1,13 @@
/*
* Author: commy2
*
* Sets a public variable, but wait a certain amount of time to transfer the value over the network. Changing the value by calling this function again resets the windup timer.
* Sets a public variable, but wait a certain amount of ACE_time to transfer the value over the network. Changing the value by calling this function again resets the windup timer.
*
* Argument:
* 0: Object the variable should be assigned to (Object)
* 1: Name of the variable (String)
* 2: Value of the variable (Any)
* 3: Windup time (Number, optional. Default: 1)
* 3: Windup ACE_time (Number, optional. Default: 1)
*
* Return value:
* Nothing.
@ -38,12 +38,12 @@ if (_idName in _allIdNames) exitWith {};
// when to push the value
private "_syncTime";
_syncTime = diag_tickTime + _sync;
_syncTime = ACE_diagTime + _sync;
// add eventhandler
[_idName, "onEachFrame", {
// wait to sync the variable
if (diag_tickTime > _this select 2) then {
if (ACE_diagTime > _this select 2) then {
// set value public
(_this select 0) setVariable [_this select 1, (_this select 0) getVariable (_this select 1), true];

View File

@ -24,7 +24,7 @@ private["_data"];
if(typeName _globalEventTTL == "CODE") then {
_ttlReturn = [(_data select 0),_eventEntry] call _globalEventTTL;
} else {
_ttlReturn = call { _globalEventTTL < 1 || {diag_tickTime < (_eventEntry select 0) + _globalEventTTL} };
_ttlReturn = call { _globalEventTTL < 1 || {ACE_diagTime < (_eventEntry select 0) + _globalEventTTL} };
};
if(_ttlReturn) then {
@ -35,7 +35,7 @@ private["_data"];
if(typeName _eventTTL == "CODE") then {
_ttlReturn = [(_data select 0),_eventEntry] call _eventTTL;
} else {
_ttlReturn = call { _eventTTL < 1 || {diag_tickTime < (_eventEntry select 0) + _eventTTL} };
_ttlReturn = call { _eventTTL < 1 || {ACE_diagTime < (_eventEntry select 0) + _eventTTL} };
};
};

View File

@ -19,7 +19,7 @@
PARAMS_3(_unit,_varName,_maxDelay);
// Create the publish scheduler PFH the first time
// Create the publish scheduler PFH the first ACE_time
if (isNil QGVAR(publishSchedId)) then {
GVAR(publishVarNames) = [];
@ -27,7 +27,7 @@ if (isNil QGVAR(publishSchedId)) then {
GVAR(publishSchedId) = [{
if (diag_tickTime > GVAR(publishNextTime)) then {
if (ACE_diagTime > GVAR(publishNextTime)) then {
{
EXPLODE_2_PVT(_x,_unit,_varName);
_unit setVariable [_varName, (_unit getVariable _varName), true];
@ -42,8 +42,8 @@ if (isNil QGVAR(publishSchedId)) then {
// If the variable is not on the list
if (GVAR(publishVarNames) find [_unit,_varName] == -1) exitWith {
GVAR(publishVarNames) pushBack [_unit,_varName];
GVAR(publishNextTime) = GVAR(publishNextTime) min (diag_tickTime + _maxDelay);
GVAR(publishNextTime) = GVAR(publishNextTime) min (ACE_diagTime + _maxDelay);
};
// If the variable is on the list
GVAR(publishNextTime) = GVAR(publishNextTime) min (diag_tickTime + _maxDelay);
GVAR(publishNextTime) = GVAR(publishNextTime) min (ACE_diagTime + _maxDelay);

View File

@ -1,25 +1,26 @@
//#define DEBUG_MODE_FULL
#include "script_component.hpp"
private["_lastRealTime", "_lastGameTime", "_delta"];
private["_lastTickTime", "_lastGameTime", "_delta"];
_lastRealTime = ACE_realTime;
_lastTickTime = ACE_diagTime;
_lastGameTime = ACE_gameTime;
ACE_gameTime = time;
ACE_diagTime = diag_tickTime;
_delta = ACE_diagTime - _lastRealTime;
_delta = ACE_diagTime - _lastTickTime;
if(ACE_gameTime <= _lastGameTime) then {
TRACE_1("paused",_delta);
ACE_paused = true;
// Game is paused or not running
ACE_pausedTime = ACE_pausedTime + _delta;
ACE_virtualPausedTime = ACE_pausedTime + (_delta * accTime);
} else {
TRACE_1("live",_delta);
ACE_paused = false;
// Time is updating
ACE_realTime = ACE_realTime + _delta;
ACE_virtualTime = ACE_virtualTime + (_delta * accTime);
ACE_time = ACE_virtualTime;
};

View File

@ -10,12 +10,12 @@
*
* Public: No
*/
//#define DEBUG_MODE_FULL
#include "script_component.hpp"
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson))
private ["_vehicle", "_loaded", "_emptyPos"];
private ["_vehicle","_emptyPos"];
PARAMS_1(_unit);
_vehicle = vehicle _unit;
@ -25,20 +25,8 @@ if !(speed _vehicle <1 && (((getpos _vehicle) select 2) < 2)) exitwith {false;};
_emptyPos = ((getPos _vehicle) findEmptyPosition [0, 10, typeof _unit]);
if (count _emptyPos == 0) exitwith {false};
_unit setPos _emptyPos;
unassignVehicle _unit;
if (!alive _unit) then {
_unit action ["Eject", vehicle _unit];
};
[_unit, false, GROUP_SWITCH_ID, side group _unit] call FUNC(switchToGroupSide);
_loaded = _vehicle getvariable [QGVAR(loaded_persons),[]];
_loaded = _loaded - [_unit];
_vehicle setvariable [QGVAR(loaded_persons),_loaded,true];
if (!([_unit] call FUNC(isAwake))) then {
[_unit,([_unit] call FUNC(getDeathAnim)), 1, true] call FUNC(doAnimation);
if (!isNull _vehicle) then {
[[_unit], QUOTE(FUNC(unloadPersonLocal)), _unit, false] call EFUNC(common,execRemoteFnc);
};
true;

View File

@ -0,0 +1,44 @@
/*
* Author: ViperMaul
* Unload a person from a vehicle, local
*
* Arguments:
* 0: unit <OBJECT>
*
* Return Value:
* Returns true if succesfully unloaded person <BOOL>
*
* Public: No
*/
//#define DEBUG_MODE_FULL
#include "script_component.hpp"
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson))
private ["_vehicle", "_loaded", "_emptyPos"];
PARAMS_1(_unit);
_vehicle = vehicle _unit;
if (_vehicle == _unit) exitwith {false;};
if !(speed _vehicle <1 && (((getpos _vehicle) select 2) < 2)) exitwith {false;};
_emptyPos = ((getPos _vehicle) findEmptyPosition [0, 10, typeof _unit]);
if (count _emptyPos == 0) exitwith {false};
_unit setPos _emptyPos;
unassignVehicle _unit;
if (!alive _unit) then {
_unit action ["Eject", vehicle _unit];
};
[_unit, false, GROUP_SWITCH_ID, side group _unit] call FUNC(switchToGroupSide);
_loaded = _vehicle getvariable [QGVAR(loaded_persons),[]];
_loaded = _loaded - [_unit];
_vehicle setvariable [QGVAR(loaded_persons),_loaded,true];
if (!([_unit] call FUNC(isAwake))) then {
[_unit,([_unit] call FUNC(getDeathAnim)), 1, true] call FUNC(doAnimation);
};
true;

View File

@ -1,36 +1,37 @@
/*
* Author: esteldunedain
*
* Executes a code once with a given game time delay, using a PFH
* Executes a code once with a given game ACE_time delay, using a PFH
*
* Argument:
* 0: Code to execute (Code)
* 1: Parameters to run the code with (Array)
* 2: Delay in seconds before executing the code (Number)
* 3: Interval of time in which the execution is evaluated, 0 means every frame (Number)
*
* Return value:
* PFH handler ID
* None
*
* Example:
* [{(_this select 0) setVelocity [0,0,200];}, [player], 10] call ace_common_fnc_waitAndExecute
*
* Public: No
*/
#include "script_component.hpp"
PARAMS_4(_func,_params,_delay,_interval);
PARAMS_3(_func,_params,_delay);
[
{
EXPLODE_2_PVT(_this,_params,_pfhId);
EXPLODE_2_PVT(_params,_delayedExecParams,_startTime);
EXPLODE_3_PVT(_delayedExecParams,_func,_funcParams,_delay);
GVAR(waitAndExecArray) pushBack [(ACE_time + _delay), _func, _params];
GVAR(waitAndExecArray) sort true;
// Exit if the time was not reached yet
if (time < _startTime + _delay) exitWith {};
// Remove the PFH
[_pfhId] call cba_fnc_removePerFrameHandler;
// Execute the function
_funcParams call _func;
},
_interval,
[_this, time]
] call CBA_fnc_addPerFrameHandler
if ((count GVAR(waitAndExecArray)) == 1) then {
[{
while {((count GVAR(waitAndExecArray)) > 0) && {((GVAR(waitAndExecArray) select 0) select 0) <= ACE_Time}} do {
private ["_entry"];
_entry = GVAR(waitAndExecArray) deleteAt 0;
(_entry select 2) call (_entry select 1);
};
if ((count GVAR(waitAndExecArray)) == 0) then {
[(_this select 1)] call cba_fnc_removePerFrameHandler;
};
}, 0, []] call CBA_fnc_addPerFrameHandler;
};

View File

@ -473,54 +473,67 @@
<Key ID="STR_ACE_Common_CheckPBO_DisplayName">
<English>Check PBOs</English>
<Polish>Sprawdzaj PBO</Polish>
<Spanish>Comprobar PBOs</Spanish>
</Key>
<Key ID="STR_ACE_Common_CheckPBO_Description">
<English></English>
<Polish>Sprawdzaj spójność addonów z serwerem</Polish>
<Spanish>Este módulo verifica la integridad de los addons con los que iniciamos el simulador</Spanish>
</Key>
<Key ID="STR_ACE_Common_CheckPBO_Action_DisplayName">
<English>Action</English>
<Polish>Akcja</Polish>
<Spanish>Acción</Spanish>
</Key>
<Key ID="STR_ACE_Common_CheckPBO_Action_Description">
<English>What to do with people who do not have the right PBOs?</English>
<Polish>Co zrobić z graczami, którzy nie mają właściwych PBO?</Polish>
<Spanish>¿Qué hacer con la gente que no tiene correctamente los PBOs?</Spanish>
</Key>
<Key ID="STR_ACE_Common_CheckPBO_Action_WarnOnce">
<English>Warn once</English>
<Polish>Ostrzeż raz</Polish>
<Spanish>Avisar una vez</Spanish>
</Key>
<Key ID="STR_ACE_Common_CheckPBO_Action_WarnPerm">
<English>Warn (permanent)</English>
<Polish>Ostrzeżenie (permanentne)</Polish>
<Spanish>Avisar (permanente)</Spanish>
</Key>
<Key ID="STR_ACE_Common_CheckPBO_Action_Kick">
<English>Kick</English>
<Polish>Kick</Polish>
<Spanish>Expulsar</Spanish>
</Key>
<Key ID="STR_ACE_Common_CheckPBO_CheckAll_DisplayName">
<English>Check all addons</English>
<Polish>Sprawdź wsz. addony</Polish>
<Spanish>Comprobar todos los addons</Spanish>
</Key>
<Key ID="STR_ACE_Common_CheckPBO_CheckAll_Description">
<English>Check all addons instead of only those of ACE?</English>
<Polish>Sprawdzaj wszystkie addony czy tylko te z ACE?</Polish>
<Spanish>Comprobar todos los addons en vez de solo los del ACE</Spanish>
</Key>
<Key ID="STR_ACE_Common_CheckPBO_Whitelist_DisplayName">
<English>Whitelist</English>
<Polish>Biała lista</Polish>
<Spanish>Lista blanca</Spanish>
</Key>
<Key ID="STR_ACE_Common_CheckPBO_Whitelist_Description">
<English>What addons are allowed regardless?</English>
<Polish>Jakie addony są dozwolone?</Polish>
<Spanish>Qué addons están permitidos igualmente</Spanish>
</Key>
<Key ID="STR_ACE_Common_LSDVehicles_DisplayName">
<English>LSD Vehicles</English>
<Polish>Pojazdy LSD</Polish>
<Spanish>Vehículos LSD</Spanish>
</Key>
<Key ID="STR_ACE_Common_LSDVehicles_Description">
<English>Adds LSD effect to synchronized vehicle</English>
<Polish>Dodaje efekt LSD pod zsynchronizowany pojazd</Polish>
<Spanish>Añade el efecto LSD al vehículo sincronizado</Spanish>
</Key>
</Package>
</Project>

View File

@ -64,7 +64,7 @@ if (isNull _holder) then {
if (isNull _holder) exitWith {
[_caller, _target, "Debug: Null Holder"] call FUNC(eventTargetFinish);
};
//Make sure only one drop operation at a time (using PFEH system as a queue)
//Make sure only one drop operation at a ACE_time (using PFEH system as a queue)
if (_holder getVariable [QGVAR(holderInUse), false]) exitWith {
[{
_this call FUNC(disarmDropItems);
@ -178,7 +178,7 @@ if (_holderIsEmpty) then {
_needToRemoveVest = ((vest _target) != "") && {(vest _target) in _listOfItemsToRemove};
_needToRemoveUniform = ((uniform _target) != "") && {(uniform _target) in _listOfItemsToRemove};
if ((time < _maxWaitTime) && {[_target] call FUNC(canBeDisarmed)} && {_needToRemoveWeapon || _needToRemoveMagazines || _needToRemoveBackpack}) then {
if ((ACE_time < _maxWaitTime) && {[_target] call FUNC(canBeDisarmed)} && {_needToRemoveWeapon || _needToRemoveMagazines || _needToRemoveBackpack}) then {
//action drop weapons (keeps loaded magazine and attachements)
{
if (_x in _listOfItemsToRemove) then {
@ -234,7 +234,7 @@ if (_holderIsEmpty) then {
clearItemCargoGlobal _holder;
};
//Verify we didn't timeout waiting on drop action
if (time >= _maxWaitTime) exitWith {
if (ACE_time >= _maxWaitTime) exitWith {
_holder setVariable [QGVAR(holderInUse), false];
[_caller, _target, "Debug: Drop Actions Timeout"] call FUNC(eventTargetFinish);
};
@ -264,4 +264,4 @@ if (_holderIsEmpty) then {
[_caller, _target, ""] call FUNC(eventTargetFinish);
};
}, 0.0, [_caller,_target, _listOfItemsToRemove, _holder, _holderIsEmpty, (time + TIME_MAX_WAIT), _doNotDropAmmo, _targetMagazinesEnd]] call CBA_fnc_addPerFrameHandler;
}, 0.0, [_caller,_target, _listOfItemsToRemove, _holder, _holderIsEmpty, (ACE_time + TIME_MAX_WAIT), _doNotDropAmmo, _targetMagazinesEnd]] call CBA_fnc_addPerFrameHandler;

View File

@ -22,4 +22,4 @@ PARAMS_3(_caller,_target,_errorMsg);
if (_caller != ACE_player) exitWith {};
systemChat format ["Debug-Caller: Disarm finished from [%1] with code [%2]", _target, _errorMsg];
diag_log text format ["[ACE_Disarming] %1 - eventCallerFinish: %2", time, _this];
diag_log text format ["[ACE_Disarming] %1 - eventCallerFinish: %2", ACE_time, _this];

View File

@ -21,6 +21,6 @@
PARAMS_3(_caller,_target,_errorMsg);
if (_errorMsg != "") then {
diag_log text format ["[ACE_Disarming] %1 - eventTargetFinish: %2", time, _this];
diag_log text format ["[ACE_Disarming] %1 - eventTargetFinish: %2", ACE_time, _this];
["DisarmDebugCallback", [_caller], [_caller, _target, _errorMsg]] call EFUNC(common,targetEvent);
};

View File

@ -1,5 +1,5 @@
#define COMPONENT disposable
#include "\z\ace\Addons\main\script_mod.hpp"
#include "\z\ace\addons\main\script_mod.hpp"
#ifdef DEBUG_ENABLED_ATTACH
#define DEBUG_MODE_FULL
@ -9,4 +9,4 @@
#define DEBUG_SETTINGS DEBUG_SETTINGS_ATTACH
#endif
#include "\z\ace\Addons\main\script_macros.hpp"
#include "\z\ace\addons\main\script_macros.hpp"

View File

@ -2,7 +2,7 @@
#include "script_component.hpp"
#ifdef DEBUG_ENABLED_DRAGGING
systemChat format ["%1 carryObjectPFH running", time];
systemChat format ["%1 carryObjectPFH running", ACE_time];
#endif
private ["_unit", "_target"];

View File

@ -2,7 +2,7 @@
#include "script_component.hpp"
#ifdef DEBUG_ENABLED_DRAGGING
systemChat format ["%1 dragObjectPFH running", time];
systemChat format ["%1 dragObjectPFH running", ACE_time];
#endif
private ["_unit", "_target"];

View File

@ -26,7 +26,7 @@ if (_weight > GETMVAR(ACE_maxWeightCarry,1E11)) exitWith {
};
private "_timer";
_timer = time + 5;
_timer = ACE_time + 5;
// handle objects vs persons
if (_target isKindOf "CAManBase") then {
@ -46,7 +46,7 @@ if (_target isKindOf "CAManBase") then {
[_unit, "AcinPknlMstpSnonWnonDnon_AcinPercMrunSnonWnonDnon", 2, true] call EFUNC(common,doAnimation);
[_target, "AinjPfalMstpSnonWrflDnon_carried_Up", 2, true] call EFUNC(common,doAnimation);
_timer = time + 15;
_timer = ACE_time + 15;
} else {
@ -62,7 +62,7 @@ if (_target isKindOf "CAManBase") then {
[_unit, _target, true] call EFUNC(common,claim);
// prevents draging and carrying at the same time
// prevents draging and carrying at the same ACE_time
_unit setVariable [QGVAR(isCarrying), true, true];
// required for aborting animation

View File

@ -2,7 +2,7 @@
#include "script_component.hpp"
#ifdef DEBUG_ENABLED_DRAGGING
systemChat format ["%1 startCarryPFH running", time];
systemChat format ["%1 startCarryPFH running", ACE_time];
#endif
private ["_unit", "_target", "_timeOut"];
@ -24,13 +24,13 @@ if ((!([_target] call EFUNC(common,isAlive))) || {(_unit distance _target) > 10}
// handle persons vs objects
if (_target isKindOf "CAManBase") then {
if (time > _timeOut) exitWith {
if (ACE_time > _timeOut) exitWith {
[_unit, _target] call FUNC(carryObject);
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
} else {
if (time > _timeOut) exitWith {
if (ACE_time > _timeOut) exitWith {
[_this select 1] call CBA_fnc_removePerFrameHandler;
// drop if in timeout

View File

@ -48,7 +48,7 @@ if (_target isKindOf "CAManBase") then {
[_target, "AinjPpneMrunSnonWnonDb_grab", 2, true] call EFUNC(common,doAnimation);
};
// prevents draging and carrying at the same time
// prevents draging and carrying at the same ACE_time
_unit setVariable [QGVAR(isDragging), true, true];
[FUNC(startDragPFH), 0.2, [_unit, _target, time + 5]] call CBA_fnc_addPerFrameHandler;
[FUNC(startDragPFH), 0.2, [_unit, _target, ACE_time + 5]] call CBA_fnc_addPerFrameHandler;

View File

@ -2,7 +2,7 @@
#include "script_component.hpp"
#ifdef DEBUG_ENABLED_DRAGGING
systemChat format ["%1 startDragPFH running", time];
systemChat format ["%1 startDragPFH running", ACE_time];
#endif
private ["_unit", "_target", "_timeOut"];
@ -22,8 +22,8 @@ if ((!([_target] call EFUNC(common,isAlive))) || {(_unit distance _target) > 10}
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
// timeout. Do nothing. Quit. time, because anim length is linked to ingame time.
if (time > _timeOut) exitWith {
// timeout. Do nothing. Quit. ACE_time, because anim length is linked to ingame ACE_time.
if (ACE_time > _timeOut) exitWith {
[_this select 1] call CBA_fnc_removePerFrameHandler;
// drop if in timeout

View File

@ -66,21 +66,28 @@ class CfgAmmo {
soundActivation[] = {"", 0, 0, 0};
soundDeactivation[] = {"", 0, 0, 0};
};
/*
class DemoCharge_Remote_Ammo_Scripted:DemoCharge_Remote_Ammo;
class SatchelCharge_Remote_Ammo_Scripted:SatchelCharge_Remote_Ammo;
TODO: Configure IEDs to use the system.
class IEDLandBig_Remote_Ammo:PipeBombBase{
triggerWhenDestroyed = 1;
};
class IEDLandSmall_Remote_Ammo:PipeBombBase{
triggerWhenDestroyed = 1;
};
/*class DemoCharge_Remote_Ammo_Scripted: DemoCharge_Remote_Ammo;
class SatchelCharge_Remote_Ammo_Scripted: SatchelCharge_Remote_Ammo;*/
class IEDUrbanBig_Remote_Ammo: PipeBombBase {
mineTrigger = "RangeTrigger";
triggerWhenDestroyed = 1;
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.562341, 1, 40};
};
class IEDLandBig_Remote_Ammo: PipeBombBase {
mineTrigger = "RangeTrigger";
triggerWhenDestroyed = 1;
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.562341, 1, 40};
};
class IEDUrbanSmall_Remote_Ammo: PipeBombBase {
mineTrigger = "RangeTrigger";
triggerWhenDestroyed = 1;
};*/
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.562341, 1, 40};
};
class IEDLandSmall_Remote_Ammo: PipeBombBase {
mineTrigger = "RangeTrigger";
triggerWhenDestroyed = 1;
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.562341, 1, 40};
};
};

View File

@ -99,29 +99,51 @@ class CfgMagazines {
class IEDUrbanBig_Remote_Mag: DemoCharge_Remote_Mag {
ACE_SetupObject = "ACE_Explosives_Place_IEDUrbanBig";
class ACE_Triggers {
SupportedTriggers[] = {"Command","DeadmanSwitch", "Cellphone"};
SupportedTriggers[] = {"Command","DeadmanSwitch", "Cellphone", "PressurePlate"};
class Command {
FuseTime = 0.5;
};
class DeadmanSwitch:Command {};
class Cellphone:Command {};
class PressurePlate {
displayName = $STR_ACE_Explosives_SLAME_Magnetic;
digDistance = 0;
ammo = "IEDUrbanBig_Remote_Ammo";
pitch = 0;
};
};
};
class IEDLandBig_Remote_Mag: IEDUrbanBig_Remote_Mag {
ACE_SetupObject = "ACE_Explosives_Place_IEDLandBig";
class ACE_Triggers: ACE_Triggers {
class PressurePlate: PressurePlate {
ammo = "IEDLandBig_Remote_Ammo";
};
};
};
class IEDUrbanSmall_Remote_Mag: DemoCharge_Remote_Mag {
ACE_SetupObject = "ACE_Explosives_Place_IEDUrbanSmall";
class ACE_Triggers {
SupportedTriggers[] = {"Command","DeadmanSwitch", "Cellphone"};
SupportedTriggers[] = {"Command","DeadmanSwitch", "Cellphone", "PressurePlate"};
class Command {
FuseTime = 0.5;
};
class DeadmanSwitch: Command {};
class Cellphone: Command {};
class PressurePlate {
displayName = $STR_ACE_Explosives_SLAME_Magnetic;
digDistance = 0;
ammo = "IEDUrbanSmall_Remote_Ammo";
pitch = 0;
};
};
};
class IEDLandSmall_Remote_Mag: IEDUrbanSmall_Remote_Mag {
ACE_SetupObject = "ACE_Explosives_Place_IEDLandSmall";
class ACE_Triggers: ACE_Triggers {
class PressurePlate: PressurePlate {
ammo = "IEDLandSmall_Remote_Ammo";
};
};
};
};

View File

@ -14,6 +14,28 @@
* Public: No
*/
#include "script_component.hpp"
//Start up a PFEH that scans all mines/explosives without defuseObjects attached and adds them
//Handles Editor Placed / Zeus / Scripted
if (isServer) then {
[{
private ["_explosive", "_helpers", "_defuseHelper"];
{
_explosive = _x;
_helpers = {
((typeOf _x) == "ACE_DefuseObject") && {(_x getVariable [QGVAR(Explosive), objNull]) == _explosive}
} count (attachedObjects _explosive);
if (_helpers == 0) then {
TRACE_3("Explosive without helper",_explosive,(getPosAsl _explosive),(typeOf _explosive));
_defuseHelper = createVehicle ["ACE_DefuseObject", (getPos _explosive), [], 0, "NONE"];
_defuseHelper attachTo [_explosive, [0,0,0], ""];
_defuseHelper setVariable [QGVAR(Explosive),_explosive,true];
};
} forEach allMines;
}, 5, []] call CBA_fnc_addPerFrameHandler;
};
if !(hasInterface) exitWith {};
GVAR(PlacedCount) = 0;
GVAR(Setup) = objNull;

View File

@ -7,7 +7,7 @@
* 1: Max range (-1 to ignore) <NUMBER>
* 2: Explosive <ARRAY>
* 0: Explosive <OBJECT>
* 1: Fuse time <NUMBER>
* 1: Fuse ACE_time <NUMBER>
*
* Return Value:
* None

View File

@ -25,6 +25,8 @@ private ["_ammo", "_explosive", "_attachedTo", "_expPos", "_magazineTrigger"];
EXPLODE_6_PVT(_this,_unit,_pos,_dir,_magazineClass,_triggerConfig,_triggerSpecificVars);
DEFAULT_PARAM(6,_setupPlaceholderObject,objNull);
_unit playActionNow "PutDown";
_attachedTo = objNull;
if (!isNull _setupPlaceholderObject) then {
_attachedTo = attachedTo _setupPlaceholderObject;

View File

@ -42,5 +42,5 @@ _player setVariable [QGVAR(PlantingExplosive), true];
[{_this setVariable [QGVAR(PlantingExplosive), false]}, _player, 1.5, 0.5] call EFUNC(common,waitAndExecute);
_setup addEventHandler ["EpeContactStart", FUNC(onLanded)];
_setup enableSimulationGlobal true;
_player playActionNow "MedicOther";
_player playActionNow "PutDown";
_player removeMagazine (_setup getVariable [QGVAR(Class), ""]);

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Explosives">
<Key ID="STR_ACE_Explosives_Menu">
@ -508,22 +508,27 @@
<Key ID="STR_ACE_Explosive_Module_DisplayName">
<English>Explosive System</English>
<Polish>System ładunków wybuchowych</Polish>
<Spanish>Sistema de explosivos</Spanish>
</Key>
<Key ID="STR_ACE_Explosive_RequireSpecialist_DisplayName">
<English>Require specialists?</English>
<Polish>Wymagaj specjalistów?</Polish>
<Spanish>¿Requiere especialista?</Spanish>
</Key>
<Key ID="STR_ACE_Explosive_RequireSpecialist_Description">
<English>Require explosive specialists to disable explosives? Default: No</English>
<Polish>Wymagać saperów do rozbrajania ładunków wybuchowych? Domyślnie: Nie</Polish>
<Spanish>Requiere especialista en explosivos para desactivar explosivos?. Por defecto: No</Spanish>
</Key>
<Key ID="STR_ACE_Explosive_PunishNonSpecialists_DisplayName">
<English>Punish non-specialists?</English>
<Polish>Karaj nie-specjalistów?</Polish>
<Spanish>¿Penalizar a los no especialistas?</Spanish>
</Key>
<Key ID="STR_ACE_Explosive_PunishNonSpecialists_Description">
<English>Increase the time it takes to complete actions for non-specialists? Default: Yes</English>
<Polish>Zwiększyć ilość wymaganego czasu do ukończenia akcji dla nie-specjalistów? Domyślnie: Tak</Polish>
<Spanish>Aumenta el tiempo que lleva completar acciones para los no especialstas?. Por defecto: Si</Spanish>
</Key>
<Key ID="STR_ACE_Explosive_Module_Description">
<English></English>

View File

@ -1,7 +1,7 @@
#include "script_component.hpp"
GVAR(enabled) = false;
GVAR(time) = 0;
GVAR(ACE_time) = 0;
GVAR(position) = [0,0,0];
if (!hasInterface) exitWith {};

View File

@ -19,7 +19,7 @@
#include "script_component.hpp"
#define PRECISION 0.1
private ["_distance","_angleTarget","_maxElev","_initSpeed","_airFriction","_timeToLive","_timeToLive","_simulationStep","_angle","_posTargetX","_posTargetY","_posX","_posY","_velocityX","_velocityY","_velocityMagnitude"];
private ["_distance", "_angleTarget", "_maxElev", "_initSpeed", "_airFriction", "_timeToLive", "_simulationStep", "_angle1", "_angle2", "_it2", "_f1", "_f2", "_temp", "_it1", "_angle"];
_distance = _this select 0;
_angleTarget = _this select 1;
@ -32,7 +32,7 @@ _simulationStep = _this select 6;
if (_simulationStep == 0) exitWith {_angleTarget};
FUNC(traceBullet) = {
private ["_distance", "_angleTarget", "_maxElev", "_initSpeed", "_airFriction", "_timeToLive", "_simulationStep", "_angle", "_posTargetX", "_posTargetY", "_posX", "_posY", "_velocityX", "_velocityY", "_velocityMagnitude"];
private ["_distance", "_angleTarget", "_maxElev", "_initSpeed", "_airFriction", "_timeToLive", "_simulationStep", "_angle", "_posTargetX", "_posTargetY", "_posX", "_posY", "_velocityX", "_velocityY", "_velocityMagnitude", "_i"];
_distance = _this select 0;
_angleTarget = _this select 1;

View File

@ -1,4 +1,7 @@
// by commy2
#include "script_component.hpp"
private ["_vehicle", "_projectile", "_zeroing", "_position", "_subMunition"];
_vehicle = _this select 0 select 0;
_projectile = _this select 0 select 1;

View File

@ -22,7 +22,7 @@ _distance = call FUNC(getRange);
if !(!GVAR(enabled) && FUNC(canUseFCS)) exitWith {};
GVAR(Enabled) = true;
GVAR(Time) = time;
GVAR(Time) = ACE_time;
if (_distance == 0) then {
_distance = [5, 5000, 0] call EFUNC(common,getTargetDistance); // maximum distance: 5000m, 5m precision

View File

@ -12,7 +12,7 @@
#include "script_component.hpp"
private ["_vehicle", "_turret", "_turretConfig", "_distance", "_weapons", "_magazines", "_showHint", "_playSound"];
private ["_vehicle", "_turret", "_turretConfig", "_distance", "_weapons", "_magazines", "_showHint", "_playSound", "_i"];
_vehicle = _this select 0;
_turret = _this select 1;
@ -60,7 +60,7 @@ private ["_movingAzimuth", "_posTarget", "_velocityTarget"];
// MOVING TARGETS
_movingAzimuth = 0;
if (time - GVAR(time) > 1 and GVAR(time) != -1 and count _this < 3) then {
if (ACE_time - GVAR(ACE_time) > 1 and GVAR(ACE_time) != -1 and count _this < 3) then {
// calculate speed of target
_posTarget = [
(getPos _vehicle select 0) + _distance * (_weaponDirection select 0),
@ -68,14 +68,14 @@ if (time - GVAR(time) > 1 and GVAR(time) != -1 and count _this < 3) then {
(getPos _vehicle select 2) + _distance * (_weaponDirection select 2)
];
_velocityTarget = [
((_posTarget select 0) - (GVAR(position) select 0)) / (time - GVAR(time)),
((_posTarget select 1) - (GVAR(position) select 1)) / (time - GVAR(time)),
((_posTarget select 2) - (GVAR(position) select 2)) / (time - GVAR(time))
((_posTarget select 0) - (GVAR(position) select 0)) / (ACE_time - GVAR(ACE_time)),
((_posTarget select 1) - (GVAR(position) select 1)) / (ACE_time - GVAR(ACE_time)),
((_posTarget select 2) - (GVAR(position) select 2)) / (ACE_time - GVAR(ACE_time))
];
private ["_magazineType", "_ammoType", "_initSpeed", "_airFriction", "_timeToLive", "_simulationStep", "_initSpeedCoef", "_velocityMagnitude"];
// estimate time to target
// estimate ACE_time to target
_magazineType = _vehicle currentMagazineTurret _turret;
_ammoType = getText (configFile >> "CfgMagazines" >> _magazineType >> "ammo");
_initSpeed = getNumber (configFile >> "CfgMagazines" >> _magazineType >> "initSpeed");
@ -130,7 +130,7 @@ if (time - GVAR(time) > 1 and GVAR(time) != -1 and count _this < 3) then {
};
};
GVAR(enabled) = false;
GVAR(time) = -1;
GVAR(ACE_time) = -1;
private ["_viewDiff", "_FCSAzimuth", "_FCSMagazines", "_FCSElevation"];

View File

@ -1,5 +1,5 @@
#define COMPONENT fcs
#include "\z\ace\Addons\main\script_mod.hpp"
#include "\z\ace\addons\main\script_mod.hpp"
#ifdef DEBUG_ENABLED_FCS
#define DEBUG_MODE_FULL
@ -9,4 +9,4 @@
#define DEBUG_SETTINGS DEBUG_SETTINGS_FCS
#endif
#include "\z\ace\Addons\main\script_macros.hpp"
#include "\z\ace\addons\main\script_macros.hpp"

View File

@ -1,5 +1,5 @@
#define COMPONENT fcs
#include "\z\ace\Addons\main\script_mod.hpp"
#include "\z\ace\addons\main\script_mod.hpp"
#ifdef DEBUG_ENABLED_FCS
#define DEBUG_MODE_FULL
@ -9,4 +9,4 @@
#define DEBUG_SETTINGS DEBUG_SETTINGS_FCS
#endif
#include "\z\ace\Addons\main\script_macros.hpp"
#include "\z\ace\addons\main\script_macros.hpp"

0
addons/fonts/$NOBIN$ Normal file
View File

1
addons/fonts/$PBOPREFIX$ Normal file
View File

@ -0,0 +1 @@
z\ace\addons\fonts

View File

@ -0,0 +1,39 @@
class CfgFontFamilies
{
class PixelSplitterBold
{
fonts[] = { PATHTOF(PixelSplitterBold\PixelSplitterBold6),
PATHTOF(PixelSplitterBold\PixelSplitterBold7),
PATHTOF(PixelSplitterBold\PixelSplitterBold8),
PATHTOF(PixelSplitterBold\PixelSplitterBold9),
PATHTOF(PixelSplitterBold\PixelSplitterBold10),
PATHTOF(PixelSplitterBold\PixelSplitterBold11),
PATHTOF(PixelSplitterBold\PixelSplitterBold12),
PATHTOF(PixelSplitterBold\PixelSplitterBold13),
PATHTOF(PixelSplitterBold\PixelSplitterBold14),
PATHTOF(PixelSplitterBold\PixelSplitterBold15),
PATHTOF(PixelSplitterBold\PixelSplitterBold16),
PATHTOF(PixelSplitterBold\PixelSplitterBold17),
PATHTOF(PixelSplitterBold\PixelSplitterBold18),
PATHTOF(PixelSplitterBold\PixelSplitterBold19),
PATHTOF(PixelSplitterBold\PixelSplitterBold20),
PATHTOF(PixelSplitterBold\PixelSplitterBold21),
PATHTOF(PixelSplitterBold\PixelSplitterBold22),
PATHTOF(PixelSplitterBold\PixelSplitterBold23),
PATHTOF(PixelSplitterBold\PixelSplitterBold24),
PATHTOF(PixelSplitterBold\PixelSplitterBold25),
PATHTOF(PixelSplitterBold\PixelSplitterBold26),
PATHTOF(PixelSplitterBold\PixelSplitterBold27),
PATHTOF(PixelSplitterBold\PixelSplitterBold28),
PATHTOF(PixelSplitterBold\PixelSplitterBold29),
PATHTOF(PixelSplitterBold\PixelSplitterBold30),
PATHTOF(PixelSplitterBold\PixelSplitterBold31),
PATHTOF(PixelSplitterBold\PixelSplitterBold34),
PATHTOF(PixelSplitterBold\PixelSplitterBold35),
PATHTOF(PixelSplitterBold\PixelSplitterBold37),
PATHTOF(PixelSplitterBold\PixelSplitterBold46)
};
spaceWidth = 0.5;
spacing = 0.065;
};
};

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More